Skip to Content
Docs

Defend disputes in bulk

Submit the same evidence documents for several open disputes in one request with POST /v1/disputes/bulk_defend.

Send POST /v1/disputes/bulk_defend to submit the same documents and text as evidence for several disputes in one request. Use it when one set of files answers many disputes, for example a delivery report that covers a batch of orders, or the terms of service your customers accepted.

Requirements

Before you send the request, check each dispute and each document:

  • Every dispute has the status open or pre_arbitration.
  • Every document is a dispute evidence document with the status active. See Upload a document.
  • Every document is within the limits of every dispute's processor. The request applies the strictest limit among the disputes you send. See Limits.

Defend the disputes

Upload the files once, then send their IDs with the disputes they answer.

  1. 1

    Upload the documents

    Create a document for each file with POST /v1/documents, upload the file, and wait for the document.active event. A document can be used in any number of bulk requests.

  2. 2

    Send the bulk defend request

    Send disputes (the dspt_ IDs), documents (1 to 10 doc_ IDs), and an optional text. The same documents and text are submitted for every dispute.

    curl -X POST https://api.sandbox.pay.com/v1/disputes/bulk_defend \
      -u ':sk-pay-com-sandbox-…' \
      --header 'Content-Type: application/json' \
      --header 'idempotency-key: 4f6c2a1e-8d3b-4b8e-9a51-0c2f7d9e6b13' \
      --data '{
        "disputes": [
          "dspt_692434889303132160",
          "dspt_692434901147842560"
        ],
        "documents": ["doc_692435112204787712"],
        "text": "Signed delivery confirmations for both orders."
      }'

    A 204 means Pay.com accepted the whole request and is submitting the evidence in the background.

  3. 3

    Follow each dispute

    Pay.com submits the evidence for each dispute on its own. Each dispute moves to evidence_under_review when its evidence is processed, and Pay.com sends a dispute.evidence_under_review event for it. One dispute can fail while the others succeed, so check each dispute's status. To check one, retrieve it with GET /v1/disputes/{dispute_id}.

How the request is checked

The API checks the whole request before it submits anything. If any check fails, it returns an error and submits no evidence for any dispute.

ProblemResponse
A dispute doesn't exist400
A document doesn't exist404
A dispute isn't open or pre_arbitration400
A document isn't an active dispute evidence document400
A document is over the strictest limit among the disputes' processors400
More than 10 documents, or no documents400
A request with the same idempotency-key is still running409

Fix the problem and send the request again. Because nothing was submitted, you can resend the same disputes. There's no limit on the number of disputes in one request.

Bulk and single submissions compared

A bulk request submits the same evidence as POST /v1/disputes/{dispute_id}/evidences, with a few differences:

Single disputeBulk
Disputes per request11 or more
Documentsdocument, or up to 10 in documents1 to 10 in documents
textRequired, and can be emptyOptional
typeOptional, defaults to additional_evidenceNot accepted. Stored as additional_evidence
Response201 with the dispute object204 with no body

Next steps

Was this page helpful?