#blindChicken

1 messages · Page 1 of 1 (latest)

velvet pawnBOT
native stag
#

You would have to explicitly update the Charge object to add in metadata to it. Why not listen for the invoice.paid event instead?

velvet pawnBOT
hard socket
native stag
#

You should really just use the checkout.session.succeeded event then. Why are you listening for other events if you just want to get to the Checkout Session?

hard socket
#

I'm new to using Stripe, so it's mostly ignorance, but I was under the impression that these event were distinct, and that it was possible to get checkout.session.succeeded but then the payment fails or something, and instead of getting charge.success I'd get charge.failed instead.

soft jungle
#

checkout.session.completed is once the Checkout flow is done, the invoice payment events are separate from that, so it depends what you want to track

hard socket
#

For right now, I need to know with certainty that the user has completed the checkout and payment has gone through. At some other point, (when I finished building the checkout flow on my app) I will then need to worry receipt of subsequent (monthly payments).

soft jungle
#

If you want to do that, when you get the checkout.session.completed you can retrieve the subscription and expand the latest_invoice property to check that the first invoice was paid