Testing Best Practices

CItyPay offer a test facility for client testing and integration development. The test gateway allows you to process a transaction through our servers and route the subsequent transaction through a test host.

Test transactions are available for reporting purposes for up to 3 months and offer multiple levels of testing, including

  1. Test Authorisation processing
  2. Test Refund processing
  3. Test Three-D Secure ACS for integrating the full authentication process in to your application
  4. Test Pre-auth processes such as authorisation, completion/capture and cancellation

Expected Authorisation Codes

Authorisation codes are static to allow the integrator to easily identify an actual authorisation code and a test code. The following authorisation codes are returned.

AuthCode Behaviour
A12345 Sale transaction
B12345 PreAuth sale transaction
C12345 Completion/Capture call
R12345 Refund transaction
V12345 Void transaction

Modelling behaviour

The API will ordinarily respond with an authorisation response. We have enabled an amount mapping process to be able to return different responses, the following table lists out the behaviour.

Amount Behaviour ErrorCode Response
3333 Returns a declined transaction 090
3344 Returns an AVS Address Failure, regardless of configuration for AVS and the address value supplied 095
3355 Returns an AVS Postcode Failure, regardless of configuration for AVS and the address value supplied 096
3366 Returns a Card Security Failure, regardless of configuration for CSC and the value supplied 094
3377 Returns a Fraud decline 091
4444 Returns a Referral 089
6666 Returns a communication error F006
5544 Returns an AVS Address Failure only if AVS is configured or enforced via the API. A value of 99 will reject the address any other value is accepted 095
5555 Returns an AVS Postcode Failure only if AVS is configured or enforced via the API. A value of 99 will reject the postcode, any other value is accepted 096
5566 Returns a Card Security Failure only if CSC matching is configured or enforced via the API. A value of 999 will reject the CSC, any other value is accepted 094

Test Cards

To perform testing, the following test card numbers can be used with any valid expiry date.

Card Type

Test Card Number

CSC (CV2)

AVS Address

AVS Postcode

Amex:

374387188019714

1234

Address 1

23

Diners:

30144453965469

123

Address 1

23

Int Maestro

6759380000000000005

123

Address 1

23

JCB

3528000000000007

123

Address 1

23

Mastercard Credit:

5100000000000008

123

Address 1

23

Mastercard Debit:

5573470000000001

123

Address 1

23

UK Maestro with Issue:

6759050000000000004 issue no should be 1

123

Address 1

23

UK Maestro no Issue:

6333110000000002

123

Address 1

23

Visa Business

4857790000000002

123

Address 1

23

Visa Credit:

4000000000000002

123

Address 1

23

Visa Debit:

4659010000000005

123

Address 1

23

Visa Electron

4508750000000009

123

Address 1

23

Visa Purchasing

4715000000000008

123

Address 1

23

  • If your account requires CSC checking or AVS checking, these values will need to be supplied.

Test ACS

As part of the test suite, the test ACS provides a simple screen confirmation page similar to an actual ACS page. It will model the response (PaRes) from a standard ACS call using your payment details. To use,

  1. click on Authorise to mimic an authorised response 
  2. click on Cancel to mimic a failed authorisation response