Last updated

Test transactions

This topic describes how to test payment transactions in Rebilly.

Environments

Sandbox environment

Use the sandbox environment to test code changes and experiment without risk.

By default, the sandbox is configured with a testing payment gateway called TestProcessor. No information is sent to third parties when using this gateway.

Live environment

Use the live environment as your product environment. Experimenting in this environment involves risk. Plan your tests carefully.

Live environment release checklist

Before releasing to your users, complete the following:

After completing the test transactions, log in to your payment gateway account and confirm that the corresponding test transactions are present.

Tests

Use this process to test payment transactions.

  1. Optionally, to test transactions, create a new test customer and a Rebilly hosted payment form:

    1. In the left navigation bar, click Data tables, then click Customers.
    2. In the top right of the screen, click Add customer.
    3. Enter the test customers details, then click Save customer.
    4. In the right of the screen, click , then click Collect payment.
    5. Enter the amount and add a description for the test payment.
    6. Select the Pay with Rebilly hosted payment form option, and click Submit.
    7. Click Copy URL and open the URL in a browser.
    8. Use any card number from the steps below.
  2. Simulate an approved transaction. Select from the following cards:

    Use a future expiration date, and any valid CVV. Amex cards have a 4 digit CVV, all others have a 3 digit CVV.

    Card typeNumber
    Visa4111111111111111
    Mastercard5555555555554444
    American Express378282246310005
    Discover6011111111111117
    Diners Club30569309025904
    JCB3530111333300000
    China UnionPay6253111111111114
    Maestro6759641111111119
    IBANDE89370400440532013000
  3. Simulate a declined transaction. Select from the following cards:

    Use a future expiration date, and any valid CVV. Amex cards have a 4 digit CVV, all others have a 3 digit CVV.

    Card typeNumber
    Visa4000000000000002
    Mastercard5105105105105100
    American Express371449635398431
    Discover6011000990139424
    Diners Club38520000023237
    JCB3566002020360505
    China UnionPay6243030000000001
    Maestro6771790000000018
    IBANDE62370400440532013001
  4. Simulate special cases:

    Use a future expiration date, and any valid CVV. Amex cards have a 4 digit CVV, all others have a 3 digit CVV.

    • First transaction approved, subsequent transactions declined: Simulate a successful subscription creation followed by declines on all rebills. Visa: 4000000000000010
    • Timeout (Approved): Simulate a timeout from a downstream gateway. After execution, the result is updated from timeout to approved. Visa: 4000000000000200
    • Timeout (Declined): Simulate a timeout from a downstream gateway. After execution, the result is updated from timeout to declined. Visa: 4462030000000000
    • Connection error: Simulate a connection exception. Visa: 4000000000001000
    • Refund request morphed to void: Where possible, Rebilly voids a transaction instead of refunding it. A void transaction prevents the transaction from occurring. A refund is a secondary transaction. Visa: 4000000000020000
    • Refund declined: Simulate a refund declined scenario. Visa: 4000000000100000
    • Alternating approved or declined: This test starts with an approved status: Visa: 4000000002000000
    • Declined with reason code Fraud: Test this scenario if you handle declines with reason code Fraud, or want to test rules that are in place to handle this automatically, such as adding those customers to a blocklist. Visa: 4000000010000000
    • Offsite payment flow: Offsite payment is used for scenarios that involve Dynamic Currency Conversion (DCC) and 3D Secure. The offsite payment workflow is advanced, contact us for more information. To trigger an offsite payment flow, use the following:
      • Simulate waiting-approval and then approve after a simulated 3DS flow is completed: Visa: 4000000000000101
      • Approve instantly: Visa: 4000001000000000
    • Waiting on gateway flow: This test simulates waiting-gateway status, waiting on an asynchronous response from the processor. The transaction is marked as approved within 10 minutes. Visa: 4263982640269299
    • Test ACH bank accounts: Use this test bank account to test ACH:
      • Routing number: 123456789
      • Account number: 1234567890

Test 3DS payment flows

This section describes how to test 3DS payment flows.

3DS is an additional security layer for online credit and debit card transactions. 3D stands for the three domains which interact using the protocol: the merchant or acquirer domain, the issuer domain, and the interoperability domain. For more information, see Set up a payment gateway - Configure 3D Secure (3DS).

Test a generic offsite approval flow

Use this process to test a generic offsite 3DS approval flow.

  1. Ensure that 3DS is not active on the payment gateway account:

    1. In the left navigation bar, click Settings .
    2. In the Configuration section, click Gateway accounts.
    3. Click TestProcessor.
    4. Click Edit gateway account.
    5. In the Setup instruction section, in the Instruction dropdown, select Authorize.
    6. In the Advanced configuration section, turn on the Advanced configuration toggle.
    7. Scroll down the page to the 3D secure section, and ensure that the Activate 3D secure checkbox is clear.
    8. At the bottom of the page, click Save gateway account.
  2. Create a new customer and test the transaction:

    1. In the left navigation bar, click Data tables, then click Customers.
    2. In the top right of the screen, click Add customer.
    3. Enter the test customers details, then click Save customer.
    4. In the right of the screen, click , then click Collect payment.
    5. Enter the amount and add a description for the payment.
    6. Select the Pay with Rebilly hosted payment form option, and click Submit.
    7. Click Copy URL and open the URL in a browser.
    8. In the payment card number field, enter 4000000000000101. Use a future expiration date, and any valid CVV.
    9. Click Continue, then click Confirm.

In the response, an approvalUrl returned. From the URL you have the option to approve, decline, or cancel the transaction.

Test a 3DS challenge flow

Use this process to test a 3DS challenge flow.

  1. Configure 3DS on the payment gateway account:

    1. In the left navigation bar, click Settings .
    2. In the Configuration section, click Gateway accounts.
    3. Click TestProcessor.
    4. Click Edit gateway account settings.
    5. In the Setup instruction section, in the Instruction dropdown, select Authorize.
    6. In the Advanced configuration section, turn on the Advanced configuration toggle.
    7. Scroll down the page to the 3D secure section, then select the Activate 3D secure checkbox.
    8. In the 3DS server dropdown, select ThreeDSecureIO3dsServer.
    9. In the Merchant ID field, enter Test.
    10. In the Merchant acquirer BIN VISA field, enter 411111.
    11. In the Merchant acquirer BIN Mastercard field, enter 55555.
    12. In the Merchant country field, enter US.
    13. In the Merchant URL field, enter any valid URL.
    14. Clear the V1 checkbox, and select the V2 checkbox.
    15. In the Transaction type dropdown, select Goods/Service purchase
    16. Clear the Use 3DS for merchant-initiated transactions checkbox.
    17. Do not select a 3RI type.
    18. At the bottom of the screen, click Save gateway account.
  2. Create a new customer and test the transaction:

    1. In the left navigation bar, click Data tables, then click Customers.
    2. In the top right of the screen, click Add customer.
    3. Enter the test customers details, then click Save customer.
    4. In the right of the screen, click , then click Collect payment.
    5. Enter the amount and add a description for the payment.
    6. Select the Pay with Rebilly hosted payment form option, and click Submit.
    7. Click Copy URL and open the URL in a browser.
    8. In the payment card number field, enter 4111111111111111. Use a future expiration date, and any valid CVV.
    9. Click Continue, then click Confirm.

In the response, an approvalUrl value is returned. At the URL, simulate the different outcomes of the challenge flow in a 3DSecure.io sandbox environment. To test different 3DS flows, use the 3dsecure.io scheme test pans.