Integrating checkout directly with our API

To integrate XBD Checkout into your store, follow these steps.

Prerequisites

XBD will provide you with the following details necessary for order creation to function, which must be kept confidential on your side:

  • Pos Client ID
  • Pos Client Secret

Sandbox url : https://pay-sandbox.xbase.digital/
Production url : https://pay.xbase.digital/

Integration Steps

Step 1. Call the Token API to obtain access token to authenticate the further apis Endpoint – identity/api/Authentication/connect/token

Method – POST

{
  "grant_type": "client_credentials",
  "client_id": "{POS Client Id which you received from XBD}",
  "client_secret": " {POS Client Secret which you received from XBD}"
}

The above api will return access token which is needed for further api to function

Step 2. Call the Authorise API to create an order on XBD System Endpoint – api/orders/authorize

Method – PUT

"header" : {
  "Content-Type" : "application/json"
  "Authorization" : "Bearer {access_token from Step 1}"
}
{
  "merchantLocationId": "{Merchant Location ID provided by XBD}",
  "merchantOrderId": "{Order ID generated by your system}",
  "title": "{Your Business Name}",
  "description": "{Description of the Cart}",
  "amount": "{Cart Amount}",
  "currency": "{Currency of the Cart}",
  "email": "{Customer Email ID}",
  "acceptUrl": "{Your Accept URL}",
  "cancelUrl": "{Your Cancel URL}",
  "callbackUrl": "{Your Callback URL}"
}

You will receive a paymentRedirectUrl in the response, which you need to redirect the user to.

With this paymentRedirectUrl, your store will be navigated to our Checkout solution which will further process the order and receive the payment.

Demo