#arditron

1 messages · Page 1 of 1 (latest)

stark lodgeBOT
reef kite
#

Price and PaymentLink is not bound to a specific Customer I believe

#

Payment Links are meant to share across customers, each of them will generate a Checkout Session

stark lodgeBOT
quasi lantern
#

OK. In that case if I have a customer already signed in through my app, how do I link the customer to the payment?

#

I mean, the customer can change the email so that is not reliable.

autumn hornet
#

if you really want to use Payment Links and pass in an existing Customer ID, you can use the Buy Button instead : https://stripe.com/docs/payment-links/buy-button#pass-an-existing-customer

Otherwise, you can also create a Checkout Session instead whereby you can explicitly pass in the Customer ID : https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer

Use Payment Links to create an embeddable buy button for your website.

quasi lantern
#

Yes! Session worked fine - Thank you both. Much appreciate your help.

quasi lantern
#

Hey, one more thing: I see that I can set succcess URL for the session. However, what if the payment fails later? Can I set a failure URL?

autumn hornet
#

you'll probably want to setup both success and the redirect url

#

subsequently when the customer is redirected, you should always check if the payment is successful and then display whatever you need to the customer