# Quickstart

> Your first Valet sale in two steps: get credentials, then send referenceId and subtotal.

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

## Step 1: get your credentials

Storey creates your Valet account and gives you a Valet Key for each location and a Valet Tag for each station. Put them in server-side environment variables, for example `VALET_KEY` and `VALET_TAG`.

## Step 2: send a sale

The only fields a sale needs are your own order reference (`referenceId`) and the `subtotal`. `taxAmount`, `tipAmount` and `shippingAmount` count as 0 when left out, and `total` is worked out for you. The customer taps their card on the terminal behind your Valet Tag.

Request — cURL:

```bash
curl -X POST https://storeypos.com/api/public/valet/sale \
  -H "X-Valet-Key: $VALET_KEY" \
  -H "X-Valet-Tag: $VALET_TAG" \
  -H "Content-Type: application/json" \
  -d '{"referenceId":"order-10490","subtotal":100}'
```

### Standard account (no card difference fee)

Answer — $100.00 charged:

```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": null,
    "amountRequested": 100,
    "amountCharged": 100,
    "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-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": null,
    "entryMode": "contactless",
    "batchNumber": "12",
    "tranNumber": "VC07",
    "kind": "sale",
    "reversalId": null,
    "originalValorTransactionId": null,
    "valorRefundTransactionId": null,
    "originalAmounts": {
      "subtotal": 100,
      "taxAmount": 0,
      "tipAmount": 0,
      "shippingAmount": 0,
      "feeAmount": null,
      "total": 100
    },
    "refundedSoFar": 0,
    "remaining": 100,
    "paymentType": "card",
    "giftCardLast4": null,
    "balanceAfter": null,
    "cardDifferenceFee": null,
    "amountRequested": 100,
    "amountCharged": 100,
    "cardFeePercent": null,
    "cardFeeReturned": null
  },
  "replayed": false,
  "warnings": []
}
```

### Cash discounting account (card difference fee added)

Answer — $100.00 + $3.50 fee = $103.50 charged:

```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,
  "warnings": []
}
```

> You never send the percent: Valet uses the percent set on the location's account, and a `cashDiscountPercent` in the request is accepted and ignored. Gift cards and store credit never carry the fee. On the hosted payment window the customer sees the card price before paying. The rule in full: [Card difference fee](https://storeypos.com/valet/docs/card-difference-fee).

Keep `storeyTransactionId` from the answer: it is the Valet Ticket you use to [refund](https://storeypos.com/valet/docs/refund) or [void](https://storeypos.com/valet/docs/void). Show the `receiptData` fields on your receipt ([Receipt fields](https://storeypos.com/valet/docs/receipt-fields)).

---

Previous: [Authentication](https://storeypos.com/valet/docs/authentication.md)
Next: [Build with AI](https://storeypos.com/valet/docs/build-with-ai.md)
