#nicolas-fernandez-falco_automatic-async
1 messages ยท Page 1 of 1 (latest)
๐ 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/1249719837807087679
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
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-fernandez-falco_api, 3 days ago, 81 messages
- nicolas_dotnet-webhook, 5 days ago, 83 messages
Hi there ๐ automatic_async still performs the associated capture automatically, but it's moved to an asynchronous background style task to improve latency.
We discuss it, along with changes to expected behavior that your integration should be prepared for, in this guide:
https://docs.stripe.com/payments/payment-intents/asynchronous-capture?locale=id-ID
Please let me know if you've already seen that and it doesn't address your question.
Yes I understood that. In my previous implementation I was using "automatic" since that one was the previous default
My current payment intent flow was, the API creates the payment intent, a front-end later confirms that payment intent and later the our API it's waiting to listen for a PaymentIntent event webhook coming from Stripe
That flow still works fine with the automatic_async?
Likely, but it depends on the type of Events you're listening for and what you're looking for within them. Did you run into problems running your flow against the newer version in testmode?
nicolas-fernandez-falco_automatic-async
Yes, the change that I had to do was fetch the charge. In the previous version the payment intent event comes with a charge and now it has a latest_charge in null. So I had to add a request to fetch the lates charge once I listen to the webhook event
Maybe this is a silly question but would you explain me what's for the capture method? I understood the difference between the automatic and autmatic_async but I'm not sure I really understood what we are setting
Captuing a payment is the process of having the funds pull from the associated payment method. There are two parts to processing a payment:
- Confirmation - this is getting approval for the transaction to occur
- Capture - actually causing the transaction to happen
What type of Event(s) are you listening to there? I think I'd still expect latest_charge to be set before the capture occurs, but I might be mistaken. Do you have an example of an Event from your testing that I could take a closer look at?
Okay. Yes I have. With the old SDK or with the new one?
One that resulted from the use of automatic_async
This change applies only for payment intents right? For charges change something? I'm asking this since I have two invoices types. One is implemented with payment intents and the other still uses charges
pi_3PQ8AwJAejluIz2U0TjdXijy
Can you elaborate? Invoices use Payment Intents, Payment Intents use Charges, so I'm not really grasping how you could have an Invoice that only uses one or the other. Unless you aren't referring to our Invoice objects.
Events are not getting processed correctly since I'm testing the upgrade on my local machine and the sandbox is target to our Testing environment which is not yet upgraded
What Event related to this Payment Intent were you looking at? I see latest_charge seems to be populated in the payment_intent.succeeded Event it generated.
No, we don't use Stripe Invoices. I was refering that our API for one of those uses Payment Intents API and the other Charges API directly
Ah, gotcha
I already tested the Payment Intents flow on my local after I did the change I mentioned earlier (fetching the charge based on the latest_charge_id coming from the payment intent event) and it's working fine. Reading the documentation of stripe API changes I read the change in the capture_method and I'm not sure if I'm missing somethign
That's why I'm asking
If you've tested your flow against the new behavior and it's functioning as expected, then I think you're set. Let me know if I seem to be misunderstanding though and you are trying to ask about a problem you ran into during testing or behavior you saw there that you weren't expecting.
Cool. Yes I think that you can help me a little bit explaining more what the capture function is
Happy to, was there something unclear about what I described here? Or is there something else you're trying to understand?
It's not clear to me point number 2
I mean, I'm trying to understand when I'm doing that on my flow
You aren't, Stripe is, it's automatic.
So capture it's basically making the real transaction/payment after the customer confirm the payment intent?
Yes. Confirming the payment is when the issuer is contacted to make sure they approve the transaction, this is only an approval, no funds start moving yet. The capture step is when the transaction is actually triggered, funds begin moving at that point.
Typically you only need to worry about the capture step if you're explicitly splitting it out into a separate step, by using our Separate Authorization and Capture flow:
https://docs.stripe.com/payments/place-a-hold-on-a-payment-method
That's why it's only mentioned briefly in our doc explaining the lifecycle of an intent:
https://docs.stripe.com/payments/paymentintents/lifecycle#:~:text=instead move to-,requires_capture,-. In that case
because usually it happens automatically and isn't something you need to think about.
Gotcha. Then in my case since I''m not using the Separte Authorization and I was already listenting to the Payment Intents events throw the Webhooks I should be Ok right?
Yup, as long as your flow is still functioning when you test it against the new version I think you're set.
Thanks