Webhooks: Payments

Webhook notifications for reservation payment events.

Overview

Guesty's Open API allows you to send guest payment-related webhooks to your application's notification URL(s).

What Notifications Can I Receive?

Guesty sends payment webhooks for the following events:

  • When a payment has been received.
  • A failed payment.
  • A refunded payment.
  • An overdue payment.
  • An overcharged guest.
  • An expected overcharge.
  • When a payment requires authentication.
  • A failed authorization hold.
  • When a payment method has been received/added.
  • An invalid payment method.
  • An invalid Booking.com payment method and an invalid second Booking.com payment method.
  • When authentication of a payment fails.
  • A disputed payment.

Continue reading to learn more about each event and how to subscribe.


Received Payment

This webhook is sent when a payment is successfully processed. Learn how to subscribe to this webhook here.


Event to Subscribe

payments.received


Webhook Payload

Body ParameterData TypeDescription
paymentObject
  accountIdThe ID of your Guesty account.
  reservationIdThe Guesty ID of the affected reservation.
  paymentIdThe Guesty ID of the payment.
  amountThe amount paid.
  currencyThe currency of the payment.
  confirmationCodeThe payment processing confirmation code.
  paidAtThe ISO 8601 date and time of the payment.
  paymentMethodIdThe Guesty ID of the payment method used.
  last4The last four digits of the credit card.
  brandThe type of credit card. E.g., "Visa"
  nameThe name of the cardholder.
  addressThe cardholder's billing address.
  ctxIt contains the request ID you can share with Guesty support for additional troubleshooting.
eventpayments.received

Payload Example

{
  "payment":{
    "accountId":"5213a2d206112710005d96ff",
    "reservationId":"667ad00db904239ef0b9cbdd",
    "paymentId":"668520e93cac721c718e845f",
    "amount":190,
    "currency":"USD",
    "confirmationCode":"20407-fd791ba4-3923-11ef-84df-005056a5723f",
    "paidAt":"2024-07-03T10:07:02.468Z",
    "paymentMethodId":"667ad2ade5969747f67ce303",
    "last4":"4242",
    "brand":"Visa",
    "name":"Bill Bull",
    "address":"My street 12, My City, 123456 NY, US",
    "ctx":{
      "requestId":"fea76539"
    }
  },
  "event":"payments.received"
}


Failed Payment

This notification is sent when a reservation payment processing attempt fails. Learn how to subscribe to this webhook here.


Event to Subscribe

payments.failed


Webhook Payload

Body ParameterData TypeDescription
paymentobjectContains the unique object IDs relevant to the failed payment.
  accountIdstringThe ID of your Guesty account.
  reservationIdstringThe Guesty ID of the affected reservation.
  paymentIdstringThe Guesty ID of the failed payment attempt.
  failureReasonstringThe reason the payment failed.
  ctxobjectIt contains the request ID you can share with Guesty support for additional troubleshooting.
eventstringpayments.failed

Payload Example

{
  "payment":{
    "accountId":"5213a2d206112710005d96ff",
    "reservationId":"667ad00db904239ef0b9cbdd",
    "paymentId":"668520e93cac721c718e845f",
    "failureReason":"Insufficient Funds",
    "ctx":{
      "requestId":"fea76539"
    }
  },
  "event":"payments.failed"
}

Refunded Payment

This webhook is sent when a guest payment has been refunded. Learn how to subscribe to this here.


Event to Subscribe

payments.refunded


Webhook Payload

Body ParameterData TypeDescription
paymentobject
  accountIdstringThe ID of your Guesty account.
  reservationIdstringThe Guesty ID of the affected reservation.
  paymentIdstringThe Guesty ID of the payment.
  amountnumberThe amount paid.
  refundedAmountnumberThe portion of the payment that was refunded.
  totalRefundednumberThe total amount that was refunded.
  confirmationCodestringThe payment processor payment confirmation code.
  refundConfirmationCodestringThe payment processor refund confirmation code.
  paidAtstringThe ISO 8601 date and time of the original payment.
  refundedAtstringThe ISO 8601 date and time of the refund.
  paymentMethodIdstringThe Guesty ID of the payment method used.
  last4stringThe last four digits of the credit card.
  brandstringThe type of credit card. E.g., "Visa"
  namestringThe name of the cardholder.
  addressstringThe cardholder's billing address.
  ctxobjectIt contains the request ID you can share with Guesty support for additional troubleshooting.
eventstringpayments.refunded

Payload Example

{
  "payment":{
    "accountId":"5213a2d206112710005d96ff",
    "listingId":"5f05dd00b5d317002b005134",
    "reservationId":"667ad00db904239ef0b9cbdd",
    "paymentId":"667bd6394d0f0d8ea7bb1f7c",
    "amount":17,
    "refundAmount":1,
    "totalRefunded":2,
    "confirmationCode":"20407-dc61b933-3399-11ef-87d5-005056a5723f",
    "refundConfirmationCode":"20407-1d7a8c4e-3923-11ef-84df-005056a5723f",
    "paidAt":"2024-06-26T08:55:40.623Z",
    "refundedAt":"2024-07-03T10:00:46.759Z",
    "paymentMethodId":"667ad2ade5969747f67ce303",
    "last4":"4242",
    "brand":"Visa",
    "name":"Bill Bull",
    "address":"My street 12, My City, 123456 NY, US",
    "ctx":{
      "requestId":"9a55a5e6a0d18a7f"
    }
  },
  "event":"payments.refunded"
}

Overdue Payment

This webhook is sent when a guest payment is overdue. Learn how to subscribe to this webhook here.


Event to Subscribe

payments.overdue


Webhook Payload

Body ParameterData TypeDescription
paymentobject
  accountIdstringThe ID of your Guesty account.
  reservationIdstringThe Guesty ID of the affected reservation.
  paymentIdstringThe Guesty ID of the payment.
  amountnumberThe amount paid.
  currencystringThe currency of the payment.
  isAuthorizationHoldstringOnly returned if it's true.
  isSecurityDepositstringOnly returned if it's true.
  paymentMethodIdstringThe Guesty ID of the payment method used.
  ctxobjectIt contains the request ID you can share with Guesty support for additional troubleshooting.
eventstringpayments.overdue

Payload Example

{
  "payment":{
    "accountId":"5213a2d206112710005d96ff",
    "reservationId":"667ad00db904239ef0b9cbdd",
    "paymentId":"668520e93cac721c718e845f",
    "amount":190,
    "currency":"USD",
    "isAuthorizationHold":true, // Only returned if it’s true
    "isSecurityDeposit":true, // Only returned if it’s true
    "paymentMethodId":"667ad2ade5969747f67ce303",
    "ctx":{
      "requestId":"9a55a5e6a0d18a7f"
    }
  },
  "event":"payments.overdue"
}

Overcharged Payment

This webhook is sent when a guest is overcharged on a reservation. Learn how to subscribe to this webhook here.

Event to Subscribe

payments.overcharged


Webhook Payload

Body ParameterData TypeDescription
paymentobject
  accountIdstringThe ID of your Guesty account.
  reservationIdstringThe Guesty ID of the affected reservation.
  paymentIdstringThe Guesty ID of the payment.
  balanceDuenumberThe overcharged amount (will always be a negative number).
  ctxobjectIt contains the request ID you can share with Guesty support for additional troubleshooting.
eventstringpayments.overcharged

Payload Example

{
  "payment":{
    "accountId":"5213a2d206112710005d96ff",
    "reservationId":"667ad00db904239ef0b9cbdd",
    "paymentId":"668520e93cac721c718e845f",
    "balanceDue":-123,
    "ctx":{
      "requestId":"9a55a5e6a0d18a7f"
    }
  },
  "event":"payments.overcharged"
}

Overcharge is Expected

This webhook is sent when a guest is due to be overcharged on a reservation. Learn how to subscribe to this webhook here.

Event to Subscribe

payments.overcharge.expected


Webhook Payload

Body ParameterData TypeDescription
paymentobject
  accountIdstringThe ID of your Guesty account.
  listingIdstringThe Guesty listing ID.
  reservationIdstringThe Guesty ID of the affected reservation.
  creditCardPaymentsStatusstringThis is one of three enums; see the section below this table for more details.
  totalPaidnumberThe total amount paid/collected for the reservation.
  currencystringThe payment currency.
  hostPayoutnumberThe guest invoice total.
  totalExpectedChargenumberThe amount the guest is expected to be charged for the reservation.
  totalExpectedOverchargenumberThe amount above the guest invoice total that is expected to be collected.
  isOverchargeExpectedbooleanThis will be true.
  ctxobjectIt contains the request ID you can share with Guesty support for additional troubleshooting.
eventstringpayments.overcharge.expected

Credit Card Payments Status Enums

EnumDescription
NO_CREDIT_CARD_PAYMENTSThe reservation has only “recorded” payments (like DEBIT, CREDIT, etc.), but no credit card payments are defined or expected to be processed by Guesty.
HAS_PENDING_PAYMENTThe reservation has at least one PENDING credit card payment that Guesty is expected to process in the future.
HAS_SUCCEEDED_PAYMENTThe reservation has at least one SUCCEEDED credit card payment processed by Guesty.

Payload Example

{
  "payment":{
    "accountId":"5213a2d206112710005d96ff",
    "listingId":"5f05dd00b5d317002b005134",
    "reservationId":"667ad00db904239ef0b9cbdd",
    "creditCardPaymentsStatus":"HAS_SUCCEEDED_PAYMENT",
    "totalPaid":262,
    "currency":"USD",
    "hostPayout":140,
    "totalExpectedCharge":262,
    "totalExpectedOvercharge":122,
    "isOverchargeExpected":true,
    "ctx":{
      "requestId":"9a55a5e6a0d18a7f"
    }
  },
  "event":"payments.overcharge.expected"
}

Authentication Required

This webhook is sent when a payment requires authentication by the guest. Learn how to subscribe to this webhook here.


Event to Subscribe

payments.authenticationRequired


Webhook Payload

Body ParameterData TypeDescription
paymentobject
  accountIdstringThe ID of your Guesty account.
  reservationIdstringThe Guesty ID of the affected reservation.
  paymentIdstringThe Guesty ID of the payment.
  ctxobjectIt contains the request ID you can share with Guesty support for additional troubleshooting.
eventstringpayments.authenticationRequired

Payload Example

{
  "payment":{
    "accountId":"5213a2d206112710005d96ff",
    "reservationId":"646c9abf137b4c0032fb87fa",
    "paymentId":"668571319b9276d5f7caa5b9",
    "ctx":{
      "requestId":"c9ed719425bf59c4"
    }
  },
  "event":"payments.authenticationRequired"
}

Failed Authorization Hold

This webhook is sent when an authorization hold fails. Learn how to subscribe to this webhook here.


Event to Subscribe

payments.authorizationHoldFailed


Webhook Payload

Body ParameterData TypeDescription
paymentobject
  accountIdstringThe ID of your Guesty account.
  reservationIdstringThe Guesty ID of the affected reservation.
  paymentIdstringThe Guesty ID of the payment.
  ctxobjectIt contains the request ID you can share with Guesty support for additional troubleshooting.
eventstringpayments.authorizationHoldFailed

Payload Example

{
  "payment":{
    "accountId":"5213a2d206112710005d96ff",
    "reservationId":"667ad00db904239ef0b9cbdd",
    "paymentId":"668520e93cac721c718e845f",
    "ctx":{
      "requestId":"9a55a5e6a0d18a7f"
    }
  },
  "event":"payments.authorizationHoldFailed"
}

Payment Method Received

This webhook is sent when a valid payment method is added to the guest and reservation. Learn how to subscribe to this webhook here.


Event to Subscribe

payments.method.received


Webhook Payload

Body ParameterData TypeDescription
paymentobject
  accountIdstringThe ID of your Guesty account.
  reservationIdstringThe Guesty ID of the affected reservation.
  paymentIdstringThe Guesty ID of the payment.
  ctxobjectIt contains the request ID you can share with Guesty support for additional troubleshooting.
eventstringpayments.method.received

Payload Example

{
  "payment":{
    "accountId":"5213a2d206112710005d96ff",
    "reservationId":"667ad00db904239ef0b9cbdd",
    "paymentId":"668520e93cac721c718e845f",
    "ctx":{
      "requestId":"9a55a5e6a0d18a7f"
    }
  },
  "event":"payments.method.received"
}

Invalid Payment Method

This webhook is sent when an invalid payment method is added to the guest and reservation. Learn how to subscribe to this webhook here.


Event to Subscribe

payments.invalidPaymentMethod


Webhook Payload

Body ParameterData TypeDescription
paymentobject
  accountIdstringThe ID of your Guesty account.
  reservationIdstringThe Guesty ID of the affected reservation.
  paymentIdstringThe Guesty ID of the payment.
  invalidCreditCardobject
    atstringThe ISO 8601 date and time of the error.
    brandstringThe credit card type. E.g., "Visa."
    last4stringThe last four digits of the credit card number.
    errorstringThe error type.
    processorErrorobjectThis contains the specific error code and message.
  ctxobjectThis contains the request ID you can share with Guesty support for additional troubleshooting.
eventstringpayments.invalidPaymentMethod

Payload Example

{
  "payment":{
    "accountId":"5213a2d206112710005d96ff",
    "reservationId":"667ad00db904239ef0b9cbdd",
    "paymentId":"668520e93cac721c718e845f",
    "invalidCreditCard":{
      "at":"2024-07-04T13:38:18.397Z",
      "brand":"visa",
      "last4":"5103",
      "error":"GENERAL",
      "processorError":{
        "code":"incorrect_zip",
        "message":"Your card could not be authorized using the postal code provided. Please update the postal code, or contact your card issuer for further details."
      }
    },
    "ctx":{
      "requestId":"9a55a5e6a0d18a7f"
    }
  },
  "event":"payments.invalidPaymentMethod"
}

Invalid Booking.com Credit Card

This webhook is sent when Guesty cannot process the payment on Booking.com reservations with the supplied Booking.com credit card. Learn how to subscribe to this webhook here.


Event to Subscribe

payments.invalidBcomCard


Webhook Payload

Body ParameterData TypeDescription
paymentobject
  accountIdstringThe ID of your Guesty account.
  reservationIdstringThe Guesty ID of the affected reservation.
  paymentIdstringThe Guesty ID of the payment.
  invalidCreditCardobject
    atstringThe ISO 8601 date and time of the error.
    brandstringThe credit card type. E.g., "Visa."
    last4stringThe last four digits of the credit card number.
    errorstringThe error type.
    processorErrorobjectThis contains the specific error code and message.
  ctxobjectThis contains the request ID you can share with Guesty support for additional troubleshooting.
eventstringpayments.invalidBcomCard

Payload Example

{
  "payment":{
    "accountId":"5213a2d206112710005d96ff",
    "reservationId":"667ad00db904239ef0b9cbdd",
    "paymentId":"668520e93cac721c718e845f",
    "invalidCreditCard":{
      "at":"2024-07-04T13:38:18.397Z",
      "brand":"visa",
      "last4":"5103",
      "error":"GENERAL",
      "processorError":{
        "code":"incorrect_zip",
        "message":"Your card could not be authorized using the postal code provided. Please update the postal code, or contact your card issuer for further details."
      }
    },
    "ctx":{
      "requestId":"9a55a5e6a0d18a7f"
    }
  },
  "event":"payments.invalidBcomCard"
}

Invalid Second Booking.com Credit Card

This webhook is sent when Guesty cannot process the payment on Booking.com reservations with a second supplied Booking.com credit card. Learn how to subscribe to this webhook here.


Event to Subscribe

payments.invalidSecondBcomCard


Webhook Payload

Body ParameterData TypeDescription
paymentobject
  accountIdstringThe ID of your Guesty account.
  reservationIdstringThe Guesty ID of the affected reservation.
  paymentIdstringThe Guesty ID of the payment.
  invalidCreditCardobject
    atstringThe ISO 8601 date and time of the error.
    brandstringThe credit card type. E.g., "Visa."
    last4stringThe last four digits of the credit card number.
    errorstringThe error type.
    processorErrorobjectThis contains the specific error code and message.
  ctxobjectThis contains the request ID you can share with Guesty support for additional troubleshooting.
eventstringpayments.invalidSecondBcomCard

Payload Example

{
  "payment":{
    "accountId":"5213a2d206112710005d96ff",
    "reservationId":"667ad00db904239ef0b9cbdd",
    "paymentId":"668520e93cac721c718e845f",
    "invalidCreditCard":{
      "at":"2024-07-04T13:38:18.397Z",
      "brand":"visa",
      "last4":"5103",
      "error":"GENERAL",
      "processorError":{
        "code":"incorrect_zip",
        "message":"Your card could not be authorized using the postal code provided. Please update the postal code, or contact your card issuer for further details."
      }
    },
    "ctx":{
      "requestId":"9a55a5e6a0d18a7f"
    }
  },
  "event":"payments.invalidSecondBcomCard"
}

Failed Authentication

This webhook is sent when the authentication step for the credit card payment fails. Learn how to subscribe to this webhook here.


Event to Subscribe

payments.authenticationFailed


Webhook Payload

Body ParameterData TypeDescription
paymentobject
  accountIdstringThe ID of your Guesty account.
  reservationIdstringThe Guesty ID of the affected reservation.
  paymentIdstringThe Guesty ID of the payment.
  ctxobjectIt contains the request ID you can share with Guesty support for additional troubleshooting.
eventstringpayments.authenticationFailed

Payload Example

{
  "payment":{
    "accountId":"5213a2d206112710005d96ff",
    "reservationId":"667ad00db904239ef0b9cbdd",
    "paymentId":"668520e93cac721c718e845f",
    "ctx":{
      "requestId":"9a55a5e6a0d18a7f"
    }
  },
  "event":"payments.authenticationFailed"
}

Disputed Payment

This webhook is sent when you receive a chargeback from your payment processor. Learn how to subscribe to this webhook here.


Event to Subscribe

payments.disputes


Webhook Payload

Body ParameterData TypeDescription
paymentobject
  accountIdstringThe ID of your Guesty account.
  reservationIdstringThe Guesty ID of the affected reservation.
  paymentIdstringThe Guesty ID of the payment.
  amountnumberThe amount that was refunded to the cardholder.
  chargebackAtstringThe ISO 8601 date string with the date and time of the chargeback.
  sourcestringThis will return AUTO for clear-cut cases such as a double charge, and MANUAL for situations where the dispute is reviewed before initiating a chargeback. Your payment processor is the channel for handling such disputes.
  reasonstringReason for the chargeback.
  typestringThe dispute type. E.g., "CHARGEBACK"
  caseIdstringThe payment processor case ID for follow-up with their support.
  createdAtstringThe ISO 8601 date when the case was opened.
ctxobjectIt contains the request ID you can share with Guesty support for additional troubleshooting.
eventstringpayments.disputes

Payload Example

{
  "payment":{
    "accountId":"5213a2d206112710005d96ff",
    "reservationId":"667ad00db904239ef0b9cbdd",
    "paymentId":"668520e93cac721c718e845f",
    "amount":234.72,
    "chargebackAt":"2024-02-07T23:59:59.000Z",
    "source":"AUTO",
    "reason":"FHS Partners L booking",
    "type":"CHARGEBACK",
    "caseId":"2024031111111",
    "createdAt":"2024-02-11T12:00:28.143Z",
    "ctx":{
      "requestId":"9a55a5e6a0d18a7f"
    }
  },
  "event":"payments.disputes"
}