Payment API
Voucher validation API
GET: /api/payments/voucher/validate
Validate voucher for specific booking
Request Body
bookingNumber (String, Required)
Booking Identifier
voucherCode (String, Required)
Voucher code
Example
{
"bookingNumber": "ADCO2203011523483",
"voucherCode": "AXOLXHLp"
}Response
bookingNumber (String)
Booking identifier
discountAmount (Double)
Discount money amount
trackingCode (String)
Identifier for booking with voucher
voucherCode (String)
Voucher code
voucherValid (Boolean)
Is valid voucher code?
duration (Integer, Optional)
errors (Array[Error], Optional)
infos (Array[Info], Optional)
success (Boolean, Optional)
textMessage (String, Optional)
Example
Voucher usage confirmation API
GET: /api/payments/voucher/redeem
Redeem voucher for specific booking
Request Body
bookingNumber (String, Required)
Booking identifier
voucherCode (String, Required)
Voucher code
trackingCode (String, Required)
Tracking code used in api validate
Example
Response
bookingNumber (String)
Booking identifier
redeemValid (Boolean)
Confirmation of success using Voucher
voucherCode (String)
Voucher code
duration (Integer, Optional)
errors (Array[Error], Optional)
infos (Array[Info], Optional)
success (Boolean, Optional)
textMessage (String, Optional)
Example
Booking Payment Request API
GET: /api/partner/place-order
Request payment booking - initiate payment order
Note
Security requirements: Encrypt data and include a digital signature
Request: Does not require encryption and includes a digital signature
Response: Part of the response data is required to be encrypted and accompanied by a digital signature
Request
bookingNumber query (string, required),
Reference code to booking
Response
Model
result (String, optional),
Information returned in the format:
duration (integer, optional),
errors (Array[Error], optional),
infos (Array[Info], optional),
success (boolean, optional),
textMessage (string, optional)
Payment Recording and Booking Commit API
POST: /api/partner/commit
Yêu cầu commit booking được cập nhật đầy đủ thông tin và hoàn tất thanh toán
Chú ý
Security requirements: Encrypt data and include a digital signature
Request: Does not require encryption and includes a digital signature
Response: Part of the response data is required to be encrypted and accompanied by a digital signature
Request Body
Model
Model
key (string, required),
Data decrypted key. How to decrypt refer to the section: Encryption of transmission data and digital signature authentication
data (string, required),
Data with digital signature (encrypted). How to decrypt refer to the section: Encryption of transmission data and digital signature authentication
Signature data schema:
Original data schema:
access_code (String, required)
Access code provided by Gotadi to Partners.
bookingNumber (String, required)
Code used to refer to booking
partner_trans_id (String, optional)
Partner transaction identifier. If the partner does not pass a value to this field, the default value will be assigned using booking_number
product_type (String, required)
Type of product, whose value is AIR or HOTEL corresponding to the type of product purchased
Example
Response
Model
Model
key (String, required)
Data decrypted key. How to decrypt refer to the section: Encryption of transmission data and digital signature authentication
data (String, required)
Data with digital signature (encrypted). How to decrypt refer to the section: Encryption of transmission data and digital signature authentication
Signature data schema:
Original data schema:
access_code (String, required)
Access code provided by Gotadi to Partners.
booking_number (String, required)
Code used to refer to booking
error_code (String, required)
Error code
product_type (String, optional)
Type of product, whose value is AIR or HOTEL corresponding to the type of product purchased
properties (String, optional)
…
return_url (String, optional)
…
total_amount (Double, required)
…
API to retrieve Booking Details After Ticket Issuance
GET: /api/products/final-booking-detail
Description:
This API is optimized to retrieve the booking status for use in the payment process (its usage is similar to the booking-detail API). It also adds enhanced handling for both successful and failed cases.
In the happy case (success), the API immediately returns the result.
In the failure case, the API automatically retries to fetch the latest booking status and continues returning results until the configured timeout is reached.
Parameter
Response
Code 200
OK
Model
Model
orgCode (String, Optional) Organization code referencing the creator of the booking.
branchCode (String, Optional) Branch code referencing the creator of the booking.
agencyCode (String, Optional) Agency code referencing the creator of the booking.
agentCode (String, Optional) Agent (staff) code referencing the creator of the booking.
customerCode (String, Optional) Customer code referencing the creator of the booking.
id (String, Optional) Unique ID of the booking.
bookingNumber (String, Optional) Reference code of the booking.
bookingCode (String, Optional) Code describing the basic information of the booking.
bookingType (String, Optional) Booking type:
FLIGHTorHOTEL, depending on the purchased product.bookingInfo (BookingInfoDTO, Optional) Detailed booking information.
groupPricedItineraries (GroupPricedItineraryDTO[], Optional) Group itinerary details (already specified in the Search section).
travelerInfo (TravelerInfoDTO, Optional) Passenger and contact information.
channelType (String, Optional) Distribution channel type:
B2BorB2C.saleChannel (String, Optional) Sales channel. Example:
B2B_WEB,B2B_APP, etc.supplierType (String, Optional) Supplier type. Example:
AIR,HOTEL, etc.bookingDate (String, Optional) Booking creation date (reservation date).
Last updated