#fractaldev-webhooks
1 messages · Page 1 of 1 (latest)
fractaldev-webhooks
Hello! Just to clarify - the piece you're missing here/wondering how to do is " After they finish purchasing on stripe I want a call back to my node backend", correct?
Have you looked into webhooks yet? https://stripe.com/docs/webhooks
Yes , I am not sure how to pass my user id there ?
How will stripe tell me which user paid?
@slim pawn
It depends on what events/apis you're working with - what are you using? Payment Intents? Checkout? Something else?
Idk which one I should use.
I think my scenario is pretty simple but couldn't figure out from docs
Basicly I want to pass a user id to stripe , then user pays on stripe in any way that I don't care then stripe tells me this user bought this product.
You can use any of our payment APIs to do this - you can include your user ID in the metadata, and you'll get that metadata back from the webhook event when payment is successful
So really, your first step would be to pick which ever API best suits your needs because any of them will work for the general use case you've laid out
What is the simplest payment api ?
Simplest (in terms of time to integrate) would probably be Checkout (https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=checkout)
can I use payment links? how can I pass metadata to there?
thanks for the help btw
btw
Yes, Payment Links should work as well
Is there a doc about passing metadata to payment links ? @slim pawn
I couldn't find
I don't know of any specific docs - you'd just set metadata when you create the Payment Link and it will be automatically copied over to the Checkout Session that gets created (see https://stripe.com/docs/api/payment_links/payment_links/create?event_types-payment_intent.payment_failed#create_payment_link-metadata)