less than a minute read • Updated 9 minutes ago
Add a coupon code via a cart link
How to apply a coupon code automatically by including it in a cart link, without the customer entering it manually.
You can apply a coupon code automatically by including it as a parameter in a cart link. This is useful for promotional links, email campaigns, or affiliate codes where you want the discount applied without the customer having to enter it manually.
Steps
Add the coupon parameter to any cart link:
https://YOURSTORE.foxycart.com/cart?coupon=DISCOUNT10
To apply a coupon without adding a product, combine with cart=view:
https://YOURSTORE.foxycart.com/cart?cart=view&coupon=DISCOUNT10
To apply multiple coupon codes at once, separate them with a comma:
https://YOURSTORE.foxycart.com/cart?coupon=DISCOUNT10,FREESHIP
Notes
Once applied, a coupon code remains active for the life of the session or until removed.
If an invalid or duplicate code is added, an error may display on the cart.
Do not sign the
couponvalue if using link and form validation.For a full list of cart parameters, see Cart parameters reference.