MekanteMekante Developers
Getting started
Till API
Webhooks
llms.txt
  • Türkçe
  • English
Getting started
Till API
Webhooks
llms.txt
  • Türkçe
  • English
  • Getting started

    • Mekante Developers
    • Getting started
    • Authentication
  • Till API

    • Till flow
    • Endpoints
    • Errors
    • Limits
  • Webhooks

    • Webhooks
    • Signature verification

Errors

Failed requests return a 4xx or 5xx HTTP status code and a JSON error envelope.

{
  "error": "Conflict",
  "code": "POINTS_ALREADY_SPENT",
  "message": "These points were already spent."
}
FieldDescription
errorHTTP status name (Bad Request, Conflict, …)
codeStable, machine-readable error code. Branch your application logic on code.
messageHuman-readable English explanation. Wording may change over time; do not parse it

Validation errors do not include code

Requests with an invalid body, query, or header return 400 without a code field. message identifies which field failed validation:

{ "error": "Bad Request", "message": "idempotency-key: Idempotency-Key header is required" }

HTTP status codes

StatusMeaning
200 / 201Success. 201 is a newly created entry; 200 is an idempotent replay (replayed: true)
400Bad request: missing field, invalid QR token
401Missing or invalid API key
402Business subscription (expired trial or suspended) blocks till transactions
403Forbidden: another cashier's entry, or the 15-minute void window has passed
404Resource not found
409Conflict: already-used QR, insufficient balance, duplicate receipt or request
413Request body exceeds 1 MB (PAYLOAD_TOO_LARGE)
422Amount or stamp count violates business rules
429Rate limit exceeded or daily earn/redeem cap reached
5xxServer error on our side. Retry safely with the same Idempotency-Key

Error codes returned by Till endpoints

Authentication & QR

CodeStatusMeaning
UNAUTHORIZED401API key is missing, malformed, or revoked
QR_INVALID400QR token is invalid or belongs to another business
QR_EXPIRED40030-second QR token has expired; customer must refresh
QR_ALREADY_USED409This QR token was already scanned
SCAN_NOT_FOUND404scanId was not found; scan the QR again
SCAN_INVALID409Scan was already consumed or its 5-minute window expired
MEMBERSHIP_NOT_FOUND404Member not found
MEMBERSHIP_BLOCKED403Membership is blocked

Earning points & stamps

CodeStatusMeaning
INVALID_AMOUNT400Purchase amount must be greater than zero
INVALID_STAMPS400Stamp count must be at least 1 (or 0 in a hybrid program)
TOO_MANY_STAMPS422Stamp count exceeds the per-visit maximum
NOTHING_TO_EARN400Neither stamps nor purchase amount was provided in a hybrid program
AMOUNT_TOO_HIGH422Purchase amount exceeds the business's per-transaction ceiling
DAILY_EARN_LIMIT429Member has reached their daily earn limit
CASHIER_DAILY_LIMIT429This API key/cashier has reached its daily earn limit
DUPLICATE_RECEIPT409This receiptNo has already been recorded
DUPLICATE_REQUEST409This Idempotency-Key was already used for a different request
NO_PROGRAM409Business has not configured a loyalty program yet

Redeeming rewards

CodeStatusMeaning
REWARD_REQUIRED400No reward selected (rewardId is required for standard QR scans)
REWARD_MISMATCH400rewardId does not match the reward encoded in the customer's QR
CASHIER_DAILY_LIMIT429This cashier or API key has reached its daily redemption limit
INSUFFICIENT_BALANCE409Member does not have enough points or stamps
REWARD_NOT_FOUND404Reward not found
REWARD_INACTIVE409Reward is currently inactive
REWARD_OUT_OF_STOCK409Reward is out of stock
REWARD_EXPIRED409Reward validity period has ended
REWARD_NOT_STARTED409Reward validity period has not started yet
REWARD_LIMIT_REACHED409Member has reached the per-member redemption limit for this reward

Voiding entries

CodeStatusMeaning
ENTRY_NOT_FOUND404Ledger entry not found
NOT_VOIDABLE409Only earn and redeem entries can be voided
ALREADY_VOIDED409Entry has already been voided
POINTS_ALREADY_SPENT409Points earned in this entry have already been spent
FORBIDDEN403An API key can only void its own entries
VOID_WINDOW_PASSED40315-minute void window has elapsed; a manager must void it

Subscription & rate limits

CodeStatusMeaning
TRIAL_EXPIRED402Business's free trial has expired
SUBSCRIPTION_SUSPENDED402Business's subscription is suspended
LOCATION_REQUIRED400No location specified (does not happen for single-branch keys)
LOCATION_FORBIDDEN403Key is not permitted to operate at this location
LOCATION_NOT_FOUND404Location was not found or has been archived
RATE_LIMITED429Rate limit exceeded
PAYLOAD_TOO_LARGE413Request body exceeds 1 MB

For 402 errors, the business owner must renew their subscription or contact Mekante support; no action can resolve it from the POS side.

Prev
Endpoints
Next
Limits