Car Rentals
Provides additional guidance for car rental companies and platforms by adding rental details, including rental company, pick-up and drop-off dates and locations, car class, and number of drivers.
Additional guidance for car rental companies and platforms that rent out vehicles.
Send every field from the General page plus the car_rentals object inside risk_assessment. For car rentals, risk_score is also Required.
What's different for car rentals
- Add
risk_assessment.car_rentals: rental company, pick-up and drop-off dates and locations, car class and number of drivers. Each of these is required if available.- Send
risk_assessment.risk_score. It's optional on the General page but Required for car rentals.- Car rentals are
Digitalitems, soshipping_addresscan be left out when no shipping address is available.
Endpoint
POST /checkout: see Create Checkout Session for the full API reference.
| Environment | Base URL |
|---|---|
| Sandbox | https://api-sandbox.tamara.co/checkout |
| Production | https://api.tamara.co/checkout |
Authenticate every request with the API token provided by Tamara in the Authorization header:
Authorization: Bearer <your_api_token>
Content-Type: application/jsonOn this page
- Before you start
- Request structure at a glance
- Order details
- Amounts
- Risk assessment
- Rental details
- Consumer
- Items
- Redirect URLs
- Addresses
- Checkout options
- Full request example
- Minimal request example
- Common mistakes
- FAQs
Before you start
| Convention | Rule |
|---|---|
| Dates | Send all dates as strings in dd-mm-yyyy format, for example 31-01-2026. |
| Currency | Use the three-letter ISO 4217 code: SAR, AED, BHD, KWD or OMR. |
| Decimal places | Amounts support 2 decimal places by default, and 3 decimal places for BHD, KWD and OMR. |
| Country | Use the two-letter ISO 3166-1 code: SA, AE, BH, KW or OM. |
| Required fields | Fields marked Required must always be sent. Conditional fields are required only in the case described. |
Send as much as you canOptional fields are not needed for the request to succeed, but the more risk signals you share, the more accurately Tamara can assess each order.
Request structure at a glance
| Field | Type | Required | Section |
|---|---|---|---|
order_reference_id | String | Required | Order details |
order_number | String | Optional | Order details |
description | String | Required | Order details |
country_code | String | Required | Order details |
locale | String | Required | Order details |
platform | String | Required | Order details |
is_mobile | Boolean | Required | Order details |
total_amount | Amount object | Required | Amounts |
shipping_amount | Amount object | Required | Amounts |
tax_amount | Amount object | Required | Amounts |
discount | Object | Conditional | Amounts |
risk_assessment | Object | Required | Risk assessment |
risk_assessment.car_rentals | Object | Required | Rental details |
consumer | Object | Required | Consumer |
items | Array of objects | Required | Items |
merchant_url | Object | Required | Redirect URLs |
billing_address | Object | Conditional | Addresses |
shipping_address | Object | Conditional | Addresses |
payment_type | String | Conditional | Checkout options |
instalments | Integer | Conditional | Checkout options |
expires_in_minutes | Integer | Optional | Checkout options |
additional_data | Object | Optional | Checkout options |
Order details
| Field | Type | Required | Description |
|---|---|---|---|
order_reference_id | String | Required | Your unique order ID. Tamara uses it in settlements and reports. |
order_number | String | Optional | The order number you show to the customer, used in customer communication. Defaults to order_reference_id if not sent. |
description | String | Required | A short description of the order. |
country_code | String | Required | Two-letter ISO 3166-1 country code of the order, for example SA. |
locale | String | Required | Language of the Tamara checkout page: ar_SA or en_US. Send it to give the customer the best experience. |
platform | String | Required | Where the order was started, for example web or mobile. |
is_mobile | Boolean | Required | true if the order was started from a mobile device. |
Amounts
All amount fields use the same Amount object:
| Field | Type | Required | Description |
|---|---|---|---|
amount | Number | Required | The value. 2 decimal places by default, 3 for BHD, KWD and OMR. |
currency | String | Required | Three-letter ISO 4217 currency code, for example SAR. |
| Field | Type | Required | Description |
|---|---|---|---|
total_amount | Amount object | Required | The final amount charged to the customer: item amount + tax amount + shipping amount − discount amount. |
shipping_amount | Amount object | Required | The shipping cost for the order. Send 0 for car rentals with no delivery. |
tax_amount | Amount object | Required | The total tax for the order. Do not send negative values. |
discount | Object | Conditional | Required only if customers can use a promo or coupon code at your checkout. See the table below. |
discount object
discount object| Field | Type | Required | Description |
|---|---|---|---|
name | String | Required | The name of the promo or coupon code. |
amount | Amount object | Required | The discount value applied to the order. |
"total_amount": { "amount": 410, "currency": "SAR" },
"shipping_amount": { "amount": 0, "currency": "SAR" },
"tax_amount": { "amount": 60, "currency": "SAR" },
"discount": {
"name": "RENT50",
"amount": { "amount": 50, "currency": "SAR" }
}Risk assessment
The risk_assessment object shares what you know about the customer, so Tamara can assess the order accurately.
| Field | Type | Required | Description |
|---|---|---|---|
is_premium_customer | Boolean | Required | true if the customer has a subscription package or VIP status with you. |
account_creation_date | String | Required | When the customer registered their account with you (dd-mm-yyyy). |
total_order_count | Integer | Required | Number of successful orders the customer has placed with you. |
date_first_paid | String | Required | Date of the customer's first successful order (dd-mm-yyyy). Send null if this is their first order. |
date_last_paid | String | Required | Date of the customer's last successful order (dd-mm-yyyy). Send null if this is their first order. |
risk_score | Integer | Required | Your own aggregated risk score for the customer or transaction. Required for car rentals. |
order_count_last_24h | Integer | Optional | Number of successful orders the customer has placed with you in the last 24 hours. |
account_security | Object | Optional | Security and identity signals for the customer's account. See the table below. |
car_rentals | Object | Required | Details of the rental booking. See Rental details. |
account_security object
account_security object| Field | Type | Required | Description |
|---|---|---|---|
is_email_verified | Boolean | Optional | true if you have verified the customer's email address. |
is_phone_verified | Boolean | Optional | true if you have verified the customer's phone number. |
password_last_changed | String | Optional | Date of the last password reset (dd-mm-yyyy). |
last_login_date | String | Optional | Date of the customer's last login (dd-mm-yyyy). |
last_verification_method | String | Optional | Method used for the last authentication, for example OTP or Biometric. |
device_id | String | Optional | Your unique device fingerprint or ID. A hashed value is fine. |
devices_linked | String | Optional | Number of active devices linked to the account, sent as a string, for example "2". |
"risk_assessment": {
"is_premium_customer": true,
"account_creation_date": "31-01-2019",
"total_order_count": 12,
"date_first_paid": "31-01-2019",
"date_last_paid": "31-01-2026",
"risk_score": 5,
"order_count_last_24h": 0,
"account_security": {
"is_email_verified": true,
"is_phone_verified": true,
"password_last_changed": "31-01-2026",
"last_login_date": "31-01-2026",
"last_verification_method": "OTP",
"device_id": "#123",
"devices_linked": "2"
}
}Rental details
The car_rentals object sits inside risk_assessment and describes the rental booking. The booking fields are Required if available: send each one you have.
| Field | Type | Required | Description |
|---|---|---|---|
rental_company | String | Required if available | Name of the rental company, for example Hertz or Enterprise. Send null if you are the rental company and not an aggregator. |
pickup_date | String | Required if available | Date the customer picks up the car (dd-mm-yyyy). |
dropoff_date | String | Required if available | Date the customer returns the car (dd-mm-yyyy). |
pickup_location | String | Required if available | Address of the pick-up location, or the airport code if applicable. |
dropoff_location | String | Required if available | Address of the return location, or the airport code if applicable. |
car_class | String | Required if available | Rental class, for example Economy, Luxury or SUV. |
number_of_drivers | Integer | Required if available | Total number of drivers on the booking. |
name_of_drivers | Object | Optional | Driver names, one key per driver. See the table below. |
insurance_purchased | Boolean | Optional | true if the customer bought rental insurance, for example damage, cancellation or travel cover. |
add_ons | String | Optional | Extras the customer bought, for example additional driver, GPS, child seat or unlimited mileage. |
deposit_required | Boolean | Optional | true if the rental needs a security deposit or pre-authorization hold. |
deposit_payment_type | String | Optional | How the deposit is paid: Cash, Credit Card, Debit Card or Prepaid Card. |
name_of_drivers object
name_of_drivers object| Field | Type | Required | Description |
|---|---|---|---|
driver1_name | String | Optional | Full name of the first driver. |
driver2_name | String | Optional | Full name of the second driver. Add driver3_name and so on for more drivers. |
"car_rentals": {
"rental_company": "Hertz",
"pickup_date": "08-07-2026",
"dropoff_date": "10-07-2026",
"pickup_location": "City Center, Riyadh",
"dropoff_location": "City Center, Riyadh",
"car_class": "SUV",
"number_of_drivers": 2,
"name_of_drivers": {
"driver1_name": "Mona Lisa",
"driver2_name": "Omar Ali"
},
"insurance_purchased": true,
"add_ons": "Child seat",
"deposit_required": true,
"deposit_payment_type": "Credit Card"
}Consumer
| Field | Type | Required | Description |
|---|---|---|---|
first_name | String | Required | The customer's first name. |
last_name | String | Required | The customer's last name. |
phone_number | String | Required | The customer's phone number. Maximum 13 characters. |
email | String | Optional | The customer's email address. Maximum 128 characters. |
"consumer": {
"first_name": "Mona",
"last_name": "Lisa",
"phone_number": "566027755",
"email": "[email protected]"
}Items
items is an array with one object for each product in the order.
| Field | Type | Required | Description |
|---|---|---|---|
reference_id | String | Required | Your unique ID for the product. |
name | String | Required | The product name, for example SUV rental, 2 days. Maximum 255 characters. |
sku | String | Required | Your SKU for the product. Maximum 128 characters. |
quantity | Integer | Required | Number of units ordered. |
type | String | Required | The product type. Car rentals are Digital. |
total_amount | Amount object | Required | The total amount for this line item. |
unit_price | Amount object | Optional | The price of one unit. |
tax_amount | Amount object | Optional | The tax for this line item. |
discount_amount | Amount object | Optional | The discount applied to this line item. |
item_url | URL | Optional | Link to the product page. |
image_url | URL | Optional | Link to the product image. |
"items": [
{
"reference_id": "RNT-12436",
"type": "Digital",
"name": "SUV rental, 2 days",
"sku": "SUV-RUH-2D",
"quantity": 1,
"unit_price": { "amount": 400, "currency": "SAR" },
"tax_amount": { "amount": 60, "currency": "SAR" },
"total_amount": { "amount": 460, "currency": "SAR" }
}
]Redirect URLs
The merchant_url object tells Tamara where to send the customer after checkout.
| Field | Type | Required | When the customer is redirected |
|---|---|---|---|
success | URL | Required | The checkout session completed successfully. |
failure | URL | Required | The checkout failed because of a network error, or the customer was declined. |
cancel | URL | Required | The customer cancelled the checkout. |
"merchant_url": {
"success": "https://example.com/checkout/success",
"failure": "https://example.com/checkout/failure",
"cancel": "https://example.com/checkout/cancel"
}Addresses
Both addresses use the same Address object.
| Field | Type | Required in shipping_address | Required in billing_address | Description |
|---|---|---|---|---|
first_name | String | Required | Required if available | Recipient's first name. |
last_name | String | Required | Required if available | Recipient's last name. |
line1 | String | Required | Required if available | First line of the street address. |
line2 | String | Required | Required if available | Second line of the street address. |
region | String | Required | Required if available | Region, district or neighbourhood. |
city | String | Required | Required if available | City. |
postal_code | String | Optional | Optional | Postal code. |
country_code | String | Required | Required if available | Two-letter ISO 3166-1 country code. |
phone_number | String | Required | Required if available | Contact phone number for this address. |
| Object | When to send it |
|---|---|
shipping_address | Required. You can leave it out for car rentals when no shipping address is available. |
billing_address | Required if available. If you send it, include every field marked Required if available. |
"shipping_address": {
"first_name": "Mona",
"last_name": "Lisa",
"line1": "3764 Al Urubah Rd",
"line2": "Apartment 12",
"region": "As Sulimaniyah",
"city": "Riyadh",
"postal_code": "12345",
"country_code": "SA",
"phone_number": "566027755"
}Checkout options
| Field | Type | Required | Description |
|---|---|---|---|
payment_type | String | Conditional | Required only if single checkout is disabled on your account. |
instalments | Integer | Conditional | Required only if single checkout is disabled on your account. |
expires_in_minutes | Integer | Optional | How long the order stays open, in minutes. Minimum 5, maximum 1440 (one day). Ignored unless Tamara support enables custom expiry for your account; otherwise the default is 30 minutes. |
additional_data | Object | Optional | Any extra order information you want to share with Tamara. See the table below. |
additional_data object
additional_data object| Field | Type | Required | Description |
|---|---|---|---|
delivery_method | String | Optional | The delivery method the customer chose, for example Home Delivery or click and collect. |
pickup_store | String | Optional | The collection point the customer chose, if the order is for store pickup. |
store_code | String | Optional | The unique store code or name the request comes from. |
vendor_amount | Number | Optional | The amount to be settled to the vendor. |
merchant_settlement_amount | Number | Optional | The amount to be settled to the merchant. |
vendor_reference_code | String | Optional | The vendor identifier. |
"additional_data": {
"delivery_method": "Home Delivery",
"pickup_store": "Store A",
"store_code": "Branch A",
"vendor_amount": 0,
"merchant_settlement_amount": 0,
"vendor_reference_code": "AZ1234"
}Full request example
The request below includes every required, conditional and optional field for car rentals. Each field has a comment that says whether it's Required, Conditional, Required if available or Optional.
Remove the comments before sendingJSON doesn't allow comments. Use the Without comments tab, or delete the
//lines, before you send the request.
{
// ─── Order details ───────────────────────────────────────────────
// Required: your unique order ID, used in settlements and reports
"order_reference_id": "abd12331-a123-1234-4567-473fkid5",
// Optional: order number shown to the customer; defaults to order_reference_id
"order_number": "S12356",
// Required: short description of the order
"description": "SUV rental, Riyadh, 2 days",
// Required: two-letter ISO 3166-1 country code (SA, AE, BH, KW, OM)
"country_code": "SA",
// Required: checkout page language (ar_SA or en_US)
"locale": "ar_SA",
// Required: where the order was started, e.g. web, mobile or your platform name
"platform": "web",
// Required: true if the order was started from a mobile device
"is_mobile": false,
// ─── Amounts ─────────────────────────────────────────────────────
// Required: final amount = item amount + tax + shipping − discount (400 + 60 + 0 − 50)
"total_amount": {
// Required: 2 decimals by default, 3 for BHD, KWD and OMR
"amount": 410,
// Required: three-letter ISO 4217 code (SAR, AED, BHD, KWD, OMR)
"currency": "SAR"
},
// Required: shipping cost for the order; send 0 for car rentals with no delivery
"shipping_amount": {
// Required
"amount": 0,
// Required
"currency": "SAR"
},
// Required: total tax for the order; no negative values
"tax_amount": {
// Required
"amount": 60,
// Required
"currency": "SAR"
},
// Conditional: required only if the customer applied a promo or coupon code to this order
"discount": {
// Required: name of the promo or coupon code
"name": "RENT50",
// Required: discount value applied to the order
"amount": {
// Required
"amount": 50,
// Required
"currency": "SAR"
}
},
// ─── Risk assessment ─────────────────────────────────────────────
// Required: what you know about the customer
"risk_assessment": {
// Required: true if the customer has a subscription package or VIP status
"is_premium_customer": true,
// Required: date the customer registered with you (dd-mm-yyyy)
"account_creation_date": "31-01-2019",
// Required: number of successful orders with you
"total_order_count": 12,
// Required: date of first successful order (dd-mm-yyyy); null if first order
"date_first_paid": "31-01-2019",
// Required: date of last successful order (dd-mm-yyyy); null if first order
"date_last_paid": "31-01-2026",
// Required for car rentals: your own aggregated risk score for the customer or transaction
"risk_score": 5,
// Optional: number of successful orders in the last 24 hours
"order_count_last_24h": 0,
// Optional: security and identity signals for the account
"account_security": {
// Optional: true if you verified the customer's email
"is_email_verified": true,
// Optional: true if you verified the customer's phone number
"is_phone_verified": true,
// Optional: date of last password reset (dd-mm-yyyy)
"password_last_changed": "31-01-2026",
// Optional: date of last login (dd-mm-yyyy)
"last_login_date": "31-01-2026",
// Optional: method used for the last authentication, e.g. OTP or Biometric
"last_verification_method": "OTP",
// Optional: your device fingerprint or ID; a hashed value is fine
"device_id": "#123",
// Optional: number of active devices linked to the account, sent as a string
"devices_linked": "2"
},
// Required: details of the rental booking
"car_rentals": {
// Required if available: rental company name; null if you are the rental company and not an aggregator
"rental_company": "Hertz",
// Required if available: pick-up date (dd-mm-yyyy)
"pickup_date": "08-07-2026",
// Required if available: drop-off date (dd-mm-yyyy)
"dropoff_date": "10-07-2026",
// Required if available: pick-up address, or airport code if applicable
"pickup_location": "City Center, Riyadh",
// Required if available: drop-off address, or airport code if applicable
"dropoff_location": "City Center, Riyadh",
// Required if available: rental class, e.g. Economy, Luxury or SUV
"car_class": "SUV",
// Required if available: total number of drivers on the booking
"number_of_drivers": 2,
// Optional: names of the drivers, one key per driver
"name_of_drivers": {
// Optional
"driver1_name": "Mona Lisa",
// Optional
"driver2_name": "Omar Ali"
},
// Optional: true if the customer bought rental insurance
"insurance_purchased": true,
// Optional: extras bought, e.g. additional driver, GPS, child seat or unlimited mileage
"add_ons": "Child seat",
// Optional: true if the rental needs a security deposit or pre-authorization hold
"deposit_required": true,
// Optional: how the deposit is paid: Cash, Credit Card, Debit Card or Prepaid Card
"deposit_payment_type": "Credit Card"
}
},
// ─── Consumer ────────────────────────────────────────────────────
// Required: the customer's identifying details
"consumer": {
// Required
"first_name": "Mona",
// Required
"last_name": "Lisa",
// Required: maximum 32 characters
"phone_number": "566027755",
// Optional: maximum 128 characters
"email": "[email protected]"
},
// ─── Items ───────────────────────────────────────────────────────
// Required: one object per product in the order
"items": [
{
// Required: your unique ID for the rental booking
"reference_id": "RNT-12436",
// Required: product type; car rentals are Digital
"type": "Digital",
// Required: product name; maximum 255 characters
"name": "SUV rental, 2 days",
// Required: your SKU; maximum 128 characters
"sku": "SUV-RUH-2D",
// Required: number of units ordered
"quantity": 1,
// Optional: price of one unit
"unit_price": {
"amount": 400,
"currency": "SAR"
},
// Optional: tax for this line item
"tax_amount": {
"amount": 60,
"currency": "SAR"
},
// Optional: discount applied to this line item
"discount_amount": {
"amount": 0,
"currency": "SAR"
},
// Required: total amount for this line item
"total_amount": {
// Required
"amount": 460,
// Required
"currency": "SAR"
},
// Optional: link to the rental offer
"item_url": "https://example.com/rentals/suv-riyadh",
// Optional: link to a photo of the car class
"image_url": "https://example.com/images/suv.png"
}
],
// ─── Redirect URLs ───────────────────────────────────────────────
// Required: where Tamara sends the customer after checkout
"merchant_url": {
// Required: checkout completed successfully
"success": "https://example.com/checkout/success",
// Required: checkout failed or the customer was declined
"failure": "https://example.com/checkout/failure",
// Required: the customer cancelled the checkout
"cancel": "https://example.com/checkout/cancel"
},
// ─── Addresses ───────────────────────────────────────────────────
// Required if available: the customer's billing address
"billing_address": {
// Required if available
"first_name": "Mona",
// Required if available
"last_name": "Lisa",
// Required if available
"line1": "3764 Al Urubah Rd",
// Required if available
"line2": "Apartment 12",
// Required if available
"region": "As Sulimaniyah",
// Required if available
"city": "Riyadh",
// Optional
"postal_code": "12345",
// Required if available: two-letter ISO 3166-1 country code
"country_code": "SA",
// Required if available
"phone_number": "566027755"
},
// Required: can be left out for car rentals when no shipping address is available
"shipping_address": {
// Required
"first_name": "Mona",
// Required
"last_name": "Lisa",
// Required
"line1": "3764 Al Urubah Rd",
// Required
"line2": "Apartment 12",
// Required
"region": "As Sulimaniyah",
// Required
"city": "Riyadh",
// Optional
"postal_code": "12345",
// Required: two-letter ISO 3166-1 country code
"country_code": "SA",
// Required
"phone_number": "566027755"
},
// ─── Checkout options ────────────────────────────────────────────
// Conditional: required only if single checkout is disabled on your account
"payment_type": "PAY_BY_INSTALMENTS",
// Conditional: required only if single checkout is disabled on your account
"instalments": 3,
// Optional: order expiry in minutes (5–1440); ignored unless Tamara support enables it, default 30
"expires_in_minutes": 60,
// Optional: any extra order information
"additional_data": {
// Optional: delivery method chosen by the customer
"delivery_method": "Home Delivery",
// Optional: collection point, if the order is for store pickup
"pickup_store": "Store A",
// Optional: the store code or name the request comes from
"store_code": "Branch A",
// Optional: the amount to be settled to the vendor
"vendor_amount": 0,
// Optional: the amount to be settled to the merchant
"merchant_settlement_amount": 0,
// Optional: the vendor identifier
"vendor_reference_code": "AZ1234"
}
}{
"order_reference_id": "abd12331-a123-1234-4567-473fkid5",
"order_number": "S12356",
"description": "SUV rental, Riyadh, 2 days",
"country_code": "SA",
"locale": "ar_SA",
"platform": "web",
"is_mobile": false,
"total_amount": {
"amount": 410,
"currency": "SAR"
},
"shipping_amount": {
"amount": 0,
"currency": "SAR"
},
"tax_amount": {
"amount": 60,
"currency": "SAR"
},
"discount": {
"name": "RENT50",
"amount": {
"amount": 50,
"currency": "SAR"
}
},
"risk_assessment": {
"is_premium_customer": true,
"account_creation_date": "31-01-2019",
"total_order_count": 12,
"date_first_paid": "31-01-2019",
"date_last_paid": "31-01-2026",
"risk_score": 5,
"order_count_last_24h": 0,
"account_security": {
"is_email_verified": true,
"is_phone_verified": true,
"password_last_changed": "31-01-2026",
"last_login_date": "31-01-2026",
"last_verification_method": "OTP",
"device_id": "#123",
"devices_linked": "2"
},
"car_rentals": {
"rental_company": "Hertz",
"pickup_date": "08-07-2026",
"dropoff_date": "10-07-2026",
"pickup_location": "City Center, Riyadh",
"dropoff_location": "City Center, Riyadh",
"car_class": "SUV",
"number_of_drivers": 2,
"name_of_drivers": {
"driver1_name": "Mona Lisa",
"driver2_name": "Omar Ali"
},
"insurance_purchased": true,
"add_ons": "Child seat",
"deposit_required": true,
"deposit_payment_type": "Credit Card"
}
},
"consumer": {
"first_name": "Mona",
"last_name": "Lisa",
"phone_number": "566027755",
"email": "[email protected]"
},
"items": [
{
"reference_id": "RNT-12436",
"type": "Digital",
"name": "SUV rental, 2 days",
"sku": "SUV-RUH-2D",
"quantity": 1,
"unit_price": {
"amount": 400,
"currency": "SAR"
},
"tax_amount": {
"amount": 60,
"currency": "SAR"
},
"discount_amount": {
"amount": 0,
"currency": "SAR"
},
"total_amount": {
"amount": 460,
"currency": "SAR"
},
"item_url": "https://example.com/rentals/suv-riyadh",
"image_url": "https://example.com/images/suv.png"
}
],
"merchant_url": {
"success": "https://example.com/checkout/success",
"failure": "https://example.com/checkout/failure",
"cancel": "https://example.com/checkout/cancel"
},
"billing_address": {
"first_name": "Mona",
"last_name": "Lisa",
"line1": "3764 Al Urubah Rd",
"line2": "Apartment 12",
"region": "As Sulimaniyah",
"city": "Riyadh",
"postal_code": "12345",
"country_code": "SA",
"phone_number": "566027755"
},
"shipping_address": {
"first_name": "Mona",
"last_name": "Lisa",
"line1": "3764 Al Urubah Rd",
"line2": "Apartment 12",
"region": "As Sulimaniyah",
"city": "Riyadh",
"postal_code": "12345",
"country_code": "SA",
"phone_number": "566027755"
},
"payment_type": "PAY_BY_INSTALMENTS",
"instalments": 3,
"expires_in_minutes": 60,
"additional_data": {
"delivery_method": "Home Delivery",
"pickup_store": "Store A",
"store_code": "Branch A",
"vendor_amount": 0,
"merchant_settlement_amount": 0,
"vendor_reference_code": "AZ1234"
}
}Minimal request example
The smallest request that includes every Required field for car rentals, including risk_score and the car_rentals details. Use it as a starting point, then add optional fields to share more risk signals.
Before you send it
- If single checkout is disabled on your account, also send
payment_typeandinstalments.- If the customer applied a promo or coupon code, also send
discount.- If you have the customer's billing address, also send
billing_address.- For a customer's first order, send
nullfordate_first_paidanddate_last_paid.
{
"order_reference_id": "abd12331-a123-1234-4567-473fkid5",
"description": "SUV rental, Riyadh, 2 days",
"country_code": "SA",
"locale": "ar_SA",
"platform": "web",
"is_mobile": false,
"total_amount": {
"amount": 460,
"currency": "SAR"
},
"shipping_amount": {
"amount": 0,
"currency": "SAR"
},
"tax_amount": {
"amount": 60,
"currency": "SAR"
},
"risk_assessment": {
"is_premium_customer": false,
"account_creation_date": "31-01-2019",
"total_order_count": 12,
"date_first_paid": "31-01-2019",
"date_last_paid": "31-01-2026",
"risk_score": 5,
"car_rentals": {
"rental_company": "Hertz",
"pickup_date": "08-07-2026",
"dropoff_date": "10-07-2026",
"pickup_location": "City Center, Riyadh",
"dropoff_location": "City Center, Riyadh",
"car_class": "SUV",
"number_of_drivers": 2
}
},
"consumer": {
"first_name": "Mona",
"last_name": "Lisa",
"phone_number": "566027755"
},
"items": [
{
"reference_id": "RNT-12436",
"type": "Digital",
"name": "SUV rental, 2 days",
"sku": "SUV-RUH-2D",
"quantity": 1,
"total_amount": {
"amount": 460,
"currency": "SAR"
}
}
],
"merchant_url": {
"success": "https://example.com/checkout/success",
"failure": "https://example.com/checkout/failure",
"cancel": "https://example.com/checkout/cancel"
},
"shipping_address": {
"first_name": "Mona",
"last_name": "Lisa",
"line1": "3764 Al Urubah Rd",
"line2": "Apartment 12",
"region": "As Sulimaniyah",
"city": "Riyadh",
"country_code": "SA",
"phone_number": "566027755"
}
}Common mistakes
Check these before going live
- Wrong date format. Send all dates as
dd-mm-yyyystrings, for example31-01-2026, not2026-01-31.- Wrong types for counts. Send
total_order_countandorder_count_last_24has integers (12), butdevices_linkedas a string ("2").- First-time customers. Send
nullfordate_first_paidanddate_last_paidwhen it is the customer's first order.- Totals that don't add up.
total_amountmust equal item amount + tax amount + shipping amount − discount amount.- Too many decimals. Use 2 decimal places, or 3 for
BHD,KWDandOMR.- Leaving out rental details you have. The
car_rentalsbooking fields are required if available, so send each one you know.- Wrong date format for the rental. Send
pickup_dateanddropoff_dateasdd-mm-yyyy.- Driver count doesn't match the names.
number_of_driversshould equal the number of names inname_of_drivers, and it must be an integer (2), not a string.- Free-text deposit payment type. Send one of
Cash,Credit Card,Debit CardorPrepaid Cardindeposit_payment_type.- Missing
risk_score. It's optional on the General page but Required for car rentals.
FAQs
Answers to common questions, grouped by topic. Select a question to expand it.
Car rentals
What if I don't have every rental detail?
The booking fields in car_rentals (company, dates, locations, car class and number of drivers) are Required if available. Send each one you have; leave out only the ones you don't know. The car_rentals object itself is required.
What do I send in rental_company if I'm the rental company?
Send null. Fill in rental_company, for example Hertz, only when you're an aggregator selling another company's rentals.
How do I send an airport pick-up or drop-off?
Send the airport code in pickup_location or dropoff_location, for example RUH. For other branches, send the branch address, for example City Center, Riyadh.
How do I send the drivers?
Send the count as an integer in number_of_drivers, and optionally each name in name_of_drivers as driver1_name, driver2_name and so on. Keep the count and the names in step.
How do I send the security deposit?
Set deposit_required to true if the rental needs a deposit or pre-authorization hold, and send how it's paid in deposit_payment_type: Cash, Credit Card, Debit Card or Prepaid Card.
Do I need a shipping address for a car rental?
Send it if you have one. Car rentals are Digital items, so you can leave shipping_address out when no shipping address is available. Send 0 in shipping_amount unless you charge for delivering the car.
Is risk_score required for car rentals?
Yes. risk_score is optional on the General page, but Required for car rentals.
Getting started
Do I also need to send the General fields?
Yes. Send every field from the General page, plus the car_rentals object and risk_score.
Do I have to send the optional fields?
No, the request works without them. But optional fields such as risk_score, order_count_last_24h and account_security are extra risk signals. The more you share, the more accurately Tamara can assess each order.
Can I test before going live?
Yes. Send requests to the sandbox URL https://api-sandbox.tamara.co/checkout with your sandbox API token, then switch to https://api.tamara.co/checkout with your live token.
Customer and risk data
What should I send for a customer placing their first order?
Send null for both date_first_paid and date_last_paid, and 0 for total_order_count.
Which date format should I use?
Send every date as a string in dd-mm-yyyy format, for example 31-01-2026.
Amounts
How is total_amount calculated?
total_amount is the final amount charged to the customer: item amount + tax amount + shipping amount − discount amount.
How many decimal places can amounts have?
2 decimal places by default, and 3 for BHD, KWD and OMR.
When should I send the discount object?
Only when the customer applies a promo or coupon code to this specific order. Don't use it for site-wide discounts.
Addresses
Is billing_address required?
It's required if available. If you send it, include every field marked Required if available in the Addresses table.
Checkout session
Do I need to send payment_type and instalments?
Only if single checkout is disabled on your account. If you're not sure which applies to you, ask your Tamara account manager.
What happens if I don't send locale?
New customers see the checkout page in Arabic. Returning customers see their saved language preference. Send ar_SA or en_US to control it yourself.
How long does a checkout session stay open?
30 minutes by default. You can set between 5 and 1440 minutes with expires_in_minutes, but only after Tamara support enables custom expiry for your account.
Where is the customer sent after checkout?
To one of the URLs in merchant_url: success when checkout completes, failure if it fails or the customer is declined, and cancel if the customer cancels.
What should I do with the response?
The response includes order_id, checkout_id, status and checkout_url. Store the order_id in your database so you can fetch the order details later, then redirect the customer to the checkout_url to complete the payment through Tamara. See Create Checkout Session.
Updated about 2 months ago
