Take a payment
Choose the transaction kind
Every Valet call, what it does and what to send, plus which call to use when.
Every Valet call, what it does and what to send. Base URL https://storeypos.com.
| Kind | Call | Send |
|---|---|---|
| Card sale | POST /api/public/valet/sale | Minimum: referenceId and subtotal. taxAmount, tipAmount, shippingAmount default to 0; total is optional (if sent it must equal the sum). paymentType omitted or "card". Terminal only; key entry uses a session. |
| Gift card sale | POST /api/public/valet/sale | Same amounts + paymentType: "gift_card", giftCardCode: the exact code. |
| Store credit sale | POST /api/public/valet/sale | Same amounts + paymentType: "store_credit", giftCardCode: the store credit code (not a field named code). |
| Refund (all three payment types) | POST /api/public/valet/sale/{storeyTransactionId}/refund | Sale ticket in path; optional amount for partial refund, memo. No paymentType/code: returns to the original payment. |
| Void (all three payment types) | POST /api/public/valet/sale/{storeyTransactionId}/void | Sale ticket in path; no body. Returns to the original payment. |
| Status lookup | GET /api/public/valet/sale/{storeyTransactionId} | Sale ticket in path; no body. Same sale answer. |
| Cancel before sending | POST /api/public/valet/cancel | referenceId. Cancels only before sending to the terminal; returns sale answer plus cancelled boolean, never an in-flight processor cancel. |
| Gift card load | POST /api/public/valet/giftcards/load | referenceId, amount; optional code to add to an existing card, omitted to create one. Always add once, never load store credit. |
| Gift card / store credit balance | GET /api/public/valet/giftcards/{code}/balance | Exact code in path; no body. |
| Hosted sale (card, gift_card, store_credit) | POST /api/public/valet/session → POST /api/public/valet/session/{token} | Create: kind: "sale" (default), referenceId, subtotal; optional total/taxAmount/tipAmount/shippingAmount. Run: paymentType omitted/card; or gift_card/store_credit + giftCardCode. Key-entry card: cardToken from secure provider field, optional address1/zip. Creation does not set paymentType. |
| Hosted refund (card, gift_card, store_credit) | POST /api/public/valet/session → POST /api/public/valet/session/{token} | Create: kind: "refund", storeyTransactionId (UUID), optional amount. Run: no body. Original sale determines payment type, never a new choice. |
| Hosted void (card, gift_card, store_credit) | POST /api/public/valet/session → POST /api/public/valet/session/{token} | Create: kind: "void", storeyTransactionId (UUID). Run: no body. Original sale determines payment type. |
| Hosted status | GET /api/public/valet/session/{token} | Token in path; returns session view, paymentOptions, cardFee (card difference fee for card payments, or null), sale and reversal summaries (not the full run response). |
| Hosted secure card field | GET /api/public/valet/session/{token}/card | Token in path; key-entry station only. Provider field initialization, not a saved card. |
| Hosted processor receipt copy | POST /api/public/valet/session/{token}/receipt | phone (10 digits) and/or email. Approved processor card sale with gateway reference only; not digital gift-card delivery. |
Which call do I use?
- Customer taps a card on a terminal: Sale: card.
- Customer pays with a gift card or store credit code: Sale: gift card or store credit.
- Card typed in (no terminal), or you want Storey's screen to handle the choice: Hosted payment window.
- You want a ready-made pop-up in your web app: Widget.
- Money back after the sale: Refund. Same day, before settlement: Void.
- Sell or top up a gift card: Load a gift card.
Creates a 20-minute token and payUrl. Send kind: sale (default) with referenceId, subtotal and total; or kind: refund / void with storeyTransactionId (the sale UUID), plus optional amount for a partial refund. Choose paymentType and giftCardCode when running a sale at POST /session/{token}, not when creating it. Refunds and voids inherit the original sale payment type; do not send a new paymentType or code. All three kinds work for card, gift_card and store_credit. Module-on choices appear automatically for sales; card stays the default.
