Skip to main content

Testing

The Mock Acquirer is a test environment that lets you test different payment flows and transaction results without processing real payments.

The test cards below can be used to simulate different scenarios for:

  • One-off payments
  • Refunds
  • Customer-Initiated Transactions (CIT)
  • Merchant-Initiated Transactions (MIT)
  • 3D Secure
  • Asynchronous payments
  • Authorization, capture, and settlement
  • Provider and technical errors
  • Timeouts
  • Subscription Module transactions

Test codes​

The card numbers used by the Mock Acquirer contain actions that determine the result of a specific operation.

The following codes define the result or behavior associated with each action:

CodeDescription
0001Approved
0002Refunded
0003In Process
0004TDS (3 DS)
0010Authorized
0011Captured
0012Settled
0020Subscription
0090Bad Input
0102Authorization Failed
0103Authentication Failed or Incomplete
0104Authentication Not Available
0105Authentication Required
0108Transaction not found
0109Issuer Unavailable
0121Authentication Failed - 3D Secure
0152Missing or Invalid Data - Recurring Model
0170Refund Error
0171Refund Rejected - Payment Not Yet Captured, Try Again Later
0172Refund Rejected - Payment Already Charged Back
0200Do Not Honor
0205Restricted Card
0303Invalid Credit Card
0304Unsupported Card Brand
0312Missing or Invalid Data
0800Provider's Connection Failed
0801Provider's Technical Error
0900Bad Input
0901Internal Server Error
1001Approved Async
1002Refunded Async
1170Refund error Async
1171Refund Rejected - Payment Not Yet Captured, Try Again Later Async
1200Do Not Honor Async
2000Forced Timeout with Success
2001Forced Timeout with Failed - Authorization Failed
9999Custom Failed. (Dynamic from database)
0000Unknown

Test cards​

Use the following card numbers to simulate specific payment and transaction scenarios.

Card NumberCard BrandActionsDescription
4000000000000002VISApayment: 0001 refund: 0002 recurrence: 0001 unscheduled: 0001APPROVED for payment, recurrence, and unscheduled. REFUNDED for refund.
4000000000000010VISApayment: 0205FAILED for payment. Error 0205 - Restricted Card.
4000000000000028VISApayment: 0001 refund: 0170APPROVED for payment. FAILED for refund. Error 0170 - Refund Error.
4000000000000036VISApayment: 0001 refund: 0002 recurrence: 0001 unscheduled: 0304APPROVED for payment and recurrence. REFUNDED for refund. FAILED for unscheduled. Error 0304 - Unsupported Card Brand.
4000000000000044VISApayment: 0001 recurrence: 0200APPROVED for payment. FAILED for recurrence. Error 0200 - Do Not Honor.
4111111145551142VISApayment: 0103FAILED for payment. Error 0103 - Authentication Failed or Incomplete.
4111112014267661VISApayment: 0104FAILED for payment. Error 0104 - Authentication Not Available.
4988438843884305VISApayment: 0105FAILED for payment. Error 0105 - Authentication Required.
4199350000000002VISApayment: 0109FAILED for payment. Error 0109 - Issuer Unavailable.
4000180000000002VISApayment: 0003IN_PROCESS for payment.
4001590000000001VISApayment: 0001 refund: 0003APPROVED for payment. IN_PROCESS for refund.
4002690000000008VISApayment: 2000APPROVED for payment with timeout.
4400000000000008VISApayment: 2001FAILED for payment with timeout.
4000060000000006VISApayment: 0001 refund: 2000APPROVED for payment. REFUNDED for refund with timeout.
4005519000000006VISApayment: 0001 refund: 2001APPROVED for payment. FAILED for refund with timeout.
4438341577554340VISApayment: 0001 refund: 0002 recurrence: 0001 unscheduled: 0001APPROVED for payment, recurrence, and unscheduled. REFUNDED for refund. Prepaid in CardType (BinInfo).
4000020000000000VISApayment: 9999 recurrence: 9999CUSTOM FAILED for payment and recurrence.
4000160000000004VISApayment: 0001 refund: 0171 recurrence: 0001 tds: 9999APPROVED for payment and recurrence. FAILED for refund. Error 0171 - Refund Rejected - Payment Not Yet Captured, Try Again Later. PENDING for 3DS with Custom Failed.
4000056655665556VISApayment: 0001 refund: 0002 recurrence: 0020SUBSCRIPTION MODULE. See Subscription Module testing.
5000590300000006MAESTROpayment: 0001 refund: 1002APPROVED for payment synchronously. REFUNDED for refund asynchronously.
5000620300000001MAESTROpayment: 1200FAILED for payment. Error 1200 - Do Not Honor asynchronously.
5000630300000018MAESTROpayment: 1001 refund: 0002APPROVED for payment and asynchronous recurrence. REFUNDED for synchronous refund.
5000610300000002MAESTROpayment: 1001 refund: 1170 recurrence: 1001APPROVED for payment and asynchronous recurrence. FAILED for refund. Error 1170 - Refund Error asynchronously.
5201281505129736MASTERCARDpayment: 0800FAILED for payment. Error 0800 - Provider's Connection Failed.
5201281262435268MASTERCARDpayment: 0801FAILED for payment. Error 0801 - Provider's Technical Error.
5970100300000018UNKNOWNpayment: 0001 refund: 1002 recurrence: 1200APPROVED for payment. REFUNDED for refund asynchronously. FAILED for recurrence. Error 1200 - Do Not Honor asynchronously.
378282000000008AMEXpayment: 0001 refund: 0002APPROVED for payment. REFUNDED for refund.
378282000000024AMEXpayment: 0102FAILED for payment. Error 0102 - Authorization Failed.
378285000000001AMEXpayment: 0001 refund: 0170APPROVED for payment and recurrence. FAILED for refund. Error 0170 - Refund Error.
378285000000019AMEXpayment: 0001 refund: 0002 recurrence: 0001APPROVED for payment and recurrence. REFUNDED for refund.
378285000000027AMEXpayment: 0001 refund: 0002 recurrence: 0200APPROVED for payment and recurrence. REFUNDED for refund. FAILED for recurrence. Error 0200 - Do Not Honor.
5555555555554444MASTERCARDpayment: 0001 refund: 0002 recurrence: 0001 tds: 0004APPROVED for payment and recurrence. REFUNDED for refund. PENDING for 3DS.
5577000055770004MASTERCARDpayment: 0001 refund: 0002 recurrence: 0001 tds: 0001APPROVED for payment and recurrence. REFUNDED for refund. APPROVED for 3DS (Frictionless).
5555444433331111MASTERCARDpayment: 0001 refund: 0002 recurrence: 0001 tds: 0121APPROVED for payment and recurrence. REFUNDED for refund. FAILED for 3DS. Error 0121 - Authentication Failed - 3D Secure.
info

Card numbers not included in the list return 0303 - Invalid credit card.

Card numbers included in the list but used with an action type that is not defined for that card return Approved.

Subscription Module testing​

The Subscription Module has its own test logic and should be tested with the dedicated subscription test card:

4000056655665556

The cardholder value controls how recurring transactions behave.

Function types​

There are three types of functions that depend on the value passed in the CardHolder:

  • Alternated
  • Counter
  • Special Step

The function is only applied when an error is specified in the cardholder.

The error must use the following format:

Exxxx

Where xxxx is the four-digit Revup error code.

For example:

E0900

All cardholder functions must be written in uppercase letters.

The function is applied only to recurring transactions generated after the initial transaction.

The initial transaction always returns APPROVED.

When the initial transaction is generated, the subscription test process is initialized. The first recurring transaction is then evaluated according to the function specified in the CardHolder.

Alternated​

The Alternated function uses a counter in the initial transaction.

Each even counter value returns APPROVED, while each odd counter value returns FAILED with the error specified in the cardholder.

When the initial transaction is generated, the counter is set to 0. Therefore, the first recurring transaction is APPROVED.

Use the following format:

ALT Exxxx

For example:

ALT E0900

The recurring transactions behave as follows:

  1. First recurring transaction → APPROVED
  2. Second recurring transaction → FAILED with error 0900
  3. Third recurring transaction → APPROVED
  4. Fourth recurring transaction → FAILED with error 0900

Counter​

The Counter function uses the following format:

Cxx Eyyyy

Where:

  • C identifies the counter function.
  • xx specifies how many consecutive APPROVED transactions should be returned.
  • Eyyyy specifies the four-digit error code returned after the counter is exceeded.

For example:

C03 E0200

This returns:

  • First recurring transaction → APPROVED
  • Second recurring transaction → APPROVED
  • Third recurring transaction → APPROVED
  • Fourth and subsequent recurring transactions → FAILED with error 0200

Another example:

C01 E0900

This returns:

  • First recurring transaction → APPROVED
  • Second and subsequent recurring transactions → FAILED with error 0900

Special Step​

The Special Step function defines an explicit sequence of successful and failed recurring transactions.

The sequence is composed of:

  • S → APPROVED
  • F → FAILED

The error specified after the sequence is returned for every failed transaction.

Use the following format:

<sequence> Exxxx

For example:

SFSSFF E0900

This returns the following sequence:

Recurring transactionResultError
1APPROVED-
2FAILED0900
3APPROVED-
4APPROVED-
5FAILED0900
6FAILED0900

Another example:

FFSFSFF E0800

This returns:

Recurring transactionResultError
1FAILED0800
2FAILED0800
3APPROVED-
4FAILED0800
5APPROVED-
6FAILED0800
7FAILED0800

Summary​

The Mock Acquirer allows you to test payment behavior without using real cards or processing real transactions.

For most payment scenarios, select a card from the test cards table according to the operation you want to test.

For subscriptions, use the dedicated Subscription Module card:

4000056655665556

and configure the desired recurring behavior through the CardHolder using one of the supported functions:

  • ALT Exxxx
  • Cxx Exxxx
  • <sequence> Exxxx