TravelCaster API - Flights - UpdateBookingPayments operation
Back to Flights home.
You can update payment methods on a booking, useful if its ticketing was denied due to credit card limits or authorization. This operation is designed to be used in conjunction with the RetrieveBooking operation.
After retrieving a booking, you can edit or remove assigned payment methods and add new ones.
- To add a new payment method, just add a new item to the Payments array of the UpdateBookingPaymentsRequest object.
- To edit an existing payment method, change the informations of the BookingPaymentInformation item from the retrieved booking and add it to the Payments array.
- To remove an existing payment, you only have to prevent it from being sent back to the API within the Payments array.
When adding/editing a payment method, please consider the following restrictions:
- All payments must have the same currency, and the currency must match the one of the booking fare.
- All CARD payments must have its matching credit card information with all its required fields (card number, card type, expiration date in YYYY-MM format,
- As the retrieve returns a masked card number, you must supply the entire card number to update the payment method.
- All payments types must be either CARD or CASH.
- The sum of all payment amounts must cover the amount of the booking as indicated in the BookingFare.TotalAmount field.
The UpdateBookingPayments operation returns a UpdateBookingPaymentsResponse object, containing the resulting payment methods assigned to the booking. To call this operation you will need a valid token, obtained previously with the GetAccessToken operation. If your token is no longer valid, you will receive a 1210 error. See the Transaction Codes page for more information.
Request
JSON
http://endpoint/api/version/FlightService.json/UpdateBookingPayments
url-encoded parameter: request ([UpdateBookingPaymentsRequest])
returns: UpdateBookingPaymentsResponse
WebService
http://endpoint/api/version/FlightService.asmx
operation: UpdateBookingPayments
parameters: request ([UpdateBookingPaymentsRequest])
returns: UpdateBookingPaymentsResponse
Structure of the UpdateBookingPaymentsRequest object
UpdateBookingPaymentsRequest
|_ Token
|
|_ BookingNumber (string)
|_ Payments (array of BookingPaymentInformation, as received in the RetrieveBooking operation)
|_ BookingPaymentInformation
|_ PaymentNumber (int, payment reference number, starts in 1)
|_ FormOfPayment (string, payment type, accepted values are CASH/CARD)
|_ Amount (decimal, payment amount)
|_ Currency (string, ISO-3 currency code)
|_ CreditCardInfo (CreditCardDetails object, see BookFlight operation, if FormOfPayment is CARD, field is required)
|_ AssignedToPassengers (array of strings, references to each passenger to apply the payment to, use the Number property from the PaxInformation object)
|_ ItemType (string, payment purpose, FARE/FEE/OFFERS)
AssignedToPassengers
Use AssignedToPassengers only if you apply payments by passenger. If you pay all passengers with a unique method (CARD, CASH or CARD + CASH), must be null.
Structure of the UpdateBookingPaymentsResponse object
UpdateBookingPaymentsResponse
|_ Token
|_ TransactionID (string)
|_ TransactionCode (string)
|_ TransactionMessage (string)
|
|_ BookingNumber (string)
|_ Payments (array of BookingPaymentInformation, provides current payment information)
|_ BookingPaymentInformation
|_ PaymentNumber (int, payment reference number, starts in 1)
|_ FormOfPayment (string, payment type, values are CASH/CARD)
|_ Amount (decimal, payment amount)
|_ Currency (string, ISO-3 currency code)
|_ CreditCardInfo (CreditCardDetails object, see BookFlight operation, if FormOfPayment is CARD, the CardNumber is returned masked)
|_ Status (int, individual payment status, 0 - New, 1 - Accepted, 2 - Denied)
|_ AssignedToPassengers (array of strings, references to each passenger to apply the payment to, use the Number property from the PaxInformation object)
|_ ItemType (string, payment purpose, FARE/FEE/etc)
Changelog
2024-05-16 v1.6.9.0 Added ItemType to BookingPaymentInformation
Back to Flights home.