Skip to content

Test vs Live Mode

The one rule

The key you use determines the mode. No other flag, header, or environment variable is needed:

  • sk_sandbox_... / pk_sandbox_... → test mode
  • sk_live_... / pk_live_... → live mode

What’s different in test mode

AspectTest modeLive mode
PSP callsMocked — no real processingReal PSP calls
Cards acceptedTest card numbers onlyReal cards
Data isolationSeparate from live dataSeparate from test data
WebhooksFire with test eventsFire with live events
TimeCan be simulated with test clocksReal time only
API responsesIdentical shapeIdentical shape

What’s the same

  • Same API endpoints
  • Same request and response structure
  • Same webhook event format and delivery
  • Same error codes and response shapes
  • Same status transitions

Switching to live

Sandbox and live are two paired accounts, not two modes of one account. Getting a live account and getting it activated is the bulk of the work:

  1. Create the live account. In the dashboard, go to Settings → Manage Accounts and use Promote to Live on your sandbox account. This creates the paired live account
  2. Complete onboarding. The new live account’s dashboard shows a Continue onboarding banner. It opens the onboarding application — business details, beneficial owners, supporting documents, and terms acceptance
  3. Wait for the review decision. The onboarding application shows the current status once submitted, including when the review team needs more from you. Approval activates the account and the banner disappears
  4. Swap keys. Replace sk_sandbox_ with sk_live_ in your server environment and pk_sandbox_ with pk_live_ in your client-side code, using the keys from the live account under Developer → API keys
  5. Register your production webhook endpoint. Ask support to add it against the live account — sandbox subscriptions do not carry over

Keeping environments separate

  • Store sandbox keys in .env.development and live keys in .env.production
  • Never mix test and live keys in the same application instance
  • Use separate webhook endpoints for test and live events — each account has its own subscriptions, registered by support
  • Test data is never visible in live mode and vice versa