How environments work
- The environment comes from the key.
psk_test_keys operate in test mode,psk_live_keys in live mode. Same base URL, same endpoints, same payload shapes. - Every resource is stamped with its environment. Each group, quote, and enrollment carries
"mode": "test"or"mode": "live". - Environments are fully isolated. Test keys only see test resources; live keys only see live resources. There is no cross-mode read and no “promote to live”. When you go live, you recreate real employers with your live key.
Test mode vs live mode
No money moves in either environment until Prescience activates the
company. Activation (
sandbox → prod) is a manual gate on our side, after
the employer completes onboarding. Test companies are never activated. You
cannot trigger a funding pull by accident; there is no API for it.Stable quote fixtures
For a stored census and market-rate snapshot, the pricing solve is stable. A fresh market sweep can return a newer plan set or rates, so do not snapshot-test against a hard-coded dollar amount forever. Instead, assert the response shape, pricing basis, covered lives, benchmark, and disclosed assumptions. That means you can:- Test the real pending state. A quote may return
409 rates_pendingwhile the market comparison is running. The iframe handles this automatically. - Build pricing UI against representative numbers. Test mode follows the production quote path without activating a real employer.
- Re-quote freely. Quoting has no side effects beyond writing the quote record. Rate limit: 60 quote creates per hour.
Test the full lifecycle
A complete test-mode pass looks like:POST /groups, thenPUT /census: verify the census acceptance response. This starts modeling but does not return an iframe URL.- When the employer opens the offer, call
POST /embed-sessionsfrom your backend, pass its returnedurlto your frontend, and render it as the iframesrc. Confirm the iframe shows live modeling and then the plan. - Complete the iframe handoff and verify the
enrollment.createdwebhook. If you use the direct quote API instead, handle409 rates_pending, then testPOST /quotesandPOST /enrollmentsseparately. GET /account+GET /members: build the benefits tab against the sandbox company.PUT /webhook+POST /webhook/test: verify signatures end to end.- New hire and termination calls: verify census sync.