Skip to content

API reference

Version 1.0.0 of the integration API. Every page here is generated from the API’s contract, the OpenAPI document integrations-v1.json, so it cannot drift from what the API does.

Base URL: https://api.passkaar.com/integrations/v1

A shop’s own systems — its online store, its outlets’ POS — read the shop’s cards, sign customers up and give or spend loyalty value. Cards are made and edited in the Passkaar portal; an integration only uses them.

Every credential belongs to one connection of one shop. Send it as Authorization: Bearer psk_live_… (or psk_test_… on a test shop). A key works only under /integrations/v1. Every failed check of the key, its connection, the shop or the scope answers the same 401.

Errors are RFC 9457 Problem Details (application/problem+json) with a stable code. Branch on code; treat a code you do not know by its HTTP status, because new codes are an additive change.

Within v1 changes are additive only: new fields, new codes, new events. Ignore what you do not know. Lists take an opaque cursor and a limit of at most 100.

Money in a request is whole rupees. Events are Standard Webhooks, signed, ids and facts only.

A key is made in the Passkaar portal, under Settings → Integrations, by the shop’s owner or an admin, once Passkaar has switched integrations on for the shop. Each key belongs to one connection (your store, or one till system), and the connection holds scopes that say what its keys may do: programs:read, customers:enrol, cards:read, awards:write, awards:reverse, redemptions:write, events:read and webhooks:manage, chosen by the shop, and customers:opening-balance, which only Passkaar switches on. Each operation names the scope it needs.

Keep keys on your server. Never put one in a web page, a mobile app or a public repository: anyone holding it can give and spend on the shop’s cards.

A test shop’s keys start psk_test_ and act only on that test shop’s cards, with lower rate limits. A live shop’s keys start psk_live_.

Every write takes an Idempotency-Key header: send a fresh UUID with each new request, and the same one when you retry it. A retry within 24 hours answers the first result instead of doing it twice. Awards, redemptions and holds also take your own reference (an order or bill number), which guards a resend for ever.

The same contract is also shown as one searchable page, with request and answer examples in several languages: the interactive reference. It has no Send request button: a secret key belongs on a server, never in a browser.

The shop’s cards and branches.

Signing customers up and linking them.

A customer’s card and its history.

Giving, spending, reversing and holding value.

Webhooks and the event feed.

This document.