Create Checkout Session

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. 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.

❗️

Warning

If you are integrating with us in the UAE region, please ensure to review the documentation here: UAE ID Verification​.

📘

Note

For critical lines of businesses, please ensure to review the documentation here: Specific details for risk assessment​.

Body Params
total_amount
object
required

Total amount to be charged to customer, not including any discount amount (item amount + tax amount + shipping amount - discount amount).

shipping_amount
object
required

Total amount for the shipping of the order.

tax_amount
object
required

Total amount of taxes, if additionally applied. Negative values should not be passed.

string
required

The unique order id from the merchant side, used in settlements and reports.

string

The order number from the merchant side, this will be used for communication with the customer. If not passed, it will take the order_reference_id value.

discount
object

Required only if you allow your customers to use a promo/coupon code on your checkout page.

items
array of objects
required

Comprehensive details about the items in the order.

items*
consumer
object
required

The customer's identifying details.

string
enum
required

The two-character ISO 3166-1 country code.

Allowed:
string
required
length ≤ 256

Brief details about the order.

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.

billing_address
object

The customer's billing address. Required if available.

shipping_address
object

The customer's shipping address. Required, but optional for digital services if not available. Optional for educational institutions and educational services merchants.

string
required

The platform where the Tamara order is being initiated from e.g., web, mobile, etc.

boolean
required

Whether the order is being initiated from a mobile device or not.

string
enum

The payment option the customer selected on your checkout page. Required if single checkout is disabled for your account. If single checkout is enabled, omit this field and the customer chooses their payment option on Tamara's checkout page.

Allowed:
integer

The number of instalments for the selected payment option. Required if single checkout is disabled and payment_type is PAY_BY_INSTALMENTS.

string
enum
required

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. Recommended to be passed for optimum customer experience.

Allowed:
risk_assessment
object
required

Risk assessment information from the merchant side.

integer
5 to 1440

Order expiry time in minutes. Required only if custom: 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

Responses

Language
Credentials
Bearer
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json