# Load a gift card

> Create a digital gift card or add value to one, once per referenceId.

Valet developer docs — Stored value. Web page: https://storeypos.com/valet/docs/gift-card-load. Full reference for AI: https://storeypos.com/llms-full.txt. OpenAPI: https://storeypos.com/openapi.json.

Endpoint:

```
POST /api/public/valet/giftcards/load
```

Loading always adds, and only once: repeat the same `referenceId` and you get the first answer back with `replayed: true` — never a second load. Leave out `code` to create a new digital gift card. The `link` opens the digital card with a QR and Code 128 barcode encoding the plain code; its token is the gift card code, never a payment card token. Store credit can be spent here but not loaded.

Request — cURL:

```bash
curl -X POST https://storeypos.com/api/public/valet/giftcards/load \
  -H "X-Valet-Key: vk_live_XXXXXXXXXXXXXXXXXXXXXXXX" \
  -H "X-Valet-Tag: vt_XXXXXXXXXXXXXXXXXXXX" \
  -H "Content-Type: application/json" \
  -d '{"referenceId":"GC-LOAD-1001","amount":10}'
```

Response:

```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
}
```

- `referenceId` (string, 1–64, required): idempotency key.
- `amount` (number > 0, whole cents, max 10000, required).
- `code` (string, optional): existing gift card to add to; omit to create a new digital card.

---

Previous: [Void](https://storeypos.com/valet/docs/void.md)
Next: [Check a balance](https://storeypos.com/valet/docs/gift-card-balance.md)
