# Responses and HTTP codes

> Full example answers and what each HTTP status code means.

Valet developer docs — Reference. Web page: https://storeypos.com/valet/docs/responses. Full reference for AI: https://storeypos.com/llms-full.txt. OpenAPI: https://storeypos.com/openapi.json.

Full example answers use fake values. receiptData is null unless approved. Loads return their own balance and link answer, not receiptData. Validation, auth and state errors return a non-200 status with `{ "error": "..." }`.

| HTTP | Meaning |
| --- | --- |
| 200 | Completed request; check status: approved, declined, no_connection, error, pending or cancelled. Stored-value pay refusals have reason, no ticket and consume no referenceId. Balance lookup returns status/reason/message, including zero balance. |
| 400 | Invalid fields/state/totals, invalid paymentType, missing code/token, or saveCard: true on sale/session creation. Void may be refused after partial refund/settlement. |
| 401 | Missing or invalid Valet key/tag. |
| 403 | Required module off or reversals disabled. |
| 404 | Unknown ticket/session/code; balance and load unknown-code errors may add card_not_found. |
| 409 | Already started session, missing terminal/reference, or cancelled/store-credit card submitted for gift-card load. |
| 410 | Expired hosted token; removed GET/POST /payment-methods, DELETE /payment-methods/{pmId}, POST /charge (after key/tag validation). |
| 429 | Rate limited. |
| 500 / 502 | Server error / secure provider field or receipt service unavailable. |

Card sale:

```json
{
  "storeyTransactionId": "9f2c8e1a-4b3d-4000-8000-000000000001",
  "referenceId": "order-10482",
  "status": "approved",
  "authCode": "0F3C21",
  "rrn": "042619005831",
  "card": {
    "brand": "visa",
    "last4": "4242",
    "entryMode": "contactless"
  },
  "amounts": {
    "subtotal": 40,
    "taxAmount": 2.5,
    "tipAmount": 0,
    "shippingAmount": 0,
    "total": 42.5,
    "cardDifferenceFee": null,
    "amountRequested": 42.5,
    "amountCharged": 42.5,
    "cardFeePercent": null
  },
  "refundedAmount": 0,
  "voidedAt": null,
  "receipt": {
    "batchNo": "12",
    "tranNo": "VC07",
    "responseText": "SUCCESS",
    "surchargeAmount": "0.00",
    "cashDiscount": "0.00",
    "cardholderName": "JANE SAMPLE",
    "terminal": "2319993484"
  },
  "error": null,
  "declineCategory": null,
  "channel": "terminal",
  "capturedAt": "2026-09-16T18:22:04Z",
  "createdAt": "2026-09-16T18:21:58Z",
  "receiptData": {
    "valetReference": "order-10482",
    "storeyTransactionId": "9f2c8e1a-4b3d-4000-8000-000000000001",
    "valorTransactionId": "00000000000011463060",
    "approvalCode": "0F3C21",
    "rrn": "042619005831",
    "dateTime": "2026-09-16T18:22:04Z",
    "cardBrand": "visa",
    "last4": "4242",
    "amount": 42.5,
    "taxAmount": 2.5,
    "feeAmount": null,
    "entryMode": "contactless",
    "batchNumber": "12",
    "tranNumber": "VC07",
    "kind": "sale",
    "reversalId": null,
    "originalValorTransactionId": null,
    "valorRefundTransactionId": null,
    "originalAmounts": {
      "subtotal": 40,
      "taxAmount": 2.5,
      "tipAmount": 0,
      "shippingAmount": 0,
      "feeAmount": null,
      "total": 42.5
    },
    "refundedSoFar": 0,
    "remaining": 42.5,
    "paymentType": "card",
    "giftCardLast4": null,
    "balanceAfter": null,
    "cardDifferenceFee": null,
    "amountRequested": 42.5,
    "amountCharged": 42.5,
    "cardFeePercent": null,
    "cardFeeReturned": null
  },
  "replayed": false
}
```

Card sale with card difference fee — $100.00 at 3.5%:

```json
{
  "storeyTransactionId": "9f2c8e1a-4b3d-4000-8000-000000000001",
  "referenceId": "order-10490",
  "status": "approved",
  "authCode": "0F3C21",
  "rrn": "042619005831",
  "card": {
    "brand": "visa",
    "last4": "4242",
    "entryMode": "contactless"
  },
  "amounts": {
    "subtotal": 100,
    "taxAmount": 0,
    "tipAmount": 0,
    "shippingAmount": 0,
    "total": 100,
    "cardDifferenceFee": 3.5,
    "amountRequested": 100,
    "amountCharged": 103.5,
    "cardFeePercent": 3.5
  },
  "refundedAmount": 0,
  "voidedAt": null,
  "receipt": {
    "batchNo": "12",
    "tranNo": "VC07",
    "responseText": "SUCCESS",
    "surchargeAmount": "350",
    "cashDiscount": "0.00",
    "cardholderName": "JANE SAMPLE",
    "terminal": "2319993484"
  },
  "error": null,
  "declineCategory": null,
  "channel": "terminal",
  "capturedAt": "2026-09-16T18:22:04Z",
  "createdAt": "2026-09-16T18:21:58Z",
  "receiptData": {
    "valetReference": "order-10490",
    "storeyTransactionId": "9f2c8e1a-4b3d-4000-8000-000000000001",
    "valorTransactionId": "00000000000011463060",
    "approvalCode": "0F3C21",
    "rrn": "042619005831",
    "dateTime": "2026-09-16T18:22:04Z",
    "cardBrand": "visa",
    "last4": "4242",
    "amount": 100,
    "taxAmount": 0,
    "feeAmount": 3.5,
    "entryMode": "contactless",
    "batchNumber": "12",
    "tranNumber": "VC07",
    "kind": "sale",
    "reversalId": null,
    "originalValorTransactionId": null,
    "valorRefundTransactionId": null,
    "originalAmounts": {
      "subtotal": 100,
      "taxAmount": 0,
      "tipAmount": 0,
      "shippingAmount": 0,
      "feeAmount": 3.5,
      "total": 100
    },
    "refundedSoFar": 0,
    "remaining": 100,
    "paymentType": "card",
    "giftCardLast4": null,
    "balanceAfter": null,
    "cardDifferenceFee": 3.5,
    "amountRequested": 100,
    "amountCharged": 103.5,
    "cardFeePercent": 3.5,
    "cardFeeReturned": null
  },
  "replayed": false
}
```

Gift card sale — pay $4 from $10:

```json
{
  "storeyTransactionId": "9f2c8e1a-4b3d-4000-8000-000000000001",
  "referenceId": "ORDER-1002",
  "status": "approved",
  "authCode": null,
  "rrn": null,
  "card": {
    "brand": null,
    "last4": null,
    "entryMode": null
  },
  "amounts": {
    "subtotal": 4,
    "taxAmount": 0,
    "tipAmount": 0,
    "shippingAmount": 0,
    "total": 4,
    "cardDifferenceFee": null,
    "amountRequested": 4,
    "amountCharged": 4,
    "cardFeePercent": null
  },
  "refundedAmount": 0,
  "voidedAt": null,
  "receipt": {
    "giftCardLast4": "0005",
    "balanceAfter": 6
  },
  "error": null,
  "declineCategory": null,
  "channel": "terminal",
  "capturedAt": "2026-09-16T18:22:04Z",
  "createdAt": "2026-09-16T18:21:58Z",
  "receiptData": {
    "valetReference": "ORDER-1002",
    "storeyTransactionId": "9f2c8e1a-4b3d-4000-8000-000000000001",
    "valorTransactionId": null,
    "approvalCode": null,
    "rrn": null,
    "dateTime": "2026-09-16T18:22:04Z",
    "cardBrand": null,
    "last4": null,
    "amount": 4,
    "taxAmount": 0,
    "feeAmount": null,
    "entryMode": null,
    "batchNumber": null,
    "tranNumber": null,
    "kind": "sale",
    "reversalId": null,
    "originalValorTransactionId": null,
    "valorRefundTransactionId": null,
    "originalAmounts": {
      "subtotal": 4,
      "taxAmount": 0,
      "tipAmount": 0,
      "shippingAmount": 0,
      "feeAmount": null,
      "total": 4
    },
    "refundedSoFar": 0,
    "remaining": 4,
    "paymentType": "gift_card",
    "giftCardLast4": "0005",
    "balanceAfter": 6,
    "cardDifferenceFee": null,
    "amountRequested": 4,
    "amountCharged": 4,
    "cardFeePercent": null,
    "cardFeeReturned": null
  },
  "replayed": false,
  "paymentType": "gift_card",
  "giftCard": {
    "last4": "0005",
    "balanceAfter": 6
  }
}
```

Store credit sale — pay $4 from $10:

```json
{
  "storeyTransactionId": "9f2c8e1a-4b3d-4000-8000-000000000001",
  "referenceId": "ORDER-1002",
  "status": "approved",
  "authCode": null,
  "rrn": null,
  "card": {
    "brand": null,
    "last4": null,
    "entryMode": null
  },
  "amounts": {
    "subtotal": 4,
    "taxAmount": 0,
    "tipAmount": 0,
    "shippingAmount": 0,
    "total": 4,
    "cardDifferenceFee": null,
    "amountRequested": 4,
    "amountCharged": 4,
    "cardFeePercent": null
  },
  "refundedAmount": 0,
  "voidedAt": null,
  "receipt": {
    "giftCardLast4": "0005",
    "balanceAfter": 6
  },
  "error": null,
  "declineCategory": null,
  "channel": "terminal",
  "capturedAt": "2026-09-16T18:22:04Z",
  "createdAt": "2026-09-16T18:21:58Z",
  "receiptData": {
    "valetReference": "ORDER-1002",
    "storeyTransactionId": "9f2c8e1a-4b3d-4000-8000-000000000001",
    "valorTransactionId": null,
    "approvalCode": null,
    "rrn": null,
    "dateTime": "2026-09-16T18:22:04Z",
    "cardBrand": null,
    "last4": null,
    "amount": 4,
    "taxAmount": 0,
    "feeAmount": null,
    "entryMode": null,
    "batchNumber": null,
    "tranNumber": null,
    "kind": "sale",
    "reversalId": null,
    "originalValorTransactionId": null,
    "valorRefundTransactionId": null,
    "originalAmounts": {
      "subtotal": 4,
      "taxAmount": 0,
      "tipAmount": 0,
      "shippingAmount": 0,
      "feeAmount": null,
      "total": 4
    },
    "refundedSoFar": 0,
    "remaining": 4,
    "paymentType": "store_credit",
    "giftCardLast4": "0005",
    "balanceAfter": 6,
    "cardDifferenceFee": null,
    "amountRequested": 4,
    "amountCharged": 4,
    "cardFeePercent": null,
    "cardFeeReturned": null
  },
  "replayed": false,
  "paymentType": "store_credit",
  "giftCard": {
    "last4": "0005",
    "balanceAfter": 6
  }
}
```

Partial refund — $10 of $42.50:

```json
{
  "storeyTransactionId": "9f2c8e1a-4b3d-4000-8000-000000000001",
  "referenceId": "order-10482",
  "reversalId": "rvs_5d71b09c2e44",
  "kind": "refund",
  "amount": 10,
  "status": "approved",
  "authCode": "1A7D04",
  "rrn": "042619005831",
  "error": null,
  "declineCategory": null,
  "channel": "terminal",
  "refundedTotal": 10,
  "remaining": 32.5,
  "createdAt": "2026-09-17T09:14:31Z",
  "cardFeeReturned": null,
  "receiptData": {
    "valetReference": "order-10482",
    "storeyTransactionId": "9f2c8e1a-4b3d-4000-8000-000000000001",
    "reversalId": "rvs_5d71b09c2e44",
    "valorRefundTransactionId": "00000000000011463101",
    "originalValorTransactionId": "00000000000011463060",
    "approvalCode": "1A7D04",
    "rrn": "042619005831",
    "dateTime": "2026-09-17T09:14:31Z",
    "cardBrand": "visa",
    "last4": "4242",
    "amount": 10,
    "entryMode": "contactless",
    "kind": "refund",
    "valorTransactionId": "00000000000011463101",
    "taxAmount": null,
    "feeAmount": null,
    "batchNumber": "12",
    "tranNumber": "VC09",
    "originalAmounts": {
      "subtotal": 40,
      "taxAmount": 2.5,
      "tipAmount": 0,
      "shippingAmount": 0,
      "feeAmount": null,
      "total": 42.5
    },
    "refundedSoFar": 10,
    "remaining": 32.5,
    "paymentType": "card",
    "giftCardLast4": null,
    "balanceAfter": null,
    "cardDifferenceFee": null,
    "amountRequested": 42.5,
    "amountCharged": 42.5,
    "cardFeePercent": null,
    "cardFeeReturned": null
  }
}
```

Void:

```json
{
  "storeyTransactionId": "9f2c8e1a-4b3d-4000-8000-000000000001",
  "referenceId": "order-10482",
  "reversalId": "rvs_8c20e5f71a93",
  "kind": "void",
  "amount": 42.5,
  "status": "approved",
  "authCode": null,
  "rrn": "042619005831",
  "error": null,
  "declineCategory": null,
  "channel": "terminal",
  "refundedTotal": 0,
  "remaining": 42.5,
  "createdAt": "2026-09-16T18:26:12Z",
  "cardFeeReturned": null,
  "receiptData": {
    "valetReference": "order-10482",
    "storeyTransactionId": "9f2c8e1a-4b3d-4000-8000-000000000001",
    "reversalId": "rvs_8c20e5f71a93",
    "valorRefundTransactionId": "00000000000011463077",
    "originalValorTransactionId": "00000000000011463060",
    "approvalCode": null,
    "rrn": "042619005831",
    "dateTime": "2026-09-16T18:26:12Z",
    "cardBrand": "visa",
    "last4": "4242",
    "amount": 42.5,
    "entryMode": "contactless",
    "kind": "void",
    "valorTransactionId": "00000000000011463077",
    "taxAmount": 2.5,
    "feeAmount": null,
    "batchNumber": "12",
    "tranNumber": "VC08",
    "originalAmounts": {
      "subtotal": 40,
      "taxAmount": 2.5,
      "tipAmount": 0,
      "shippingAmount": 0,
      "feeAmount": null,
      "total": 42.5
    },
    "refundedSoFar": 42.5,
    "remaining": 0,
    "paymentType": "card",
    "giftCardLast4": null,
    "balanceAfter": null,
    "cardDifferenceFee": null,
    "amountRequested": 42.5,
    "amountCharged": 42.5,
    "cardFeePercent": null,
    "cardFeeReturned": null
  }
}
```

Gift card load:

```json
{
  "loadId": "4b1f0c2e-0000-4000-8000-000000000001",
  "referenceId": "GC-LOAD-1001",
  "code": "7000000000000005",
  "codeLast4": "0005",
  "amount": 10,
  "balance": 10,
  "createdCard": true,
  "expiresAt": null,
  "link": "https://storeypos.com/gift/00000000-0000-4000-8000-000000000000/7000000000000005",
  "createdAt": "2026-12-01T18:00:00.000Z",
  "replayed": false
}
```

---

Previous: [Receipt fields](https://storeypos.com/valet/docs/receipt-fields.md)
Next: [Decline categories](https://storeypos.com/valet/docs/decline-categories.md)
