Online Checkout
Copy of Create Checkout Session
Changed onThis 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-1
Request
- Base URLhttps://api-sandbox.tamara.co
- AuthHTTP bearer
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": {
"account_creation_date": "12-06-2020"
},
"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
Changes
- info
endpoint added
- info