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.

Body Params
total_amount
object
required

Total amount to be charged to consumer.

shipping_amount
object
required

Total amount for the shipping of the order.

tax_amount
object
required

Total amount of taxes, if additionally applied.

string
required
Defaults to abd12331-a123-1234-4567-fbde34ae

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.

string
Defaults to A123125

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.

items
array of objects
required
Defaults to [object Object]
items*
string
required
≤ 255
Defaults to Lego City 8601

Product name. <=255 characters.

number
required
Defaults to 1

The quantity being purchased for this specific item.

string
required
Defaults to 123

The unique id of the item from merchant's side

string
required
Defaults to Physical
string
required
≤ 128
Defaults to SA-12345

Product SKU. <= 128 characters

uri
≤ 1024
Defaults to https://item-url.com/1234

URL of the item from merchant's website. <= 1024 characters

uri
≤ 1024
Defaults to https://image-url.com/1234

URL to an image of the product that can be later displayed to the customer. <= 1024 characters
Size = 2-3 MB maximum
Resolution WxH = 1024xY (the Y height of image should be small).

unit_price
object
tax_amount
object
discount_amount
object
total_amount
object
required
consumer
object
required

The customer's identifying details.

string
enum
required
Defaults to SA

The two-character ISO 3166-1 country code

Allowed:
string
required
≤ 256
Defaults to Enter order description here.

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.

billing_address
object

The customer's billing address, if any.

shipping_address
object
required
string
Defaults to platform name here

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.

boolean
Defaults to false

To identify mobile users of your store.

string
enum
Defaults to ar_SA

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.

Allowed:
risk_assessment
object

Risk assessment info from the merchant side

integer
5 to 1440

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

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