Shrey Agarwal
Shrey Agarwal

Reputation: 11

Stripe: Can I send payment link received from Checkout Session object to customer in email.?

In Stripe docs, it is mentioned you can create a pre-build checkout session which is hosted by Stripe. When response is returned from session creation you can send a redirect request to client with the link obtained for the session. Instead of redirecting the client, I want to send the link in an email/whatsapp to the customer. I want to know is it safe to do so. Is there anything i need to keep in mind while doing this ?

Upvotes: 1

Views: 1631

Answers (1)

soma
soma

Reputation: 2219

If you are creating a Checkout Session, the URL will expire after 24 hours and it can only be used by a single user.

If you are creating a Payment Link, the URL won't expire and it also can be used by multiple users. Note that when a user clicks on the Payment Link URL, Stripe will automatically create a Checkout Session for that user.

So if you plan to share the link directly with your users (for example by email), I would recommend using a Payment Link.

Upvotes: 1

Related Questions