Testing Best Practices
CityPay offers a comprehensive test facility for clients during testing and integration development with our APIs. All testing should be conducted within the sandbox service, which simulates an acquirer environment and generates test transactions for the verification of post-authorisation processes.
Our Test Gateway Includes:
- Test Authorisation processing
- Test Refund processing
- Test ThreeDSecure v2 ACS for integrating the full authentication process into your application
- Test Pre-auth processes such as authorisation, completion/capture, and cancellation/voids
- Test Charge processing
Authorisation Codes on the Test Gateway
To facilitate easy identification between actual authorisation codes and test codes, the test gateway returns static authorisation codes:
AuthCode | Behaviour |
---|---|
A12345 | Sale transaction |
B12345 | PreAuth sale transaction |
C12345 | Completion/Capture call |
R12345 | Refund transaction |
V12345 | Void transaction |
Modelling Behaviour
To simulate different transaction outcomes, our test gateway allows for amount mapping and CSC mapping, which will return different responses based on these values:
Amount | CSC | Behaviour | Response |
---|---|---|---|
3333 | 333 | Returns a declined transaction | 090 |
3344 | 344 | Returns an AVS Address Failure | 095 |
3355 | 355 | Returns an AVS Postcode Failure | 096 |
3366 | 366 | Returns a Card Security Failure | 094 |
3377 | 377 | Returns a Fraud decline | 091 |
4444 | 444 | Returns a Referral | 089 |
6666 | 666 | Returns a communication error | F006 |
5544 | 544 | Returns an AVS Address Failure if AVS is configured | 095 |
5555 | 555 | Returns an AVS Postcode Failure if AVS is configured | 096 |
5566 | 566 | Returns a Card Security Failure if CSC is configured | 094 |
For American Express cards requiring 4 digit CSC values, the last 3 digits of the CSC are considered (e.g., 0333
, 1333
would result in the same behaviour).
Test Card Numbers
The following test card numbers can be used for transaction testing:
Card Number | Scheme | Type | CSC Length |
---|---|---|---|
3743 871880 19714 | Amex | Credit | 4 |
3014 445396 5469 | Diners | Credit | 3 |
3528 0000 0000 0007 | JCB | Credit | 3 |
4000 0000 0000 0002 | Visa | Credit | 3 |
4659 0100 0000 0005 | Visa | Debit | 3 |
5100 0000 0000 0008 | MasterCard | Credit | 3 |
5573 4700 0000 0001 | MasterCard | Debit | 3 |
6333 1100 0000 0002 | Maestro | Debit | 3 |
4508 7500 0000 0009 | Visa Electron | Debit | 3 |
4857 7900 0000 0002 | Visa Business | Debit | 3 |
AVS (Address Verification System) checks the numeric values of the address and postcode via the card issuer and card schemes. Our test gateway will validate whether the required values are supplied but does not perform actual verification against cardholder information.