Booking | SetPaymentToBooking
Set payment method to a booking.
Notice:
Product Scope : TechHub, FareMarket
2, Please set the payment that retrieved from GetBookingPayments.
POST
/flight/bookingParameter
| Field | Mandatory | Type | Scope | Description |
|---|---|---|---|---|
| action | required |
String | SetPaymentToBooking | |
| key | required |
String | API security key applied from AeroHub | |
| signature | required |
String | Refer to Guideline to generate. | |
| timestamp | required |
Int | The ‘timestamp’ field should be a 10-digit Unix timestamp in seconds, used for encryption and data verification. | |
| version | optional |
String | API version information, e.g. 3.0.0 | |
| request | required |
Object | ||
| paymentCode | required |
String | Payment code get from GetBookingPayments. AAG (FareMarket and Techhub): AeroHub payment account CAG (Techhub+): customized account set up by customer. CC (Techhub+): credit card. BSP (Techhub+): xxxx |
|
| sessionId | required |
String | SessionId: generated from AirPricing | |
| timeout | optional |
int | timeout in seconds | |
| ccFields | optional |
Object | TechHub+ |
Credit / Debt card information |
| cardNumber | optional |
String | TechHub+ |
Credit / Debt card information |
| expiration | optional |
String | TechHub+ |
Card expiration time, splited by /, e.g MM/YY |
| holderName | optional |
String | TechHub+ |
Credit / Card holder name |
| cvv | optional |
int | TechHub+ |
Card Verification Value |
| cardType | optional |
int | TechHub+ |
Card type, 0: VISA; 1: MasterCard; 2: American Express; 3: UnionPay; 4: JCB; 5: Diners Club;6: Others |
Request_Example:
{ "action": "SetPaymentToBooking", "key": "52WQEQaaaMK87xXYQa", "signature": "TIzve3ZAEWQEyfv8AGnOs/hlS4WQEWwqWEQ0x0zM6Q5=", "timestamp": 1685116516, "request": { "sessionId": "e7b9e00ee26a8df4b5e6840d1869bfda", "paymentCode": "AAG", "timeout": 200 } }
Response
| Field | Type | Description |
|---|---|---|
| status | int | 0 for success, others for failure, refer to status error appendix for details |
| msg | String | Return message, maximum 64 char |
| contentStatus | int | Return the original code from airlines or suppliers. |
| contentMsg | String | Return the original message from airlines or suppliers, maximum 64 char |
| amount | Float | Total cost for payment |
| currency | String | Currency information, 3_letter code e.g. USD |
| originalAmount | Float | Total cost for payment |
| originalCurrency | String | Currency information, 3_letter code e.g. USD |
| balanceDue | Float | Amount to be paid |
Success-Response:
{ "status": 0, "originalAmount": 13320.00, "balanceDue": 13320.00, "originalCurrency": "TWD", "msg": "Success", "amount": 59805.02, "currency": "JPY", "contentStatus": 0, "contentMsg": "Success" }
Status Code
| Name | Description |
|---|---|
| 1000 | General system error |
| 1001 | Request parameters or part of parameters missing |
| 1002 | Invalid Action |
| 1003 | API request timeout, please request again |
| 1004 | Invalid request parameter |
| 1005 | Service system error |
| 1006 | System busy, please try again |
| 1101 | Authentication fail, wrong signature |
| 1102 | Account disabled, please contact with account administrator |
| 2301 | Invalid payment methods |
| 2024 | Set payment failed |
Error-Response
{ "status": 1000, "msg": "Letslfy flight internal error" }
Author:admin Create time:2023-05-24 16:08
Last editor:AeroHub Update time:2026-02-04 13:48
Last editor:AeroHub Update time:2026-02-04 13:48