Parameter
By appending parameters to the URL of a payment form, you can set default values and thereby personalize the form.
By appending parameters to the URL of a payment form, you can set default values and thereby personalize the form.
Overview of All Parameters
The following overview shows which parameters are available in the various forms.
Global parameters
The following parameters work across all e-commerce tools in zahls.ch:
| Name | Parameter |
|---|---|
| Amount (Default) | invoice_amount |
| Amount (Terminal) | amount |
| Currency (Default) | invoice_currency |
| Currency (Terminal) | currency |
| Purpose (Default) | invoice_number |
| Purpose (Terminal) | purpose |
| Salutation | contact_title |
| First name | contact_forename |
| Last name | contact_surname |
| Company | contact_company |
| Street | contact_street |
| ZIP Code | contact_postcode |
| Place | contact_place |
| Country | contact_country |
| Phone | contact_phone |
| contact_email | |
| Text field content | contact_text |
| Multiline text field content | contact_textbox |
| Discount code | code |
| Reference | referenceId |
Parameters for the Donation tool
The following parameters work only in the "Donation" tool:
| Description | Parameter |
|---|---|
| The amount of 50 is proposed. Can be changed by the donor.[Values: Amount, amount with decimal point (e.g. 10.50)]. | donation[preselect_amount] |
| Interval is selected. Can no longer be changed.[Values: one_time, weekly, monthly, quarterly, annually] | donation[interval] |
| Interval is proposed. Can still be changed by the donor.[Values: one_time, weekly, monthly, quarterly, annually] | donation[preselect_interval] |
| The purpose of the donation is pre-selected and can be changed by the donor.[Values: 1,2,3,...] | donation[preselect_purpose] |
| The campaign description is hidden.[Values: 0.1] | hide_description |
Examples of Using URL Parameters
The following examples illustrate how you can use URL parameters with zahls.ch e-commerce tools.
| Link with URL parameters | Function |
|---|---|
| https://[instance].zahls.ch/en/vpos?amount=19.50 | When the terminal is opened, the amount of 19.50 is pre-defined. |
| https://[instance].zahls.ch/en/vpos?amount=19.50&purpose=Test | When the terminal is opened, the amount of 19.50 and the payment purpose “Test order” are pre-defined. |
| https://[instance].zahls.ch/en/pay?tid=fbd71f97&contact_title=Mr&contact_forename=John&contact_surname=Smith | When the payment page is opened, the fields "Title", "First name", and "Last name" are automatically populated with "Mr", "John", and "Smith". |
| https://[instance].zahls.ch/en/pay?cid=74eb3a66&donation[preselect_amount]=50 | When the donation page is opened, the amount of 50.00 is automatically selected, but can still be modified by the donor. |