#nicolas-fernandez-falco_automatic-async

1 messages ยท Page 1 of 1 (latest)

deep dragonBOT
#

๐Ÿ‘‹ 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.

empty tigerBOT
#

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.

manic cloak
#

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.

Learn how to use Asynchronous Capture to enable faster PaymentIntent confirmations.

runic crow
#

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?

manic cloak
#

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?

deep dragonBOT
#

nicolas-fernandez-falco_automatic-async

runic crow
#

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

manic cloak
#

Captuing a payment is the process of having the funds pull from the associated payment method. There are two parts to processing a payment:

  1. Confirmation - this is getting approval for the transaction to occur
  2. 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?

runic crow
#

Okay. Yes I have. With the old SDK or with the new one?

manic cloak
#

One that resulted from the use of automatic_async

runic crow
#

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

manic cloak
#

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.

runic crow
#

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

manic cloak
runic crow
#

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

manic cloak
#

Ah, gotcha

runic crow
#

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

manic cloak
#

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.

runic crow
#

Cool. Yes I think that you can help me a little bit explaining more what the capture function is

manic cloak
runic crow
#

It's not clear to me point number 2

#

I mean, I'm trying to understand when I'm doing that on my flow

manic cloak
#

You aren't, Stripe is, it's automatic.

runic crow
#

So capture it's basically making the real transaction/payment after the customer confirm the payment intent?

manic cloak
#

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.

runic crow
#

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?

manic cloak
#

Yup, as long as your flow is still functioning when you test it against the new version I think you're set.

runic crow
#

Thanks