Stripe: Create new user on payment success.
Hi everyone, im making a system where only the users who make a purchase have an account, i was trying to use the
invoice.paid
event but it does not give me the checkout name/email. The checkout.session.completed
gives me that information and the payment status, is it safe to assume that the payment will not be delayed and i can only listen to this event? Thanks9 Replies
Pass metadata
The metadata is also attached to the checkout session
It will be if u listen to the webhooks
Is it possible that when the checkout is completed the payment is still processing?
there is a "pending" state in webhook so i assume so?
i dont think so
checkout.session.completed
will not be emitted if a payment fails, so you can use it
You can use payment_intent.*
if you want to check if it fails
but you should be able to grab the customerId from invoice paid, so you could use that to get the name and emailYou can also pass client reference id which is any arbitrary string you can use to reconcile a successful checkout session with your own systems