Error message when trying to use coupon
Description: When proceeding to redeem a coupon, the plugin says that the coupon is invalid.
What happened?
When trying to redeem a coupon on a subscription form you get the following error message:
“Entered coupon code is not valid anymore. Try with another one.”
Why is it happening?
Either of the following scenarios can cause the error:
- You’re trying to use the coupon not in the API mode it was created in.
- Name and ID of the coupon differ, and because of this the plugin cannot find it
What is the solution?
Create the coupon in the right API mode
In Stripe, API modes (test and live) are two different worlds, with a different set of objects (like subscriptions plans, coupon codes, etc).
Most probably, you’ve created the coupon in test mode, and you are trying to use it in live mode, or vice versa. Please make sure that the coupon exists in the mode you are trying to use it in.
Use the same name and id for the coupon when creating it
Make sure that you set the same name and ID for the coupon when creating it on the Stripe dashboard:
For existing coupons, verify that the name and ID are the same. Delete and create a new coupon if they differ.
(Stripe doesn’t allow the ID to be modified for existing coupons)