#Brayden-link
1 messages ยท Page 1 of 1 (latest)
as in you're specifically using this feature : https://stripe.com/docs/payments/payment-links and want to connect the PaymentIntent object to the link that was used?
right, using that new/experimental payment links api, and need to figure out which link was responsible for the payment intent success webhook event
ive actually already jumped the gun and headed to stripe support, in a live ticket there-
feel free to ignore me until i have a resolution there if this isnt a simple thing to figure out ๐
as far as I know it's not possible, I was going to say when we have an API for creating the links that might add a connection somewhere.
looks like you can use metadata when creating the PaymentLink in the API
Metadata associated with this Payment Link will automatically be copied to Checkout Sessions created by this Payment Link.
so that lets you track it(you get to the CheckoutSession from the PaymentIntent by doing https://stripe.com/docs/api/checkout/sessions/list#list_checkout_sessions-payment_intent )
rgr- ive got metadata on the paymentlink already,
so i should now query all checkout sessions on paymentintent.success webhook event
find matching payment intent
and retrieve metadata that way? ๐ค
well why not just use the checkout.session.completed event?
ah there we go, that might be the one i needed.
that's what you're supposed to use for reconciliation, not payment_intent.succeeded