Testing in the Sandbox

It is very important to test your ProcessOut code during development, so we provide the sandbox to help you test safely.

The sandbox is a testing environment that simulates the normal ProcessOut 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 ProcessOut 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_test_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.

Test cardComment
Cards that will result in a successful payment:
4242 4242 4242 4242VISA
5555 5555 5555 4444Mastercard
3782 82246 310005American Express
3012 3456 7890 19Diners Club
3530 1113 3330 0000JCB
6011 1111 1111 1117Discover
Successful cards with different issuing countries:
4977 8300 0000 0001FR
4556 6200 0000 0005FR (carte-bancaire)
4658 5800 0000 0008GB
4571 7300 0000 0003DK
4023 6000 0000 0002IT
4338 3000 0000 0009AR
4835 9100 0000 0003CN
Cards with 3-D Secure specific behavior:
4000 0000 0000 01013-D Secure supported and required on the card
4000 0000 0000 01193-D Secure not supported on the card
4000 0000 0000 02593-D Secure v2 supported but v1 not supported
4000 0000 0000 32383-D Secure v2 not supported but v1 supported
4000 0000 0000 30553-D Secure v2 supported with frictionless (no fingerprint)
4000 0000 0000 30633-D Secure v2 supported with frictionless (with fingerprint)
4000 0000 0000 32203-D Secure v2 supported with fingerprint failing
4000 0000 0000 32533-D Secure v2 required for SCA, no authentication when Merchant Initiated Transaction
4000 0000 0000 32463-D Secure v1 required but v2 not supported
Cards that have special authorization behavior:
4000 0000 0000 2180The authorization on the card will fail with error code card.do-not-honor
4000 0000 0000 2198The authorization on the card will fail with error code card.possible-fraud
4000 0000 0000 2206The authorization on the card will fail with error code card.no-money
4000 0000 0000 2214The authorization on the card will fail with error code card.expired
4000 0000 0000 2222The authorization on the card will fail with error code card.stolen
4000 0000 0000 2230The authorization on the card will fail with error code card.failed-cvc
4000 0000 0000 2248The authorization on the card will fail with error code card.failed-avs
4000 0000 0000 2255The authorization on the card will fail with error code card.not-authorized
4000 0000 0000 2263The authorization on the card will fail with error code card.inactive
4000 0000 0000 2271The authorization on the card will fail with error code card.lost
4000 0000 0000 2289The authorization on the card will fail with error code card.region-not-authorized
4127 9694 2058 7632The authorization on the card will fail with error code card.blacklisted
Cards that have special behavior:
4000 0000 0000 0002The credit card will be denied
4000 0000 0000 0010The authorization on the card will be successful, but any capture will fail
4000 0000 0000 0028The CVC check will fail
4000 0000 0000 0036The AVS check will fail
4000 0000 0000 0044The CVC and AVS checks will both fail
4000 0000 0000 0069The payment will be successful, but a chargeback will be initiated as soon as the payment completes
4000 0000 0000 0077The payment will be successful, but refunds will be declined
4000 0000 0000 0085The authorization will be successful, but an AVS Postal check will fail
4000 0000 0000 0093The authorization will be successful, but an AVS Street check will fail
4000 0000 0000 0200The payment will be successful, but a failed chargeback will be initiated as soon as the payment completes
4000 0000 0000 0309The payment will be successful, but a retrieval request will be initiated as soon as the payment completes
4000 0000 0000 1216The card will succeed on a verification but fail on a transaction
4000 0000 0000 4004The payment will be successful, but a fraud notification will be sent
4000 0000 0000 6223The payment will be successful, but any incremental capture will result in a failure
4000 0000 0000 6009The authorization on the card will fail with error code card.no-money in subsequent requests. For example, if you perform a card verification, this will be successful, but any new authorizations after that will fail.
4000 0000 0000 4301The authorization on the card will fail with error code card.expired in subsequent requests. For example, if you perform a card verification, this will be successful, but any new authorizations after that will fail.
5337 4800 000 7168The transaction will fail with a recommandation code set do do-not-retry.