#shaharyarilyas
1 messages · Page 1 of 1 (latest)
Hello! You would need to write code to do that. Are you a developer?
yes
I recommend you set up a Webhook Endpoint to listen for payment_intent.succeeded Events. When you receive those Events you can update the Payment Intent with the metadata you want to add.
There's some sample code for setting up a Webhook Endpoint and veriying signatures here: https://stripe.com/docs/webhooks#verify-official-libraries
@clever quiver One question which key in the paymentIntent data shows this payment was created from payment link because i have multiple ways for creating paymentIntent like tap-to-pay and wisepad3.
In that case you probably want to listen for checkout.session.completed instead. That will give you the Checkout Session created by the Payment Link instead of the lower-level Payment Intent.
The Checkout session has a payment_link property populated if it was created with a Payment Link: https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-payment_link
And it also has a payment_intent property: https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-payment_intent
Thanks, it will helpful for me