AlmondTill/G3N API

acceptDispute

mutation · in the family Dispute

What it does

Record that you accept a customer’s card dispute (a chargeback) instead of fighting it.

Accept (concede) a Dispute: the processor close fires first (post /v1/disputes/:id/close — never inside a transaction; a processor refusal is CONFLICT/RECONCILE, retryable), then the flip commits. The withdrawn funds stay withdrawn — reports-only impact. Requires the unrestricted capability + the record's current revision.

Before you call

A bearer session from an API key (see Authentication and key hygiene) or a signed-in user.

Capability area: Refunds and payment corrections — Refunds, corrective notes and voiding invoices.

Roles that may call it:

What happens

Moves the dispute to “accepted” — the card networks return the money to the cardholder.

Careful

Money leaves for good: an accepted dispute cannot be re-fought. Use it when the customer is right or fighting costs more than the sale.

Arguments

NameTypeRequiredNotes
idID ID!yesThe id of the record.
revisionID ID!yesThe revision id you read on the record; the change is refused if an edit landed in the meantime.
reasonStringno

Concurrency

Send the record’s current revision from your last read as revision. A stale revision is refused as CONFLICT/REVISION_STALE — read the record again and retry with the new value.

Returns

Dispute Dispute! — A Dispute — the Stripe chargeback lifecycle mirrored. Never wire-created: webhook-born from charge.dispute.created — the ingress resolves the parent Payment through the PI-metadata law, mints record-first (needs_response, deduped by a uniq reservation on disputeRef), appends Order.disputeIds (32 bound), and emits the payment_dispute_opened operational line (money-loss events are operator-mandatory). The processor holds the disputed funds while evidenceDueBy runs; won/lost land via charge.dispute.closed (an unanswered dispute closing lost rides the two-edge cascade needs_response→under_review→lost — the must-pass-under_review law); on lost the funds+fee reverse reports-only.

Example request

graphql
mutation ExampleAcceptDispute($id: ID!, $revision: ID!, $reason: String) {
  acceptDispute(id: $id, revision: $revision, reason: $reason) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    organizationId
    orderId
    disputeRef
    amountMinor
    currency
    reason
    evidenceDueBy
    stripeAccountRef
    evidenceText
  }
}

Variables:

json
{
  "id": "01900000-0000-7000-8000-c8f04d1b0000",
  "revision": "01900000-0000-7000-8000-b7960e180000",
  "reason": "Correcting a miscount."
}

Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.

Example response

json
{
  "data": {
    "acceptDispute": {
      "id": "01900000-0000-7000-8000-c8f04d1b0000",
      "sysId": "DP-EXMP-0000-000F",
      "type": "Dispute",
      "caption": "Blue jeans",
      "status": "accepted",
      "parentId": "01900000-0000-7000-8000-20f641110000",
      "rootId": "01900000-0000-7000-8000-a1295a650000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 1,
      "revision": "01900000-0000-7000-8000-53c6eea90000",
      "organizationId": "01900000-0000-7000-8000-1971e30a0000",
      "orderId": "01900000-0000-7000-8000-18e782370000",
      "disputeRef": "01900000-0000-7000-8000-fec151240000",
      "amountMinor": 1250,
      "currency": "USD",
      "reason": "Correcting a miscount.",
      "evidenceDueBy": "<evidence due by>",
      "stripeAccountRef": "<stripe account ref>",
      "evidenceText": "<evidence text>"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer

Used in