#clashroyaleofficial

1 messages · Page 1 of 1 (latest)

lucid sandalBOT
kindred sapphire
#

Which webhook event(s) are you listening for currently?

forest birch
#

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

kindred sapphire
#

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

forest birch
#

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?

kindred sapphire
kindred sapphire
forest birch
#

Thank you!