All documentation

Transactions

A purchase is recorded on the card a scan opened (see Customers). Likom Business applies the business's rules: points per amount spent, stamps, cashback, bonuses and tiers. The customer sees the result in Likom at once.

Preview what a bill earns

POST /transactions/preview

Scope transactions:write. Nothing is written. Use it to show the cashier or the customer what they'll earn before payment.

FieldType
ticketstring, requiredFrom the scan
amountmoney, requiredThe full bill, 0 to 1,000,000
json
{
              "points": "24",
              "punches": 0,
              "cashback": "0",
              "lines": ["1 point per $1 spent: 24 points"],
              "skipped": ["Double points on Mondays: not today"],
              "version": 3
            }

lines explain what applies and skipped what doesn't, in words you can show. version is the program version the rules came from.

Record a purchase

POST /transactions

Scope transactions:write. Needs an Idempotency-Key header.

FieldType
ticketstring, requiredFrom the scan. One purchase per ticket.
amountmoney, requiredThe full bill the customer paid, VAT included, 0 to 1,000,000. Above 0 unless needs_amount is false.
receipt_refstring, requiredYour receipt or order number, 1 to 60 characters. Can't earn twice in the business.
bash
curl https://api.likom.co/v1/partner/transactions \
              -H "Authorization: Bearer $LIKOM_API_KEY" \
              -H "Content-Type: application/json" \
              -H "Idempotency-Key: order-10482" \
              -d '{"ticket": "t_9Gq2…", "amount": "24.50", "receipt_ref": "OR-10482"}'
json
{
              "transaction_id": "0193d4e5-6f70-7182-9a3b-4c5d6e7f8091",
              "transaction_at": "2026-11-16T02:14:05.381Z",
              "redemption_id": null,
              "activated": false,
              "became_member": false,
              "earned": {"points": "24", "punches": 0, "cashback": "0", "lines": ["1 point per $1 spent: 24 points"], "skipped": [], "version": 3},
              "message": "Recorded. Maya earned 24 points.",
              "card": {"ticket": "t_9Gq2…", "card": {"points": "144", "…": "…"}, "…": "…"},
              "replayed": false
            }
Field
transaction_id, transaction_atKeep both: the id is for undo and reconciliation
earnedWhat this purchase earned
activatedThis purchase made a new card live (cards start at the first purchase)
became_memberThe customer reached a membership through this purchase
messageA confirmation to show the cashier
cardThe card after the purchase (balances, rewards now available)
replayedtrue: this Idempotency-Key was used before; this is that first result, and card is null

Limits on a purchase

  • Largest bill: the key's own, or the business's Counter limit. Over it: 403 over_key_limit with limit.
  • Daily total: when the key has one, the purchases it recorded today plus this one must stay within it (403 over_daily_cap). The day runs midnight to midnight, UTC+8.
  • One per scan: 409 already_recorded. One per receipt: 409 receipt_used.
  • The program must be running (409 program_not_running) and the card not paused (409 card_paused). A full stamp card needs its reward handed over first (409 card_full).

Undo a purchase

POST /transactions/{transaction_id}/undo

Scope transactions:write. Takes back what the purchase earned and marks it refunded.

FieldType
reasonstringOptional, up to 300 characters. Shown in Likom Business's audit log.
json
{"transaction_id": "0193d4e5-6f70-7182-9a3b-4c5d6e7f8091", "message": "Undone. 24 points taken back."}

Who can undo what:

  • A key can undo its own purchases within 10 minutes.
  • A key with transactions:refund can undo any purchase up to 30 days old, including staff's.
  • If what the purchase earned was already spent (on a reward, for example), it can't be undone here: 409 already_spent. Staff can sort it out in Likom Business.

For a refund at your till after 10 minutes, either give that till transactions:refund, or ask a manager to undo it in Likom Business.

List transactions

GET /transactions

Scope transactions:read. Every transaction of the business from every source (Counter, API, Likom), oldest first, to match against your own sales. No customer details.

Query
sincetime with zoneDefault: 24 hours ago. Included.
untiltime with zoneDefault: now. Not included. At most 31 days after since.
branch_idUUIDOne branch. A branch key always gets its own branch.
limit1–200Default 100
cursorstringnext_cursor from the last page
bash
curl -G https://api.likom.co/v1/partner/transactions \
              -H "Authorization: Bearer $LIKOM_API_KEY" \
              --data-urlencode "since=2026-11-15T00:00:00+08:00" \
              --data-urlencode "until=2026-11-16T00:00:00+08:00"
json
{
              "items": [
                {
                  "id": "0193d4e5-6f70-7182-9a3b-4c5d6e7f8091",
                  "created_at": "2026-11-15T02:14:05.381Z",
                  "kind": "purchase",
                  "status": "completed",
                  "source": "api",
                  "amount": "24.50",
                  "refunded_amount": "0.00",
                  "currency": "USD",
                  "receipt_ref": "OR-10482",
                  "branch_id": "0193a1c2-8f01-7b22-8c3d-1a2b3c4d5e6f",
                  "card_id": "0193b7e0-4a5b-7c6d-9e8f-0a1b2c3d4e5f",
                  "refund_of_id": null,
                  "api_key": "sk_live_Q7f2kLm9"
                }
              ],
              "next_cursor": null
            }
FieldValues
kindpurchase, membership_fee, refund, adjustment, expiry, cashback_use
statuscompleted, partially_refunded, refunded, cancelled
sourcecounter, api, likom_app, system, import
refund_of_idOn a refund row: the purchase it undid
api_keyThe prefix of the key that recorded it, or null

An undone purchase shows status: "refunded", and the undo appears as its own refund row pointing to it.

Still need help? Troubleshooting · [email protected]