The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

Apply coupon to existing subscription?

Hey guys,

Is there a way to apply a coupon to an existing subscription?

(One of our customer forgot to enter the coupon during checkout)
  • fc_adamfc_adam FoxyCart Team
    edited April 2017

    Good question. There is - and there are two ways you could approach it, depending on your needs.

    If you want your customer to receive an email notification that it was added - you can load the subscription using the subtoken URL and log in on the checkout using your Unified Order Entry password to login as the customer. You can then add the coupon on the checkout and complete it to update the subscription to include the coupon. The customer will then receive an email receipt showing that you've added the coupon - but they won't be charged anything today (all future charges).

    If you don't want to trigger an email notification, you can use the advanced edit within the administration. To access that, find the subscription in the administration, click edit, and then click the "advanced edit" button. A textarea will then appear containing a summary of the subscription. One without a coupon attached will have a node that looks like this:
    Replace that with code like this - assuming your coupon code has a code of mycode1:
    <code><![CDATA[mycode1]]></code >
    After saving, it will show a summary of the subscription, and you should see the coupon applied.
  • @fc_adam, great. Thank you.
  • @fc_adam

    Is it possible to apply a coupon via the Foxy API?

    Would we just POST a coupon code to a subscription transaction_template via the fx:applied_coupon_codes resource?
  • fc_adamfc_adam FoxyCart Team

    Spot on - you'd POST something like { "code": "your-coupon-code" } to the fx:applied_coupon_codes URI. You can see some details on that here:
Sign In or Register to comment.