Invoice
The invoice contains all order/invoice information.
Key | Type | Description |
---|---|---|
number | string | Comma separated product names |
products | array | Products as array with - name: string - price: float - quantity: integer |
amount | float | The total amount paid |
discount | array | (optional) Information about the discount - code: string - amount: float - percentage: integer (optional) |
currency | string | ISO 4217 of currency |
test | boolean | Payment has been processed in sandbox |
referenceId | string | Reference code passed through API or GET parameter to the payment page |
paymentRequestId | id | ID of the Invoice or VR pay secure Gateway created through API |
paymentLink | array | Invoice / Gateway data as array - hash - referenceId |
custom_fields | array | All fields passed within the form in the shopper's language as array - name - value |
Example
<?php
array(
'number' => 'Product 1, Product 2',
'products' => array(
0 => array(
'name' => 'Product 1',
'price' => 2.9,
'quantity' => 1,
),
1 => array(
'name' => 'Product 2',
'price' => 1.9,
'quantity' => 1,
),
),
'amount' => 4.8,
'discount' => array(
'code' => NULL,
'amount' => 0,
'percentage' => NULL,
),
'currency' => 'EUR',
'test' => 0,
'referenceId' => '',
'paymentRequestId' => NULL,
'paymentLink' => NULL,
'custom_fields' => array(
1 => array(
'name' => 'Field 1 name',
'value' => 'Field 1 value',
),
2 => array(
'name' => 'Field 2 name',
'value' => 'Field 2 value',
),
3 => array(
'name' => 'Field 3 name',
'value' => 'Field 3 value',
),
),
);
Updated 8 months ago