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? Thanks
9 Replies
z
z2y ago
Pass metadata
Diogo
DiogoOP2y ago
The metadata is also attached to the checkout session
z
z2y ago
It will be if u listen to the webhooks
Diogo
DiogoOP2y ago
Is it possible that when the checkout is completed the payment is still processing?
z
z2y ago
there is a "pending" state in webhook so i assume so?
Diogo
DiogoOP2y ago
i dont think so
Diogo
DiogoOP2y ago
chip
chip2y ago
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 email
jingleberry
jingleberry2y ago
You can also pass client reference id which is any arbitrary string you can use to reconcile a successful checkout session with your own systems
Want results from more Discord servers?
Add your server