Travel and Hotel Booking

For merchants offering both flights and hotel booking

List of Parameters

FieldData TypeRequiredDescription
total_amountObjectRequiredTotal amount to be charged to customer, not including any discount amount(item amount + tax amount + shipping amount - discount amount)
amountNumberRequiredThe exact format depends on the currency. By default we support 2 decimals, for BHD and KWD we support 3 decimals
currencyStringRequiredThe three-letter ISO currency code e.g SAR
shipping_amountObjectRequired
amountNumberRequired
currencyStringRequired
tax_amountObjectRequired
amountNumberRequired
currencyStringRequired
order_reference_idStringRequiredThe unique order id from the merchant side, this will be used with the settlement and reports
order_numberStringOptionalThe order number from the merchant side, this will be used for communication with the customer. If not passed, it will take the order_reference_id value
discountObjectOptionalRequired only if you allow your customers to use a promo/coupon code on your checkout page
nameString
amountObject
amount
currency
risk_assessmentObjectRequiredRisk assessment information from the merchant side
is_premium_customerBooleanRequiredAny subscription package/ VIP segmentation of customers
account_creation_dateStringRequiredDate when the customer registered their account (format: dd-mm-yyyy)
total_order_countIntegerRequiredNo. of successful orders of customer on merchant
risk_scoreIntegerRequiredAggregated transaction/ customer risk score by merchant(if available)
travel_dataObjectRequired
originStringRequiredOrigin IATA Code
destinationStringRequiredDestination IATA Code
travel_typeStringRequiredDomestic/ International
trip_typeStringRequiredOneWay/ Return/ MultipleDestination/ Unknown/ Null
classStringRequiredFlight ticket Type, for e.g., Economy/ Premium/ Business
number_of_passengersNumberRequiredNumber of passengers within this booking
travel_dateStringRequiredDeparture date of flight (format: dd-mm-yyyy)
is_refundable_bookingBooleanRequiredWhether the customer can request for refund for this booking
hotel_dataObjectRequired
checkin_dateStringRequiredCheck-in Date (format: dd-mm-yyyy)
checkout_dateStringRequiredCheck-out Date (format: dd-mm-yyyy)
guest_nameStringRequiredName of the main guest within this booking
number_of_guestsIntegerRequiredNumber of guests within this booking
hotel_cityStringRequiredCity IATA Code
hotel_countryStringRequiredCountry IATA Code (two-character ISO 3166-1 country code)
is_refundable_bookingBooleanRequiredWhether the customer can request for refund for this booking
consumerObjectRequiredThe customer's identifying details.
emailStringOptionalLimited to 128 characters.
phone_numberStringRequiredLimited to 32 characters.
first_nameStringRequired
last_nameStringRequired
itemsArray of ObjectsRequiredItem-specific details from the order
reference_idStringRequiredThe unique id of the product from the merchant side
typeStringRequiredThe type of the product e.g., Digital.
nameStringRequiredThe name of the productLimited to 255 characters.
skuStringRequiredIf applicable, otherwise hardcoded value can be passed. Limited to 128 characters.
quantityIntegerRequiredThe number of units of the product
item_urlUrlOptional
image_urlUrlOptional
unit_priceObjectOptional
tax_amountObjectOptional
amountNumber
currencyString
discount_amountObjectOptional
amountNumber
currencyString
total_amountObjectRequired
amountNumberRequired
currencyStringRequired
country_codeStringRequiredThe two-character ISO 3166-1 country code
descriptionStringRequiredBrief details about the order
merchant_urlObjectRequiredThis object includes all the redirect URLs that the customer will be redirected to from the Tamara checkout page in different cases.
cancelUrlRequiredWhen the user manually cancels the checkout session
failureUrlRequiredWhen the checkout session fails due to a network error or the user is declined
successUrlRequiredWhen the checkout session is successful
billing_addressObjectRequired(if available)
cityString
country_codeString
first_nameString
last_nameString
line1String
line2String
phone_numberString
regionString
shipping_addressObjectRequired (Optional, if not available for digital services)
cityStringRequired
country_codeStringRequired
first_nameStringRequired
last_nameStringRequired
line1StringRequired
line2StringRequired
phone_numberStringRequired
regionStringRequired
localeStringRequired(Recommended to be passed for optimum customer experience)
platformStringRequiredThe platform where the Tamara order is being initiated from e.g.,, web, mobile, etc.
is_mobileBooleanRequiredWhether the order is being initiated from a mobile device or not
payment_typeStringRequired only if single checkout is disabled
instalmentsIntegerRequired only if single checkout is disabled
expire_in_minutesIntegerRequired only if customOrder expiry time in minutes
additional_dataObjectAny additional order data information from the merchant side


Request Payload Sample

{
    "total_amount": {
        "amount": 50.00,
        "currency": "SAR"
    },
    "shipping_amount": {
        "amount": 1,
        "currency": "SAR"
    },
    "tax_amount": {
        "amount": 7.35,
        "currency": "SAR"
    },
    "order_reference_id": "abd12331-a123-1234-4567-473fkid5",
    "risk_assessment": {
        "is_premium_customer": true,
        "account_creation_date": "31-01-2019",
        "total_order_count": 12,
				"risk_score": 5,
        "travel_data": {
            "origin": "RUH",
            "destination": "JED",
            "travel_type": "Domestic",
            "trip_type": "Return",
            "class": "Economy",
            "number_of_passengers": 3,
            "travel_date": "24-08-2024",
            "return_date": "29-08-2024",
            "is_refundable_booking": "true"
        },
        "hotel_data": {
            "checkin_date": "24-08-2025",
            "checkout_date": "25-08-2025",
            "guest_name": "Mona",
            "number_of_guests": 2,
            "hotel_city": "Riyadh",
            "hotel_country": "SA",
            "is_refundable_booking": "true"
        }
    },
 "consumer": {
        "phone_number": "502223333",
        "first_name": "Mona",
        "last_name": "Lisa",
        "email": "[email protected]"
    },
    "items": [
        {
            "total_amount": {
                "amount": 304.04,
                "currency": "SAR"
            },
            "reference_id": "SA-12436",
            "type": "Digital",
            "name": "RUH - JED Return Ticket",
            "sku": "SA-12436",
            "quantity": 1,
            "tax_amount": {
                "amount": 0,
                "currency": "SAR"
            }
        },
        {
            "total_amount": {
                "amount": 304.04,
                "currency": "SAR"
            },
            "reference_id": "SA-12436",
            "type": "Digital",
            "name": "Happy Hotel Reservation",
            "sku": "SA-12436",
            "quantity": 1,
            "tax_amount": {
                "amount": 0,
                "currency": "SAR"
            }
        }
    ],
    "country_code": "SA",
    "description": "Test Hospitality Order",
    "merchant_url": {
        "cancel": "http://example.com/#/cancel",
        "failure": "http://example.com/#/fail",
        "success": "http://example.com/#/success"
    },
    "shipping_address": {
        "country_code": "SA",
        "first_name": "Mona",
        "last_name": "Lisa",
        "line1": "3764 Al Urubah Rd",
        "line2": "string",
        "region": "As Sulimaniyah",
        "postal_code": "12345",
        "city": "Riyadh",
        "phone_number": "502223333"
    },
    "locale": "ar_SA",
    "platform": "platform name here",
    "is_mobile": false
}