Checkout 2.0
PaymentLink
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

NameDataTypeDefaultValueDescription
OrderReferenceStringEmptyStringOrderReference is used to identify the order through avarda online and in eventual settlement. It is merchat reference and will not be changed by Avarda.
ReleasedByNameStringEmptyStringPerson at Merchant that triggered this payment.
AmountDecimalMandatoryTotal purchase amount.
ItemsClass List of ItemsMandatoryA 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.
ThreeLetterCountryIsoCodeStringMandatoryExample values SWE, FIN, NOR, DEN
ContactstringMandatoryWhere payment link will be distributed.
either a phone number or an email address.
NotificationTypeEnumeration NotificationTypeMandatoryEmail or Phone
StoreIDintegerMandatoryID 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.