Test Environment

View as Markdown

As part of the test entity, you can fully simulate the product experience. Each test entity is preloaded with sample payees and payers. For payouts and payins, the simulation bank decides success or failure from the payee or payer name as described below.

For Payouts: Use any payee name for a successful simulated payout, except John Failed, which simulates a payout that fails after initiation.

For Payins: Use any payer name for a successful simulated payin, except John Failed, which simulates a payin that fails after initiation.

Card and bank details do not determine which scenario is triggered, but a general sanity check is performed on the provided card and bank information. A predefined list of valid card numbers, account numbers, and routing numbers is provided for use in the test entity. Random or invalid numbers are not accepted.

For sandbox bank values in currencies other than USD, see Test Values by Currency under Test Environment. For bank field shapes (country_code, currency_code, routing_number_type, and how account_number / routing_number are formatted), see Country and Currency under Payment Methods API.

Allowed Test Bank Account Numbers

1ALLOWED_TEST_ACCOUNT_NUMBERS = [
2 "1234567890",
3 "9999999999",
4 "0000123456",
5 "1111222233"
6]

Allowed Test Routing Numbers

1ALLOWED_TEST_ROUTING_NUMBERS = [
2 "111000025",
3 "021000021",
4 "011401533",
5 "091000022"
6]

Allowed Test Card Numbers

1ALLOWED_TEST_CARD_NUMBERS = [
2 "4111111111111111", # Visa test card
3 "5555555555554444", # Mastercard test card
4 "378282246310005", # Amex test card
5 "6011111111111117" # Discover test card
6]

Payment Rail Restrictions

Payout Rails (Money Out)

In the test environment, payouts support all available payment rails:

  • INSTANT_BANK (RTP) - Real-time payments
  • INSTANT_CARD - Card payments
  • SAME_DAY_ACH - Same-day ACH settlement
  • STANDARD_ACH - Standard ACH processing
  • WIRE - Wire transfers

Payin Rails (Money In)

In the test environment, payins only support ACH rails, similar to the live environment:

  • SAME_DAY_ACH - Same-day ACH Debit
  • STANDARD_ACH - Standard ACH Debit

Note: Attempting to use non-ACH rails (such as INSTANT_BANK, INSTANT_CARD, or WIRE) for payins will result in an error, as ACH Debit is the only supported method for pulling funds from payer accounts.

Processing Delays and Timing

The test entity simulates bank processing delays based on the payment rail so webhooks and status transitions occur after a short, rail-specific wait (when simulated delays are enabled in the worker environment):

Payment RailSimulated Processing DelayDescription
INSTANT_BANK (RTP)5 secondsReal-time payment processing
INSTANT_CARD10 secondsCard payment processing
SAME_DAY_ACH30 secondsSame-day ACH settlement
STANDARD_ACH1 minuteStandard ACH processing
WIRE3 minutesWire transfer processing

Webhooks

The test entity supports webhooks just like your production entity. If you have a test entity and create a webhook for a scenario that emits webhooks, you will receive them after the realistic processing delay for the selected payment rail.

Examples:

  • If you create a payout using the INSTANT_CARD rail for a payee named Acme Supplier Inc., the webhook will be sent approximately 10 seconds after the payout is initiated (when simulated delays are enabled).
  • If you create a payin using the SAME_DAY_ACH rail for a payer named Jane Q. Customer, the webhook will be sent approximately 30 seconds after the payin is initiated (when simulated delays are enabled).

Scenarios

The following scenarios work for both payouts and payins (use the payee name for payouts and the payer name for payins):

#ScenarioDescriptionPayee/Payer NameWebhook
1Payout Status: Initiated → FailedPayout initiated but failed during processing.John Failedfailed
2Payout Status: Initiated → SuccessPayout succeeds. Terminal state depends on rail: Settled (instant rails) or Debited (ACH rails)Any name except John Failed (e.g., Acme Supplier Inc.)settled or debited
3Payin Status: Initiated → FailedPayin initiated but failed during processing.John Failedfailed
4Payin Status: Initiated → SuccessPayin succeeds. Terminal state: Settled (ACH rails only)Any name except John Failed (e.g., Jane Q. Customer)settled

Note: The reserved name John Failed always triggers the failure scenario for both payouts and payins. All other names simulate a successful transfer.