AlmondTill/G3N API

On this page

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. Carries authority:manage_dispute. Requires the unrestricted capability + the record's CURRENT revision.

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.

Who may call it

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

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.
reasonStringnoNo further notes.

Returns

Dispute Dispute! — A Dispute — the Stripe chargeback lifecycle mirrored (SPEC_CATALOG 147; the / fraud-signal seed). 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. The TWO caller lanes carry authority:manage_dispute: submitEvidenceDispute (the evidence bespoke) and acceptDispute (concede via the processor close).

Example request

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:

{
  "id": "01900000-0000-7000-8000-37386ae00000",
  "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

{
  "data": {
    "acceptDispute": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "sysId": "DP-EXMP-0000-000F",
      "type": "Dispute",
      "caption": "Blue jeans",
      "status": "needs_response",
      "parentId": "01900000-0000-7000-8000-065235280000",
      "rootId": "01900000-0000-7000-8000-a093dd800000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 1,
      "revision": "01900000-0000-7000-8000-b7960e180000",
      "organizationId": "01900000-0000-7000-8000-44b781470000",
      "orderId": "01900000-0000-7000-8000-f6d8263a0000",
      "disputeRef": "01900000-0000-7000-8000-fec151240000",
      "amountMinor": 1,
      "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