#alex6743_code
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1360217826408923328
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
To confirm, you're creating ui_mode: 'embedded' sessions?
Yes
Then this is explained here: https://docs.stripe.com/payments/checkout/custom-success-page?payment-ui=embedded-form#disable-redirects
You can omit return_url if you pass redirect_on_completion: 'never', but that means you can't use PMs that require a redirect (like BNPLs and stuff)
What are PMs?
Then you can just use the onCompletecallback to render whatever you want
Like the type of payment methods your customers can use โ cards, banking methods, etc
See here: https://docs.stripe.com/payments/payment-methods/payment-method-support
We only need users to pay with credit cards Visa, MC, AmEx so I doubt we'll run into this issue
Sounds good then!
One other question: how do I read the ProductData's MetaData when the payment finishes?
We need to pass additional information with the purchase and read it perhaps via the webhooks
You'd listen for checkout.session.completed events and retrieve the session to 'expand' the line_items.data.price.product field
Thanks, @unborn cedar
No problem, glad I could help!
That worked perfectly
Is it possible to have the "Save my info for 1-click" unchecked by default?
Can you share a screenshot?
This section belongs to Link payment method. Unfortunately, you can't control the specific behavior of the checkbox.
Am I correct that for customers to save their CC for later easy checkout, we'd use Link?
It depends, there's many ways to do this.
Link payment methods are saved across all Stripe accounts, and you don't have particular control over it. The customer will be able to use the saved Payment Method with any other shop that uses Stripe.
If you want to have more control over saved Payment Methods, but it will work only in your app - take a look at https://docs.stripe.com/payments/existing-customers