Skip to Content
Docs

Dispute events and testing

Handle dispute webhooks, read the daily disputes file, and simulate every dispute status in the sandbox before you go live.

Pay.com tells you about disputes in three ways: dispute.* webhook events, the Fraud & Disputes → Disputes page in the Pay.com dashboard, and an optional daily disputes file. In the sandbox, simulate disputes on your test charges to check that your integration handles every status.

Webhook events

Pay.com sends a dispute.<status> event when a dispute is created or its status changes, plus dispute.evidence_rejected when Pay.com rejects your evidence. See Events for what each one means. To receive them, register a webhook endpoint and subscribe to the dispute events. See Webhooks.

Verify the Pay-Signature header before you process an event. See Verify webhook signatures.

Each event's data is the dispute object. Amounts are in the currency's smallest unit, so 5000 is $50.00 USD:

{
  "id": "evt_692434889852583936",
  "resource": "event",
  "type": "dispute.open",
  "created": "2026-03-26T18:09:02.560Z",
  "data": {
    "id": "dspt_692434889303132160",
    "resource": "dispute",
    "amount": 5000,
    "amount_human_readable": "50.00",
    "arn": "80597117747",
    "charge": "chrg_692434850019280896",
    "created": "2026-03-26T18:09:02.414Z",
    "currency": "usd",
    "evidence_required_by": "2026-04-02T00:00:00.000Z",
    "reason": "consumer_disputes",
    "reason_code": "13.1",
    "status": "open",
    "test_mode": true
  }
}

When you handle an event:

  • Update your records from data.status, not from the event type, because events can arrive out of order. See Act on the status, not the event.
  • Handle the same event more than once safely, using id to skip events you already processed.
  • For the dispute's full details, retrieve it with GET /v1/disputes/{dispute_id}. GET /v1/disputes returns a shorter object. It leaves out chargeback_type, returns reason_code, arn, and processor_dispute_id as null, and has no evidence.

Daily disputes reports

Pay.com generates two disputes reports each day, as CSV files on its SFTP server. It can also push them to your Amazon S3 bucket or email them. Pay.com sends a report.uploaded event for each file.

  • mrchnt_<merchant_id>_<YYYYMMDD>_disputes_daily.csv lists the disputes that changed that day, and the disputes whose chargeback cleared the day before.
  • mrchnt_<merchant_id>_<YYYYMMDD>_disputes.csv lists every dispute that's still open, and the closed disputes that changed that day.

To turn the reports on or off, or change how they're delivered, contact Pay.com support. For every column, see Disputes reports.

Simulate a dispute in the sandbox

Create a test dispute on a sandbox charge with POST /v1/charges/{charge_id}/simulate/dispute, which creates an open dispute. To create it in another status, put the status in the path with POST /v1/charges/{charge_id}/simulate/dispute/{dispute_status}. The request has no body, and Pay.com ignores one if you send it.

curl -X POST https://api.sandbox.pay.com/v1/charges/chrg_692434850019280896/simulate/dispute/pre_arbitration \
  -u ':sk-pay-com-sandbox-…'

dispute_status can be any of the 15 statuses: new, open, evidence_under_review, evidence_under_review_auto_defend, pre_arbitration, arbitration_under_review, won, lost, arbitration_won, arbitration_lost, chargeback_accepted, chargeback_canceled, expired, resolved, and resolved_rapid_dispute_resolution.

How the simulation behaves:

  • No dispute yet: Pay.com creates one with reason: consumer_disputes, a reason code for the card's network (13.1 for Visa, 4841 for Mastercard, 4515 for American Express, and 4755 for Discover), and a chargeback on the charge. For won and arbitration_won, it also books a representment.
  • A dispute already exists: Pay.com changes that dispute's status. It doesn't create another one. Simulating the status the dispute already has sends no event.
  • Payment methods: the charge must be paid by card, Apple Pay, Google Pay, Kakao Pay, or Naver Pay. Other charges return 422.
  • Live: the endpoints work only in the sandbox. In live, they return 403 with code: permission_denied. An invalid status returns 400 first.

The simulate endpoints need an API key with access to charges. The response is always 204 with no body, so take the dispute's ID from the webhook, or list your disputes.

Test a dispute's lifecycle

Run a dispute through the statuses your integration handles:

  1. 1

    Create a test charge

    Create a charge in the sandbox, as in Create a charge.

  2. 2

    Open a dispute

    Call POST /v1/charges/{charge_id}/simulate/dispute. Check that you receive dispute.open, and store the dispute's ID from data.id.

  3. 3

    Defend it

    Upload a document and submit it as evidence, as in Dispute evidence. Check that the dispute moves to evidence_under_review.

  4. 4

    Simulate the outcome

    Call POST /v1/charges/{charge_id}/simulate/dispute/won, or lost, or pre_arbitration to test a second round. Check that your records follow each data.status.

To simulate collaborations and fraud warnings too, see Test risk events.

Next steps

Was this page helpful?