# Create an order

Use this endpoint to confirm the booking and proceed the payment.

Endpoint: POST /orders/create
Version: 3.1
Security: BearerAuth

## Header parameters:

  - `X-Affiliate-Id` (integer, required)
    Include here your Affiliate identifier number

## Request fields (application/json):

  - `accommodation` (object)
    Additional information related to the accommodation order.

  - `accommodation.label` (string)
    A label for this order. This can be read back later while fetching this order details.

  - `accommodation.products` (array)

  - `accommodation.products.id` (string, required)
    ID for this product. Please note that this MUST match the product IDs used for related /orders/preview request.

  - `accommodation.products.bed_configuration` (string)
    Bed configuration ID to select for this product. Please note that it can not be guaranteed that the selected bed_configuration will be available.

  - `accommodation.products.guests` (array)
    The guest details for this product.

  - `accommodation.products.guests.email` (string, required)
    The email address of the guest.

  - `accommodation.products.guests.name` (string, required)
    The name of the guest.

  - `accommodation.remarks` (object)
    Optional remarks from the guest.

  - `accommodation.remarks.estimated_arrival_time` (object)
    Estimated arrival time of the guests.

  - `accommodation.remarks.estimated_arrival_time.hour` (integer, required)
    Approximate hour of arrival to the hotel. Allowed values are from 0 to 23. This time should be within the hotel reception hours, or will be ignored otherwise with a warning will be appended to special_requests.

  - `accommodation.remarks.estimated_arrival_time.next_day` (boolean)
    Set this to true, if the hour selected is for the day after checkin.

  - `accommodation.remarks.special_requests` (string)
    Optional comments or requests from the guest. Special requests cannot be guaranteed – but the property will do its best to meet your needs.

  - `booker` (object, required)
    The booker's information.

  - `booker.address` (object, required)
    The booker's address to be used for creating this order. All fields of this object are required if the /accommodations/details endpoint indicates that the booker's address is necessary by returning booker_address_required=true.

  - `booker.address.address_line` (string)
    The details of this address.

  - `booker.address.city` (string)
    The city for this address.

  - `booker.address.country` (string, required)
    The country for this address.
    Example: "nl"

  - `booker.address.post_code` (string)
    Post code for this address.

  - `booker.company` (string)
    The booker's company name.

  - `booker.email` (string, required)
    The booker's email address.

  - `booker.language` (string)
    A [IETF language tag code](https://en.wikipedia.org/wiki/IETF_language_tag) that uniquely identifies a supported human language or dialect. Note: Demand API only accepts lowercase for the language codes. Examples: "nl" for Dutch/Nederlands or "en-us" for English (US). To retrieve the full list of supported languages, call the /common/languages endpoint in the same Demand API version you are using.
    Example: "en-us"

  - `booker.name` (object, required)
    The name of the booker.

  - `booker.name.first_name` (string, required)

  - `booker.name.last_name` (string, required)

  - `booker.telephone` (string, required)
    The booker's telephone number.

  - `order_token` (string, required)
    A token containing the necessary data to be used for creating this order.

  - `payment` (object, required)
    Payment related information for the order.

  - `payment.airplus` (object)
    All information related to airplus payment. This is required if airplus is selected as payment method.

  - `payment.airplus.dbi` (object)
    Descriptive billing information(dbi) details to pass to AirPlus.

  - `payment.airplus.dbi.accounting_code` (string)
    Accounting code to pass in descriptive billing information.

  - `payment.airplus.dbi.accounting_unit` (string)
    Accounting unit to pass in descriptive billing information.

  - `payment.airplus.dbi.cost_centre` (string)
    Cost centre to pass in descriptive billing information.

  - `payment.airplus.dbi.department_code` (string)
    Department code to pass in descriptive billing information.

  - `payment.airplus.dbi.employee_number` (string)
    Employee number to pass in descriptive billing information.

  - `payment.airplus.dbi.internal_account` (string)
    Internal account to pass in descriptive billing information.

  - `payment.airplus.dbi.order_number` (string)
    Order number to pass in descriptive billing information.

  - `payment.airplus.dbi.project_number` (string)
    Project number to pass in descriptive billing information.

  - `payment.airplus.number` (string, required)
    12 digit Airplus Number.

  - `payment.business_information` (object)
    All business related information for billing and authorisation form. This must be included for the payments that require authorisation form.

  - `payment.business_information.authorisation_form` (object)
    Information that is relevant for generating an authorisation form.

  - `payment.business_information.authorisation_form.chargeable_items` (array)
    Items which can be charged using a provided virtual credit card.
    Enum: "alcohol", "breakfast", "food_beverage", "internet", "parking", "phone", "taxes"

  - `payment.business_information.billing` (object)
    All information to be used in the invoice.

  - `payment.business_information.billing.address` (object)
    The address to bill this reservation

  - `payment.business_information.billing.address.address_line` (string)
    The details of this address.

  - `payment.business_information.billing.address.city` (string)
    The city for this address.

  - `payment.business_information.billing.address.country` (string)
    The country for this address.
    Example: "nl"

  - `payment.business_information.billing.address.post_code` (string)
    Post code for this address.

  - `payment.business_information.billing.email` (string, required)
    Email to send the invoice to.

  - `payment.business_information.billing.vat` (string, required)
    VAT number to be used in the invoice.

  - `payment.business_information.company` (string, required)
    Company that will issue an authorisation form for the virtual credit card and used in the invoice.

  - `payment.card` (object)
    Card information for executing the payment.

  - `payment.card.authentication` (object)
    Card authentication information for executing the payment.

  - `payment.card.authentication.riskified` (object)
    Riskified information for external fraud verification.

  - `payment.card.authentication.riskified.ip_address` (string, required)
    The booker's IP address.

  - `payment.card.authentication.riskified.session_id` (string, required)
    Riskified provided session_id for external fraud verification.

  - `payment.card.authentication.sca_exemption` (string)
    The type of SCA exemption to be applied to the payment.
    Enum: "moto", "virtual"

  - `payment.card.authentication.3d_secure` (object)
    3-factor authentication information for the card.

  - `payment.card.authentication.3d_secure.authentication_value` (string, required)
    Cardholder Authentication Verification Value.

  - `payment.card.authentication.3d_secure.eci` (string, required)
    The electronic commerce indicator.

  - `payment.card.authentication.3d_secure.transaction` (string, required)
    The unique ID assigned by the DS to identify a single transaction.

  - `payment.card.authentication.3d_secure.cavv` (string)
    Deprecated. Do not use

  - `payment.card.cardholder` (string, required)
    Name of the cardholder.

  - `payment.card.cvc` (string, required)
    3 or 4 digits card validation code (CVC) of this card.

  - `payment.card.expiry_date` (string, required)
    Expiry date of the card. Format: YYYY-MM

  - `payment.card.number` (string, required)
    Number of the card.

  - `payment.include_receipt` (boolean)
    This is used to determine whether to include payment receipt_url in the response or not.

  - `payment.method` (string)
    The payment method to be used for this order.
    Enum: "airplus", "card", "wallet"

  - `payment.timing` (string, required)
    Information about when to execute the payment.
    Enum: "pay_at_the_property", "pay_online_later", "pay_online_now"

## Response 200 fields (application/json):

  - `request_id` (string)
    Uniquely identifies the request. Please provide this identifier when contacting support.

  - `data` (object)

  - `data.accommodation` (object)
    All accommodation related information for this order.

  - `data.accommodation.order` (string)
    ID for this accommodation order.

  - `data.accommodation.pincode` (string)
    Pincode for this accommodation order.

  - `data.accommodation.reservation` (integer)
    Reservation ID for this accommodation order.

  - `data.accommodation.third_party_inventory` (object)

  - `data.accommodation.third_party_inventory.checkin_number` (string)
    The number required at the time of check-in. It allows guests to confirm their order at the accommodation.
    Example: "473026811"

  - `data.accommodation.third_party_inventory.confirmation_number` (string)
    The confirmation number, when used in conjunction with the pincode, helps verify the customer's order and facilitates efficient support during inquiries or troubleshooting.
    Example: "12365478936925814787"

  - `data.payment` (object)
    All payment related information for this order.

  - `data.payment.authorisation_form_url` (string)
    Link to a virtual credit card''s authorisation form, valid for 7 minutes from issue. This will only the added if the request has authorisation_form.
    Example: "https://secure-admin.booking.com/airplus_auth_form_pdf.html?token=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA&lang=en"

  - `data.payment.receipt_url` (string)
    Link to the payment receipt of the order. This will only be added if include_receipt is true.
    Example: "https://secure.booking.com/payment_receipt.html?bn=0000000000&pincode=0000&lang=en"


