Testing specific payment methods
See the dedicated instructions for testing chargeback scenarios for:
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.
| Requirement | Description | 
|---|---|
| Integration type | Make sure that you have built an online payments integration. | 
| API credentials | To manage disputes using the Disputes API, make sure that you have an API credential with an API key and the API dispute management role. | 
| Customer Area roles | To manage disputes using the Customer Area, make sure that you have one of the following role(s): 
 | 
| Limitations | Not all dispute types can be simulated. | 
| Setup steps | Decide if you want to test managing disputes with the Disputes API or with the Customer Area. For either flow, we recommend that you: 
 | 
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.
In your test payment request, you enter a value for the 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 the holderName:
- Chargeback:{reason_code}
- Chargeback
- ChargebackReversed
- SecondChargeback
For example test payment values, see the table with example values.
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 the holderName:
- {chargeback scenario} {quantity in minor units} {currency code}
When you use this format, take into account the following limitations:
- 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.
For example test payment values, see the table with example test values.
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.
| Test scenario | Example value holderName | Example value amount | Chargeback | 
|---|---|---|---|
| Test a chargeback with a specific reason code. | Chargeback:10.4 | Any | Full | 
| Test a chargeback with a specific reason code that has the same value and currency as the test payment. | Chargeback:10.4 10000 EUR | 10000 EUR | Full | 
| Test a partial chargeback with a specific reason code that has a lower value but the same currency as the test payment. | Chargeback:10.4 9000 EUR | 10000 EUR | Partial | 
| Test a chargeback with a specific reason code that has higher value but the same currency as the test payment. | Chargeback:10.4 11000 EUR | 10000 EUR | Greater than the payment amount | 
| Test a chargeback with a specific reason code in a currency that differs from the test payment. | Chargeback:10.4 10000 USD | 10000 EUR | Different currency | 
| Test a chargeback without an explicit reason code. | Chargeback | Any | Full | 
| Test a chargeback without an explicit reason code that has the same value and currency as the test payment. | Chargeback 10000 EUR | 10000 EUR | Full | 
| Test a partial chargeback without an explicit reason code that has a lower value but the same currency as the test payment. | Chargeback 9000 EUR | 10000 EUR | Partial | 
| Test a chargeback without an explicit reason code that has higher value but the same currency as the test payment. | Chargeback 11000 EUR | 10000 EUR | Greater than the payment amount | 
| Test a chargeback without an explicit reason code in a currency that differs from the test payment. | Chargeback 10000 USD | 10000 EUR | Different currency | 
| Test a chargeback with a Chargeback Reversed status without an explicit reason code. | ChargebackReversed | Any | Full | 
| Test a chargeback with a Chargeback Reversed status without an explicit reason code that has the same value and currency as the test payment. | Chargeback Reversed 10000 EUR | 10000 EUR | Full | 
| Test a partial chargeback with a Chargeback Reversed status without an explicit reason code that has a lower value but the same currency as the test payment. | Chargeback Reversed 9000 EUR | 10000 EUR | Partial | 
| Test a chargeback with a Chargeback Reversed status without an explicit reason code that has higher value but the same currency as the test payment. | Chargeback Reversed 11000 EUR | 10000 EUR | Greater than the payment amount | 
| Test a chargeback with a Chargeback Reversed status without an explicit reason code in a currency that differs from the test payment. | Chargeback Reversed 10000 USD | 10000 EUR | Different currency | 
| Test a chargeback with a Second Chargeback status without an explicit reason code. | SecondChargeback | Any | Full | 
| Test a chargeback with a Second Chargeback status without an explicit reason code that has the same value and currency as the test payment. | Second Chargeback 10000 EUR | 10000 EUR | Full | 
| Test a partial chargeback with a Second Chargeback status without an explicit reason code that has a lower value but the same currency as the test payment. | Second Chargeback 9000 EUR | 10000 EUR | Partial | 
| Test a chargeback with a Second Chargeback status without an explicit reason code that has higher value but the same currency as the test payment. | Second Chargeback 11000 EUR | 10000 EUR | Greater than the payment amount | 
| Test a chargeback with a Second Chargeback status without an explicit reason code in a currency that differs from the test payment. | Second Chargeback 10000 USD | 10000 EUR | Different currency | 
Make a test payment
In your test environment, submit a payment request with the holderName 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.
You receive a response containing a 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.
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.
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 a pspReference, which is the unique identifier for the dispute. For example:
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.