#nicolas-fernandez-falco_api
1 messages ¡ Page 1 of 1 (latest)
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.
- nicolas_dotnet-webhook, 1 day ago, 83 messages
đ 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.
Hello
Hello
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
Ah you are correct
I wanted to know how Stripe API is expecting to recieve thosse parameters.
Didn't realize we removed that in the SDK
But yeah you add it just like it shows in the github repo: https://github.com/stripe/stripe-dotnet/#parameters
Stripe.net is a sync/async .NET 4.6.1+ client, and a portable class library for stripe.com. - stripe/stripe-dotnet
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
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
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
Okay wait let's pause.
Sorry, I was moving a bit too fast above as helping multiple folks at once.
Sure no worries!
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
So if you were doing this previously, it sounds like you maybe were listing Balance Transactions by Payout (https://docs.stripe.com/api/balance_transactions/list#balance_transaction_list-payout) ?
And looking at the AvaialbleOn property?
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
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.
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?
Yep
Sure
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?
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.
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
Yep that works fine too
Either retreiving the Charge or expanding LatestCharge on the PaymentIntent
Basically accomplishes the same thing
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.
Sure you can create multiple endpoints with different versions: https://docs.stripe.com/api/webhook_endpoints/create#create_webhook_endpoint-api_version
The Events will be sent to the Webhook endpoint based on its version
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?
That sounds right and mirrors what our other APIs do for greater than and less than
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] ?
Hi taking over as bismarck has to step out
What endpoint are you calling where you're passing available_on?
I don't see available_on as a valid param for that endpoint: https://docs.stripe.com/api/balance_transactions/list
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
No, it was removed from the API doc and Dotnet SDK. But they suggest continue using AddExtraParameter
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
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?
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
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
If using a newer api version, I don't think it'll work
But, again, just try it in test mode
okay