#chambaz-promotion-codes
1 messages ยท Page 1 of 1 (latest)
Hi ๐ no, there isn't a way to delete promo codes. Once it's marked as inactive your user's shouldn't be able to redeem it via a checkout session though.
Hey thanks for the response. We are seeing that they are able to use coupons that are passed through Stripe Checkout session via the API.
Do you have some IDs that you could provide that I could take a closer look at? Checkout session ID (cs_test_xxx) and the promo code ID (promo_xxx) would be most helpful to start.
Sorry, we don't allow DMs, you can share a live one though.
cs_live_a1EWgeoUrRLr8dwsWUCMh6TxNSW8WowFLl0sjzT9g1Q8UGcJ1cYim9POJV
promo_1JwhxDCzpuIfKpkBpI9eeE89
Ah, so that looks a little different than the user redeeming the promo code. In this case the coupon is being applied to the checkout session at creation. Promo codes and coupons are related objects but have their own states.
If you don't pass the coupon via the discounts parameter, are you able to enter the promo code in the checkout session?
Additionally, if you make the coupon inactive does it prevent the above behavior?
No even when inactive it still applies like above
Also doesn't seem like there is a way for us to check if a promo is inactive or not through API
You can retrieve the promo code and check the active field:
https://stripe.com/docs/api/promotion_codes/retrieve
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
And apologies for misspeaking earlier, you can't make a coupon inactive, so if you keep passing it into the checkout session then it will keep applying. Can you remove the coupon from the discounts parameter when you're creating the checkout session?
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-discounts
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.