Testing Environment

How to test payments before going live in production.

Before your merchant account is verified, you will be able to test the API in our sandbox environment. No actual transactions will be processed.

You'll need to use some specific data to be able to simulate successful payments, declines and various errors that might occur once your account is verified, and you are live.

Environment Header

You can set the CARTGATEWAY-ENVIRONMENT to sandbox to process requests in our sandbox environment. If you are using the PHP SDK, you should set the sandbox property when creating a new CartGateway client:

$client = new CartGateway([
    'environment' => 'sandbox',
    'account_id' => Config::TEST_ACCOUNT_ID,
    'access_token' => Config::TEST_ACCESS_TOKEN,
]);

Test Address

Use the following address details in the sandbox environment:

DescriptionParameterValue
Addressaddress6 Pheasant Run
Zip Codezip07733
CitycityHolmdel
StatestateNJ
CountrycountryUnited States

If you use a different address, you will receive a AVS error.

Test Cards

You can use special test card numbers in the sandbox environment to test various scenarios and make sure that you can handle both successful transactions, declined transactions, and errors.

To simulate a successful transaction, you can use the following card details:

Card Number: 6011111111111117
Date: Any Date in the future
CVV: 123

If you use an incorrect date, you will receive a validation error. If you use a CVV other than 123, you will receive a CVV error.

To simulate a failed transaction/decline, you can use one of the following card details:

Card NumberFailure
4000000000000002Generic Decline
4000000000009995Insufficient funds decline
4000000000009987Lost card decline
4000000000009979Stolen card decline
4000000000000069Expired card decline
4000000000000127Incorrect CVV decline
4000000000000119Processing error decline
4242424242424241Incorrect number decline