#dan-checkout-webhook

1 messages · Page 1 of 1 (latest)

brave meteorBOT
eager wasp
#

dan-checkout-webhook

#

There's no way for you to control the metadata that will be put on the PaymentIntent associated to an Invoice associated to a Subscription

regal frost
#

is checkout.session.completed equivalent to payment_intent.succeeded in my usecase of working only with subscriptions?

tidal trellis
#

Hi there 👋 taking over, as my colleague needs to step away

For Subscriptions, you would want to use invoice.paid for fulfillment, since obviously checkout.session.completed will only fire for Checkout (e.g. the first time someone uses Checkout to create a Subscription payment)

eager wasp
#

I mean no. You should still use checkout.session.completed for the first part

brave meteorBOT
regal frost
#

Oh I see, so then invoice.paid would cover the first time and all subsequent times as well, correct?

eager wasp
#

yes, but I would personally still do fulfillment on checkout.session.completed for the first Invoice/Subscription creation

regal frost
#

oh ok what's the reason for that?

eager wasp
#

because you send them to Checkout, you should be looking at their Session completion, the created Subscription, etc. Getting invoice.paid and having no record of that Subscription or where it came from will make your code go "huh wtf"