Skip to content

Getting a key

Every call to the API carries a key, and every key belongs to one connection of one shop: your till system at that shop, or that shop’s online store. The key decides which shop’s cards you see and what you may do with them. There is no key that opens every shop.

Keys come in two kinds, and you can tell them apart by how they begin:

Key Works on Who makes it
psk_test_… A test shop: a shop that exists only for you to build against. Its customers are yours to make up, and nothing in it is billed. Passkaar, on request
psk_live_… A real shop and its real customers. The shop’s owner, in the Passkaar portal

Both go to the same address and behave the same way. A test key never works on a real shop, and a live key never works on a test shop. A real shop needs Passkaar’s Growth or Chain plan (Standard connects a WooCommerce or Shopify store), with integrations switched on by Passkaar. There is no charge per call.

Write to support@passkaar.com with your company’s name and what you are building. Passkaar makes you a test shop with a loyalty card to try and sends you its psk_test_ key. The key is shown to Passkaar once and sent to you once: keep it in your password manager or your server’s secret store.

A test shop has small limits, so a bug in your code cannot run away with it. Today it holds at most 100 customers, signs up at most 20 an hour, takes bills up to Rs 100,000, and answers a test key at most 2 requests a second (in bursts of 5). Its cards are real cards: a claim link from it really adds the card to Apple Wallet or Google Wallet.

Set the two variables every guide uses. Paste your key when asked:

Every guide starts here
export PASSKAAR_API=https://api.passkaar.com/integrations/v1
printf 'Your key: '; read -rs PASSKAAR_KEY; echo; export PASSKAAR_KEY

Then ask for the shop’s cards:

Terminal window
curl -sS "$PASSKAAR_API/programs" \
-H "Authorization: Bearer $PASSKAAR_KEY" | tee programs.json | jq .
{
"data": [
{
"id": "259975f9-719a-48c8-8dc9-eb7128114ebf",
"name": "Bean points",
"type": "points",
"accepting_sign_ups": true,
"join_url": "https://passkaar.com/j/test-overnight-walk-2026-11-22-beans-mwr3ag67",
"ends_on": null,
"updated_at": "2026-11-22T00:19:20.330Z"
}
],
"next_cursor": null
}

The API calls a shop’s loyalty card a program: the card design and its rules. Each customer who signs up gets their own card on that program. This test shop has one program, a points card called Bean points. Keep its id for the next guides:

Terminal window
PROGRAM=$(jq -r '.data[0].id' programs.json); echo "$PROGRAM"

A program’s own page says how it earns and spends, and which questions its sign-up form asks:

Terminal window
curl -sS "$PASSKAAR_API/programs/$PROGRAM" \
-H "Authorization: Bearer $PASSKAAR_KEY" | jq .
{
"id": "259975f9-719a-48c8-8dc9-eb7128114ebf",
"name": "Bean points",
"type": "points",
"accepting_sign_ups": true,
"join_url": "https://passkaar.com/j/test-overnight-walk-2026-11-22-beans-mwr3ag67",
"ends_on": null,
"updated_at": "2026-11-22T00:19:20.330Z",
"rules": {
"type": "points",
"unit_name": "beans",
"earn": { "points": 1, "per_rupees": 10, "min_bill": null },
"daily_cap": null,
"spend": { "mode": "cash", "rupees_per_point": 1, "min_points": 10 }
},
"form": [
{
"key": "first_name",
"type": "first_name",
"label": "First name",
"required": true,
"dedupe_key": false,
"options": null
},
{
"key": "phone",
"type": "phone",
"label": "Phone",
"required": true,
"dedupe_key": true,
"options": null
},
{
"key": "email",
"type": "email",
"label": "Email",
"required": false,
"dedupe_key": false,
"options": null
}
]
}

Read it as the shop wrote it: a customer earns 1 bean for every Rs 10 spent, and each bean takes Rs 1 off a bill once they hold at least 10. The shop calls its points beans, and so should your screens (unit_name). The form asks for a first name and a phone number, and the phone number is what makes a customer unique in this shop (dedupe_key).

Programs come in six types, and each gives and spends in its own way: stamps, points, prepaid, coupon, membership and tiers (a VIP card). These guides use a points card; the reference’s Give value for a sale and Spend value list what each type takes.

Every problem with a key (mistyped, stopped by the shop, its connection paused, the shop closed) answers the same way, without saying which, so a stolen key teaches nothing:

{
"type": "https://passkaar.com/developers/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"code": "unauthorized",
"request_id": "779bf9ea673237c30c5fb04f75fda497"
}

Check the key was pasted whole (58 characters) and that you are using a test key on its test shop. If it still fails, write to Passkaar with the request_id.

Next: sign a customer up.