We recommend that you run a few test transactions in both the Sandbox Environment and Live Environment before opening it up to your customers. Try to test all the card types and payment methods that you've enabled to avoid surprises down the line. 

Here’s how to test transactions in both environments:

Sandbox Environment

What’s great about the Sandbox Environment is that you can literally test any situation with no repercussion or risk to your business. 

To get you started, we’ve already set you up with our testing gateway “Rebilly Processor” as your sandbox payment gateway. When using “RebillyProcessor”, all of the payment information will not be sent to any 3rd parties. 

Then, you can use these cards to simulate the different behaviors of real cards. 

Approved Transaction

These test cards result in an approved transaction. You must use them with any valid expiration date (in the future), and any valid CVV (4 digits for Amex, and 3 digits for everything else).

  • Visa:   4111111111111111
  • MasterCard: 5555555555554444
  • American Express: 378282246310005
  • Discover: 6011111111111117
  • Diners Club: 30569309025904
  • JCB: 3530111333300000

Declined Transaction

These test cards result in a declined transaction. You must use them with any valid expiration date (in the future), and any valid CVV (4 digits for Amex, and 3 digits for everything else).

  • Visa: 4000000000000002 
  • MasterCard: 5105105105105100 
  • American Express: 371449635398431 
  • Discover: 6011000990139424 
  • Diners Club: 38520000023237 
  • JCB: 3566002020360505 

Special Cases

These test cards simulate special cases that may help your tests. You must use them with any valid expiration date (in the future), and any valid CVV (4 digits for Amex, and 3 digits for everything else). All of these special case test cards are Visa.

  • First transaction approved, subsequent transactions declined: Simulate a successful subscription creation followed by declines on all rebills.  Good for testing Rebill failures.  Visa: 4000000000000010 
  • Timeout (Approved): Simulates a timeout from a downstream gateway.  It will change from "timeout" to "approved" after we do the query. Visa: 4000000000000200 
  • Timeout (Declined): Simulates a timeout from a downstream gateway.  It will change from "timeout" to "declined" after we do the query. Visa: 4462030000000000 
  • Connection Error: Simulate a connection exception. Visa: 4000000000001000 
  • Refund request morphed to void: When Rebilly can, it will void a transaction instead of refunding it. A void transaction "prevents" it from happening, and a refund acts more like a secondary transaction. Visa: 4000000000020000 
  • Refund declined: Sometimes refunds are declined.  Simulate it if refunds are an important part of your strategy, so you can test handling that scenario. Visa: 4000000000100000 
  • Alternating approved/declined (starting with approved): Visa: 4000000002000000 
  • Declined with reason code Fraud: If you handle declines with reason code Fraud different from others, or want to test rules set up to handle those automatically (such as adding those customers to a blacklist). Visa: 4000000010000000 
  • Offsite Payment Flow: Trigger an offsite payment flow, which is used for scenarios like DCC and 3-D Secure.  The offsite payment workflow is advanced, so please contact us for more information. Visa: 4000000000000101 
  • Test ACH Bank Accounts: This test bank account may help you test ACH. Routing Number: 123456789 / Account Number: 1234567890

Live Environment

It’s not a bad idea to test transactions in the Live Environment as well. Try to run a few small-value test transactions for various scenarios for all the card types you’ve enabled. 

  • Test out the checkout flow
  • Subscribe to a plan with a plan to make sure the card is charged immediately 
  • Cancel a subscription
  • Issue a partial and a full refund

TIP: After completing the test transactions, log in to your payment gateway account and double check that the matching transactions are there. 

Need Help? 

If you have questions about any part of this, you can reach out to customer support at support@rebilly.com or schedule a one-on-one demo with a billing specialist.

Did this answer your question?