#Wayne-Tenaciousw
1 messages · Page 1 of 1 (latest)
Hi there, so you want to programmatically apply a discount to a checkout session, at the same time this checkout session can't accept promo code entered by your customers, am I right?
I want it so the customer can apply discount codes, just not there own, I have made the script that creates the discount code when they join the site and everything works, just dont want them to be able to use there own code
so didnt know if there was an option like 'allow_promotion_codes' => true, block 'tenaciousw123'
There's no option to exclude a promocode or coupon during checkout session creation I'm afraid.
hmm, darn that's what I was afraid of... see when someone logs into the dash board it has an option to purchase a subscript, and it allows them to enter a discount code, only issue is the same page shows them there own discount code, and I think if people refer people to join the site they wont use the promo code that there person shared they will use there own... not sure how to redesign this. Thank you for your help
is there a way to programmatically applying a discount code?
Yes, you can apply a coupon or promo code when creating a checkout session (https://stripe.com/docs/api/checkout/sessions/create?lang=java#create_checkout_session-discounts-coupon)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ok maybe I can rework something with this, thank you for your help