Booking
Create Booking
1min
This API is used to create booking in your PayDocker account
POST
Request
Response
Body Parameters
share_secret
required
String
Test mode secret keys and live mode secret keys are available in your PayDocker account under Integration menu.
Don't share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.
booking_event
required
String
Used to identify the action connected to the booking and the allowed action for this request would be "new".
source_id
required
String
Your PayDocker Account ID assigned upon account creation (e.g. PDR1). It is case sensitive.
buyer_id
optional
String
Buyer ID (e.g. ID 001) generated in your platform. It represents the account that has performed the purchase in your platform.
booking_id
required
String
Used to identify the Booking ID.
Maximum 150 characters allowed.
booking_date
required
String
The format is DD-MM- YYYY e.g. 25-12-2023
Allowed date range is same or lower than import date
E.g. Import Date - 18 Oct 2023, Booking Date could be 18 Oct 2023 or lower
booking_category
required
String
Used to identify the category connected to the booking and the allowed categories are
Payable
Receivable
supplier_id
required
String
Supplier ID (e.g. ID 001) generated in your platform
Maximum 150 characters allowed.
property_name
required
String
Used to identify the property name associated within the booking .
Maximum 80 characters allowed.
property_country
required
String
Country ID ISO 3166-1 alpha-3 codes standard format associated within the token value.
Country ID ISO 3166-1 alpha-3 codes are available in API Reference --> Standard Codes --> Country Code
guests_count
required
Number
Used to identify the number of guests associated within the booking .
Only number accepted
Min. value is 1
Max value is 99
room_count
required
Number
Used to identify the number of room associated within the booking.
Only number accepted
Min. value is 1
Max value is 99
check_in
required
String
The format is DD-MM- YYYY e.g. 25-12-2023
Selectable date range is from the booking date up to 2 years in the future. The check_in date cannot be later than the check_out date.
check_out
required
String
The format is DD-MM- YYYY e.g. 25-12-2023
Selectable date range is from the check_in date up to 180 days in the future. The check_out date cannot be before the check_in date.
transaction_currency
required
String
Currency ID ISO 4217 standard format associated within the token value.
Supported currency and ISO code are available in API Reference --> Standard Codes --> Currency Code
transaction_amount
required
String
Used to identify the total booking amount.
Minimum accepted value is 0.00
Max accepted value is 9,999,999,999.00
The amount value supports up to twelve digits (e.g. a value of 9,999,999,999.99) divided by decimal.
margin_category
required
String
Used to identify the margin category connected to the booking and the allowed categories are
$
%
transaction_margin
required
String
Used to identify the transaction margin value connected to the booking.
If margin_category is $
Minimum accepted value is 1.00
Max accepted value is 9,999,999,999.00
The amount value supports up to twelve digits (e.g. a value of 9,999,999,999.99) divided by decimal.
---------
If margin_category is %
Minimum accepted value is 0.01
Max accepted value is 99.99
The amount value supports up to four digits (e.g. a value of 99.99)
nonrefundable_amount
required
String
Used to identify the non refundable amount.
Minimum accepted value is 0.00
Max accepted value is the amount set at transaction_amount
The amount value supports up to eleven digits (e.g. a value of 999,999,999.99) divided by decimal.
The sum between nonrefundable_amount and refundable_amount must be equal to transaction_amount
refundable_amount
required
String
Used to identify the refundable amount.
Minimum accepted value is 0.00
Max accepted value is the amount set at transaction_amount
The amount value supports up to twelve digits (e.g. a value of 9,999,999,999.99) divided by decimal.
The sum between nonrefundable_amount and refundable_amount must be equal to transaction_amount
firstnight_amount
required
String
Used to identify the first night amount.
Minimum accepted value is 0.00
Max accepted value is the amount set at transaction_amount
The amount value supports up to twelve digits (e.g. a value of 9,999,999,999.99) divided by decimal.
cancellation_days
required
Number
Used to identify the cancellation days for the refundable_amount.
If the refundable_amount is 0, cancellation_days can be left empty.
If the refundable_amount is greater than 0, cancellation_days must be specified, with a value between 0 and 365.
auth_code
optional
String
The auth_code is required only when the value set in the buyer_id is not empty.
If the buyer_id has added your account as trusted, the value for auth_code should be set to "trusted"
If your account is not trusted by the buyer_id, a 16-digit auth_code generated by the buyer_id is required to allow your account to perform operations on the buyer_id balances.
pre_auth
optional
Boolean
The pre_auth setting allows your account to generate tokens and schedule top-ups for the buyer_id account.
pre_auth is required only when the buyer_id is not empty.
If the buyer_id is empty, pre_auth can also be left empty.
If the buyer_id is not empty, pre_auth must be set to one of the following values:
true
false