# Take a card payment on the reader

Send the order’s remaining amount to the paired card reader, capture an authorized payment when the money should move, and void a payment that should not have happened — the paper trail stays.

Payments & fulfillment · a play in 3 steps.

## The steps

1. Take the card-present payment on the reader paired to this till. — [processReaderPayment](/reference/selling/processReaderPayment/)
2. Capture an authorized payment — the money moves for real. — [capturePayment](/reference/payment/capturePayment/)
3. Void a payment that should not have happened — permanent, audited. — [voidPayment](/reference/payment/voidPayment/)

## The calls

Every operation this use case runs, in the order it first appears, with the request and the response its reference page shows.

### processReaderPayment

[processReaderPayment](/reference/selling/processReaderPayment/) — mutation · Take a card-present payment on the card reader paired to this till.

**Example request**

```graphql
mutation ExampleProcessReaderPayment($input: ProcessReaderPaymentInput!) {
  processReaderPayment(input: $input) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    organizationId
    amountMinor
    tipMinor
    currency
    methodRef
    tenderId
    stripeAccountRef
    sagaId
    intentRef
    chargeRef
    brand
    last4
    declineReason
  }
}
```

Variables:

```json
{
  "input": {
    "orderId": "01900000-0000-7000-8000-f6d8263a0000",
    "expectedRevision": "01900000-0000-7000-8000-e02b2e6c0000",
    "amountMinor": 1,
    "tipMinor": 1
  }
}
```

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

**Example response**

```json
{
  "data": {
    "processReaderPayment": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "sysId": "PY-EXMP-0000-000F",
      "type": "Payment",
      "caption": "Blue jeans",
      "status": "created",
      "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",
      "amountMinor": 1,
      "tipMinor": 1,
      "currency": "USD",
      "methodRef": "<method ref>",
      "tenderId": "01900000-0000-7000-8000-0ae1978a0000",
      "stripeAccountRef": "<stripe account ref>",
      "sagaId": "01900000-0000-7000-8000-8b3fa5540000",
      "intentRef": "01900000-0000-7000-8000-0cb528b40000",
      "chargeRef": "01900000-0000-7000-8000-ae314a160000",
      "brand": "<brand>",
      "last4": "<last4>",
      "declineReason": "<decline reason>"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```

### capturePayment

[capturePayment](/reference/payment/capturePayment/) — mutation · Capture an authorized card payment — actually take the reserved money.

**Example request**

```graphql
mutation ExampleCapturePayment($id: ID!, $revision: ID!, $reason: String) {
  capturePayment(id: $id, revision: $revision, reason: $reason) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    organizationId
    amountMinor
    tipMinor
    currency
    methodRef
    tenderId
    stripeAccountRef
    sagaId
    intentRef
    chargeRef
    brand
    last4
    declineReason
  }
}
```

Variables:

```json
{
  "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**

```json
{
  "data": {
    "capturePayment": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "sysId": "PY-EXMP-0000-000F",
      "type": "Payment",
      "caption": "Blue jeans",
      "status": "created",
      "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",
      "amountMinor": 1,
      "tipMinor": 1,
      "currency": "USD",
      "methodRef": "<method ref>",
      "tenderId": "01900000-0000-7000-8000-0ae1978a0000",
      "stripeAccountRef": "<stripe account ref>",
      "sagaId": "01900000-0000-7000-8000-8b3fa5540000",
      "intentRef": "01900000-0000-7000-8000-0cb528b40000",
      "chargeRef": "01900000-0000-7000-8000-ae314a160000",
      "brand": "<brand>",
      "last4": "<last4>",
      "declineReason": "<decline reason>"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```

### voidPayment

[voidPayment](/reference/payment/voidPayment/) — mutation · Void a payment on an order — cancel it as if it should not have happened, keeping the paper trail.

**Example request**

```graphql
mutation ExampleVoidPayment($id: ID!, $revision: ID!, $reason: String) {
  voidPayment(id: $id, revision: $revision, reason: $reason) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    organizationId
    amountMinor
    tipMinor
    currency
    methodRef
    tenderId
    stripeAccountRef
    sagaId
    intentRef
    chargeRef
    brand
    last4
    declineReason
  }
}
```

Variables:

```json
{
  "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**

```json
{
  "data": {
    "voidPayment": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "sysId": "PY-EXMP-0000-000F",
      "type": "Payment",
      "caption": "Blue jeans",
      "status": "created",
      "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",
      "amountMinor": 1,
      "tipMinor": 1,
      "currency": "USD",
      "methodRef": "<method ref>",
      "tenderId": "01900000-0000-7000-8000-0ae1978a0000",
      "stripeAccountRef": "<stripe account ref>",
      "sagaId": "01900000-0000-7000-8000-8b3fa5540000",
      "intentRef": "01900000-0000-7000-8000-0cb528b40000",
      "chargeRef": "01900000-0000-7000-8000-ae314a160000",
      "brand": "<brand>",
      "last4": "<last4>",
      "declineReason": "<decline reason>"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```
