Create or resolve simulated disputes in the sandbox environment to test your integration. The workflow is two-phase: first create a simulated dispute using CREATE_DISPUTE or CREATE_DISPUTE_EXCEED_DEADLINE, then resolve it using DISPUTE_WON or DISPUTE_LOST.
Create a simulated dispute
{
"scenario": "CREATE_DISPUTE",
"payment_id": "py-59a3cf39-2a7d-4733-a3e3-8177c78090f7",
"amount": "100000",
"currency": "IDR",
"product_type": "CARDS",
"channel_code": "CARDS"
}Create a simulated dispute that will exceed deadline
{
"scenario": "CREATE_DISPUTE_EXCEED_DEADLINE",
"payment_id": "py-59a3cf39-2a7d-4733-a3e3-8177c78090f7",
"amount": "100000",
"currency": "IDR",
"product_type": "CARDS",
"channel_code": "CARDS",
"deadline": "instant"
}Resolve simulated dispute as WON
{
"scenario": "DISPUTE_WON",
"dispute_id": "mi-dspt-48e96517-9889-4e29-a93e-d1ffae1fa366"
}Resolve simulated dispute as LOST
{
"scenario": "DISPUTE_LOST",
"dispute_id": "mi-dspt-48e96517-9889-4e29-a93e-d1ffae1fa366"
}CREATE_DISPUTE creates a dispute in ACTION_REQUIRED with a realistic deadline. CREATE_DISPUTE_EXCEED_DEADLINE creates a dispute that automatically expires.
Xendit payment ID of an existing settled payment to attach the simulated dispute to.
Dispute amount as a decimal string.
Currency of the simulated dispute amount, in ISO-4217 format.
Product classification for the simulated dispute (e.g., CARDS, QR).
Specific channel for the simulated dispute. Must be consistent with product_type.
Optional deadline override for the simulated dispute. Only used with CREATE_DISPUTE_EXCEED_DEADLINE scenario.
DISPUTE_WON resolves in the merchant's favor. DISPUTE_LOST resolves against the merchant.
ID of the simulated dispute to resolve.
Optional resolved amount. Defaults to the full initial amount. Provide a lower value to simulate a partial chargeback.
Simulation triggered successfully.
ID of the dispute that was created or resolved by this simulation.
Payment ID the simulated dispute is attached to.
Simulation resolved successfully.
ID of the dispute that was created or resolved by this simulation.
Payment ID the simulated dispute is attached to.
Bad request.
{
"error_code": "INVALID_SCENARIO",
"message": "Invalid scenario."
}{
"error_code": "PAYMENT_NOT_FOUND",
"message": "The specified payment was not found."
}{
"error_code": "PAYMENT_NOT_SETTLED",
"message": "The specified payment is not in a settled state."
}{
"error_code": "ILLEGAL_STATE",
"message": "Evidence must be submitted before resolving a simulated dispute."
}{
"error_code": "INVALID_REQUEST",
"message": "Invalid deadline value. Accepted values: instant, 1m, 2m, 3m, 5m."
}This endpoint is only available in sandbox environment.
{
"error_code": "UNAVAILABLE_IN_LIVE_MODE",
"message": "This endpoint is only available in test mode."
}Conflict. A resolve scenario has already been applied.
{
"error_code": "ILLEGAL_STATE",
"message": "A resolve scenario has already been applied to this simulated dispute."
}Too many requests. Maximum simulated disputes per time window exceeded.
{
"error_code": "TOO_MANY_REQUESTS",
"message": "Maximum of 5 simulated disputes per 24 hours exceeded."
}