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:

A12345Sale transaction
B12345PreAuth sale transaction
C12345Completion/Capture call
R12345Refund transaction
V12345Void 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:

3333333Returns a declined transaction090
3344344Returns an AVS Address Failure095
3355355Returns an AVS Postcode Failure096
3366366Returns a Card Security Failure094
3377377Returns a Fraud decline091
4444444Returns a Referral089
6666666Returns a communication errorF006
5544544Returns an AVS Address Failure if AVS is configured095
5555555Returns an AVS Postcode Failure if AVS is configured096
5566566Returns a Card Security Failure if CSC is configured094

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 NumberSchemeTypeCSC Length
3743 871880 19714 AmexCredit4
3014 445396 5469 DinersCredit3
3528 0000 0000 0007 JCBCredit3
4000 0000 0000 0002 VisaCredit3
4659 0100 0000 0005 VisaDebit3
5100 0000 0000 0008 MasterCardCredit3
5573 4700 0000 0001 MasterCardDebit3
6333 1100 0000 0002 MaestroDebit3
4508 7500 0000 0009 Visa ElectronDebit3
4857 7900 0000 0002 Visa BusinessDebit3

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.