Errors & Rate Limits

Status codes, error shapes, throttling, and retries.

Error shape

Validation errors:

{
  "message": "The check in field is required.",
  "errors": { "check_in": ["The check in field is required."] }
}

Everything else returns a message, sometimes with an error or code:

{ "message": "Invalid or expired API key." }

Status codes

StatusWhenDo
200Success.
201Prebook created.Keep the booking id.
401Missing / bad / revoked / expired key.Check the header; rotate if needed.
402Payment needs action or failed.See below.
403Test key tried to book.Use a live key.
404Not found, or belongs to another org.Check the ID.
415Body wasn't JSON.Send Content-Type: application/json.
422Validation failed.Read errors, fix the request.
429Rate limited.Back off and retry.

Payment errors

Both come back as 402.

Needs 3-D Secure:

{ "error": "payment_requires_action", "payment_intent_id": "pi_...", "client_secret": "pi_..._secret" }

Finish authentication with Stripe.js, then call book again with payment_intent_id. See Book a Package.

Failed:

{ "error": "payment_failed", "message": "Your card was declined." }

The message is safe to show for card declines. Retry with a different method.

Rate limits

120 requests per minute per key. Over that, you get 429 with Retry-After, respect it and back off. Need more? Contact support.

Retries

  • Book is safe to retry. An already-paid booking is rejected with 422, not charged twice. Intent creation is idempotent per booking.
  • Prebook is not. Each call creates a new hold. On a timeout, check the booking before retrying.
  • On any book timeout, poll the booking to learn the real outcome before retrying.

Did this page help you?