Skip to main content
The Partner API provides two environments: test mode for development and integration testing, and live mode for real employer groups. Both run the same code paths: the same rating engine, the same validations, the same webhooks, the same onboarding state machine. The only things that never happen in test mode are the real-world ones: outbound email, production activation, and money movement. Unlike platforms that separate environments by base URL, the Partner API derives the environment from your API key.

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

BehaviorTest modeLive mode
Rating engineSame deterministic engineSame deterministic engine
QuotesReal numbers from your censusReal numbers from your census
EnrollmentsFully working sandbox company, flagged test: trueSandbox company, then onboarding to prod
Onboarding pipelineRuns (sandbox state)Runs, completed with the employer
Employer portal provisioningAccount provisioned, no email (inviteSuppressed: true)Account provisioned, set-password invite emailed
Outbound emailNever sentSent (portal invites, member invitations at activation)
WebhooksDelivered and signed, "mode": "test"Delivered and signed, "mode": "live"
Activation (sandboxprod)Never; test companies stay sandboxedBy Prescience, after onboarding
Money movementNoneNone until Prescience flips the company to prod
No money moves in either environment until Prescience activates the company. Activation (sandboxprod) 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.

Deterministic quotes

The rating engine is a pure function of the census, the plan year start date, and the rate card. The same inputs always produce the same cents, in test and in live. That means you can:
  • Snapshot-test your integration. The quote in the quickstart (monthly.totalCents: 660096) will reproduce exactly from the same census.
  • Build pricing UI against real numbers. No mock data drift between your test fixtures and production behavior.
  • Re-quote freely. Quoting has no side effects beyond writing the quote record. Rate limit: 60 quote creates per hour.
The quotes guide documents quote inputs, response fields, expiry, and in-review handling.

Test the full lifecycle

A complete test-mode pass looks like:
  1. POST /groupsPUT /censusPOST /quotes: verify your quote handling and plan-selection UI.
  2. POST /enrollments: verify your selection flow, the employerPortal response (inviteSuppressed: true in test mode), and the enrollment.created webhook.
  3. GET /account + GET /members: build the benefits tab against the sandbox company.
  4. PUT /webhook + POST /webhook/test: verify signatures end to end.
  5. New hire and termination calls: verify census sync.
When that loop is green, going live is a key swap plus the compliance checklist. The code does not change.