Are you looking for test card numbers?

Would you like to contact support?

Risk-management icon

Test a chargeback scenario

Simulate chargebacks by submitting dispute reason codes in your payment request.

To verify your Disputes API integration, you can test a chargeback scenario. First, you create a test payment with a chargeback reason of your choice. Then, you capture that transaction and wait for the webhook. When you receive the webhook, the chargeback is created and you can use the information from your test transaction to test the Disputes API.

If you're looking to test a Klarna dispute scenario, refer to the Klarna dispute guidelines.

  1. In your test environment, submit a payment request with the holderName set to any of the following values, depending on the scenario you want to simulate:

    • Chargeback:{reason_code}: A chargeback with a specific reason code. For a list of available reason codes, refer to Dispute reason codes.

      You may have to temporarily disable or lower the risk score for the Card/bank account holder name contains a non-alphabetic character risk check.

    • Chargeback: A chargeback without an explicit reason code.
    • Chargeback Reversed: A ChargebackReversed status without an explicit reason code.
    • Second Chargeback: A SecondChargeback status without an explicit reason code.

    For example, submit the /payments request below to simulate a chargeback with reason code 10.4:

    You receive a response containing pspReference, our unique identifier for the payment.

  2. Capture the payment with a /payments/paymentPspReference/captures request, specifying:

    • paymentPspReference: The pspReference of the payment you're capturing.
    • amount: The value and currency specified in the payment request.

    You receive a response containing:

    • pspReference: The PSP reference associated with this capture request. Note that this is different from the PSP reference associated with the original payment request.

    The payment will then go through SentforSettle, Settled, and finally the Chargeback status. This process can take up to 24 hours to complete.

  3. Wait for the webhook. In this example, you will receive a NOTIFICATION_OF_CHARGEBACK. This webhook contains a pspReference, which is the unique identifier for the dispute. For example:

               "defendable" : "true",
            "reason":"Other Fraud-Card Absent Environment",
  4. After the chargeback is created, use the Disputes API and follow the steps to retrieve defense reasons request, upload dispute defense documents, and defend the dispute.