Tamara for API only
Last updated: November 5, 2025
To accept Tamara payments, follow these steps:
To send a payment request, call the payments endpoint.
post
https://api.checkout.com/payments
1{2"amount": 10000,3"currency": "SAR",4"source": {5"type": "tamara",6"billing_address": {7"address_line1": "123 Anywhere St.",8"address_line2": "Apt. 456",9"city": "Anytown",10"state": "Riyadh Province",11"zip": "123456",12"country": "SA"13}14},15"payment_type": "Installment",16"payment_plan": {17"total_number_of_payments": 2,18"description": "Split into two payments or securely pay in full with Tamara"19},20"failure_url": "https://example.com",21"success_url": "https://example.com",22"reference": "ORD-5023-4E89",23"processing_channel_id": "pc_whznpho6lkrunjg4h45bvcydfu",24"customer": {25"name": "Jane Smith",26"email": "jane.smith@example.com",27"phone": {28"country_code": "+966",29"number": "556002013"30}31},32"shipping": {33"address": {34"address_line1": "123 Anywhere St.",35"address_line2": "Apt. 456",36"city": "Anytown",37"state": "Riyadh Province",38"zip": "123456",39"country": "SA"40}41},42"capture": true,43"processing": {44"tax_amount": 0,45"shipping_amount": 046},47"items": [48{49"name": "item name",50"quantity": 2,51"unit_price": 2500,52"total_amount": 5000,53"tax_amount": 0,54"discount_amount": 0,55"reference": "description of item",56"image_url": "https://some_s3bucket.com",57"url": "https://some.website.com/item",58"sku": "123687000111"59},60{61"name": "Test",62"quantity": 2,63"unit_price": 2500,64"total_amount": 5000,65"tax_amount": 0,66"discount_amount": 0,67"reference": "description of item",68"image_url": "https://some_s3bucket.com",69"url": "https://some.website.com/item",70"sku": "123687000111"71}72]73}
Tamara performs a credit assessment on each customer during the sign up and checkout process. In some cases, such as for marketplaces, travel, or high-risk industries, Tamara may require additional data to improve their risk assessment. This can include the following fields:
customer.summary.first_transaction_datecustomer.summary.last_payment_amountcustomer.summary.last_payment_datecustomer.summary.lifetime_valuecustomer.summary.phone_verifiedcustomer.summary.premium_customercustomer.summary.registration_customercustomer.summary.returning_customercustomer.summary.total_order_countsource.stored
1{2"id": "pay_er3uvjvfgpauje7o64agv3damy",3"requested_on": "2023-07-06T11:39:05.0933952Z",4"source": {5"type": "tamara"6},7"items": [8{9"name": "item name",10"quantity": 2,11"unit_price": 2500,12"reference": "description of item",13"image_url": "https://some_s3bucket.com",14"url": "https://some.website.com/item",15"total_amount": 5000,16"tax_amount": 0,17"discount_amount": 0,18"sku": "123687000111"19},20{21"name": "Test",22"quantity": 2,23"unit_price": 2500,24"reference": "description of item",25"image_url": "https://some_s3bucket.com",26"url": "https://some.website.com/item",27"total_amount": 5000,28"tax_amount": 0,29"discount_amount": 0,30"sku": "123687000111"31}32],33"amount": 10000,34"currency": "SAR",35"payment_type": "Regular",36"reference": "ORD-5023-4E89",37"description": "Order Description",38"status": "Expired",39"approved": false,40"customer": {41"id": "cus_ujs5uvwcshhujllodxegkknwou",42"email": "jane.smith@example.com",43"name": "Jane Smith",44"phone": {45"country_code": "+966",46"number": "556002013"47}48},49"shipping": {50"address": {51"address_line1": "123 Anywhere St.",52"address_line2": "Apt. 456",53"city": "Anytown",54"state": "Riyadh Province",55"zip": "123456",56"country": "SA"57}58},59"processing": {60"partner_payment_id": "2ef5d0b7-f491-4069-b436-1819b3809bda",61"product_type": "pay_by_instalment_3",62"locale": "en-US"63},64"_links": {65"self": {66"href": "https://api.sandbox.checkout.com/payments/pay_er3uvjvfgpauje7o64agv3damy"67},68"actions": {69"href": "https://api.sandbox.checkout.com/payments/pay_er3uvjvfgpauje7o64agv3damy/actions"70}71}72}
If you receive a 202 Accepted response, with the status field set to Pending, your request was successful.
Tamara supports English and Arabic redirect landing pages. You can choose which language to display by setting the processing.locale field in your payment request to either:
en-US– for Englishar-AE– for Arabic
Redirect the customer to the _links.redirect.href URL provided in the payment response. This redirection enables the customer to authenticate with Tamara and complete the payment.
Call the Get payment details endpoint and provide the payment ID as the {id} path parameter.
get
https://api.checkout.com/payments/{id}
The payment_type and payment_plan fields contain the information of the payment option that your customer selected. The following table matches our payment_type and payment_plan values to their corresponding Tamara's payment types:
| API fields | Tamara payment plan |
|---|---|
| Pay in Full |
| Split in 2 |
| Split in 3 |
| Split in 4 |
| Pay Next Month |
Depending on the merchant integration type and the payment status, information about the product_type may not be available. It may also not be part of the GET response.
If the payment has a captured status, the payment response will display the product_type field, showing the payment option selected by the customer.
1{2"id": "pay_er3uvjvfgpauje7o64agv3damy",3"requested_on": "2023-07-06T11:39:05.0933952Z",4"source": {5"type": "tamara"6},7"items": [8{9"name": "item name",10"quantity": 2,11"unit_price": 2500,12"reference": "description of item",13"image_url": "https://some_s3bucket.com",14"url": "https://some.website.com/item",15"total_amount": 5000,16"tax_amount": 0,17"discount_amount": 0,18"sku": "123687000111"19},20{21"name": "Test",22"quantity": 2,23"unit_price": 2500,24"reference": "description of item",25"image_url": "https://some_s3bucket.com",26"url": "https://some.website.com/item",27"total_amount": 5000,28"tax_amount": 0,29"discount_amount": 0,30"sku": "123687000111"31}32],33"amount": 10000,34"currency": "SAR",35"payment_type": "Regular",36"reference": "ORD-5023-4E89",37"status": "Expired",38"approved": false,39"customer": {40"id": "cus_ujs5uvwcshhujllodxegkknwou",41"email": "jane.smith@example.com",42"name": "Jane Smith",43"phone": {44"country_code": "+966",45"number": "556002013"46}47},48"shipping": {49"address": {50"address_line1": "123 Anywhere St.",51"address_line2": "Apt. 456",52"city": "Anytown",53"state": "Riyadh Province",54"zip": "123456",55"country": "SA"56}57},58"processing": {59"partner_payment_id": "2ef5d0b7-f491-4069-b436-1819b3809bda",60"product_type": "pay_by_instalment_3"61},62"_links": {63"self": {64"href": "https://api.sandbox.checkout.com/payments/pay_er3uvjvfgpauje7o64agv3damy"65},66"actions": {67"href": "https://api.sandbox.checkout.com/payments/pay_er3uvjvfgpauje7o64agv3damy/actions"68}69}70}
Tamara supports both partial and full refunds. You can refund a payment through the Dashboard or by using the Refund API.
For the full API specification, see the API reference.
post
https://api.checkout.com/payments/{id}/refunds
1{2"amount": 1003}
1{2"action_id": "act_2zhdyofygycezfjfmqh4iiujoa",3"_links": {4"payment": {5"href": "https://api.checkout.sandbox.com/payments/pay_zt7jpwxhl2werecz2wvfourfya"6}7}8}
If the customer does not complete their payment, we will expire the payment and send a payment_expired webhook within 30 minutes. If the customer cancels their payment, we will send a payment_expired webhook.
Once a payment is created, it cannot be voided by the merchant. To void a payment in progress, wait for the payment_captured webhook, and then process a refund. Communicating this in advance to your end customer can help you avoid chargebacks.
To start testing, contact your account manager or integrations engineer to activate Tamara payments in the sandbox environment.
- Create a Tamara transaction and select the redirect link in the response to Tamara's website.
- Sign in to the account by filling up one of the test phone numbers you have been provided with.
- Confirm the one-time password (OTP) code — it should be pre-filled for you in the sandbox environment.
- Fill in the card details, using one of the test card details provided to you.
- Select Submit. You should then be redirected to your predefined success URL.