#nimby_09436

1 messages · Page 1 of 1 (latest)

carmine spearBOT
sacred finch
#

Can you share examples? Most likely, those checkout session must not have been completed yet

fallow wedge
#

I have one with "id": "cs_live_b1GPo1zUnJYJcpMS8YpIWv9fF3u3BrgyDrz7TbU32ByhIteK2ghvPssq0h" which also has status: completed

sacred finch
#

For subscriptions, I believe the payment intent is nested under the invoice object

fallow wedge
#

So if I was to use the invoice field within that checkout session to pull that invoice, I should be able to find a payment intent field that is always populated?

sacred finch
#

For subscriptions, yes. For one-time payments, you'd find it under payment_intent field on the Checkout Session

#

The ID of the PaymentIntent for Checkout Sessions in payment mode.

fallow wedge
#

Okay thank you. So if I am listening for payment_intent.succeeded, I should then check if the subscription field is null for the session, and can then progress dependent on whether or not it is a subscription?

sacred finch
fallow wedge
#

Thanks so much!