Point of sale — Passtastic API
☰
Passtastic
Explore
Product
Pricing
Use Cases
Customer Stories
Help
No account yet? Sign up free

Point of sale

Award points or stamps at the till and show the balance on the receipt.

Earn points from a sale

Pass the raw sale — Passtastic applies the card's configured accrual rate. Use from: "spend" for a currency amount, or from: "items" when your POS tracks earn-eligible items by key (e.g. one stamp per coffee, regardless of price). Omit from and pass a flat amount to add a specific number of points or stamps directly.

bash
# Item-based (e.g. "one stamp per coffee")
curl -X POST https://api.passtastic.io/api/v1/customers/crm_10293/earn \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "stamps",
    "from": "items",
    "items": [{ "key": "coffee", "quantity": 1 }]
  }'

Or the spend-based form, for a card that earns points per currency unit spent:

bash
curl -X POST https://api.passtastic.io/api/v1/customers/crm_10293/earn \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: sale-98213-earn" \
  -d '{
    "type": "points",
    "from": "spend",
    "spend": { "amount": 24.50, "currency": "EUR" },
    "note": "Order #4821"
  }'

Send an Idempotency-Key — a POS register can retry the same sale on a network blip, and the key stops it from being awarded twice.

Read a customer's balance

bash
curl https://api.passtastic.io/api/v1/customers/crm_10293 \
  -H "X-Api-Key: YOUR_API_KEY"
json
{
  "externalCustomerId": "crm_10293",
  "passUserId": "66a1e2f3c9d4b5a6f7081920",
  "cardId": "64f1c2a9b8e4a2d1c0a1b2c3",
  "cardType": "point_card",
  "balance": { "points": 245 },
  "installed": true,
  "installUrl": "https://passtastic.io/get-pass/64f1c2a9b8e4a2d1c0a1b2c3"
}

balance shape depends on the card: { stamps } for stamp cards, { points } for point cards, { points, level } for level cards. Print it on the receipt so the customer sees the result of the sale they just made.

Units. Every balance is a whole number — 245 points, 6 stamps — with one exception: store credit (a card that tracks the merchant's own currency or a custom unit, e.g. "credits") can carry up to 2 decimals, e.g. { "points": 25.5 }. initialPoints on enroll and balanceCorrection/setPoints on adjust follow the same rule.