Testing specific payment methods
See the dedicated instructions for testing chargeback scenarios for:
To test the dispute flow, you can simulate a chargeback and then make Disputes API calls to handle the simulated dispute, or test the process in your Customer Area.
This is how it works:
- Create a test payment with a
holderName
value that triggers one of the chargeback scenarios that you can simulate. - Capture the test payment.
- Wait 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 use your test Customer Area.
Test the dispute flow
-
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.
The following example shows a /payments request to simulate a chargeback with reason code 10.4.
You receive a response containing a
pspReference
, our unique identifier for the payment. You need thispspReference
in the next step. - Chargeback:{reason_code}: A chargeback with a specific reason code. For a list of available reason codes, refer to Dispute reason codes.
-
To capture the test payment, make a /payments/{paymentPspReference}/captures request, where
{paymentPspReference}
is thepspReference
you received in the payment response. Specify:amount
: Thevalue
andcurrency
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.
-
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: -
After the chargeback is created, you can use the Disputes API to handle the simulated dispute, or use your Customer Area.
Using the Disputes API:
Using the Customer Area:
- Go to Revenue & risk > Disputes
- Select the simulated dispute and either accept or defend the dispute.