v1

latestOpenAPI 3.0.32026-07-2418074.2 KB
In-Store Checkout

Create In-store Checkout Session

This endpoint facilitates the creation of an In-Store checkout session, where all payment information is sent within the request to send a payment link via SMS message, enabling customer payments via Tamara. <br /> <br /> Please store the order_id and checkout_id received in response in your DBs as they might be needed later.

post/checkout/in-store-session

Request body

phone_numberstring required

The customer's phone number, on which the customer will receive an SMS containing a payment link. This will be used to complete the transaction via Tamara.

emailstring email

The customer's email address, designated to receive the payment link. Serves as a backup option in case of mobile coverage issues affecting the phone number.

order_reference_idstring required

The unique order id from merchant side, this will be used with the settlement and reports

order_numberstring

Unique order ID from the merchant's side, which will be used for settlement and reporting purposes. Can be modified after the checkout session is created.

locale'ar_SA' | 'en_US'

Display language for Tamara checkout page. Language to be defined by the merchant following RFC 1766, e.g en_US or ar_SA. Default is set to Arabic if value not passed and customer is new. If customer already exists and locale is not passed then customer's preference will be taken into account.

payment_type'PAY_BY_INSTALMENTS' | 'PAY_NOW'

The payment method offered by Tamara that you want to offer to your customer for this checkout session.

expiry_timeinteger

Order expiry time in minutes, min 5 minutes, max 1440 (one day). By default this key will be ignored, and default value of 15 mins is used, Please contact our support team to enable this feature.

Example request

{
  "total_amount": {
    "amount": 300,
    "currency": "SAR"
  },
  "phone_number": "534274516",
  "email": "customer@emailhere.com",
  "order_reference_id": "1231234123-234a-fe21-1234-a324af2",
  "order_number": "A1231234123",
  "items": [
    {
      "name": "Lego City 8601",
      "quantity": 1,
      "type": "Digital, Physical...etc.",
      "reference_id": "123",
      "sku": "SA-12436",
      "item_url": "SA-12436",
      "image_url": "SA-12436",
      "unit_price": {
        "amount": 490,
        "currency": "SAR"
      },
      "tax_amount": {
        "amount": 10,
        "currency": "SAR"
      },
      "discount_amount": {
        "amount": 100,
        "currency": "SAR"
      },
      "total_amount": {
        "amount": "100",
        "currency": "SAR"
      }
    }
  ],
  "payment_type": "PAY_BY_INSTALMENTS",
  "expiry_time": 15,
  "additional_data": {
    "store_code": "Branch A"
  }
}

Response

Checkout Session Created

checkout_idstring uuid
order_idstring uuid
checkout_deeplinkstring