This function requires an api user login for identification.
Function call
Example
Below is an example of a voucher generated using the recommended parameters for generatevouchers.cgi
<form method="post" action="https://login:password@payment.architrade.com/cgi-adm/generatevouchers.cgi"> <input type="hidden" name="merchant" value="12345678"> <input type="hidden" name="quantity" value="1000"> <input type="hidden" name="type" value="M"> <input type="hidden" name="value" value="5"> <input type="hidden" name="currency" value="DKK"> </form>
Essential input parameters
Parameter | Description |
---|---|
currency * |
The smallest unit of an amount in the selected currency, following ISO4217 (see the currency list here). Example: Smallest unit for EUR is "cent" thus setting 'amount="150"' leads to the amount being 1,50 EUR
Smallest unit for JPY is "yen" thus setting 'amount="150"' leads to the amount being 150 JPY |
merchant * |
Shop identification. The Merchant number appears in the e-mail received from Nets during registration with Nets or on your contract. |
quantity * |
The number of vouchers to generate. |
type * |
The voucher type can be either "M" or "P". "M" ("money") means that the voucher has a certain fixed amount in a certain currency. "P" ("percentage") means that the voucher calculates a percentage rebate given by the "value" parameter. Please refer to parameters "value" and "currency". |
value * |
Specifies the amount for the voucher. If the voucher is of type "M" (fixed amount), this value should be given in the smallest unit of the selected currency, i.e. Smallest unit for EUR is "cent" thus setting 'value="150"' leads to the amount being 1,50 EUR
Smallest unit for JPY is "yen" thus setting 'value="150"' leads to the amount being 150 JPY If the voucher is of type "P" (percentage), this field specifies the percentile, i.e. 'value=10' leads to the rebate being 10%.
|
*: Mandatory parameters
Optional input parameters
Parameter | Description |
---|---|
expire | The end date on which the vouchers will expire and no longer be valid. Voucher will be valid throughout this date. The format of the date is DDMMYYYY. If unspecified, the vouchers will never expire. |
group | The group identifier of the vouchers to be created. The value is 1-4 alphanumeric characters. If the group identifier does not exist, it will be created. If not specified it will default to "V". |
maxuses | Specifies the number of times the generated voucher(s) can be used. |
min | The minimum purchase amount required for the vouchers to be applicable. The format is decimal with the seperator being '.'. Example: 'min="99.95"' and 'currency="572"' leads to the minimum amount of the payment before the voucher is available being 99,95 NOK. |
start | The start date on which the vouchers will be valid. The format of the date is DDMMYYYY. If unspecified, the vouchers will be active immediately. |