#buttonclick

1 messages · Page 1 of 1 (latest)

compact obsidianBOT
covert steeple
#

Hello

#

You want to know which Payment Link the PaymentIntent was generated from?

dreamy iris
#

yes, i need to intercept the paymentintent generated by the paymentlink

covert steeple
#

Gotcha

#

So the Payment Link will create a Checkout Session

dreamy iris
#

OK, thanks
Is there an API call to locate a checkout session through the associated paymentlink?
I saw that the Retrieve Session API call takes the session ID as a Required parameter.

But I only have the paymentlink url

covert steeple
#

You can list all PaymentLinks to inspect their URL so that you get the PaymentLink ID

dreamy iris
#

do you mean to process all checkout sessions to find the one that has the paymentlink I'm interested in?

covert steeple
#

There are various ways to do this

#

Let's back up a second

#

What are you really trying to do here

#

What is the end goal

dreamy iris
#

So,

I provide my customer with the link to make a payment.

for instance:
https://buy.stripe.com/test_bIY4hJ3aR6PM0wwdRX.

The customer pays and a checkout.session.completed is generated.

How do I retrieve the checkout.session that refers to the source paymentlink?

Among the Postman API I found the call "retrive checkout" but this requires the session ID which I don't know