POST /InStoreApi/InitializePayment
Function distributes a link to Avarda checkout via text message or email. Customer receives a link what loads the checkout and payment can be fulfilled. The payment link is valid for 24 hours from initialisation and 30 minutes from the first time it has been opened.
InstoreAPI/InitializePayment
Name | DataType | DefaultValue | Description |
---|---|---|---|
OrderReference | String | EmptyString | OrderReference is used to identify the order through avarda online and in eventual settlement. It is merchat reference and will not be changed by Avarda. |
ReleasedByName | String | EmptyString | Person at Merchant that triggered this payment. |
Amount | Decimal | Mandatory | Total purchase amount. |
Items | Class List of Items | Mandatory | A list of items representing the individual rows on an invoice. Individual items may have a negative value but the total sum of all items must be positive. |
ThreeLetterCountryIsoCode | String | Mandatory | Example values SWE, FIN, NOR, DEN |
Contact | string | Mandatory | Where payment link will be distributed. either a phone number or an email address. |
NotificationType | Enumeration NotificationType | Mandatory | Email or Phone |
StoreID | integer | Mandatory | ID of the store in AvardaOnline |
Items
The class represents a single row that appears on an invoice. Typically a purchased commodity but it can also be a more abstract think such as a discount with a negative value.
ExampleRequest
{
"OrderReference": "12345",
"ReleasedByName": "John",
"Amount": 1250,
"Items": [
{
"Id": 1,
"Description": "Description",
"Amount": 1250,
"Notes": "Notes",
"TaxCode": "25",
"TaxAmount": 250
}
],
"ThreeLetterCountryIsoCode": "SWE",
"Contact": "test@avarda.com",
"NotificationType": "Email",
"StoreId": 115
}
The method returns a Purchase ID for the negotiated session formatted as a string. An example:
Return value
"19ac0d1ee909c302d212b4324d9194b5"
Please note that although the return type is just a simple string, it is still formatted as JSON. Hence the quotes.