Create test payments and use test cards to try every step of a payment without moving real money.
Test mode lets you build and test your integration without moving real money. You can use test
cards to make any step of a payment succeed or fail on purpose.
Enabling test mode
Set "testmode": true when you create a payment:
{
"amount": 500,
"currency": "DKK",
"order_id": "test-1234",
"testmode": true
}The same field is available when you create payouts and subscriptions.
In test mode:
- Card payments are handled by our test acquirer. Only the test cards on this page work, and
no real card is charged. - Other payment methods, such as MobilePay or Klarna, use the payment provider's own test
environment. The method must be set up on your account.
Test cards
Use any of these cards to get started:
| Card number | Result | Card |
|---|---|---|
4000112401172221 | Succeeds | Visa debit, consumer, Canada |
5500120801422221 | Succeeds | Mastercard credit, consumer, Denmark |
4242120802091112 | Authorization fails | Visa credit, consumer, Denmark |
4000253302611113 | Capture fails | Visa debit, business, Aruba |
5500113602321114 | Cancel fails | Mastercard credit, consumer, Cayman Islands |
5100116202241115 | Refund fails | Mastercard debit, consumer, Christmas Island |
4242137200491116 | Payout and saving the card fail | Visa credit, consumer, Ireland |
4242120800091072 | Asks for 3-D Secure, then succeeds | Visa credit, consumer, Denmark |
For every test card:
- Expiry date: any date in the future, up to 20 years ahead.
- CVC: any 3 or 4 digits.
Building your own test card
Every test card has 16 digits, made up of five parts:
| Digits | Part | Meaning |
|---|---|---|
| 1–4 | Card type | Brand and whether the card is credit or debit. See Card types. |
| 5 | Segment | 2 is a business card. Any other digit is a consumer card. |
| 6–8 | Country | The card's country as an ISO 3166-1 numeric code, for example 208 for Denmark. |
| 9–12 | Free | Any 4 digits. |
| 13–16 | Result | Makes a step fail on purpose. See Results. |
The full number must also pass the Luhn check.
Change one of the free digits until it does.
Card types
| First 4 digits | Brand | Funding |
|---|---|---|
4242 | Visa | Credit |
4000 | Visa | Debit |
5500 | Mastercard | Credit |
5100 | Mastercard | Debit |
5019 | Dankort | Debit |
Results
| Last 4 digits | Result |
|---|---|
1112 | Authorization fails. |
1113 | Capture fails. |
1114 | Cancel fails. |
1115 | Refund fails. |
1116 | Payouts to the card fail, and the card cannot be saved for later payments or subscriptions. A one-off payment succeeds. |
1072 | The cardholder is asked to complete 3-D Secure. The payment then succeeds. |
| Anything else | Every step succeeds. |