Appearance
Payment Responses
The payment response event will include a javascript object containing the payment details and status.
See below for examples of the different payment response events.
Card
Successful Payment
json
{
event: "paymentAttemptResult",
transactionRef: "CHUSAS-A000001",
transactionId: "A000001",
paymentStatus: "Authorised",
paymentSuccessful: true,
paymentDetails: {
transactionId: "6972098197926599504001",
billToFirstName: "Jamie",
billToLastName: "Testa",
billToAddressLine1: "12010 Rockaway Beach Blvd",
billToAddressLine2: "",
billToAddressCity: "Rockaway Park",
billToAddressState: "NY",
billToAddressCountry: "US",
billToAddressPostalCode: "11694",
lastFourDigits: "1111",
amount: {
currency: "USD",
fee: 0,
total: 100
},
paymentMethod: "creditcard"
}
}Failed Payment
json
{
event: "paymentAttemptResult",
transactionRef: "CHUSAS-A000001",
transactionId: "A000001",
paymentStatus: "Rejected",
paymentSuccessful: false,
paymentDetails: {
amount: {
currency: "USD",
total: "1.00"
},
error: "Transaction rejected by payment provider",
paymentMethod: "creditcard"
}
}Paypal
Successful Payment
json
{
event: "paymentAttemptResult",
transactionRef: "CHUSAS-A000001",
transactionId: "A000001",
paymentStatus: "Authorised",
paymentSuccessful: true,
paymentDetails: {
amount: {
currency: "USD",
total: "1.00"
},
payerEmailAddress: "test.person@ttc.com",
paymentMethod: "paypal"
}
}Failed Payment
json
{
event: "paymentAttemptResult",
transactionRef: "CHUSAS-A000001",
transactionId: "A000001",
paymentStatus: "Rejected",
paymentSuccessful: false,
paymentDetails: {
amount: {
currency: "USD",
total: "1.00"
},
error: "Declined payment - PayPal rejected the transaction. Please inform your Reservation Agent / IT Support",
paymentMethod: "paypal"
}
}E-Payments
Successful Payment
json
{
event: "paymentAttemptResult",
transactionRef: "CHUSAS-A000001",
transactionId: "A000001",
paymentStatus: "Authorised",
paymentSuccessful: true,
paymentDetails: {
amount: {
currency: "USD",
total: "1.00"
},
paymentMethod: "paywithgoogle"
}
}Failed Payment
json
{
event: "paymentAttemptResult",
transactionRef: "CHUSAS-A000001",
transactionId: "A000001",
paymentStatus: "Rejected",
paymentSuccessful: false,
paymentDetails: {
amount: {
currency: "USD",
total: "1.00"
},
error: "Transaction declined by payment provider",
paymentMethod: "paywithgoogle"
}
}