หน้านี้ยังไม่ได้แปล คุณจึงกำลังอ่านฉบับภาษาอังกฤษ
Environments
Staging and production, their addresses and keys, what is different on staging, and what changes when you go live.
ChatBeds runs in two places. They share the code and the API, and nothing else: not their accounts, hotels, keys, apps or data.
| Staging | Production | |
|---|---|---|
| For | Building and testing, by developers and hotels | Real hotels and real guests |
| Dashboard | https://staging.chatbeds.app | https://app.chatbeds.app |
| Partner API | https://staging.chatbeds.app/partner/v1 | https://app.chatbeds.app/partner/v1 |
| OAuth | https://staging.chatbeds.app/oauth/... | https://app.chatbeds.app/oauth/... |
| Partner keys | cbk_test_... | cbk_live_... (and older cbk_... keys) |
| App access tokens | cbat_test_... | cbat_live_... |
| Data | Made-up, and can be reset at any time | Real |
| Status | https://staging.chatbeds.app/status | https://status.chatbeds.app |
Every example in these docs uses the production address. To call staging, put staging.chatbeds.app in its place: the paths, fields and answers are the same.
A key works only where it was made
Each environment refuses the other's credentials and says where to call instead:
{
"detail": "This is a staging credential: call https://staging.chatbeds.app with it. Production needs a live key or token (cbk_live_..., cbat_live_...)."
}So a test key can never touch a real hotel, and a live key sent to staging by mistake fails at once.
What is different on staging
Staging is ChatBeds with every feature turned on and nothing that can reach a real person by surprise.
- Every plan feature and module is unlocked and never billed. An account can have up to 10 test hotels, so you can test hotel groups, transfers and tokens for several properties.
- WhatsApp is a simulator. No real number can be connected. Everything a hotel would send is kept, with its buttons, lists and Pay now links, and shown on the hotel's guest phone.
- Email goes only to the account's own sign-in addresses. Every other email is held on the outbox with the reason, and every subject starts with
[TEST]. - Card payments use Stripe's test mode. Live Stripe keys are refused. A hotel connects a Stripe test key on its Finance page; then payment links work, and you pay them with Stripe's test cards or simulate the outcome.
- AI is capped at USD 2 and 30 voice minutes a day per account.
- Rate limits are 5 times higher: 600 calls a minute per key.
- Test tools that production doesn't have: reset, time travel, firing webhook events, the webhook and API logs, and simulators.
- An orange STAGING · test data band across the top of every screen, and no page is indexed by search engines.
Webhooks go to the addresses you choose, through the same checks and signatures as in production.
Every answer has a request id
Both environments add an X-Request-Id header to every answer. Send your own (8 to 64 letters, digits, ., _, : or -) and the answer carries it back; otherwise ChatBeds makes one. Quote it when you ask for help, and on staging find the call by it in the API log.
Releases reach staging first
A change reaches staging when it is merged, and production at least 48 hours later, as the same build. Changes to the partner API are announced in the changelog with the day they reach production. Version 1 only grows: fields and endpoints are added, never removed or changed in meaning.
If you run your tests against staging on a schedule, you see a change two days before your hotels do.
Going live
Your code doesn't change. What changes:
- The base URL:
staging.chatbeds.appbecomesapp.chatbeds.app. - The credential: a hotel makes a live key on its own Settings → Partner API page, or an app is registered again in production and goes through the going-live checklist. Apps registered on staging stay on staging and never show in the real Apps directory.
- Your webhook secret: each key and app has its own.
Fair use
Staging is for testing. Please:
- use made-up guests only, with the reserved fiction phone ranges (UK
+44 7700 900000to900999, US+1 555 0100to0199) and email addresses at domains you own orexample.com; - never run a real hotel on staging, or keep anything there you can't lose: test hotels can be reset at any time, and staging's data may be cleared;
- don't load-test beyond the rate limits. Ask us first if you need to.
The API log keeps each key's last 1,000 calls.
กำลังสร้างอะไรอยู่หรือเปล่า?