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:
| Code | Description |
|---|---|
| 0001 | Approved |
| 0002 | Refunded |
| 0003 | In Process |
| 0004 | TDS (3 DS) |
| 0010 | Authorized |
| 0011 | Captured |
| 0012 | Settled |
| 0020 | Subscription |
| 0090 | Bad Input |
| 0102 | Authorization Failed |
| 0103 | Authentication Failed or Incomplete |
| 0104 | Authentication Not Available |
| 0105 | Authentication Required |
| 0108 | Transaction not found |
| 0109 | Issuer Unavailable |
| 0121 | Authentication Failed - 3D Secure |
| 0152 | Missing or Invalid Data - Recurring Model |
| 0170 | Refund Error |
| 0171 | Refund Rejected - Payment Not Yet Captured, Try Again Later |
| 0172 | Refund Rejected - Payment Already Charged Back |
| 0200 | Do Not Honor |
| 0205 | Restricted Card |
| 0303 | Invalid Credit Card |
| 0304 | Unsupported Card Brand |
| 0312 | Missing or Invalid Data |
| 0800 | Provider's Connection Failed |
| 0801 | Provider's Technical Error |
| 0900 | Bad Input |
| 0901 | Internal Server Error |
| 1001 | Approved Async |
| 1002 | Refunded Async |
| 1170 | Refund error Async |
| 1171 | Refund Rejected - Payment Not Yet Captured, Try Again Later Async |
| 1200 | Do Not Honor Async |
| 2000 | Forced Timeout with Success |
| 2001 | Forced Timeout with Failed - Authorization Failed |
| 9999 | Custom Failed. (Dynamic from database) |
| 0000 | Unknown |
Test cards
Use the following card numbers to simulate specific payment and transaction scenarios.
| Card Number | Card Brand | Actions | Description |
|---|---|---|---|
| 4000000000000002 | VISA | payment: 0001 refund: 0002 recurrence: 0001 unscheduled: 0001 | APPROVED for payment, recurrence, and unscheduled. REFUNDED for refund. |
| 4000000000000010 | VISA | payment: 0205 | FAILED for payment. Error 0205 - Restricted Card. |
| 4000000000000028 | VISA | payment: 0001 refund: 0170 | APPROVED for payment. FAILED for refund. Error 0170 - Refund Error. |
| 4000000000000036 | VISA | payment: 0001 refund: 0002 recurrence: 0001 unscheduled: 0304 | APPROVED for payment and recurrence. REFUNDED for refund. FAILED for unscheduled. Error 0304 - Unsupported Card Brand. |
| 4000000000000044 | VISA | payment: 0001 recurrence: 0200 | APPROVED for payment. FAILED for recurrence. Error 0200 - Do Not Honor. |
| 4111111145551142 | VISA | payment: 0103 | FAILED for payment. Error 0103 - Authentication Failed or Incomplete. |
| 4111112014267661 | VISA | payment: 0104 | FAILED for payment. Error 0104 - Authentication Not Available. |
| 4988438843884305 | VISA | payment: 0105 | FAILED for payment. Error 0105 - Authentication Required. |
| 4199350000000002 | VISA | payment: 0109 | FAILED for payment. Error 0109 - Issuer Unavailable. |
| 4000180000000002 | VISA | payment: 0003 | IN_PROCESS for payment. |
| 4001590000000001 | VISA | payment: 0001 refund: 0003 | APPROVED for payment. IN_PROCESS for refund. |
| 4002690000000008 | VISA | payment: 2000 | APPROVED for payment with timeout. |
| 4400000000000008 | VISA | payment: 2001 | FAILED for payment with timeout. |
| 4000060000000006 | VISA | payment: 0001 refund: 2000 | APPROVED for payment. REFUNDED for refund with timeout. |
| 4005519000000006 | VISA | payment: 0001 refund: 2001 | APPROVED for payment. FAILED for refund with timeout. |
| 4438341577554340 | VISA | payment: 0001 refund: 0002 recurrence: 0001 unscheduled: 0001 | APPROVED for payment, recurrence, and unscheduled. REFUNDED for refund. Prepaid in CardType (BinInfo). |
| 4000020000000000 | VISA | payment: 9999 recurrence: 9999 | CUSTOM FAILED for payment and recurrence. |
| 4000160000000004 | VISA | payment: 0001 refund: 0171 recurrence: 0001 tds: 9999 | APPROVED for payment and recurrence. FAILED for refund. Error 0171 - Refund Rejected - Payment Not Yet Captured, Try Again Later. PENDING for 3DS with Custom Failed. |
| 4000056655665556 | VISA | payment: 0001 refund: 0002 recurrence: 0020 | SUBSCRIPTION MODULE. See Subscription Module testing. |
| 5000590300000006 | MAESTRO | payment: 0001 refund: 1002 | APPROVED for payment synchronously. REFUNDED for refund asynchronously. |
| 5000620300000001 | MAESTRO | payment: 1200 | FAILED for payment. Error 1200 - Do Not Honor asynchronously. |
| 5000630300000018 | MAESTRO | payment: 1001 refund: 0002 | APPROVED for payment and asynchronous recurrence. REFUNDED for synchronous refund. |
| 5000610300000002 | MAESTRO | payment: 1001 refund: 1170 recurrence: 1001 | APPROVED for payment and asynchronous recurrence. FAILED for refund. Error 1170 - Refund Error asynchronously. |
| 5201281505129736 | MASTERCARD | payment: 0800 | FAILED for payment. Error 0800 - Provider's Connection Failed. |
| 5201281262435268 | MASTERCARD | payment: 0801 | FAILED for payment. Error 0801 - Provider's Technical Error. |
| 5970100300000018 | UNKNOWN | payment: 0001 refund: 1002 recurrence: 1200 | APPROVED for payment. REFUNDED for refund asynchronously. FAILED for recurrence. Error 1200 - Do Not Honor asynchronously. |
| 378282000000008 | AMEX | payment: 0001 refund: 0002 | APPROVED for payment. REFUNDED for refund. |
| 378282000000024 | AMEX | payment: 0102 | FAILED for payment. Error 0102 - Authorization Failed. |
| 378285000000001 | AMEX | payment: 0001 refund: 0170 | APPROVED for payment and recurrence. FAILED for refund. Error 0170 - Refund Error. |
| 378285000000019 | AMEX | payment: 0001 refund: 0002 recurrence: 0001 | APPROVED for payment and recurrence. REFUNDED for refund. |
| 378285000000027 | AMEX | payment: 0001 refund: 0002 recurrence: 0200 | APPROVED for payment and recurrence. REFUNDED for refund. FAILED for recurrence. Error 0200 - Do Not Honor. |
| 5555555555554444 | MASTERCARD | payment: 0001 refund: 0002 recurrence: 0001 tds: 0004 | APPROVED for payment and recurrence. REFUNDED for refund. PENDING for 3DS. |
| 5577000055770004 | MASTERCARD | payment: 0001 refund: 0002 recurrence: 0001 tds: 0001 | APPROVED for payment and recurrence. REFUNDED for refund. APPROVED for 3DS (Frictionless). |
| 5555444433331111 | MASTERCARD | payment: 0001 refund: 0002 recurrence: 0001 tds: 0121 | APPROVED for payment and recurrence. REFUNDED for refund. FAILED for 3DS. Error 0121 - Authentication Failed - 3D Secure. |
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:
- First recurring transaction → APPROVED
- Second recurring transaction → FAILED with error
0900 - Third recurring transaction → APPROVED
- Fourth recurring transaction → FAILED with error
0900
Counter
The Counter function uses the following format:
Cxx Eyyyy
Where:
Cidentifies the counter function.xxspecifies how many consecutive APPROVED transactions should be returned.Eyyyyspecifies 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→ APPROVEDF→ 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 transaction | Result | Error |
|---|---|---|
| 1 | APPROVED | - |
| 2 | FAILED | 0900 |
| 3 | APPROVED | - |
| 4 | APPROVED | - |
| 5 | FAILED | 0900 |
| 6 | FAILED | 0900 |
Another example:
FFSFSFF E0800
This returns:
| Recurring transaction | Result | Error |
|---|---|---|
| 1 | FAILED | 0800 |
| 2 | FAILED | 0800 |
| 3 | APPROVED | - |
| 4 | FAILED | 0800 |
| 5 | APPROVED | - |
| 6 | FAILED | 0800 |
| 7 | FAILED | 0800 |
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 ExxxxCxx Exxxx<sequence> Exxxx