{"title":"Additional Payments Applied Vouchers Controller - Liquid Controller Reference","slug":"additional-payments-applied-vouchers-controller-reference","url":"https://support.storeconnect.com/articles/additional-payments-applied-vouchers-controller-reference","url_markdown":"https://support.storeconnect.com/articles/additional-payments-applied-vouchers-controller-reference.md","subtitle":null,"summary":"Hook applying and removing a voucher on an order\u0026#39;s outstanding-balance payment page with Liquid controller templates at controllers/additional_payments/applied_vouchers/.","type":"Developer_Documentation","video_url":"","keywords":"liquid, controllers, additional payments, applied vouchers, pay outstanding balance, voucher, storefront, storeconnect","last_modified":"2026-11-25T21:09:53+0000","body_markdown":"## Description\n\nThe Additional Payments Applied Vouchers controller applies a voucher to, or removes one from, an order's outstanding-balance payment page. It is the voucher counterpart of the [Additional Payments controller](additional-payments-controller-reference).\n\n| Property | Value |\n|----------|-------|\n| **Controller** | `AdditionalPayments::AppliedVouchersController` |\n| **Liquid Template Path** | `controllers/additional_payments/applied_vouchers/` |\n| **Namespace** | AdditionalPayments |\n\n## Actions\n\n| Action | HTTP Method | Route | Result |\n|--------|-------------|-------|--------|\n| `create` | POST | `/orders/:order_reference_number/payment/applied_vouchers` | Applies the voucher, then redirects back to the payment page |\n| `destroy` | DELETE | `/orders/:order_reference_number/payment/applied_vouchers/:id` | Removes the voucher, then redirects back to the payment page |\n\nA voucher cannot be applied to a subscription renewal order. The request redirects back with an error instead.\n\n## Example\n\nCreate a theme template with the key `controllers/additional_payments/applied_vouchers/create` to notify another system each time a customer applies a voucher to an outstanding balance. `{% api %}` inside `{% final %}` runs after the response is sent, so the customer does not wait for it:\n\n\n```liquid\n\n{% final %}\n  {%- new Map payload -%}\n  {%- assign payload = payload | set_key: \"event\", \"voucher_applied\" | set_key: \"order\", current_request.params.order_reference_number -%}\n  {% api url: \"https://hooks.example.com/vouchers\", method: \"post\", data: payload %}\n  {% endapi %}\n{% endfinal %}\n```\n\n\nSee [how Liquid controllers work](liquid-controllers-guide) for the phases and the tags you can use in them."}