v1
latestOpenAPI 3.0.32026-07-2418074.2 KBOnline Checkout
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. <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.
post/checkout
Request body
Example request
{
"total_amount": {
"amount": 300,
"currency": "SAR"
},
"shipping_amount": {
"currency": "SAR"
},
"tax_amount": {
"currency": "SAR"
},
"order_reference_id": "A1231234123",
"order_number": "A1231234123",
"items": [
{
"name": "Lego City 8601",
"quantity": 1,
"reference_id": "123",
"type": "Digital, Physical...etc.",
"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": {
"currency": "SAR"
}
}
],
"consumer": {
"email": "customer@email.com",
"first_name": "Mona",
"last_name": "Lisa",
"phone_number": "566027755"
},
"country_code": "SA",
"description": "lorem ipsum dolor",
"merchant_url": {
"cancel": "http://example.com/#/cancel",
"failure": "http://example.com/#/fail",
"success": "http://example.com/#/success"
},
"billing_address": {
"city": "Riyadh",
"country_code": "SA",
"first_name": "Mona",
"last_name": "Lisa",
"line1": "3764 Al Urubah Rd",
"line2": "string",
"phone_number": "532298658",
"region": "As Sulimaniyah"
},
"shipping_address": {
"city": "Riyadh",
"country_code": "SA",
"first_name": "Mona",
"last_name": "Lisa'",
"line1": "3764 Al Urubah Rd",
"line2": "string",
"phone_number": "532298658",
"region": "As Sulimaniyah"
},
"platform": "Magento, WooCommerce, Salla..etc.",
"locale": "ar_SA",
"risk_assessment": {
"customer_age": 21,
"customer_dob": "01-12-2000",
"customer_nationality": "SA or IN or KW",
"account_creation_date": "12-06-2020",
"platform_account_creation_date": "12-06-2020",
"date_of_first_transaction": "12-06-2020",
"is_card_on_file": true,
"total_ltv": 200,
"total_order_count": 15,
"order_amount_last3months": 2000,
"order_count_last3months": 10,
"last_order_date": "12-06-2020",
"last_order_amount": 2000,
"reward_program_points": 2000
},
"expires_in_minutes": 30,
"additional_data": {
"delivery_method": "Home Delivery",
"pickup_store": "Store A",
"store_code": "Branch A",
"vendor_amount": 10,
"merchant_settlement_amount": 100,
"vendor_reference_code": "AZ1234"
}
}Response
Checkout Session Created