Halaman ini belum diterjemahkan, jadi Anda membaca versi bahasa Inggris.
Test tools (staging)
Reset the test hotel, move its clock, send yourself webhook events and replay them, read the API log, and simulate card payments and guests' WhatsApp messages. Staging only.
These endpoints exist on staging only, at https://staging.chatbeds.app/partner/v1/sandbox/.... In production they answer 404. They act on the property of the key or token that calls them, and they need no scope, except where noted. Hotels have the same tools on the Test tools page of the staging dashboard.
Reset the test hotel
/sandbox/scenariossandbox.scenarios/sandbox/resetsandbox.resetEmpties the hotel and fills it again from a scenario: its rooms, prices, team and bookings. Its id, name, API keys and connected apps stay, so your configuration keeps working. Everything else made there goes: bookings, guests who stayed only there, bills, policies you created, the guest phone's conversations, and the logs below. The clock goes back to now.
standard (the default): 12 rooms, 8 stays around today, 2 guests in house who paid half. busy: 3 guests leaving today, 6 arriving and 3 staying on, every room taken tonight. empty: the rooms, prices and team, with no bookings.Only the hotel's own keys can reset it. An app's access token answers 403.
curl -X POST "https://staging.chatbeds.app/partner/v1/sandbox/reset" \
-H "Authorization: Bearer cbk_test_••••" \
-H "Content-Type: application/json" \
-d '{"scenario": "busy"}'{
"property_id": "19306340-c7cf-465a-93d3-0b7873a7e85d",
"name": "Sandbox Hotel",
"scenario": "busy",
"reservations": 12,
"rooms": 12,
"kept": { "keys": 1, "apps": 0 }
}Booking ids change with every reset: read them again afterwards.
Time travel
/sandbox/clocksandbox.clock/sandbox/clocksandbox.moveClockMoves the test hotel's own clock forward. Tomorrow's arrivals become today's, check-outs fall overdue, and the night audit and guest reminders come due at their next run. Nothing else's clock moves, and what is recorded keeps the real time it happened.
The clock can be at most 400 days ahead, and never behind now (400).
{
"offset_minutes": 3060,
"hotel_now": "2026-11-09T08:12-05:00",
"hotel_today": "2026-11-09",
"real_now": "2026-11-07T13:12+00:00",
"moved": true
}Webhooks
Send an event
/sandbox/eventssandbox.fireEventSends a webhook event about one of the hotel's bookings to this key's webhook address now, with the real payload, signed as usual. It is sent whether or not the key turned that event on, and its body has "test": true. The key still needs the scope the event needs (an app needs reservations:read for booking events, folios:read or payments:write for payment events).
reservation.created, reservation.modified, reservation.cancelled, reservation.checked_in, reservation.checked_out, reservation.no_show, folio.updated, or payment.completed, payment.failed, payment.expired, payment.voided, payment.refunded.{ "queued": ["a6f1c2d4-5e8b-4c3a-9f71-2b0d8e6a4c19"] }400 when the key has no webhook address, the event is unknown, or the booking has no payment for a payment event.
The webhook log
/sandbox/webhookssandbox.webhookLogThis key's deliveries, newest first, with their bodies: status (PENDING, SENT or FAILED), attempts, last_error, delivered_at, test, replay_of and body. limit: 1 to 200, default 50.
Replay a delivery
/sandbox/webhooks/{webhook_id}/replaysandbox.replayWebhookSends a delivery again as a new one: the same body under a new id, with replay_of naming the first. Answers 202 with {"queued": [...], "replay_of": "..."}.
The API log
/sandbox/requestssandbox.apiLogThe last 1,000 calls made with this key or token, newest first: request_id, method, path, status, ms, and the request_body (up to 8 KB) and response_body (up to 16 KB). Secrets in bodies (fields named like secret, token, password, card_number, cvc) are masked.
X-Request-Id.Every answer, in both environments, carries an X-Request-Id header. Send your own and it comes back, so you can match the call in your logs and here.
Simulate a card payment
/sandbox/simulate/paymentsandbox.simulatePaymentWhat Stripe would tell ChatBeds about a card payment link, run through the same code as Stripe's own notice: the bill, the booking, the hotel's messages and your webhooks all follow, exactly as for a real payment.
PENDING card link, from Create a payment link.paid, failed or expired.{
"result": "paid",
"payment": {
"id": "d302aa4b-90a4-44f4-b510-501da4c65bb3",
"reservation_id": "fd3f935f-7ff2-4493-bc69-b132fdd38609",
"kind": "PAYMENT",
"amount": 50.0,
"currency": "USD",
"method": "STRIPE",
"status": "COMPLETED",
"paid_at": "2026-11-07T13:20:41+00:00"
}
}Making the link needs Stripe connected with a test key on the hotel's Finance page. You can also pay it for real with Stripe's test cards.
Guests on WhatsApp
Write as a guest
/sandbox/simulate/guest-messagesandbox.guestMessageA guest's WhatsApp message to the hotel, or a tap on one of its buttons, taken through the same path as a real one. The answer holds every message the hotel sent back, as WhatsApp's Cloud API would have received it: its text, buttons, list and Pay now link.
+44 7700 900123.button, the words on the button).id of a button or list row the guest taps, from an earlier reply.{
"status": "inbox",
"phone": "+447700900123",
"replies": [
{
"id": "wamid.sim.6541cc10992849229918b9930c7b27d5",
"at": "2026-11-07T13:30:09.032622+00:00",
"message": {
"to": "+447700900123",
"type": "interactive",
"interactive": {
"type": "list",
"body": { "text": "Happy to book you a room 🛏️ Which day would you arrive? Pick a day, or type a date like 25/10." },
"action": {
"button": "Pick a day",
"sections": [{ "title": "Pick a day", "rows": [
{ "id": "g:bk:d:0", "title": "📅 Today", "description": "Sat 7 Nov" },
{ "id": "g:bk:d:1", "title": "📅 Tomorrow", "description": "Sun 8 Nov" }
] }]
}
}
}
}
]
}To tap Tomorrow: {"phone": "+447700900123", "button": "g:bk:d:1", "text": "📅 Tomorrow"}.
The hotel answers guests when its Guest services are on. When they are off, replies is empty and note says so: the message waits in the hotel's inbox for a person, as it would in production.
The guest phone
/sandbox/guest-phonesandbox.guestPhoneOne number's conversation with the hotel, oldest first: the guest's messages ("from": "guest") and the hotel's ("from": "hotel"), including messages the hotel sent on its own, such as booking confirmations and reminders. Query: phone, and limit (1 to 500, default 100).
Sedang membangun sesuatu?
Folios and payments
Read a booking's bill, post charges, record payments you took, send or void a card payment link on the hotel's Stripe account, check a payment's status, and handle refunds.
Webhooks
Get a signed POST whenever a booking at a connected property is made, changed or cancelled, or money moves on it, from anywhere.