#clashroyaleofficial
1 messages · Page 1 of 1 (latest)
Which webhook event(s) are you listening for currently?
I'm new to webhooks but this is what I need:
client side payment with user ID
-> stripe processes payment (success)
-> stripe contacts my webhook endpoint [payment_intent.succeeded] AND passes user ID (??)
-> my backend does whatever it needs to do using the user ID
Then you'd use metadata that you can set on the Payment Intent: https://docs..stripe.com/api/metadata
And those key/values will be in the associated payment_intent.* events
Ohh ok nice. So this data goes straight into the payment_intent?
Is it good practice to use the same backend.php file that I use to create the payment intent, as the one which will manage webhooks?
Yes it's set on the object when you create/update the intent
I don't know really. Seems fine to have multiple routes like that in your application, but obviously you may need to refactor that as your applciation grows in complexity
Thank you!