#jahanzaib
1 messages · Page 1 of 1 (latest)
Hi there, how can I help?
if we open a payment link and expire it at the same time...the already opened link works and it pays out our card...
if we open that link in a new tab it works fine i-e it shows it has been expired
What's the problem?
THE EXPIRED PAYMENT LINK WORKS!!!!!!!
There's no need to shout.
sorry the caps was on
First of all, a PaymentLink doesn't expire, you can set a PaymentLink inactive but it doesn't mean that it's expired.
When a customer open a PaymentLink URL, Stripe would create a CheckoutSession and redirect the customer to the Checkout page. A Checkout page expires 24 hours by default and that's why your customer can still continue the payment even though the PaymentLink is inactive.
so is there any way to prevent that ?
because we created the new payment link with new price...but customer is charged with the old link
If you need granular control on the checkout expiration, I'd suggest you to use CheckoutSession API directly, which you can set the expire_at https://stripe.com/docs/api/checkout/sessions/create?lang=node#create_checkout_session-expires_at property
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
if we open the incative link in the new tab...it works fine i-e the page does not open
Yes, this is expected. As explained here https://stripe.com/docs/api/payment_links/payment_links/object?lang=php#payment_link_object-active
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.