#Akin
1 messages · Page 1 of 1 (latest)
hello! where do you expect to see the promotion code field, but are not currently seeing it?
In the stripe checkout page
I copied the code in the checkout snippet generator and added it to my website but noticed the promotion code field not showing up when the page is triggered
Seeing this instead
did you enable this?
Yes I did
When i go straight to the payment link, it shows up but the code from the checkout snippet doesnt show it
I am using the code snippet from here
ah, just so you're aware, that Checkout code snippet has limited functionality. redirectToCheckout is deprecated and doesn't support many new features.
I would just use the Payment Link url
Ah okay! Does this create a new stripe customer when used as i will want this to be the case?
it should yes, but it won't deduplicate customers on your behalf
so it'll create more than one customer for the same email
Ah okay and no way to prevent duplicate?
Also, i have a data in the product metadata that i am hoping of accessing from checkout session, how can this be achieve?
are you using mode=payment, or mode=subscription?
Mode=payment
hrm, if you're planning to rely on the checkout.* webhook events, the product metadata won't show on the webhook event. I would add it into the Checkout Session metadata directly to make it easier for you : https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-metadata
Ah okay, How do i add it to the checkout session sent from the response of the payment link?
on the payment link page, there's this section
Yeah i did that but when i retrieved the session info using the session id the metadata was empty
I will try it again and let you know if it is still not showing up
Preventing the customer duplicate from payment link, is there a way to stop that?
not at the moment, there're some future plans for this, but no timeline that I can share at this point
Oh okay, thanks
if you want to prevent customer duplicates, you have to implement the logic on your own, and implement Checkout Sessions : https://stripe.com/docs/payments/checkout