#cgy

1 messages · Page 1 of 1 (latest)

feral moonBOT
slow crown
#

For initial successful subscription with Checkout Session, you may listen to checkout.session.completed event.

For future recurring payment, you may listen to invoice.paid event for successful payment

feral moonBOT
quasi panther
#

The payment_intent.succeeded event and invoice.paid sounds like the same. Can I listen to invoice.paid only ?

dull ruin
#

Hi @quasi panther Yes you can rely on invoice.paid only. But I'd recommend you to listening to more events to make your integration more resilient in case invoice.paid is not sent.

quasi panther
#

Ok , Jack Tan. Thank you for your suggesstion.

#

@dull ruin I check the envent , when checkout.session.completed, I didn't find "paymentIntentId" in Session Object, so when the next event payment_intent.succeeded, how can I find this one belongs to which

dull ruin
#

Is it a subscription mode checkout session?

quasi panther
#

Yes

#

I use low-code form your docs

#

It's more easy for me

#

I use this one

dull ruin
#

OK, so for subscription mode checkout session, you don't get the paymentIntent from the checkout session directly. It's located at checkoutSession->subscription->latest_invoice->payment_intent.

quasi panther
#

I try to understande it and translate your word into Chinese. But I don't understand very well about "you don't get the paymentIntent from the subscription directly" . Is this means I should first get a paymentIntentId form invoice.paid or some other envents ?

dull ruin
#

Sorry, I mean you don't get the paymentIntent from the checkout session directly.

quasi panther
#

OK, so I just listen to invoice.paid

#

But I think there have a little about what you said. Let me show you. I am not sure yet