Sandbox
Before runs no separate sandbox environment. A bk_test_
key, against the same https://api.before.com, opens practice sales: the
real wizard, products and prices, marked as practice and never sent to a
carrier.
Live key (bk_live_) | Test key (bk_test_) | |
|---|---|---|
| Sale | Real | Practice, hidden from the funeral home's normal lists |
| Wizard | Unmarked | Shows a Practice pill |
| Documents | Sent for signature | Watermarked PRACTICE and signed at once, with no email or text to the family |
| Carrier | Submitted | Never submitted |
mode in responses and webhooks | live | test |
| Webhooks | All four events | sale.signed only |
Practise the whole flow
- Open a session with a test key and a new
partner_reference. - Call
Before.openwith the token and complete the wizard. - Send the documents for signature. A practice sale is signed straight away,
so
onCompletefires without_for_signatureorsigned. - Receive
sale.signedwith"mode": "test"and verify its signature. - Read the sale with
GET /v1/partner/sales/:id.
sale.submitted, policy.issued and sale.declined never fire for practice
sales. Exercise those handlers with a recorded event signed with your own
endpoint secret; the signature is all
your code needs to trust.
Create test and live keys in the Before Partner Portal.
Keep modes apart
- A test key reads only practice sales, and a live key only real ones.
- A
partner_referencebelongs to the mode that first used it. Use distinct references in testing, such as atest-prefix. - One endpoint receives both modes; branch on
data.mode.