API Documentation 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.

AVS Checking

AVS checks the numeric values of the address and postcode online via the card issuer and card schemes. Our test gateway will not validate these values however it will validate whether values are supplied when expected by configuration of your account. 

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

 

+44 (0)1534 884000