Testing specific payment methods
See the dedicated instructions to test chargeback scenarios for ACH Direct Debit. To test the dispute flow, you can simulate different chargeback scenarios. You can then follow a simulated dispute through the process, and test how to defend or accept disputes using the Disputes API or the Customer Area.Requirements
Before you begin, take into account the following requirements and limitations.How it works
The overall chargeback simulation and testing process is as follows:- Choose one of the test scenarios.
- Make a test payment with a
holderNamevalue that triggers the scenario that you want to simulate. - Capture the test payment.
- Listen for the webhook that indicates the simulated chargeback is created.
- Use the information from your test environment to test handling the chargeback using the Disputes API or your test Customer Area.
Test scenarios
You can test the following chargeback scenarios:- A chargeback with a specific chargeback reason code.
- A chargeback without an explicit reason code.
- A chargeback that is reversed without an explicit reason code.
- A second chargeback without an explicit reason code.
holderName that corresponds with the scenario that you want to test. You can test a chargeback scenario with the same or with a custom value and or currency.
Test a chargeback with the same value and currency
To test a chargeback with the same value and currency as the payment request, use the following pattern for theholderName:
- Chargeback:{reason_code}
- Chargeback
- Chargeback Reversed
- Second Chargeback
Test a chargeback with a custom value and/or currency
To test a custom value for full or partial chargebacks, or chargebacks for an amount that is greater than payment amount, in the same or in a different currency as the payment request, use the following pattern for theholderName:
- {chargeback scenario} {quantity in minor units} {currency code}
- For partial chargebacks, the maximum difference between the chargeback and the test payment amount is 50 percent.
- For chargebacks greater than payment amount, the maximum difference between the chargeback and the test payment amount is 20 percent.
Example test values
The table shows example values that you can use in the test payment for the cardholder name and the amount in minor units, and which chargeback scenario it tests.Make a test payment
In your test environment, submit a payment request with theholderName set to any of the values from the table.
The following example shows a /payments request to simulate a full chargeback with reason code 10.4.
Payment request to simulate a chargeback with reason code 10.4
pspReference, our unique identifier for the payment. You need this pspReference to capture the payment in the next step.
Capture the payment
To capture the test payment, make a /payments/{paymentPspReference}/captures request, where{paymentPspReference} is the pspReference you received in the payment response. In the amount object, specify the value and currency that you used in the test payment request.
Capture request
pspReference: the PSP reference associated with this capture request. Note that this is different from the PSP reference associated with the original payment request.
Monitor webhooks
After you capture the test payment, you receive a CAPTURE webhook message. The test payment then goes through SentforSettle, Settled, and finally the Chargeback status. This process can take up to 24 hours to complete. Listen for the webhook message related to the chargeback scenario that you are testing. For example, if you are testing a chargeback flow, you will receive a NOTIFICATION_OF_CHARGEBACK. This webhook message contains apspReference, which is the unique identifier for the dispute. For example:
NOTIFICATION_OF_CHARGEBACK webhook
Accept or defend the dispute
If you are simulating a chargeback, you can use the Disputes API to accept or defend the simulated chargeback, or use your Customer Area. To defend the dispute using the Disputes API: Or, you can accept the dispute using the Disputes API. To accept or defend the dispute using the Customer Area:- Go to Revenue & risk > Disputes
- Select the simulated dispute and either accept or defend the dispute.