Simulate a dispute with a status
/charges/{transaction_id}/simulate/dispute/{dispute_status}Simulates a dispute in the given status on a charge.
This endpoint is only available in the sandbox. The charge must be a card, Google Pay, Apple Pay, KakaoPay or Naver Pay charge.
If the charge has no dispute yet, a dispute is created with reason consumer_disputes, together with a chargeback on the charge (and a representment when the status is won or arbitration_won). If the charge already has a dispute, only that dispute's status changes; no new dispute is created.
The response has no body. To find the dispute, list disputes or listen for the dispute webhook.
Headers
AuthorizationstringRequiredidempotency-keystringA unique key, such as a UUID, that makes a POST or DELETE request safe to retry. Pay.com keeps each key for 24 hours, separately for each workspace.
- A retry with the same key, endpoint and body gets the first request's stored status and body, without running the request again.
- If the first request is still being processed, a retry gets 409
idempotency_error(request_in_progress). - The same key on another endpoint, or with another body, gets 400
idempotency_error(invalid_parameters). - GET, PUT and PATCH requests ignore the key.
The response repeats the key in its Idempotency-Key header.
Path parameters
transaction_idstringRequiredUnique identifier for the charge.
dispute_statusstringRequiredThe dispute status to simulate. One of the dispute status values.
Returns
Dispute simulated successfully.
Errors
400401invalid_key, invalid_token, legacy_keys_ended, legacy_keys_off or permission_denied).403code says why.404409idempotency-key is still being processed (request_in_progress). Wait, then retry with the same key.422500503Retry-After, or after a few seconds when there's none.