Testing in the sandbox

It is very important to test your Smart Router code during development, so we provide the sandbox to help you test safely. The sandbox is a testing environment that simulates the normal Smart Router production environment using mock data. This data doesn’t belong to any real-world customers and is kept completely separate from any genuine data. We strongly recommend that you use the sandbox during development to avoid the risk of damaging real customer data.

Using the sandbox

You can use most of the Smart Router API objects in either the sandbox or the production environment. Note that the two environments are separate and so objects created in one environment will not be available in the other. All of the main objects (ie, ones that are not simply used to pass parameters) have a sandbox attribute that is set to true only when the sandbox is active.

To enable the sandbox in your code, use the special sandbox public and private keys when you instantiate the ProcessOut object:

curl -X GET https://api.processout.com/ \
    -u test-proj_gAO1Uu0ysZJvDuUpOGPkUBeE3pGalk3x:key_sandbox_mah31RDFqcDxmaS7MvhDbJfDJvjtsFTB
var ProcessOut = require("processout");
var client = new ProcessOut(
    "test-proj_gAO1Uu0ysZJvDuUpOGPkUBeE3pGalk3x",
    "key_sandbox_mah31RDFqcDxmaS7MvhDbJfDJvjtsFTB");

import processout
client = processout.ProcessOut(
    "test-proj_gAO1Uu0ysZJvDuUpOGPkUBeE3pGalk3x", 
    "key_sandbox_mah31RDFqcDxmaS7MvhDbJfDJvjtsFTB")

require "processout"
client = ProcessOut::Client.new(
    "test-proj_gAO1Uu0ysZJvDuUpOGPkUBeE3pGalk3x", 
    "key_sandbox_mah31RDFqcDxmaS7MvhDbJfDJvjtsFTB")

<?php
$client = new \ProcessOut\ProcessOut(
    "test-proj_gAO1Uu0ysZJvDuUpOGPkUBeE3pGalk3x", 
    "key_sandbox_mah31RDFqcDxmaS7MvhDbJfDJvjtsFTB");

import "github.com/processout/processout-go"

var client = processout.New(
    "test-proj_gAO1Uu0ysZJvDuUpOGPkUBeE3pGalk3x", 
    "key_sandbox_mah31RDFqcDxmaS7MvhDbJfDJvjtsFTB",
)

Note: You must enable the production environment before deploying your product. Remove the test- prefix from the project ID and replace the sandbox private key with the production private key.

You may find it convenient to create two completely separate projects and use one only for production and the other only for testing.

Test cards

In the sandbox, you can use a set of test card numbers in place of real cards. Some of these numbers simulate particular card brands or issuing countries while others will generate errors or other special behavior so you can test your code’s responses.

The full set of test card numbers is listed below. Note that the sandbox environment doesn’t check the expiry dates and CVC number of test cards. Also note that no genuine card numbers will work within the sandbox and no test numbers will work in the production environment.

Cards that will result in a successful payment:
4242 4242 4242 4242
VISA
5555 5555 5555 4444
Mastercard
3782 82246 310005
American Express
3012 3456 7890 19
Diners Club
3530 1113 3330 0000
JCB
6011 1111 1111 1117
Discover
Successful cards with different issuing countries:
4977 8300 0000 0001
FR
4556 6200 0000 0005
FR (carte-bancaire)
4658 5800 0000 0008
GB
4571 7300 0000 0003
DK
4023 6000 0000 0002
IT
4338 3000 0000 0009
AR
4835 9100 0000 0003
CN
Cards with 3-D Secure specific behavior:
4000 0000 0000 0101
3-D Secure supported and required on the card
4000 0000 0000 0119
3-D Secure not supported on the card
4000 0000 0000 0259
3-D Secure v2 supported but v1 not supported
4000 0000 0000 3238
3-D Secure v2 not supported but v1 supported
4000 0000 0000 3055
3-D Secure v2 supported with frictionless (no fingerprint)
4000 0000 0000 3063
3-D Secure v2 supported with frictionless (with fingerprint)
4000 0000 0000 3220
3-D Secure v2 supported with fingerprint failing
4000 0000 0000 3253
3-D Secure v2 required for SCA, no authentication when Merchant Initiated Transaction
4000 0000 0000 3246
3-D Secure v1 required but v2 not supported
Cards that have special authorization behavior:
4000 0000 0000 2180
The authorization on the card will fail with error code card.do-not-honor
4000 0000 0000 2198
The authorization on the card will fail with error code card.possible-fraud
4000 0000 0000 2206
The authorization on the card will fail with error code card.no-money
4000 0000 0000 2214
The authorization on the card will fail with error code card.expired
4000 0000 0000 2222
The authorization on the card will fail with error code card.stolen
4000 0000 0000 2230
The authorization on the card will fail with error code card.failed-cvc
4000 0000 0000 2248
The authorization on the card will fail with error code card.failed-avs
4000 0000 0000 2255
The authorization on the card will fail with error code card.not-authorized
4000 0000 0000 2263
The authorization on the card will fail with error code card.inactive
4000 0000 0000 2271
The authorization on the card will fail with error code card.lost
4000 0000 0000 2289
The authorization on the card will fail with error code card.region-not-authorized
Cards that have special behavior:
4000 0000 0000 0002
The credit card will be denied
4000 0000 0000 0010
The authorization on the card will be successful, but any capture will fail
4000 0000 0000 0028
The CVC check will fail
4000 0000 0000 0036
The AVS check will fail
4000 0000 0000 0044
The CVC and AVS checks will both fail
4000 0000 0000 0069
The payment will be successful, but a chargeback will be initiated as soon as the payment completes
4000 0000 0000 0077
The payment will be successful, but refunds will be declined
4000 0000 0000 0085
The authorization will be successful, but an AVS Postal check will fail
4000 0000 0000 0093
The authorization will be successful, but an AVS Street check will fail
4000 0000 0000 0200
The payment will be successful, but a failed chargeback will be initiated as soon as the payment completes
4000 0000 0000 0309
The payment will be successful, but a retrieval request will be initiated as soon as the payment completes
4000 0000 0000 1216
The card will succeed on a verification but fail on a transaction
4000 0000 0000 4004
The payment will be successful, but a fraud notification will be sent