{"title":"Checkout AppliedVouchers Controller - Liquid Controller Reference","slug":"checkout-applied-vouchers-controller-reference","url":"https://support.storeconnect.com/articles/checkout-applied-vouchers-controller-reference","url_markdown":"https://support.storeconnect.com/articles/checkout-applied-vouchers-controller-reference.md","subtitle":null,"summary":"Intercept voucher destroy and error-handling actions at `controllers/checkout/appliedvouchers/`. Customize behavior when a customer removes an applied voucher or encounters voucher validation errors during checkout.","type":"Developer_Documentation","video_url":"","keywords":"liquid, controllers, Checkout AppliedVouchers, storefront, storeconnect","last_modified":"2026-08-21T07:12:35+0000","body_markdown":"## Description\n\nThe Checkout AppliedVouchers controller handles requests related to checkout appliedvouchers functionality in your StoreConnect storefront.\n\n| Property | Value |\n|----------|-------|\n| **Controller** | `AppliedVouchersController` |\n| **Liquid Template Path** | `controllers/checkout/appliedvouchers/` |\n| **Namespace** | Checkout |\n\n## Actions\n\n| Action | HTTP Method | Route | Liquid Page |\n|--------|-------------|-------|-------------|\n| `destroy` | DELETE | `/checkout/appliedvouchers/:id` | — |\n| `go_back_with_errors` | GET | `/checkout/appliedvouchers/go-back-with-errors` | — |\n\n## Liquid Controller Lifecycle\n\nFor each action, Liquid controller templates are executed in three phases:\n\n1. **Before** — `controllers/checkout/appliedvouchers/{action}.liquid` runs before the Rails action\n2. **After** — runs after the Rails action but before the response is sent\n3. **Final** — runs after the response, useful for cleanup\n\n## Available Liquid Tags\n\nInside controller templates, these tags are available:\n\n| Tag | Description |\n|-----|-------------|\n| `{% params %}` | Set request parameters (e.g. `{% params foo: \"bar\" %}`) |\n| `{% variables %}` | Set template variables (e.g. `{% variables title: \"Hello\" %}`) |\n| `{% respond %}` | Respond with custom content, alert, or notice |\n| `{% redirect %}` | Redirect the request (e.g. `{% redirect to: \"/products\" %}`) |\n| `{% action %}` | Execute a server-side action (e.g. `{% action \"cart.add\" %}`) |\n\n## Example\n\nCreate a file at `controllers/checkout/appliedvouchers/destroy.liquid`:\n\n\n```liquid\n\n{% before %}\n  variables custom_heading: \"Welcome\"\n{% endbefore %}\n```\n"}