Skip to main content
PayNext provides separate sandbox and production environments. Always test your integration in sandbox before processing real payments.

Environments

EnvironmentDashboardAPI
Sandboxsandbox-dashboard.paynext.comsandbox-api.paynext.com
Productiondashboard.paynext.comapi.paynext.com
Switch between environments using the toggle in the left sidebar of each dashboard.
Processor sandbox credentials only work with PayNext sandbox. Production credentials only work with PayNext production. Mixing environments will cause authentication failures.

Setup Checklist

1

Configure processor in sandbox

Add your processor’s sandbox/test credentials in sandbox-dashboard.paynext.com → Integrations.
2

Create sandbox API keys

Generate API keys in sandbox-dashboard.paynext.com → Developers → API Keys.
3

Set SDK environment

Use environment: 'sandbox' when mounting the SDK:
checkout.mount('paynext-checkout', {
  clientToken: session.id,
  environment: 'sandbox',  // Use 'production' for live
  // ...
})
4

Test payment flows

Use processor-specific test cards to simulate different scenarios.

Test Credentials

Each processor provides test credentials for their sandbox environment—cards, wallets, and alternative payment methods. See your processor’s integration page in Integrations for sandbox setup guides and test credentials.
Test both successful payments and failure scenarios (declined cards, insufficient funds, 3DS challenges) to ensure your error handling works correctly.

Best Practices

During Development

  • Use sandbox exclusively — Never test with production credentials during development
  • Test all payment methods — Verify each enabled payment method works correctly
  • Simulate failures — Use test cards that trigger declines to test your error handling
  • Verify webhooks — Confirm your webhook endpoint receives and processes events correctly

Before Going Live

  • Complete end-to-end testing — Test the full flow from checkout to settlement
  • Verify 3D Secure — Test authentication flows with 3DS-enabled test cards
  • Test subscription scenarios — Verify trials, renewals, upgrades, and cancellations
  • Check Dashboard data — Confirm payments appear correctly in the sandbox Dashboard

Going Live

  1. Add production credentials for your processor in dashboard.paynext.com
  2. Generate production API keys in dashboard.paynext.com → Developers
  3. Update your backend to use api.paynext.com
  4. Change SDK environment to 'production'
  5. Process a small real payment to verify the integration
Double-check your environment configuration before launch. Sandbox API calls to production endpoints (or vice versa) will fail.

Debugging

IssueCauseSolution
Authentication failedWrong environment credentialsVerify API key matches environment
Processor errorSandbox credentials in productionCheck processor credentials match PayNext environment
Payments not appearingWrong DashboardSwitch to correct environment in sidebar
Webhooks not receivedWrong endpointVerify webhook URL is configured in correct environment