#zero-checkout-promotioncode

1 messages · Page 1 of 1 (latest)

supple creekBOT
pseudo mirage
#

Hello! Can you try and provide a clear summary of the exact issue with all the information in one message?

shadow socket
#

Created Promo code for discount, customer responds it doesn't work, sends screenshot of not working

#

Customer ID

#

cus_OOE5pd6YstNxfK

pseudo mirage
#

Sorry please try to provide all information clearly in one message. We need more than just that
1/ Exact Customer id (you gave)
2/ Exact PromotionCode id (the promo_123 which you can find in your Dashboard)
3/ Exact Checkout Session id cs_live_123

#

zero-checkout-promotioncode

shadow socket
#

would 3 exist if transaction diidnt go through?

pseudo mirage
#

Yes

shadow socket
#

@pseudo mirage

#

ok

#

For 2, here's the api id for the code: promo_1NbRnJE3UP9Zs5paSjw8xQ6G

#

For 3, here is the payment link's id

#

where would i find the cs live id?

pseudo mirage
#

Ah I think you have misunderstood something important about all of this

#

Your PromotionCode is limited to a specific Customer object in your account. The Customer cus_OOE5pd6YstNxfK.
But when you use PaymentLink, we have no idea who the end customer is and we have no way to "map them" to the existing Customer object in your account. There's no match on email addresses or anything (or it could be abused)
So basically this will never work

#

If you want to offer a discount to only one specific Customer you can not use PaymentLink. You have to write real code that will call the Create Checkout Session API https://stripe.com/docs/api/checkout/sessions/create and explicitly pass customer: 'cus_123' to tell us this specific Customer you already created is the one buying so that we can validate that PromotionCode for them

#

Does that make sense?

shadow socket
#

So I would have to code it myself directly?

pseudo mirage
#

Yes

shadow socket
#

Time to whip out VSCode! Follow the docs and if I get stuck just ping you again in #dev-help?