Testing in the Sandbox:

The sandbox simulates the live payment gateway. The sandbox never processes an actual payment. We do not submit sandbox transactions to financial institutions for processing.

The sandbox environment is completely separate from the live production environment, and it requires separate credentials.  If you use your production credentials in the sandbox or visa versa, you get a 401 HTTP error.  

Sign up for a sandbox account

Test Card Numbers:

The following test credit card numbers work only in the sandbox. If no expiration date is provided, use any expiration date after today’s date. If the card verification code is required and is not provided, use any 3-digit combination for Visa, Mastercard, Discover, Diners Club and JCB; use a 4-digit combination for American Express.

Test Card Brand Number CVV Expires
Visa  4111 1111 1111 1111    
Visa 4622 9431 2701 3705 838 12/22
Visa 4622 9431 2701 3713 043 12/22
Visa 4622 9431 2701 3721 258 12/22
Visa 4622 9431 2701 3739 942 12/22
Visa 4622 9431 2701 3747 370 12/22
MasterCard 2222 4200 0000 1113    
  2222 6300 0000 1125    
  5555 5555 5555 4444    
American Express  3782 8224 6310 005    
Discover 6011 1111 1111 1117    
JCB 3566 1111 1111 1113    
Maestro (International) 5033 9619 8909 17    
  5868 2416 0825 5333 38    
Maestro (UK Domestic) 6759 4111 0000 0008    
  6759 5600 4500 5727 054    
  5641 8211 1116 6669    
UATP 1354 1234 5678 911    

Common Payment's Transaction Response:

Review the tables below to find the payment transaction responses that you want to trigger. For example, to trigger an invalid amount response, pass the value -1 in the orderInformation.amountDetails.totalAmount request field. The triggered test responses below mostly depend on the value that you pass in the request field: orderInformation.amountDetails.totalAmount

Also, please note the following when testing Payments transactions:

For credit cards, the transaction decisions typically are:

  • AUTHORIZED - Transaction accepted. Passed with a 201 HTTP response Code. 
  • DECLINE - Transaction declined. 
  • ERROR - Transaction failed. The response includes a ReasonCode. To obtain more information about an error, view the transaction's details in the Enterprise Business Center.  

The value of the requestID field will vary. The number increments with each CyberSource transaction (for all merchants).

 

Test Information 
Input Expected Response
 Valid Transaction  orderInformation.amountDetails.totalAmount=1     STATUS = AUTHORIZED
Invalid Amount < $0 orderInformation.amountDetails.totalAmount=-1     STATUS = INVALID_REQUEST
    REASON = INVALID_DATA
Invalid Amount
Amount too large                  
orderInformation.amountDetails.totalAmount= 100000000000      STATUS = INVALID_REQUEST
    REASON = INVALID_DATA
Empty Credit Card number  paymentInformation.card.number = 42423482938483873     STATUS = DECLINE
    REASON = INVALID_DATA
Invalid Expiration Month paymentInformation.card.expirationMonth = 13     STATUS = INVALID_REQUEST
    REASON = INVALID_DATA
Invalaid Expiration Year  paymentInformation.card.expirationYear = 1998     STATUS = DECLINE
    REASON = INVALID_ACCOUNT
Invalid Luhn Mod 10 paymentInformation.card.number = 4111111111111112     STATUS = DECLINE
    REASON = INVALID_ACCOUNT
   
21-Digit Credit Card Number

paymentInformatioon.card.number = 412345678912345678914     STATUS = DECLINE
    REASON = INVALID_ACCOUNT