Payment
Payment contracts
The payment endpoint must be used so that the reservations created on our booking engine are paid online in a fast and secure process. It is also possible to check the payment conditions available for payment.
GetPaymentConditionsByBookingId
In this method it is possible to recover the payment conditions registered for the user's agency used.
GetPaymentConditionsByBookingId request
The user and password corresponding to the agency that wants information about the available payment conditions must be informed.
{
"BookingId": "?",
"Credential": {
"Password": "?",
"Username": "?"
},
"Services": {
" {
"key(ServiceId)": "?",
"value(ServiceType)": "?"
}
}
}
GetPaymentConditionsByBookingId response
The return consists of information about the active payment conditions available for use.
The returned id must be informed at the time of payment, through the payBooking method and during the service confirmation flow.
{
"CreditCard": {
"MinimumParcelValue": {
"Currency": "BRL"
},
"NumberPaymentMaster": 1,
"NumberPaymentMin": 1,
"NumberPaymentVisa": 1
},
"Id": 70,
"Name": "Braspag",
"Operation": "0",
"PaymentMode": "1"
}
payBooking
This method must be used to pay for a reservation.
The request consists of the card information and the cardholder's information.
payBooking request
The ids of the services or the booking to be paid must be informed:
"ServicesId": {
"arr:int": "?"
},
"BookingId": "?"
Credit card information is mandatory and guarantees successful payment:
"CreditCard": {
"CardNumber": "?",
"CardOperator": "?",
"Holder": "?",
"MonthExpiration": "?",
"NumberPayments": "?",
"SecurityCode": "?",
"YearExpiration": "?"
}
The data of the person responsible for the payment must be informed:
"ContractingParty": {
"Address": "?",
"AddressComplement": "?",
"AddressNumber": "?",
"CPF": "?",
"CityName": "?",
"CountryCode": "?",
"DistrictName": "?",
"Email": "?",
"PersonName": "?",
"PhoneNumber": "?",
"PhoneNumberDDD": "?",
"PhoneNumberDDI": "?",
"ReceiveCreditCardReceipt": "?",
"StateCode": "?",
"ZipCode": "?"
}
In the payment flow it is possible to apply a new value to the service commission as well as to retain it totally.
"RetainCommission": "?",
"SmartCommissionValue": "?"
payBooking response
The payment return contains the services selected for payment and the transaction status.
getPaymentConditionByToken
In this method it is possible to return the information of the payment terms available according to the informed token. The token is obtained through the booking confirmation flow. It must be used after returning the getBookingConditions method.
getPaymentConditionByToken request
{
"Credential": {
"Password": "?",
"Username": "?"
},
"Services": {
"Services": {
"ServiceId": "?",
"ServiceType": "?",
"Token": "?"
}
}
}
getPaymentConditionByToken response
The return consists of information about the active payment conditions available for use.
The returned id must be informed at the time of payment, through the payBooking method and during the service confirmation flow.
{
"CreditCard": {
"MinimumParcelValue": {
"Currency": "BRL"
},
"NumberPaymentMaster": 1,
"NumberPaymentMin": 1,
"NumberPaymentVisa": 1
},
"Id": 70,
"Name": "Braspag",
"Operation": "0",
"PaymentMode": "1"
}
URL and Examples
SOAP
http://ws-[clientIdentification].cangooroo.net/API/SOAP/Payment.svc
REST
REST: http://ws-[clientIdentification].cangooroo.net/API/REST/Payment.svc
Postman example here: https://documenter.getpostman.com/view/11200591/SzfAymKV?version=latest#d9d82f18-b0c7-499d-8b97-e732595b4ef9.