---
title: "Copy of Create Checkout Session"
method: POST
path: "/checkout-1"
tags: ["Online Checkout"]
---

# Copy of Create Checkout Session

`POST /checkout-1`

## Request

- Base URL: `https://api-sandbox.tamara.co`
- URL: `https://api-sandbox.tamara.co/checkout-1`
- Auth: HTTP bearer

This endpoint facilitates the creation of a checkout session, where all payment information is sent within the request to enable customer payments via Tamara. The response will include `order_id`, `checkout_id` , `status` and `checkout_url`. <br /> <br /> Please store the `order_id` in your DBs to fetch the information about the order later and direct the customer to the `checkout_url` to seamlessly conclude the transaction through Tamara.

## Request body

- object
  - `total_amount` object, required: Total amount to be charged to consumer.
    - `amount` number
    - `currency` 'SAR' | 'AED' | 'BHD' | 'KWD' | 'OMR'
  - `shipping_amount` object, required: Total amount for the shipping of the order.
    - `amount` string
    - `currency` 'SAR' | 'AED' | 'BHD' | 'KWD' | 'OMR'
  - `tax_amount` object, required: Total amount of taxes, if additionally applied. Negative values should not be passed.
    - `amount` string
    - `currency` 'SAR' | 'AED' | 'BHD' | 'KWD' | 'OMR'
  - `order_reference_id` string, required: 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.
  - `order_number` string: The order number from the merchant side, this will be used for communication with the customer. If this value is not passed, the order_number will take the order_reference_id value.
  - `discount` object: This object is used to mention any customer-specific discount/voucher code being used for this specific order, but not to be used for site-wide discounts.
    - `name` string, required
    - `amount` object, required
      - `amount` number, required
      - `currency` 'SAR' | 'AED', required
  - `items` object[], required
    - `name` string, required: Product name. `<=255 characters`.
    - `quantity` number, required: The quantity being purchased for this specific item.
    - `reference_id` string, required: The unique id of the item from merchant's side
    - `type` string, required
    - `sku` string, required: Product SKU. **`<= 128 characters`**
    - `item_url` string, uri: URL of the item from merchant's website. **`<= 1024 characters`**
    - `image_url` string, uri: URL to an image of the product that can be later displayed to the customer. **`<= 1024 characters`** <br /> **Size** = 2-3 MB maximum <br /> **Resolution** WxH = 1024xY (the Y height of image should be small).
    - `unit_price` object
      - `amount` number
      - `currency` 'SAR' | 'AED' | 'BHD' | 'KWD' | 'OMR'
    - `tax_amount` object
      - `amount` number
      - `currency` 'SAR' | 'AED' | 'BHD' | 'KWD' | 'OMR'
    - `discount_amount` object
      - `amount` number
      - `currency` 'SAR' | 'AED' | 'BHD' | 'KWD' | 'OMR'
    - `total_amount` object, required
      - `amount` string
      - `currency` 'SAR' | 'AED' | 'BHD' | 'KWD' | 'OMR'
  - `consumer` object, required: The customer's identifying details.
    - `email` string, email
    - `first_name` string, required
    - `last_name` string, required
    - `phone_number` string, required
  - `country_code` 'SA' | 'AE' | 'BH' | 'KW' | 'OM', required: The two-character ISO 3166-1 country code
  - `description` string, required: The order description.
  - `merchant_url` object, required: This object includes all the redirect URLs that the customer will be redirected to from the Tamara checkout page in different cases.
    - `cancel` string, uri, required
    - `failure` string, uri, required
    - `success` string, uri, required
  - `billing_address` object: The customer's billing address, if any.
    - `city` string
    - `country_code` 'SA' | 'AE' | 'BH' | 'KW' | 'OM': The two-character ISO 3166-1 country code
    - `first_name` string
    - `last_name` string
    - `line1` string
    - `line2` string
    - `phone_number` string
    - `region` string
  - `shipping_address` object, required
    - `city` string, required
    - `country_code` 'SA' | 'AE' | 'BH' | 'KW' | 'OM', required: The two-character ISO 3166-1 country code
    - `first_name` string, required
    - `last_name` string, required
    - `line1` string, required
    - `line2` string
    - `phone_number` string
    - `region` string
  - `platform` string: Mentions the platform where the Tamara order is being initiated from (Mostly used by our e-commerce plugins) but can also be used by direct integrations.
  - `is_mobile` boolean: To identify mobile users of your store.
  - `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 not passed and customer is new. If customer already exists and locale is not passed then customer's preference will be taken into account.
  - `risk_assessment` object: Risk assessment info from the merchant side
    - `is_premium_customer` boolean, required: Any subscription package/ VIP segmentation of customers(if available)
    - `account_creation_date` string, required: Date when the customer registered their account at merchant (format: dd-mm-yyyy)
    - `total_order_count` integer, required: No. of successful orders of customer on merchant
    - `risk_score` integer: Aggregated transaction/ customer risk score by merchant(if available)
    - `date_first_paid` string, required: Date of first successful order. Will be null if first order (format: dd-mm-yyyy)
    - `date_last_paid` string, required: Date of last successful order. Will be null if first order (format: dd-mm-yyyy)
    - `order_count_last_24h` integer: No. of successful orders of customer on merchant, in the last 24 hours
    - `account_security` object: Security and identity signals.
      - `is_email_verified` boolean: true if email is verified by merchant.
      - `is_phone_verified` boolean: true if email is verified by merchant.
      - `password_last_changed` string: Date of last password reset (format: dd-mm-yyyy).
      - `last_login_date` string: Date of last login (format: dd-mm-yyyy).
      - `last_verification_method` string: Method used for last authentication, for e.g., OTP, Biometric, etc..
      - `device_id` string: Unique device fingerprint/ID from merchant. Any Hash (#) device ID
      - `devices_linked` integer: Number of active devices linked to the account.
  - `expires_in_minutes` integer: Order expiry time in minutes, min 5 minutes, max 1440 (one day). By default this key will be ignored, and default value of 30 mins is used, **Please contact our support team to enable this feature**.
  - `additional_data` object: Any additional order data information from the merchant side
    - `delivery_method` string: the delivery method selected by the customer e.g. home delivery, or click and collect
    - `pickup_store` string: the collection point selected by the user if his order is for store collection
    - `store_code` string: The unique store code/name from which request is called
    - `vendor_amount` number: The amount to be settled to vendor
    - `merchant_settlement_amount` number: The amount to be settled to merchant
    - `vendor_reference_code` string: The vendor identifier

## Response `200`

Checkout Session Created

- object
  - `checkout_id` string, uuid
  - `order_id` string, uuid
  - `status` string
  - `checkout_url` string

## Other responses

- `400`: Unsupported Country/Currency

## Changes

- **2026-11-03** `aa481f4d0218`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/tamara/apis/tamara-public-apis-v1-0/changes/checkout-1/post.md)

---

[API](https://skmtc.dev/tamara/apis/tamara-public-apis-v1-0.md) - [All operations](https://skmtc.dev/tamara/apis/tamara-public-apis-v1-0/llms.txt) - [OpenAPI document](https://skmtc.dev/tamara/apis/tamara-public-apis-v1-0/revisions/aa481f4d0218?raw)
