AlmondTill/G3N API

On this page

orderTenders

query · in the family Reading your records

What it does

The payments applied to one order — the tender-by-tender money story.

The Tender ledger of ONE Order, NEWEST-FIRST + bounded: 'limit' clamps server-side; 'before' = the prior page's oldest tender id (exclusive). With the order GET (tenderedNetMinor/tipTotalMinor/paymentState) this IS the settlement story — sale tenders + refund tenders, Return-ref'd. Requires authentication; the order is tenant-scoped server-side.

What happens

Reads only.

Who may call it

Capability area: Reading your records — Looking up and listing the records of your organization.

Arguments

NameTypeRequiredNotes
orderIdID ID!yesNo further notes.
limitIntnoHow many records to answer at most; a page may hold fewer.
beforeIDnoNo further notes.

Returns

Tender [Tender!]! — ONE applied tender: FSM-LESS by ratified intent (SPEC_CATALOG / — status is always active; the lifecycle is its Payment / the money facts); sysId-LESS (the class); IMMUTABLE — reversal = a NEW refund tender row (negative appliedMinor), never an edit. Posted ONLY by applyTender, refundTender, and the refund writers (refundReturn/posReturn method=cash) — each in ONE transaction with the Order rollup stamp (+ the drawer entries for cash).

Example request

query ExampleOrderTenders($orderId: ID!, $limit: Int) {
  orderTenders(orderId: $orderId, limit: $limit) {
    id
    type
    caption
    status
    parentId
    rootId
    tenderType
    appliedMinor
    currency
    collectedMinor
    changeMinor
    tipMinor
    roundingDeltaMinor
    paymentId
    instrumentId
    orgCustomerId
    returnId
    tillSessionId
    reason
    refs
    createdAt
    updatedAt
    revision
    revisionNum
  }
}

Variables:

{
  "orderId": "01900000-0000-7000-8000-f6d8263a0000",
  "limit": 1
}

Example response

{
  "data": {
    "orderTenders": [
      {
        "id": "01900000-0000-7000-8000-37386ae00000",
        "type": "<type>",
        "caption": "Blue jeans",
        "status": "<status>",
        "parentId": "01900000-0000-7000-8000-065235280000",
        "rootId": "01900000-0000-7000-8000-a093dd800000",
        "tenderType": "cash",
        "appliedMinor": 1,
        "currency": "USD",
        "collectedMinor": 1,
        "changeMinor": 1,
        "tipMinor": 1,
        "roundingDeltaMinor": 1,
        "paymentId": "01900000-0000-7000-8000-a7c488a40000",
        "instrumentId": "01900000-0000-7000-8000-736f3dcd0000",
        "orgCustomerId": "01900000-0000-7000-8000-ba56ff800000",
        "returnId": "01900000-0000-7000-8000-4d4c03d20000",
        "tillSessionId": "01900000-0000-7000-8000-83d61fef0000",
        "reason": "Correcting a miscount.",
        "refs": [
          "<refs>"
        ],
        "createdAt": "2027-01-31T00:00:00.000Z",
        "updatedAt": "2027-01-31T00:00:00.000Z",
        "revision": "01900000-0000-7000-8000-b7960e180000",
        "revisionNum": 1
      }
    ]
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer