Skip to main content


Test your integration with the Comcarde REST API by sending payment and refund requests with the test values provided below. Each results in a different set response from our API.

These test values are only for use in our Sandbox environment when using the public Merchant Account we provide.

To test merchant accounts other than our public Merchant Account in our Sandbox environment please refer to the developer documentation for the configured PSPs of that account as they usually provide their own test values.

If you would like access to our public Merchant Account, please contact us by emailing

Test Card Numbers#

Use test card numbers to make a test card payment which will return a specific payment response.

When creating a payment request with a test card number, the other fields in the request (e.g. cvv, expiry date, name on card, etc) can be set to any valid value. An example card payment request can be seen in our Swagger-UI by selecting 'Payment with Card Payment Instrument' from the 'Examples' drop-down menu.

You can make a card payment by either using our PHP SDK or by interacting with our API directly using our Swagger-UI. If you are using Swagger-UI, follow the steps outlined above to select the example card payment and select 'Try it out'. Change the fields in the payment request to the desired values, then make the payment.

Successful Card Payment with Primary PSP#

PAN: 4444333322221111

Response Code: 1000

Response Message: Approved

Successful Card Payment with Secondary PSP#

PAN: 5105105105105100

Response Code: 1000

Response Message: Approved

Note: Successful card payment with the secondary PSP after failing over from the primary PSP

Merchant Account Misconfigured on PSP#

PAN: 4646464646464644

Response Code: 4102

Response Message: Merchant account is configured incorrectly on the payment service provider

Transaction Declined#

PAN: 5555555555554444

Response Code: 4201

Response Message: Transaction declined by payment processor

Invalid Credit Card Number#

PAN: 5454545454545454

Response Code: 4206

Response Message: Invalid credit card number

Duplicate Transaction#

PAN: 343434343434343

Response Code: 4215

Response Message: Duplicate transaction

Note: This is an American Express card number, so a 4 digit CVV must be used

Invalid Amount#

PAN: 5555444433331111

Response Code: 4232

Response Message: Invalid amount

Payment Rejected by Payment Processor#

PAN: 4111111111111111

Response Code: 4251

Response Message: Payment was rejected by payment processor

Error Occurred on PSP#

PAN: 6304000000000000

Response Code: 5009

Response Message: Error occurred on payment service provider

Test Refund Amounts#

Use test refund amounts to perform a test refund request which will return a specific refund response.

To perform a test refund, first make a test payment with the card number for the primary PSP 'Approved' response specified above. Then make a refund request using the 'paymentId' from the payment response, and the amount provided below which corresponds to your desired refund response.

Note: Amount values are agnostic to any specific currency code.

You can make a refund by either using our PHP SDK or by interacting with our API directly using our Swagger-UI. If you are using Swagger-UI; select 'Try it out', then 'Partial Refund' from the 'Examples' drop-down menu. From here, follow the steps outlined above to fill in the refund request fields, then make the refund.

Successful Refund#

Amount: 999

Response Code: 1000

Response Message: Approved

Transaction Already Refunded#

Amount: 1999

Response Code: 4402

Response Message: Transaction already refunded

Refund Amount Too Large#

Amount: 2999

Response Code: 4403

Response Message: Refund amount is too large for this transaction

For the full list of our response codes please refer to our Comcarde Response Codes page.