A separate environment, isolated from your production data

To test Polar or work on your integration without worrying about actual money processing or breaking your live organization, you can use our sandbox environment.

It’s a dedicated server, completely isolated from the production instance where you can do all the experiments you want.

Why a dedicated environment instead of a test mode?

Since we’re dealing with money and need to keep track of all movements to assure or Merchant of Record service, we found it safer to isolate live data from test data so it never interferes. Besides, it allows you to create an unlimited number of account and organization to test lot of different scenarios. Consider it as your own development server!

Get started

You can access the sandbox environment directly on sandbox.polar.sh or by clicking on Go to sandbox from the organization switcher.

You’ll then need to create a dedicated user account and organization, the same way described in our Quick Start guide.

Testing payments

The sandbox environment allows you to experience the complete customer funnel, including checkout. You can perform test payments using Stripe’s test card numbers.

The easiest one to test a successful payment is to use the following card number with a future expiration date and random CVC:

4242 4242 4242 4242

API and SDK

To make requests to our API, all you need to do is to switch the base URL from https://api.polar.sh to https://sandbox-api.polar.sh. You’ll also need to create an access token in the sandbox environment, the access token created in the production environment can’t be used in the sandbox.

Our official SDK support the sandbox environment through a dedicated parameter.

const polar = new Polar({
  server: 'sandbox',
  accessToken: process.env['POLAR_ACCESS_TOKEN'] ?? '',
})

Was this page helpful?