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 card | Comment |
---|---|
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 |
4127 9694 2058 7632 | The authorization on the card will fail with error code card.blacklisted |
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 |
4000 0000 0000 6223 | The payment will be successful, but any incremental capture will result in a failure |
4000 0000 0000 6009 | The 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 4301 | The 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 7168 | The transaction will fail with a recommandation code set do do-not-retry . |
Updated 9 months ago