#nicolas-fernandez-falco_api

1 messages ¡ Page 1 of 1 (latest)

blazing groveBOT
untold raftBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

blazing groveBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1248263089221009453

📝 Have more to share? Add details, code, screenshots, videos, etc. below.

teal scroll
#

Hello

ancient jasper
#

Hello

teal scroll
#

Hmm I don't think AvailableOn should have been removed

#

But checking

ancient jasper
#

As I mentioned, I'm upgrading from 39.121 to 44.10. In my API we were using Stripe endpoint to fetch Balance Transaction List. In my old version the BalanceTransactionListOptions had a AvailableOn (DateRangeOptions) having the ability to filter "GreaterThan, LessThan" etc

#

In the new version those types were removed. In the Stripe Dotnet documentation they mentioned to start using AddExtraParam method with receives a key and a value

teal scroll
#

Ah you are correct

ancient jasper
#

I wanted to know how Stripe API is expecting to recieve thosse parameters.

teal scroll
#

Didn't realize we removed that in the SDK

ancient jasper
#

So, to put an example. I had the following piece of code:

stripePayoutListOptions.AvailableOn = new DateRangeOptions()
                {
                    GreaterThan = lastPayoutDate,
                    LessThan = payoutSummary.NextPayoutDate
                };
#

I'll guess that now it will have to be something like stripeBalanceListOptions.AddExtraParam("available_on_greater_than", lastPayoutDate);

#

wanted to know specifically the keys

teal scroll
#

Ah, yeah I believe what you just listed is correct but I'm not a dotnet dev. The best thing to do is test it out

ancient jasper
#

Yes, but aren't you able to confirm how that Stripe Endpoint is expecting to recieve the AvailableOn filters?

#

because In terms of Stripe dotnet it's clear that I have to use that AddExtraParam. Need to confirm which should be the keys for those parameters

teal scroll
#

Okay wait let's pause.

#

Sorry, I was moving a bit too fast above as helping multiple folks at once.

ancient jasper
#

Sure no worries!

teal scroll
#

The Stripe API does not allow listing Payouts by Balance Transaction Available On date. You can see the different parameters you can pass to the List Payouts API at https://docs.stripe.com/api/payouts/list

#

And looking at the AvaialbleOn property?

ancient jasper
#

mmmm no. I was using the balance transaction list endpoint. Sometimes I was performing the request using the type parameter to get specifically payouts, payments or just everything if I didn't specify the type

teal scroll
#

Okay okay I see. Yeah using AvailableOn in the BalanceTransactionListOptions is quite old so now I see what you mean.

Mostly when using AddExtraParam you should be just passing the exact same parameters that you were passing previously to the SDK before you upgraded. I can have someone check on what that is exactly here but the quickest way to figure this out is to test.

ancient jasper
#

Okay. Gotcha

#

So I just need to see what the SDK was translating that type into a the parameter key and re-use the same one right?

teal scroll
#

Yep

ancient jasper
#

Cool. I will downgrade my version to double check that

#

One more question.

teal scroll
#

Sure

ancient jasper
#

In the newer version of the SDK my payments intents don't have a Charge property, now they have a LatestCharge property. Based on what I read from the Documentation, the LatestCharge will be populated if it's specify in the request since it's a Expandable property

#

I did those changes meaning that I'm requesting specifically to add the LatestCharge but I have a doubt for the PaymentIntents webhooks

#

Now the payment intents events that my API is listening to doesn't have the LatestCharge, is there any way to establish that for the Webhooks events stripe populate the LatestCharge?

teal scroll
#

Yep for Webhooks you will want to retrieve the PaymentIntent in your handler so that you can expand LatestCharge

#

Unfortunately Webhooks can't expand, no.

ancient jasper
#

oh okay. Also the paymentIntent have a LatestChargeId

#

that one is always populated right?

#

Because what I'm doing it's fetching specifically the Charge since the payment intent I already have it based on the event

teal scroll
#

Yep that works fine too

#

Either retreiving the Charge or expanding LatestCharge on the PaymentIntent

#

Basically accomplishes the same thing

ancient jasper
#

Cool

#

Now yes, last question haha

#

In our Stripe account we have a Testing environment using sandbox

#

Today webhooks are usign 2019 API version. Now that I'm testing this upgrade on my local, I want to create new webhooks using the latest API version since I need to test those payloads since they will change with the new API version

#

I want to create new webhooks without impacting Test environment.

teal scroll
#

The Events will be sent to the Webhook endpoint based on its version

ancient jasper
#

Okay. Thanks

#

I double check on the previous SDK version and seems that the availableON Greater than for example it's send as available_on[gt]=

#

Can you confirm that?

teal scroll
#

That sounds right and mirrors what our other APIs do for greater than and less than

blazing groveBOT
ancient jasper
#

Cool. I'm trying to reproduce the last scenario that I have that uses LessThanOrEqual

#

what would be that? haha lte?

#

available_on[lte] or available_on[ltoe] ?

runic harness
#

Hi taking over as bismarck has to step out

#

What endpoint are you calling where you're passing available_on?

ancient jasper
#

List Balance Transaction

#

Hi!

runic harness
ancient jasper
#

No, it was removed from the API doc and Dotnet SDK. But they suggest continue using AddExtraParameter

runic harness
#

Ah ok so you're just on an older version?

#

I think it would be lte

#

But you can just try it out in test mode

ancient jasper
#

Exactly I'm moving from 39.121 to 44.10

#

Based on that the parameter was removed. But can you confirm that if I use the AddExtraParam sending available_on[gt] or available_on[lt] will filter the result?

runic harness
#

I thought you said you were using an older version?

#

If using the older version, you should still be able to use it

#

As my colleague mentioned, easiest way to verify is to just test this out

ancient jasper
#

I was. But I'm working on upgrade the Stripe version

#

So since I update the SDK version AvailableOn type was removed

#

The changelog library suggest to start using the AddExtraParameter but I wanted to confirm that Stripe endpoint will actually do something with those parameter if I add those to the request

runic harness
#

If using a newer api version, I don't think it'll work

#

But, again, just try it in test mode

ancient jasper
#

okay