Requirements
Test card requirements
Generated test cards should meet the following requirements:- Test card numbers should be between 6-19 digits long.
- All test card numbers in a generated test card range need to have the same number of digits.
- The first six digits of the test card numbers in any generated range need to be valid BIN numbers.
- Test card numbers should comply with standard payment card number constraints. For example, to test a system with Visa you should create a test card range with a valid Visa BIN.
- Although the created test card start and end range numbers are not checked for Luhn compliance, if you carry out a test payment the test card is handled like a standard payment card. It undergoes the standard card checks that take place in live environments, including Luhn verification.
- The billing address details you define for a test card range need to be AVS (Address Verification Service) compliant, i.e. you always need to include at least the street address. Zip code is optional.
- The billing address check verifies only the numeric characters in the street address and Zip code (if available).
Generating test cards in Customer Area
To generate ranges of test card numbers using the UI, do the following:- Log in to your Customer Area.
- Go to Account > Test cards.
- Select Add new range.
- Enter the necessary details in the Test Card Range form.
- Select Save.
Generating test cards via API
To create test card ranges using the API, send a request to the/createTestCardRanges endpoint.
Request
JSON
Soap
Response
JSON
Soap
Response with an error
JSON
Soap
Error handling
After submitting a call, you receive a confirmation that the message was received, and if it was correctly processed. The API returns HTTP status codes and the response message. For a list of request and response fields, see Response handling.Test card response handling
Test card generation fails, with a 4XX or 5XX HTTP response, in the following cases:- The range start test card number is larger than the end one.
- The range start and the end test card numbers have different lengths, i.e. they do not have the same amount of digits.
- The test card numbers are shorter than 6 digits or longer than 19 digits.
- The test card numbers do not observe BIN code and AVS constraints (see Requirements).
- If you use a generated test card number to carry out an actual payment, the test card number needs to be Luhn compliant because this check is part of standard behavior in a live environment.