Checkout 3.0
In-Store
Initiate In-Store payment

Initiate In-Store Payment

Start session

Download swagger specification: In-Store swagger (opens in a new tab)

Use Avarda Base URLs for Checkout 3.0 Backend API. The API-endpoints described in this guide basically follow the same structure as those for the regular checkout, modified for the in-store scenario.

Obtain partner access token for authentication needed for Payment widget API.

To start a new in-store payment session, send a POST request to the in-store Initiate endpoint. It carries the same inputs as the normal Initiate Payment, except for a few “add-ons” (see Extra Data below). In return, you’ll receive the unique purchaseId for this session. The same purchaseId will live through both the in-store and checkout session.

# Initialize Payment link
POST {api_url}/api/instore/partner/initialize
Content-type: application/json
Authorization: Bearer {partner_access_token}

Make sure to specify the phone number and/or email address in userInputs User inputs.

{
  "userInputs": {
    "phone": "076875580",
    "email": "example@avarda.se",
    "phoneCountryTwoLetterIso": "SE"
  }
}

Specify how the in-store link should be distributed to the customer by setting up InStoreDistribution in CheckoutSetup. The options are "Phone", "Email" or "None". If you choose "None", you will have to distribute the link yourself.

{
  "checkoutSetup": {
    "inStoreDistribution": "Phone"
  }
}

Example request:

{
  "items": [
    {
      "description": "string",
      "notes": "string",
      "amount": 100,
      "taxCode": "string",
      "taxAmount": 0,
      "quantity": 1
    }
  ],
  "checkoutSetup": {
    "inStoreDistribution": "Phone",
    "customerVerified": true,
    "hiddenPaymentMethods": ["Invoice", "Loan"],
    "language": "English",
    "mode": "B2C",
    "completedNotificationUrl": "string"
  },
  "b2C": {
    "customerToken": "string",
    "invoicingAddress": {
      "address1": "string",
      "address2": "string",
      "zip": "string",
      "city": "string",
      "country": "AF",
      "firstName": "string",
      "lastName": "string"
    },
    "userInputs": {
      "phone": "string",
      "email": "string",
      "ssn": "string",
      "phoneCountryTwoLetterIso": "SE"
    }
  },
  "extraIdentifiers": {
    "orderReference": "string",
    "loyaltyNumber": "string",
    "productGroup": "string",
    "attachment": "string",
    "description": "string",
    "referenceName": "string",
    "posId": "string"
  }
}

Return value:

Based on customer preference you can send email or phone with a link which loads the checkout and payment can be fulfilled.

Additional In-store information

Personal number

If you have access to customers SSN, you can initiate the payment with the SSN

User inputs can be extended by ssn.

PropertyTypeDescriptionOptional
ssnstringPrefill personal numberYes
{
  "userInputs": {
    "email": "example@avarda.se",
    "ssn": "exampleSsn"
  }
}

Hide payment methods and Exclude 3rd party verification

In some cases you might want to make it as simple as possible for the customer to complete the payment. We have therefore made it possible for you to hide certain payment methods in checkout. An example could be that you have agreed with the customer to pay by invoice, it is then possible to hide all other payment methods in the checkout.

In order to make a quick checkout process we have also added the possibility to exclude 3rd party customer verification in checkout. Of course, you will have to identify the customer physically in the store (with driver’s license or similar) before completing the purchase. Note: special agreement with Avarda is needed to be able to use this function.

Checkout Setup can be extended by hiddenPaymentMethods, customerVerified and inStoreDistribution.

PropertyTypeDescriptionOptional
inStoreDistributionenumOption to select distribution method. The options are "Phone", "Email" or "None". Default value is "Email"Yes
customerVerifiedboolCustomer verification won't be triggeredYes
hiddenPaymentMethodsarrayOption to hide specific payment methods Payment methods typeYes
{
  "checkoutSetup": {
    "customerVerified": true,
    "inStoreDistribution": "Phone",
    "hiddenPaymentMethods": ["Invoice", "Loan"]
  }
}