Technical Documentations
  • 🇻🇳Vietnamese
    • Tổng quan
    • Đối tác B2B2C
      • Phương thức Webview
        • API Login
        • Yêu cầu bảo mật
        • Place Order
        • API Get Booking Detail
        • API Commit
        • API Check commit result
      • Phương thức SDK
        • API Login
        • Yêu cầu bảo mật
        • Initiate SDK
          • Init IOS SDK
          • Init Android SDK
        • Place order
        • API Commit
        • API Get booking detail
        • API Check commit result
      • Phương thức API
        • API Login
        • Yêu cầu bảo mật
        • ✈️Flight
          • Search API
          • Booking API
        • 🏨Hotel
          • Search API
          • Booking API
          • Cancellation API
        • Payment API
        • Booking Management API
    • Đối tác Corporate Agent (CA)
      • Qui trình tích hợp
      • API Chứng thực
      • Yêu cầu bảo mật
    • Đối tác Affiliate
    • ❓Câu hỏi thường gặp
      • Các status trong luồng booking Gotadi
      • Quy định Test
        • ✈️Vé máy bay
        • 🏨Khách sạn
      • Bộ Testcase dành cho đối tác B2B2C
      • Quy trình hỗ trợ từ CS
      • Danh sách Airlines
  • 🇬🇧English
    • Overview
    • B2B2C Partner
      • Webview method
        • API Login
        • Security Requirements
        • Place Order
        • API Get Booking Detail
        • API Commit
        • API Check commit result
      • SDK method
        • API Login
        • Security Requirments
        • Initiate SDK
          • Init IOS SDK
          • Init Android SDK
        • Place order
        • API Commit
        • API Get booking detail
        • API Check commit result
      • API method
        • Integration process
        • Login API
        • ✈️Flight
          • Search API
          • Booking API
        • 🏨Hotel
          • Search API
          • Booking API
          • Cancellation API
        • Payment API
    • Corporate Agent Partner (CA)
      • Integration Process
      • Authentication API
      • Security Requirements
    • Affiliate Partner
    • ❓FAQ section
      • Booking Statuses in Gotadi's Booking Flow
      • Regulations for Testing
        • ✈️Flight
        • 🏨Hotel
      • CS Support Overall Flow
      • Airlines List
Powered by GitBook
On this page
  • Voucher validation API
  • Voucher usage confirmation API
  • Booking Payment Request API
  • Payment Recording and Booking Commit API
  1. English
  2. B2B2C Partner
  3. API method

Payment API

Voucher validation API

GET: /api/payments/voucher/validate

Validate voucher for specific booking

Request Body

Parameter
Description

bookingNumber (String, Required)

Booking Identifier

voucherCode (String, Required)

Voucher code

Example

{
    "bookingNumber": "ADCO2203011523483",
    "voucherCode": "AXOLXHLp"
}

Response

Parameter
Description

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

{
    "isSuccess": true,
    "duration": 3896,
    "textMessage": null,
    "errors": null,
    "infos": null,
    "bookingNumber": "ADCO2203011523483",
    "voucherCode": "AXOLXHLp",
    "voucherValid": true,
    "trackingCode": "track_xbhwiFai1HNQNCQLe2PmvdxJu/rd5zEG7NGuvjHI5CY=",
    "discountAmount": 1000,
    "percentOff": null,
    "type": "AMOUNT",
    "success": true
}

Voucher usage confirmation API

GET: /api/payments/voucher/redeem

Redeem voucher for specific booking

Request Body

Parameter
Description

bookingNumber (String, Required)

Booking identifier

voucherCode (String, Required)

Voucher code

trackingCode (String, Required)

Tracking code used in api validate

Example

{
    "bookingNumber": "ADCO2203011523483",
    "trackingCode": "track_xbhwiFai1HNQNCQLe2PmvdxJu/rd5zEG7NGuvjHI5CY="
    "voucherCode": "AXOLXHLp"
}

Response

Parameter
Description

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

    {
        "isSuccess": true,
        "duration": 6508,
        "textMessage": null,
        "errors": null,
        "infos": null,
        "voucherCode": "gtd_fpt_test",
        "bookingNumber": "ADCO2203101541927",
        "redeemValid": true,
        "success": true
    }

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

Parameter
Description

bookingNumber query (string, required),

Reference code to booking

- bookingNumber `query` (string, required),

    !!! quote ""

        Reference code to booking

Response

Model
  • result (String, optional),

    Information returned in the format:

    ```
    <payment_url>?key=<encrypted_key>?data=<encrypted_data>
    ```
    
    *Signature data schema:*
    
    ``` 
    <access_code>|<booking_number>|<product_type>|<total_amount>
    ```
    
    *Original data schema:*
    ```
    <access_code>|<booking_number>|<product_type>|<signature>|<total_amount>
    ```
    
    - access_code (String, required)
    
        !!! quote ""
    
            Access code provided by Gotadi to Partners.
    
    - bookingNumber (String, optional)
    
        !!! quote ""
    
            Code used to refer to booking
    
    - product_type (String, optional)
    
        !!! quote ""
    
            Type of product, whose value is AIR or HOTEL corresponding to the type of product purchased
    
    - total_amount (String, optional)
    
        !!! quote ""
    
            Total payment amount
    
    - payment_url (String, required)
    
        !!! quote ""
    
            URL navigate to payment page
    
    - encrypted_key (String, required)
    
        !!! quote ""
    
            Key decrypts (encrypted) data. How to decrypt refer to the section: Encryption of transmission data and digital signature authentication
    
    - encrypted_data (String, required)
    
        !!! quote ""
    
            Data with digital signature (encrypted). How to decrypt refer to the section: Encryption of transmission data and digital signature authentication
  • 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:

    <access_code>|<booking_number>|<partner_trans_id>|<product_type>

    Original data schema:

    <access_code>|<booking_number>|<partner_trans_id>|<product_type>|<signature>
    • 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:

    <access_code>|<booking_number>|<error_code>|<product_type>|<properties>|<return_url>|<total_amount>

    Original data schema:

    <access_code>|<booking_number>|<error_code>|<product_type>|<properties>|<return_url>|<signature>|<total_amount>
    • 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)

      …

PreviousCancellation APINextCorporate Agent Partner (CA)

Last updated 2 months ago

Made with

🇬🇧
PreviousAPIs for Book
NextAbout
Material for MkDoc