#rvk
1 messages ยท Page 1 of 1 (latest)
Hi ๐ there are a couple ways to do this, but I think the easiest would be if you listened for checkout.session.completed Events instead. Those will contain the Checkout Session that was created from your Payment Link, which will have a payment_link field that points back to the Payment Link that created it:
https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-payment_link
It will also have a reference to the related Payment Intent in case you need data from there as well:
https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-payment_intent
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
got it, thank you
Any time!
On the checkout.session.completed event does the attributes "amount_subtotal" and "amount_total" represent the amount user paid?
That's correct
amount_subtotal: Total of all items before discounts or taxes are applied.
amount_total: Total of all items after discounts and taxes are applied.