v1

latestOpenAPI 3.0.02026-07-26190104.7 KB
Reservation quote

Create an instant reservation if a credit card charge is successful

Create an instant reservation based on a quote, with an immediate charge using a Stripe confirmation token or the initialPaymentMethodId when GuestyPay is used. This endpoint allows you to charge a reservation before confirming the reservation. If the charge fails, the reservation is not created. Stripe's confirmation token is generated using Stripe frontend embedded component. See Stripe docs for more information.

The initialPaymentMethodId is created using our dedicated SDK v2. Documentation can be found here. Before requesting this endpoint, when GuestyPay is used, the SDK submit function must be called to get the initialPaymentMethodId. The payload option 1 should be used and the email must also be sent in the guest data. After this request, if the status of the payment is PENDING_AUTH, the /verify-payment endpoint must be called.

❗ Important

Before using the Booking Engine (BE) API reservation endpoints, ensure your Guesty account is properly activated by following these steps:

  1. Activate Manual Source (skip this step if you already have direct reservations in Guesty account):
    • Create a manual reservation directly in the Guesty UI. This step is required to activate the "Manual" booking source in your account.
  2. Activate BE API Source:
    • Create your first reservation using the Booking Engine API endpoints.
    • This step is essential to initialize the BE API source, which allows you to set up additional fees, taxes, auto payments and automated messages.
post/api/reservations/quotes/{quoteId}/instant-charge

Path parameters

quoteIdstring required
Example:5d6e7a7ebf8e3800207735ae

ID of quote

Request body

ratePlanIdstring required

Rate plan ID. Ensure you supply one of the rate plan IDs returned in the quote payload. Attempts to use any other string will result in an error.

initialPaymentMethodIdstring

The payment method ID from our tokenization endpoint when provider is not Stripe. Exactly one of initialPaymentMethodId or confirmationToken is required.

reservedUntil-1 | 12 | 24 | 36 | 48 | 72

Time in hours to reserve the reservation for. Use -1 to keep calendar reserved. Valid values: -1, 12, 24, 36, 48, 72

confirmationTokenstring required

Confirmation token from Stripe frontend embedded component. Exactly one of initialPaymentMethodId or confirmationToken is required.

reuseboolean

Whether to reuse the payment method for future charges

Example request

{
  "ratePlanId": "5bf544a600a9b000389f81d8",
  "initialPaymentMethodId": "5bf544a600a9b000389f81d8",
  "reservedUntil": 12,
  "confirmationToken": "ctoken_1QZvJiAAEsTuBlhIyegBgy7j",
  "guest": {
    "firstName": "Jhon",
    "lastName": "Dou",
    "email": "jhon.dou@guesty.com",
    "phone": "380111111111",
    "address": {
      "street": "1000 5th Ave",
      "city": "New York",
      "country": "United State",
      "countryCode": "US",
      "zipCode": "10028",
      "state": "New York"
    }
  },
  "policy": {
    "privacy": {
      "version": 1
    }
  }
}

Response

successful operation

threeDSChallengeobject

The threeDSChallenge object returned for the SDK handle3DSChallenge function.