Skip to content

    Test card processing

    This guide describes how to test card processing on your checkout page.

    Complexity: Low
    Coding: None

    Before you start

    Before you start, you need a checkout page that uses the Checkout test environment.

    How to test

    The Checkout page provides your customers with the option to pay by card. To test card payments on the checkout page, follow the steps below:

    1. Navigate to your checkout page
    2. Select "Pay by card"
    3. Add one of the sample card numbers from Number column in the table below
    4. Enter an expire date in the future
    5. Enter any 3 digits in the CVC field
    6. Enter any arbitrary name, address, and phone number in the address form
    Test card processing

    When using the sample cards in the test environment, some amounts have special meaning and will generate error codes or increase the API response times. This is not a bug, but a feature of the test environment so that you can test your system against error codes and delayed responses. See the following section for more information.

    Reason codes

    You can check the reason codes for card schemes outlined in this guide here.

    3D Secure

    When testing card payments in the checkout, you can be prompted for the 3D Secure simulator as outlined from here.

    From here, it is possible if you would like to test success or failure payment flows with the test data from here.

    Amounts with special meaning

    It is possible to test how your website behaves when Checkout returns various error codes or if the checkout process is delayed. The following amounts have a special meaning and changes the checkout behaviour when creating a new payment in the test environment:

    • The amount 1.XX will raise the error code XX. For example, if the property order.amount is set to 133, the error code 33 will be raised.

    • The amount 3.XX will delay the API response by XX seconds. For example, if the property order.amount is set to 310, the reply from the checkout flow will be delayed by 10 seconds.

    You can read more about reason codes from here.


    It is possible to specify for discounts in the payment requests. This is done by adding an order line with a negative amount.

    You can see an example of this in the payload example from here.

    Please note that it is not possible for the total amount to ever be 0 or lower for the following requests:

    Sample credit cards

    The following sample cards can be used in the test environment when testing card payments:

    Card TypeNumberExpiry DateCVVAdditional info
    Visa4268270087374847> todayAny 3 digitsSuccess
    Visa4925000000000087> todayAny 3 digitsReservation will fail
    Visa4925000000000079> todayAny 3 digitsNon-recurring charge will fail
    Visa4925000000000061> todayAny 3 digitsDirect Charge Fails. Code: 99
    MasterCard5213199803453465> todayAny 3 digitsSuccess
    MasterCard5544330000000235> todayAny 3 digitsSuccess
    Maestro6761638084569584> todayAny 3 digitsSuccess
    American Express37620600000000912/23Any 4 digitsSuccess

    Expire date can be any date from today and in the future. For the CVC (Card Verification Code), you can use three arbitrary digits (123 for example).


    If the Create payment request contains "charge":true, then charge with test card 4925000000000079 will not fail.

    Was this helpful?

    What was your feeling about it?