Take a payment
Sale: gift card or store credit
Pay with a gift card or store credit through the same sale call, with paymentType and giftCardCode.
Endpoint
POST /api/public/valet/saleAdd paymentType ("gift_card" or "store_credit") and giftCardCode to a normal sale. Leave paymentType out and the sale is a card sale. The balance is checked and taken off in one step, so it can never be spent twice; not enough balance comes back as status "declined". The answer has the same receiptData as a card sale, with no card brand or last four, plus giftCardLast4 and balanceAfter. Refunds and voids use the same calls as cards and put the money back on the same gift card or store credit.
Gift card and store credit sales work without a terminal and never carry a card difference fee.
Request — cURL
curl -X POST https://storeypos.com/api/public/valet/sale \
-H "X-Valet-Key: vk_live_XXXXXXXXXXXXXXXXXXXXXXXX" \
-H "X-Valet-Tag: vt_XXXXXXXXXXXXXXXXXXXX" \
-H "Content-Type: application/json" \
-d '{"referenceId":"ORDER-1002","subtotal":4,"total":4,"paymentType":"gift_card","giftCardCode":"7000000000000005"}'Gift card sale answer
{
"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 answer
{
"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
}
}Codes must match exactly — never a near match. When a code can't pay, see Codes and refusals.
