Test Payments

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 numberResultCard
4000112401172221SucceedsVisa debit, consumer, Canada
5500120801422221SucceedsMastercard credit, consumer, Denmark
4242120802091112Authorization failsVisa credit, consumer, Denmark
4000253302611113Capture failsVisa debit, business, Aruba
5500113602321114Cancel failsMastercard credit, consumer, Cayman Islands
5100116202241115Refund failsMastercard debit, consumer, Christmas Island
4242137200491116Payout and saving the card failVisa credit, consumer, Ireland
4242120800091072Asks for 3-D Secure, then succeedsVisa 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:

DigitsPartMeaning
1–4Card typeBrand and whether the card is credit or debit. See Card types.
5Segment2 is a business card. Any other digit is a consumer card.
6–8CountryThe card's country as an ISO 3166-1 numeric code, for example 208 for Denmark.
9–12FreeAny 4 digits.
13–16ResultMakes 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 digitsBrandFunding
4242VisaCredit
4000VisaDebit
5500MastercardCredit
5100MastercardDebit
5019DankortDebit

Results

Last 4 digitsResult
1112Authorization fails.
1113Capture fails.
1114Cancel fails.
1115Refund fails.
1116Payouts to the card fail, and the card cannot be saved for later payments or subscriptions. A one-off payment succeeds.
1072The cardholder is asked to complete 3-D Secure. The payment then succeeds.
Anything elseEvery step succeeds.