Developers

API reference

Connect your point of sale, CRM or website to your Q Wallet loyalty cards.

14 endpointsJSON over HTTPSBearer key

Overview#

Base URL: https://app.qwallet.me

The Qwallet API lets your own systems, such as a point of sale, a CRM or your website, work with the loyalty cards of your business without anyone signing in to the dashboard.

With an API key you can read cards and their history, add stamps and points, redeem rewards, record check-ins, issue new cards, send a notification to your card holders, and read your locations and card templates. Fourteen endpoints in total, listed below. Everything else, including managing keys, staff and billing and creating or editing templates, stays in the dashboard.

Requests and responses are JSON. Send Content-Type: application/json on every POST. Timestamps are ISO 8601 in UTC. A body that is not valid JSON is refused with 400 before anything else is checked, and a body over 10 MB with 413. Send objects as objects: on the notify endpoint, message must be an object, not null.

A first request, once you have a key:

Request
curl https://app.qwallet.me/api/passes/summary \
  -H "Authorization: Bearer qwk_YOUR_KEY"

It returns your card totals, for example { "totalCards": 120, "activeUsers": 115, "totalStamps": 431 }. The key needs the Read cards permission.

Getting a key#

  • Only the business owner can create keys: sign in to the dashboard and open Settings, then API keys. Staff accounts cannot. Step by step: see the guide "Create an API key".
  • API access comes with the plan, or as an add-on that the qwallet team can switch on for your business. If you do not see the Create key button, your business does not have it yet.
  • A business can have at most 5 active keys. Revoked keys do not count towards the 5.
  • The secret is shown once, when the key is created. Qwallet stores only a hash, so it cannot be shown again. If you lose it, create a new key and revoke the old one.
  • Store the key on your server only, for example in an environment variable or a secrets manager. Never put it in a web page, a browser script or a mobile app: anyone who can read it can act as your business.

Guide for business owners: create an API key →

Authentication#

The scheme must be exactly Bearer, capitalised as shown, followed by one space and the key.

Send the key in the Authorization header as a Bearer token. A key is qwk_ followed by 40 letters and digits.

Header
Authorization: Bearer qwk_YOUR_KEY

Every request in this reference uses the placeholder qwk_YOUR_KEY; replace it with your own key, from your server.

Permissions#

Each key carries one or more permissions, chosen when it is created. The dashboard shows them by label. An endpoint needs the permission named on it.

PermissionDashboard labelWhat it allows
cards:readRead cardsList and search your cards, read one card with its progress, read the activity log and the card totals.GET /api/passesGET /api/passes/:cardIdGET /api/passes/scan-logGET /api/passes/summary
cards:writeUpdate card progressAdd stamps, redeem rewards, earn and redeem points, and record membership check-ins.POST /api/passes/:cardId/stampPOST /api/passes/:cardId/redeemPOST /api/passes/:cardId/check-inPOST /api/passes/points/:cardId/earnPOST /api/passes/points/:cardId/redeem
cards:issueIssue new cardsCreate a new card for a customer from one of your templates.POST /api/passes/create
notifications:sendSend notificationsSend a notification to your card holders and read the history of past notifications.POST /api/passes/notifyGET /api/passes/notify/history
locations:readRead locationsList your business locations.GET /api/business/:businessId/locations
templates:readRead templatesList your card templates, for example to find the templateId to issue a card from.GET /api/business/:businessId/templates

Give each key only the permissions its system needs. A key with a missing permission is refused with 403, and repeated refusals count against the failed-request limit described under Rate limits.

The businessId rule#

A key belongs to exactly one business. On the card, notification and issue endpoints, businessId (in the body or the query, as each endpoint shows) is optional: leave it out and the key's own business is used.

If you do send it, it must be your own business. Naming any other business is refused with 403 and never rewritten.

The locations and templates endpoints take the business in the URL path, so there it is part of the path and must be your own business id. Your business id is shown on the API keys page in the dashboard (Settings, then API keys), with a Copy ID button. It is not a secret.

Endpoints#

Fourteen endpoints, in six groups. Each one lists its permission, parameters, an example request, a trimmed example response and the errors specific to it.

Read cards

Look up cards, their progress and your activity log. Needs the cards:read permission.

List cards#

GET/api/passes

Permission: cards:read

Lists your cards, newest first, with cursor pagination and search. Use it to find a customer's card by name, email, phone or your own userId.

Query parameters

  • businessIdstring (uuid)Optional

    Your business. Defaults to the key's own business; any other business is refused with 403.

  • userIdstringOptional

    Exact match on the userId you gave when the card was issued.

  • qstringOptional

    Case-insensitive search in name, email and phone. The first 100 characters are used.

  • limitintegerOptional

    Page size. Default 20, from 1 to 100.

  • cursorstringOptional

    The nextCursor from the previous page, passed back unmodified. An unknown cursor is ignored and the first page is returned.

Request
curl "https://app.qwallet.me/api/passes?q=jane&limit=20" \
  -H "Authorization: Bearer qwk_YOUR_KEY"
Response · 200
{
  "passes": [
    {
      "cardId": "AB12CD34EF",
      "businessId": "3f6c1a52-7c0e-4c56-9a0e-1f6d7e2b9c11",
      "userId": "customer-001",
      "userName": "Jane Smith",
      "userEmail": "jane@example.com",
      "platform": "both",
      "templateType": "reward",
      "merchantData": {
        "businessName": "Salon Name",
        "rewardDescription": "Free haircut",
        "stampsRequired": 8
      },
      "stampCount": 3,
      "rewardsAvailable": 0,
      "applePassUrl": "https://app.qwallet.me/api/passes/apple/…",
      "googleSaveUrl": "https://pay.google.com/gp/v/save/…",
      "createdAt": "2026-01-15T10:30:00.000Z",
      "updatedAt": "2026-01-15T11:00:00.000Z"
    }
  ],
  "hasMore": true,
  "nextCursor": "AB12CD34EF"
}

Trimmed: merchantData also carries the template's colours and image URLs. googleSaveUrl is null for a card without a Google Wallet object. nextCursor is null on the last page. templateType is reward, points, membership or multi_service.

Errors

Besides the key errors and the general errors below, this endpoint can return:

StatuserrorWhen
403Access deniedbusinessId names a business other than the key's own.

Get one card#

GET/api/passes/:cardId

Permission: cards:read

Returns one card with its progress and the blocks for its type: points balance and program, membership details and check-ins, or the per-service progress of a multi-service card.

Path parameters

  • cardIdstringRequired

    The card's cardId, for example AB12CD34EF.

Query parameters

  • businessIdstring (uuid)Optional

    Your business. Defaults to the key's own business; any other business is refused with 403.

Request
curl "https://app.qwallet.me/api/passes/AB12CD34EF" \
  -H "Authorization: Bearer qwk_YOUR_KEY"
Response · 200
{
  "cardId": "AB12CD34EF",
  "businessId": "3f6c1a52-7c0e-4c56-9a0e-1f6d7e2b9c11",
  "serialNumber": "8d1f0c0e-5a1b-4e8e-9d57-0a5c2f3b7a10",
  "userId": "customer-001",
  "userName": "Jane Smith",
  "userEmail": "jane@example.com",
  "userPhone": "+97433123456",
  "platform": "both",
  "templateType": "reward",
  "merchantData": {
    "businessName": "Salon Name",
    "rewardDescription": "Free haircut",
    "stampsRequired": 8,
    "customFields": [ { "id": "birthday", "label": "Birthday", "value": "1990-04-02" } ]
  },
  "stampCount": 3,
  "rewardsAvailable": 0,
  "pointsBalance": 0,
  "pointsExpiry": null,
  "membershipNumber": null,
  "membershipCategory": null,
  "membershipExpiry": null,
  "checkIn": null,
  "pointsProgram": null,
  "services": [],
  "applePassUrl": "https://app.qwallet.me/api/passes/apple/…",
  "googleSaveUrl": "https://pay.google.com/gp/v/save/…",
  "createdAt": "2026-01-15T10:30:00.000Z",
  "updatedAt": "2026-01-15T11:00:00.000Z"
}

Trimmed. checkIn is { visits, lastCheckInAt } on membership cards and null otherwise. pointsProgram is set on points cards that have a program (see Earn points for its shape). services lists the per-service progress on multi-service cards and is an empty array otherwise. Each entry in services is { id, name, stampCount, stampsRequired, rewardsAvailable, stampsUntilReward, currentReward, rewardMilestones }, where currentReward is { description, label } and rewardMilestones is a list of { stampsRequired, rewardDescription, rewardLabel } (empty unless the service has a reward ladder).

Errors

Besides the key errors and the general errors below, this endpoint can return:

StatuserrorWhen
403Access deniedbusinessId names a business other than the key's own.
404Pass not foundNo card with this cardId in your business.

Read the activity log#

GET/api/passes/scan-log

Permission: cards:read

Returns your combined card activity (stamps, redemptions, check-ins and points actions), newest first, optionally for one card.

Query parameters

  • businessIdstring (uuid)Optional

    Your business. Defaults to the key's own business; any other business is refused with 403.

  • cardIdstringOptional

    Only entries for this card.

  • limitintegerOptional

    Page size. Default 20. Send a value from 1 to 100.

  • cursorstring (ISO timestamp)Optional

    The nextCursor from the previous page, passed back unmodified. Returns entries logged before it.

Request
curl "https://app.qwallet.me/api/passes/scan-log?cardId=AB12CD34EF&limit=20" \
  -H "Authorization: Bearer qwk_YOUR_KEY"
Response · 200
{
  "scanLog": [
    {
      "id": "4812",
      "cardId": "AB12CD34EF",
      "businessId": "3f6c1a52-7c0e-4c56-9a0e-1f6d7e2b9c11",
      "staffId": null,
      "staffName": "API key: Front desk POS",
      "customerName": "Jane Smith",
      "customerEmail": "jane@example.com",
      "stampsAdded": 1,
      "stampsBefore": 3,
      "stampsAfter": 4,
      "serviceId": null,
      "billAmount": null,
      "itemName": null,
      "rewardName": null,
      "loggedAt": "2026-11-13T09:41:00.000Z",
      "type": "stamp"
    }
  ],
  "hasMore": false,
  "nextCursor": null
}

Trimmed. type is "stamp", "redemption", "check_in", "points_adjust", "points_earn" or "points_redeem". For points entries, stampsAdded is the points earned and stampsBefore / stampsAfter are the balance either side. Entries made with an API key have staffId null and the key's name as staffName. Stamps removed in the dashboard appear as type "stamp" with a negative stampsAdded. On points_earn entries billAmount is a decimal string such as "87.50". id is returned as a string and is not unique across types.

Errors

Besides the key errors and the general errors below, this endpoint can return:

StatuserrorWhen
403Access deniedbusinessId names a business other than the key's own.

Card totals#

GET/api/passes/summary

Permission: cards:read

Returns whole-business card totals.

Query parameters

  • businessIdstring (uuid)Optional

    Your business. Defaults to the key's own business; any other business is refused with 403.

Request
curl "https://app.qwallet.me/api/passes/summary" \
  -H "Authorization: Bearer qwk_YOUR_KEY"
Response · 200
{ "totalCards": 120, "activeUsers": 115, "totalStamps": 431 }

activeUsers is the number of distinct userId values; totalStamps is the sum of current stamp counts.

Errors

Besides the key errors and the general errors below, this endpoint can return:

StatuserrorWhen
403Access deniedbusinessId names a business other than the key's own.

Update card progress

Add stamps, redeem rewards, earn and redeem points and record check-ins. Needs the cards:write permission. After each change the customer's wallet card refreshes within moments; a wallet problem never changes the HTTP response.

Add stamps#

POST/api/passes/:cardId/stamp

Permission: cards:write

Adds stamps to a reward card, or to one service of a multi-service card. Stamping past a full card banks a reward and carries the rest into the next cycle. On a card with a reward ladder (several rewards at different stamp counts), a reward is banked for each rung the stamps cross, and the card resets to 0 once the ladder's total is reached.

Path parameters

  • cardIdstringRequired

    The card's cardId, for example AB12CD34EF.

Body (JSON)

  • businessIdstring (uuid)Optional

    Your business. Defaults to the key's own business; any other business is refused with 403.

  • incrementnumberOptional

    How many stamps to add. Default 1. Only whole numbers from 1 to 100 are supported.

  • serviceIdstringOptional

    Which service to act on. Required on a multi-service card (one of the card's service ids, such as s1); must not be sent for any other card type.

Request
curl -X POST "https://app.qwallet.me/api/passes/AB12CD34EF/stamp" \
  -H "Authorization: Bearer qwk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "increment": 1 }'
Response · 200
{ "cardId": "AB12CD34EF", "stampCount": 4, "stampsRequired": 8, "rewardsAvailable": 0 }

On a multi-service card the response is instead { "cardId", "serviceId", "stampCount", "rewardsAvailable", "services": [ … ] }, where stampCount and rewardsAvailable are totals across services. Each entry in services is { id, name, stampCount, stampsRequired, rewardsAvailable, stampsUntilReward, currentReward, rewardMilestones }, where currentReward is { description, label } and rewardMilestones is a list of { stampsRequired, rewardDescription, rewardLabel } (empty unless the service has a reward ladder).

Errors

Besides the key errors and the general errors below, this endpoint can return:

StatuserrorWhen
400increment must be a numberincrement is not a finite number.
400serviceId only applies to multi-service cardsserviceId was sent for a card that is not multi-service.
400This card is not a reward-type cardThe card is a points or membership card.
400serviceId is required and must be one of this card's servicesMulti-service card, and serviceId is missing or unknown.
400increment must be an integer between 1 and 100Multi-service card and increment is out of range or not whole.
403Access deniedbusinessId names a business other than the key's own.
404Card not foundNo card with this cardId in your business.
409Card was updated concurrently, please retryTwo requests changed the same card at once. Nothing was written; send the request again.

Redeem a reward#

POST/api/passes/:cardId/redeem

Permission: cards:write

Redeems one reward on a reward card: uses a banked reward if there is one, otherwise clears a completed card.

Path parameters

  • cardIdstringRequired

    The card's cardId, for example AB12CD34EF.

Body (JSON)

  • businessIdstring (uuid)Optional

    Your business. Defaults to the key's own business; any other business is refused with 403.

  • serviceIdstringOptional

    Which service to act on. Required on a multi-service card (one of the card's service ids, such as s1); must not be sent for any other card type.

Request
curl -X POST "https://app.qwallet.me/api/passes/AB12CD34EF/redeem" \
  -H "Authorization: Bearer qwk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
Response · 200
{ "cardId": "AB12CD34EF", "stampCount": 0, "stampsRequired": 8, "rewardsAvailable": 0 }

On a multi-service card the response is instead { "cardId", "serviceId", "stampCount", "rewardsAvailable", "services": [ … ] }, where stampCount and rewardsAvailable are totals across services. Each entry in services is { id, name, stampCount, stampsRequired, rewardsAvailable, stampsUntilReward, currentReward, rewardMilestones }, where currentReward is { description, label } and rewardMilestones is a list of { stampsRequired, rewardDescription, rewardLabel } (empty unless the service has a reward ladder).

Errors

Besides the key errors and the general errors below, this endpoint can return:

StatuserrorWhen
400serviceId only applies to multi-service cardsserviceId was sent for a card that is not multi-service.
400This card is not a reward-type cardThe card is a points or membership card.
400No reward available to redeemThe card has no banked reward and is not complete.
400serviceId is required and must be one of this card's servicesMulti-service card, and serviceId is missing or unknown.
403Access deniedbusinessId names a business other than the key's own.
404Card not foundNo card with this cardId in your business.
409Card was updated concurrently, please retryTwo requests changed the same card at once. Nothing was written; send the request again.

Record a check-in#

POST/api/passes/:cardId/check-in

Permission: cards:write

Records one visit on a membership card. Every call counts: there is no cooldown and no de-duplication, so do not retry blindly.

Path parameters

  • cardIdstringRequired

    The card's cardId, for example AB12CD34EF.

Body (JSON)

  • businessIdstring (uuid)Optional

    Your business. Defaults to the key's own business; any other business is refused with 403.

Request
curl -X POST "https://app.qwallet.me/api/passes/AB12CD34EF/check-in" \
  -H "Authorization: Bearer qwk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
Response · 200
{
  "cardId": "AB12CD34EF",
  "checkIn": { "visits": 12, "lastCheckInAt": "2026-11-13T09:41:00.000Z" }
}

visits includes this visit. The card itself does not change.

Errors

Besides the key errors and the general errors below, this endpoint can return:

StatuserrorWhen
400This card does not support check-inThe card is not a membership card.
403Access deniedbusinessId names a business other than the key's own.
404Card not foundNo card with this cardId in your business.

Earn points#

POST/api/passes/points/:cardId/earn

Permission: cards:write

Records a purchase on a points card that has a points program, by bill amount or by item depending on the program's earn method.

Path parameters

  • cardIdstringRequired

    The card's cardId, for example AB12CD34EF.

Body (JSON)

  • businessIdstring (uuid)Optional

    Your business. Defaults to the key's own business; any other business is refused with 403.

  • amountnumber or decimal stringOptional

    Amount programs only. More than 0 and at most 100000, with up to 2 decimals. Points earned are floor(amount × the program's rate). Do not send itemId.

  • itemIdstringOptional

    Item programs only: one of the program's item ids, such as i1. Do not send amount.

  • quantityintegerOptional

    Item programs only. A whole number from 1 to 10. Default 1.

  • Which of amount or itemId is required depends on the card's program. Read the card (GET /api/passes/:cardId) to see pointsProgram.earn.method.
Request
curl -X POST "https://app.qwallet.me/api/passes/points/AB12CD34EF/earn" \
  -H "Authorization: Bearer qwk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "amount": 87.5 }'
Response · 200
{
  "success": true,
  "pointsEarned": 87,
  "rewardsIssued": ["Free coffee"],
  "pointsBalance": 17,
  "pointsExpiry": null,
  "readyRewards": [ { "readyId": "rd1", "rewardId": "r1", "name": "Free coffee" } ],
  "pointsProgram": {
    "earn": { "method": "amount", "rate": 1 },
    "mode": "convert",
    "rewards": [
      { "id": "r1", "name": "Free coffee", "points": 100, "imageUrl": null },
      { "id": "r2", "name": "Free lunch", "points": 200, "imageUrl": null }
    ],
    "readyRewards": [ { "readyId": "rd1", "rewardId": "r1", "name": "Free coffee" } ],
    "nextReward": { "id": "r2", "name": "Free lunch", "pointsToGo": 83 }
  }
}

rewardsIssued lists rewards issued by this purchase (convert mode; empty otherwise). pointsEarned can be 0 for a small bill. pointsProgram describes the card's program: how points are earned (earn), the mode ("convert" or "choose"), the rewards, the rewards ready to redeem (readyRewards) and the next reward (nextReward). earn is { "method": "amount", "rate": <number> } or { "method": "items", "items": [ { "id", "name", "points" } ] }. In choose mode every reward also has "affordable": true or false, readyRewards is always empty, and nextReward is null when every reward is affordable.

Errors

Besides the key errors and the general errors below, this endpoint can return:

StatuserrorWhen
400This card is not a points-type cardThe card is not a points card.
400This card has no points programThe card's template has no points program (a manual points card).
400This card earns points by bill amount, not by itemitemId sent to an amount program.
400amount must be more than 0 and at most 100000, with up to 2 decimalsAmount program and amount is missing or invalid.
400This card earns points by item, not by bill amountamount sent to an item program.
400Unknown itemitemId is missing or not one of the program's items.
400quantity must be a whole number from 1 to 10quantity is out of range or not whole.
400Points balance limit reached (1,000,000,000 points)The purchase would push the balance over the limit.
403Access deniedbusinessId names a business other than the key's own.
404Card not foundNo card with this cardId in your business.
409Card was updated concurrently, please retryTwo requests changed the same card at once. Nothing was written; send the request again.
503Could not load the points program. Please try again.A temporary failure while loading the template. Retry shortly.

Redeem points rewards#

POST/api/passes/points/:cardId/redeem

Permission: cards:write

Redeems a reward on a points card with a program. In convert mode it uses up a ready reward; in choose mode it buys a reward with points.

Path parameters

  • cardIdstringRequired

    The card's cardId, for example AB12CD34EF.

Body (JSON)

  • businessIdstring (uuid)Optional

    Your business. Defaults to the key's own business; any other business is refused with 403.

  • readyIdstringOptional

    Convert mode: the ready reward to use. The oldest one when omitted.

  • rewardIdstringOptional

    Choose mode: the reward to buy, such as r2. Its points are deducted from the balance.

Request
curl -X POST "https://app.qwallet.me/api/passes/points/AB12CD34EF/redeem" \
  -H "Authorization: Bearer qwk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "readyId": "rd1" }'
Response · 200
{
  "success": true,
  "rewardName": "Free coffee",
  "pointsBalance": 17,
  "pointsExpiry": null,
  "readyRewards": [],
  "pointsProgram": {
    "earn": { "method": "amount", "rate": 1 },
    "mode": "convert",
    "rewards": [
      { "id": "r1", "name": "Free coffee", "points": 100, "imageUrl": null },
      { "id": "r2", "name": "Free lunch", "points": 200, "imageUrl": null }
    ],
    "readyRewards": [ { "readyId": "rd1", "rewardId": "r1", "name": "Free coffee" } ],
    "nextReward": { "id": "r2", "name": "Free lunch", "pointsToGo": 83 }
  }
}

pointsProgram describes the card's program: how points are earned (earn), the mode ("convert" or "choose"), the rewards, the rewards ready to redeem (readyRewards) and the next reward (nextReward). earn is { "method": "amount", "rate": <number> } or { "method": "items", "items": [ { "id", "name", "points" } ] }. In choose mode every reward also has "affordable": true or false, readyRewards is always empty, and nextReward is null when every reward is affordable.

Errors

Besides the key errors and the general errors below, this endpoint can return:

StatuserrorWhen
400This card is not a points-type cardThe card is not a points card.
400This card has no points programThe card's template has no points program (a manual points card).
400No reward ready to redeemConvert mode: no reward is ready, or readyId is unknown.
400Unknown rewardChoose mode: rewardId is missing or unknown.
400Not enough points for <reward name>Choose mode: the balance cannot pay for the reward.
403Access deniedbusinessId names a business other than the key's own.
404Card not foundNo card with this cardId in your business.
409Card was updated concurrently, please retryTwo requests changed the same card at once. Nothing was written; send the request again.
503Could not load the points program. Please try again.A temporary failure while loading the template. Retry shortly.

Issue new cards

Create a card for a customer and get the links they use to add it to their wallet. Needs the cards:issue permission.

Issue a card#

POST/api/passes/create

Permission: cards:issue

Issues a new card from one of your templates and returns its Apple Wallet download URL and/or Google Wallet save URL. Design and rules come from the template. Send the link to the customer (by SMS, email or QR code); the card is not in their wallet until they open it.

Headers

  • Idempotency-KeystringOptional

    Makes the request safe to retry. A repeat with the same key returns the first card again, with status 200 instead of 201. Keys are scoped to your business, so another business can use the same value. Use a unique value per card, such as an order id.

Body (JSON)

  • businessIdstring (uuid)Optional

    Your business. Defaults to the key's own business; any other business is refused with 403.

  • templateIdstring (uuid)Required

    The template to issue from. List them with GET /api/business/:businessId/templates.

  • userIdstringRequired

    Your own identifier for this customer, for example your CRM id. You can look the card up by it later.

  • platform"apple" | "google" | "both"Required

    Which wallet links to return.

  • userNamestringOptional

    The customer's name.

  • userEmailstringOptional

    The customer's email.

  • locationIdstringOptional

    The id of one of your locations, as returned by the locations endpoint. Send only an id returned by the locations endpoint; other values are not reliably ignored. An inactive location is ignored.

  • collectedFieldsarray of { id, label, value }Optional

    Answers to the template's sign-up fields. fullName and email override userName and userEmail. phone is validated and stored in international format (E.164). Any other entry with a value is stored as a custom field.

  • merchantDataobjectOptional

    Per-card overrides of the template's rules: templateType, rewardDescription, stampsRequired, customFields, expiryMonths, membershipCategory, membershipNumberPrefix, rewardMilestones, and, for membership cards, membershipNumber and membershipExpiry (YYYY-MM-DD or an ISO timestamp). Design keys such as names, colours and images are ignored.

  • Always send the key. Unlike the other endpoints, this one also accepts anonymous sign-ups, so a forgotten Authorization header is not a 401: without it businessId is not filled in (you get 400 Missing required fields), and if you do send businessId the request is treated as an anonymous public sign-up. A malformed header is a 401 Malformed Authorization header.
  • Reward cards: stampsRequired must be a whole number from 2 to 20 unless the card has a reward ladder.
  • Membership cards: membershipNumber is trimmed and upper-cased, at most 64 characters. If you omit it, the template's numbering is used.
  • If the template marks phone as unique and that number already has a card from the template, the request returns 409 with the existing card instead of creating another.
Request
curl -X POST "https://app.qwallet.me/api/passes/create" \
  -H "Authorization: Bearer qwk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-10482" \
  -d '{
    "templateId": "b7a1e3c4-2d5f-4a60-8c19-5e0f6a7d8b21",
    "userId": "customer-001",
    "platform": "both",
    "userName": "Jane Smith",
    "userEmail": "jane@example.com"
  }'
Response · 201
{
  "cardId": "AB12CD34EF",
  "serialNumber": "3f6c1a52-7c0e-4c56-9a0e-1f6d7e2b9c11",
  "applePassUrl": "https://app.qwallet.me/api/passes/apple/3f6c1a52-7c0e-4c56-9a0e-1f6d7e2b9c11",
  "googleSaveUrl": "https://pay.google.com/gp/v/save/…"
}

applePassUrl is null when platform is "google"; googleSaveUrl is null when it is "apple". An idempotent replay returns the same four fields with status 200.

Errors

Besides the key errors and the general errors below, this endpoint can return:

StatuserrorWhen
400Missing required fields: businessId, userId, platform, templateIdA required field is missing. With a key, businessId is filled in for you. Also what you get if the Authorization header is missing altogether (see the note above).
400templateType must be "reward", "points", or "membership"The template has an unknown card type, or merchantData.templateType does.
400Template is missing businessName/businessType in its designThe template is incomplete. Fix it in the dashboard.
400stampsRequired is required for reward passesA reward card has no stampsRequired from the template or from merchantData.
401Malformed Authorization headerThe header is present but is not exactly Bearer followed by one space and the key. A missing header is not a 401 here.
400platform must be "apple", "google", or "both"platform is not one of the three values.
400Enter a phone number / Include the country code / Enter a valid phone number / That phone number is too longThe phone collected field is not a valid number.
400stampsRequired must be an integer between 2 and 20A reward card's target is out of range.
400membershipNumber … / membershipExpiry …A membership number or expiry is empty, too long, contains invalid characters or is not a valid date.
400This card has no services configuredA multi-service template without its services.
403Access deniedbusinessId names a business other than the key's own.
403Plan limit exceeded. Please upgrade your plan to add more cards.Your plan's card limit is reached. The body also carries "code": "PLAN_LIMIT_EXCEEDED".
404Template not foundNo such template in your business.
409(no error field)Duplicate unique phone. The body is the existing card: cardId, serialNumber, applePassUrl and googleSaveUrl.
409Membership number "<n>" is already in use by another cardA membership number collided with one already assigned. This one has an error field and no card; retry. Check for error before treating a 409 as an existing card.
410This card is no longer availableThe template has been archived and no longer issues cards.
429Pass creation rate limit exceeded.More than 300 cards per hour with this key.

Send notifications

Send a message to your card holders and read past campaigns. Needs the notifications:send permission. Keys are limited to 5 notifications per 24 hours.

Send a notification#

POST/api/passes/notify

Permission: notifications:send

Sends a broadcast message to your card holders, optionally filtered, and records it as a campaign. The request is processed before it answers, so a large audience can take a while.

Body (JSON)

  • businessIdstring (uuid)Optional

    Your business. Defaults to the key's own business; any other business is refused with 403.

  • message{ header?, body? }Required

    The text to send, as an object (null is not accepted). At least one of header or body is required.

  • filtersobjectOptional

    Narrow the audience; all filters you set must match. templateId (exact), emailContains and phoneContains (case-insensitive substring), stampMin and stampMax (inclusive bounds on the stamp count; send numbers). Leave filters out to message every card.

  • Only requests that pass validation and the business check count towards the 5 per 24 hours; a rejected request is free.
  • Send stampMin and stampMax as numbers. A non-numeric value is not validated and fails with a 500.
  • With no matching cards the request still succeeds with all-zero stats and is recorded.
Request
curl -X POST "https://app.qwallet.me/api/passes/notify" \
  -H "Authorization: Bearer qwk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": { "header": "Weekend offer", "body": "Double stamps this Saturday." },
    "filters": { "stampMin": 3, "stampMax": 7 }
  }'
Response · 200
{
  "success": true,
  "stats": {
    "totalCards": 58,
    "appleDevices": 40,
    "appleSent": 39,
    "appleFailed": 0,
    "googleSent": 21,
    "googleFailed": 1
  }
}

On Apple Wallet the text appears when the customer's device refreshes the card; on Google Wallet it is added as a message on the card. Devices that Apple reports as gone are counted in neither appleSent nor appleFailed.

Errors

Besides the key errors and the general errors below, this endpoint can return:

StatuserrorWhen
400message.header or message.body is requiredNeither a header nor a body was sent.
403Access deniedbusinessId names a business other than the key's own.
429Notification rate limit exceeded.More than 5 accepted notifications in 24 hours with this key.

Notification history#

GET/api/passes/notify/history

Permission: notifications:send

Lists your past notification campaigns, newest first.

Query parameters

  • businessIdstring (uuid)Optional

    Your business. Defaults to the key's own business; any other business is refused with 403.

  • limitintegerOptional

    Page size. Default 20, from 1 to 100.

  • cursorstring (ISO timestamp)Optional

    The nextCursor from the previous page, passed back unmodified.

Request
curl "https://app.qwallet.me/api/passes/notify/history?limit=20" \
  -H "Authorization: Bearer qwk_YOUR_KEY"
Response · 200
{
  "campaigns": [
    {
      "id": 17,
      "messageHeader": "Weekend offer",
      "messageBody": "Double stamps this Saturday.",
      "filters": { "stampMin": 3, "stampMax": 7 },
      "totalCards": 58,
      "appleDevices": 40,
      "appleSent": 39,
      "appleFailed": 0,
      "googleSent": 21,
      "googleFailed": 1,
      "status": "completed",
      "createdAt": "2026-11-01T08:00:00.000Z",
      "templateName": null
    }
  ],
  "hasMore": false,
  "nextCursor": null
}

filters holds only the filters that were set. status is "completed" or "failed". templateName is null unless a template filter was used.

Errors

Besides the key errors and the general errors below, this endpoint can return:

StatuserrorWhen
403Access deniedbusinessId names a business other than the key's own.

Read locations

List your business locations. Needs the locations:read permission.

List locations#

GET/api/business/:businessId/locations

Permission: locations:read

Lists your locations, oldest first. Deactivated locations are included with isActive set to false.

Path parameters

  • businessIdstring (uuid)Required

    Your own business id. Any other business is refused with 403.

Request
curl "https://app.qwallet.me/api/business/YOUR_BUSINESS_ID/locations" \
  -H "Authorization: Bearer qwk_YOUR_KEY"
Response · 200
{
  "locations": [
    { "id": "3", "name": "West Bay Branch", "isActive": true, "createdAt": "2026-01-15T10:30:00.000Z" }
  ]
}

The location id is returned as a string. Pass it as locationId when issuing a card.

Errors

Besides the key errors and the general errors below, this endpoint can return:

StatuserrorWhen
403Insufficient permissionsThe business in the path is not the key's own.

Read templates

List your card templates. Needs the templates:read permission.

List templates#

GET/api/business/:businessId/templates

Permission: templates:read

Lists your card templates, newest first. Archived templates are left out. Use the templateId when issuing a card.

Path parameters

  • businessIdstring (uuid)Required

    Your own business id. Any other business is refused with 403.

Request
curl "https://app.qwallet.me/api/business/YOUR_BUSINESS_ID/templates" \
  -H "Authorization: Bearer qwk_YOUR_KEY"
Response · 200
{
  "templates": [
    {
      "templateId": "b7a1e3c4-2d5f-4a60-8c19-5e0f6a7d8b21",
      "businessId": "3f6c1a52-7c0e-4c56-9a0e-1f6d7e2b9c11",
      "templateName": "Loyalty Card",
      "templateType": "reward",
      "businessName": "Undercuts Salon",
      "rewardDescription": "Free haircut after 10 stamps",
      "stampsRequired": 10,
      "rewardMilestones": [],
      "services": [],
      "pointsProgram": null,
      "fields": [
        { "id": "fullName", "label": "Full Name", "fieldType": "text", "required": true, "askAtSignup": true },
        { "id": "email", "label": "Email", "fieldType": "text", "required": false, "askAtSignup": true },
        { "id": "phone", "label": "Phone", "fieldType": "text", "required": false, "askAtSignup": true }
      ],
      "createdAt": "2026-01-15T10:30:00.000Z"
    }
  ]
}

Heavily trimmed. Each entry is the full template: its design (colours, images, labels), sign-up fields, reward rules, and for multi-service and points templates their services and points program. The id of each entry in fields (fullName, email, phone, terms or a custom field's id) is what to send as collectedFields[].id when issuing a card. Use templateId, templateType and the rules; treat the design fields as display data.

Errors

Besides the key errors and the general errors below, this endpoint can return:

StatuserrorWhen
403Insufficient permissionsThe business in the path is not the key's own.

Rate limits#

A request over a limit returns 429 with the body shown. All limits are per key, except the failed-request limit, which is per IP address.

LimitAllowedApplies to429 body
Requests600 per 15 minutes, per keyEvery request made with a key. Keys do not share the per-IP limit that dashboard traffic has.{ "error": "Too many requests, please try again later." }
Card creation300 per hour, per keyPOST /api/passes/create, on top of the 600 above.{ "error": "Pass creation rate limit exceeded." }
Notifications5 per 24 hours, per keyPOST /api/passes/notify. Only requests that pass validation and the business check are counted.{ "error": "Notification rate limit exceeded." }
Failed key requests100 per 15 minutes, per IP addressRequests that carry a qwk_ token but do not authenticate: a wrong, revoked or mistyped key, or a key sent to an endpoint that does not accept keys. Because these checks run before the key is authenticated, a key's own 429 (over 600 per 15 minutes) and a request whose body is not valid JSON also count.{ "error": "Too many failed API key requests, please try again later." }

A valid key's own 4xx responses (for example a 404 for an unknown card) do not count towards the failed-request limit. A valid key that is refused before it authenticates does: a missing permission, or an account without API access. Fix the key's permissions instead of retrying. Otherwise every key behind the same IP address, such as all the tills in one shop, can be blocked for 15 minutes.

Limits are counted in memory and reset when the service restarts. When you receive a 429, wait and retry later; never retry in a tight loop: retrying a 429 or a refused request adds to the failed-request count and can extend the block.

Every response from a rate-limited request carries the standard headers RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset (seconds until the window resets), plus RateLimit-Policy. Read RateLimit-Remaining and slow down before you reach zero.

Errors#

Errors are JSON with a single error message, and an HTTP status that says what kind:

Error body
{ "error": "Message describing what went wrong" }

Key errors

These four come from the key itself and can be returned by any endpoint.

StatuserrorMeaning
401Invalid API keyThe key is unknown, has been revoked, or the business is inactive. On POST /api/passes/create an invalid key is never treated as an anonymous request.
403API access is not included in your planThe business has neither a plan with API access nor the API access add-on. Existing keys work again when access returns.
403This endpoint cannot be used with an API keyThe endpoint is not one of the fourteen listed here. Keys cannot manage keys, staff or billing, and cannot create or edit templates.
403This API key does not have the <permission> permissionThe key lacks the permission the endpoint needs, for example cards:write. Create a key with the right permissions.

General behaviour

StatusMeaning
400The request is invalid. error says what to fix. The endpoint sections list the messages. A body that is not valid JSON returns 400 before the key is checked.
413The request body is over 10 MB.
401The key is missing or wrong: Invalid API key. A missing or malformed Authorization header returns 401 Missing or malformed Authorization header, except on POST /api/passes/create, where a missing header is not a 401 (see that endpoint) and a malformed one returns 401 Malformed Authorization header.
403The key is valid but not allowed: no API access, a missing permission, an endpoint keys cannot use, or another business.
404The card or template does not exist in your business.
409A conflict. Card was updated concurrently, please retry means nothing was written and the same request can be sent again.
410The template has been archived and can no longer issue cards.
429A rate limit was reached. See Rate limits. Wait and retry later.
500Something went wrong on our side. Retry after a short delay; the message is not stable, so do not parse it. A 503 on the points endpoints is a temporary failure; retry shortly.

Key security#

  • Rotate a key by creating a new one first, switching your system over to it, and only then revoking the old one. You can have up to 5 active keys, so the two can overlap.
  • Revoke a key in the dashboard under Settings, API keys. A revoked key can take up to 60 seconds to stop working. Changing a plan or deactivating the business can take the same time to reach a key that was used recently.
  • A plan downgrade, or switching the API access add-on off, stops every key of the business with 403 API access is not included in your plan, within about a minute. The keys are not revoked: they work again when access returns.
  • Never put a key in a browser, a mobile app or a public repository. If a key may have leaked, revoke it straight away and create a new one.
  • Give each system its own key with only the permissions it needs, so you can revoke one without breaking the others.