Apply Provider Voucher Form - Liquid Form Reference
On this page
Usage
```liquid
{% form “apply-provider-voucher”, provider: voucher_provider %} {% endform %} ```
The apply-provider-voucher form applies a voucher issued by a specific voucher provider — for example a third-party gift card — to the current cart. It posts to the same endpoint as the Apply Voucher form, but adds a provider discriminator and exposes the fields that the provider’s own apply form requires.
| Property | Value |
|---|---|
| Form Name | apply-provider-voucher |
| Category | Checkout |
Parameters
| Parameter | Required | Description |
|---|---|---|
provider |
Yes | The voucher provider to apply a voucher from. |
Fields
The fields rendered are determined by the selected provider, so they vary by provider. Read each one as form.fields["<name>"].
| Provider | Field | Required | Description |
|---|---|---|---|
sc |
code |
Yes | The voucher code |
sc |
pin |
Only for a PIN-protected voucher | The voucher PIN |
vii |
card_number |
Yes | The gift card number |
vii |
pin |
Yes | The gift card PIN |
vii |
amount |
No | The amount of the card to apply. When blank, StoreConnect applies the lower of the card balance and the amount payable. |
Credential fields such as card numbers and PINs are never replayed from a previous submission, so their values are always blank.
The form renders nothing if the provider has no registered adapter.
Form Object
Inside the form block, you can access the form object which provides:
form.errors— Any validation errors after submission
Was this article helpful?
Thanks for your feedback! It helps us improve our docs.