Skip to content

Test Mode

Test mode is determined by the key you use — there is no separate flag or environment to select. A request made with a _sandbox_ key runs in test mode. A request made with a _live_ key runs in live mode.

Terminal window
# Test mode
Authorization: Bearer sk_sandbox_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Live mode
Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Both key types exist for both modes:

Mode Secret key Publishable key
Sandbox sk_sandbox_... pk_sandbox_...
Live sk_live_... pk_live_...

Find your keys under Developer → API keys in the dashboard, or go straight to dashboard.elasticpay.co/developers.

Use test card numbers to simulate payment outcomes. See Test Cards for all accepted values.

For BECS direct debit testing, use BSB 062-000 with any account number.

Sandbox mode includes test clocks — fast-forward time for a set of test customers to watch payment plans renew, retries fire, and links expire in seconds instead of weeks.

  • PSP calls are mocked — no real card processing occurs
  • Webhook events fire identically to live mode
  • API request and response shapes are identical
  • Data is isolated — test records are not visible in live mode
  • Emails only reach people in your team — see below

A sandbox account sends its emails only to people in your organisation who joined it themselves (by signing up, or by accepting an invitation that created their account) and have confirmed their email address. Someone added to your team from an existing account doesn’t count. That covers payment links, setup links, mandate copies and behaviour-rule emails to customers, and account emails such as failure digests. Any other address is skipped, and an email with no one left to send to isn’t sent. The API response and dashboard behave as they would in live mode either way.

To see what a customer would receive, give the test customer your own email address. Test emails have [Test] at the start of the subject and a line at the top saying they come from a sandbox account.

SMS isn’t sent in sandbox, to anyone. A payment link created with SMS delivery is created as usual, but no message goes out: the link shows as not yet delivered, and its SMS status reads “Not sent: sandbox”. Copy the link from the dashboard to open it yourself.

Every page ElasticPay hosts for a sandbox account shows a “Test mode — no real payment will be processed” banner: the checkout, the card setup page that setup emails link to and its confirmation, and the payment link pages.

  1. Replace all _sandbox_ keys with _live_ keys
  2. Ensure your live account has been activated. There is no compliance settings screen — while the account is awaiting activation, the dashboard shows a Continue onboarding banner that opens the onboarding application, and that application shows the current review status. When the banner is gone, the account is active
  3. Ask support to register your production webhook endpoint against the live account — sandbox subscriptions do not carry over

See Test vs Live for the full switchover checklist.