Developers
A small set of endpoints and signed webhooks, to connect your own till, website or CRM to your own TAPPI account.
The TAPPI API connects a business’s own systems (its till software, website, booking page or CRM) to its own TAPPI account: sign a customer up from your checkout, add a stamp or points when a sale closes, keep points in step with your app, and hear about every change through signed webhooks.
It is narrow on purpose. It is not a way to run TAPPI from outside, and one key works for one business only.
API keys come with the Scale plan. The owner creates them in the dashboard under Settings › Developers, picks the scopes each key may use, and can revoke a key at any time. Every key expires.
A test key reads a sample café and writes nothing, so you can build against it before you touch real customers.
Want an AI app such as Claude or ChatGPT to work on your venue instead? Connect an AI app (MCP)
Send your key as a bearer token. Live keys start with tappi_live_, test keys with tappi_test_. A test key reads a sample café, never your customers, and writes nothing: write endpoints answer { "mode": "test", "simulated": true }.
curl https://www.thetappi.com/api/public/v1/locations \ -H "Authorization: Bearer tappi_live_…"
Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. The limit is 60 requests per minute per key and 120 across all of your keys. Over it is 429 with Retry-After. Errors are always { "error": "snake_case" }: 401 for a missing, invalid, revoked or expired key; 403 insufficient_scope names the scope you need; 404 for anything that is not yours.
Each business can read up to 2,000 customer records a day through the API (10% of its customers if that is more, at most 10,000) and make up to 5,000 writes, whatever the number of keys. Past a limit the answer is 429 daily_cap_reached until midnight UTC. Points added to one card through the API are capped per day too, and so are the points one key with points:write can add across all cards (10,000 a day). Ask TAPPI if a real integration needs more, for example a go-live import.
/api/public/v1/customerscustomers:read/api/public/v1/customers/{id}customers:read/api/public/v1/customers/{id}/timelinecustomers:read/api/public/v1/segmentscustomers:read/api/public/v1/segments/{id}/customerscustomers:read/api/public/v1/cardscards:read/api/public/v1/cards/{serial}cards:read/api/public/v1/visitsvisits:read/api/public/v1/programsprograms:read/api/public/v1/programs/{id}programs:read/api/public/v1/rewardsrewards:read/api/public/v1/rewards/{id_or_code}rewards:read/api/public/v1/membershipsmemberships:read/api/public/v1/memberships/{id}memberships:read/api/public/v1/multipassmemberships:read/api/public/v1/coupons/redemptionsprograms:read/api/public/v1/promotionsprograms:read/api/public/v1/referralsprograms:read/api/public/v1/rewardsrewards:write/api/public/v1/rewards/{id_or_code}/redeemredemptions:write/api/public/v1/cards/{serial_or_id}/coupon/redeemredemptions:write/api/public/v1/cards/{serial_or_id}/membership/check-inredemptions:write/api/public/v1/cards/{serial_or_id}/multipass/useredemptions:write/api/public/v1/cards/{serial_or_id}/points/redeemredemptions:write/api/public/v1/campaignscampaigns:read/api/public/v1/campaigns/{id}campaigns:read/api/public/v1/campaignsmessages:write/api/public/v1/campaigns/{id}/cancelmessages:write/api/public/v1/cards/{serial_or_id}/messagemessages:write/api/public/v1/transactionstransactions:read/api/public/v1/transactionstransactions:write/api/v1/webhooks/testwebhooks:write/api/public/v1/locationslocations:read/api/public/v1/eventsevents:read/api/public/v1/giftsgifts:read/api/public/v1/gifts/{id}gifts:read/api/public/v1/memberscustomers:write/api/public/v1/members/lookupcards:read/api/public/v1/members/{member_ref}/totaltransactions:write/api/public/v1/members/{member_ref}/pointspoints:write/api/public/v1/members/{member_ref}/pointspoints:write/api/public/v1/members/{member_ref}/pointscards:read/api/public/v1/points/importpoints:write/api/public/v1/members/{member_ref}customers:writecustomers:readCustomers who changed since a date you give, one customer’s full record and timeline, and your saved segments, with name, email and phone. Counted against the daily limit.customers:writeSign a customer up to one of your cards from your own checkout or booking page, with their consent, and add what they bought. Owner only.cards:readLook up a loyalty card by its serial or id, or list the cards that changed: type, stamps, points, balance or tier. The customer’s name, email and phone ride along only with Read customers, on a single card.transactions:readThe last 30 days of till transactions.transactions:writeStamp a card or add points from your POS or website.prepaid:writeTake money off a customer’s prepaid balance from your POS. Owner only.points:writeKeep your own website or app in step with your cards: add, take off or set a member’s points. Owner only.webhooks:writeSend a test delivery to one of your endpoints.locations:readList your active locations and their ids.events:readThe last 100 webhook events TAPPI published for your account, with the amounts of top-ups, gift cards and membership payments. Owner only.gifts:readGift card orders with the buyer’s and recipient’s name and email, the message and, while unredeemed, the redeem link, so you can send the gift email yourself. Owner only.visits:readVisits since a date you give: one per customer per day, with the location and what counted it. Customer ids only, no contact details.programs:readYour card programmes and their rules (stamps, points, tiers, top-ups, membership plans, packs, coupon offers), plus promotions, coupon uses and referrals. No contact details.rewards:readRewards your customers hold and whether each is open, used or expired, and one reward looked up by its code. Codes are never listed.memberships:readMembership subscriptions with their plan, status and current period, benefit uses and invoices, and packs bought. Owner only.redemptions:writeFrom your POS, use what a customer already holds, exactly as staff do at the till: hand over a reward, use a coupon, check in a membership benefit, use pack visits or spend points on a reward.rewards:writeGive a customer a reward from your own system, as you can from their page: up to 5 at once and 10 per customer a day.campaigns:readYour push campaigns: the text, who each one is for, when it goes or went out, and how many it reached. No contact details.messages:writeSend a message to one customer’s card, and create, send or cancel push campaigns, with the composer’s own rules: only customers who said yes to offers on their card are reached. Owner only.There is no scope that can create keys, change billing or touch your team. A leaked key can only ever do what it was given.
Send your own idempotency_key with every write that takes one. If the answer is a 5xx, or no answer arrives (a timeout, a dropped connection), send the same request again with the same key: the first attempt may have been applied, and TAPPI uses the key to recognise a request it has already applied.
A 4xx is final: the request was refused, so correct it before sending it again. The one exception is 429, which means a limit was reached: try again later.
TAPPI POSTs a JSON envelope to your https endpoint and expects a 2xx within 10 seconds. Failures retry at 30 s, 2 min, 10 min, 1 h and 6 h, then the delivery is marked “gave up” and can be replayed from the Developers page.
Delivery records are kept for 30 days after a delivery succeeds and 90 days after it gives up, then deleted — replay a delivery before then.
The signature is HMAC-SHA256 of t=<ts>.<raw body> with your endpoint’s secret, hex-encoded. Reject anything older than five minutes. For 24 hours after a rotation the header carries two v1 values — accept either.
import { createHmac, timingSafeEqual } from 'node:crypto';
// TAPPI signs every delivery: X-TAPPI-Signature: t=<unix seconds>,v1=<hex>[,v1=<hex>]
// During a secret rotation the header carries two v1 values — one per secret.
export function verifyTappiSignature(secret: string, rawBody: string, header: string | null) {
if (!header) return false;
let ts = null;
const sigs = [];
for (const part of header.split(',')) {
const [k, v] = part.trim().split('=', 2);
if (k === 't') ts = Number(v);
else if (k === 'v1' && v) sigs.push(v);
}
if (!Number.isFinite(ts) || sigs.length === 0) return false;
if (Math.abs(Math.floor(Date.now() / 1000) - ts) > 300) return false; // 5 min replay window
const expected = createHmac('sha256', secret).update(`t=${ts}.${rawBody}`).digest();
return sigs.some((s) => {
const given = Buffer.from(s, 'hex');
return given.length === expected.length && timingSafeEqual(given, expected);
});
}
// export async function POST(req: Request) {
// const raw = await req.text();
// if (!verifyTappiSignature(process.env.TAPPI_WEBHOOK_SECRET, raw, req.headers.get('x-tappi-signature')))
// return new Response('invalid signature', { status: 401 });
// const event = JSON.parse(raw); // { id, type, created_at, org_id, data }
// // dedupe on event.id, then handle event.type
// return new Response('ok');
// }webhook.testA test delivery you send from the Developers page or the API.wallet.pass.savedA customer added their card to Apple Wallet, or a reward pass to Google Wallet.wallet.pass.removedA customer removed their card from Apple Wallet, or a reward pass from Google Wallet.customer.enrolledA customer joined a loyalty card.transaction.createdAny till action was recorded (stamp, points, prepaid spend or top-up, reward, coupon, check-in, pack, promotion), at the till or via the API.transaction.voidedA till action was undone within 30 seconds: the reversal of a transaction.created.reward.issuedA reward code was minted for a customer.reward.redeemedStaff redeemed a reward at the till.membership.purchasedA customer bought a paid membership.membership.renewedA membership renewed for another period.membership.cancelledA membership ended: cancelled by the customer or the owner, run out, or left unpaid.multipass.purchasedA customer bought a pack of units.coupon.redeemedStaff redeemed a coupon at the till.referral.createdA new customer joined through a referral link.referral.rewardedA referral qualified and both sides were rewarded.promotion.publishedA promotion went live on customers’ cards.promotion.usedStaff applied a promotion at the till.points.changedA card’s points moved, whatever moved them (till, dashboard, reward, your own API calls), with the new balance.stamps.changedA card’s stamps moved (a stamp added or taken back), with the card’s new count.balance.changedA prepaid card’s balance moved, whatever moved it (top-up, spend, refund, gift credit, expiry), with the new balance.gift_card.purchasedA gift card was paid for.gift_card.deliveredThe gift card email is due: TAPPI sent it to the recipient, or, if your system sends its own, this is the moment to send it (right away, or on the day the buyer chose).gift_card.redeemedThe recipient redeemed the gift card onto a loyalty card.gift_card.refundedA gift card was refunded, or a dispute over it was lost.gift_card.disputedThe buyer’s bank opened a dispute over a gift card.gift_card.expiredA gift card passed its expiry date without being redeemed.topup.succeededA customer topped up their prepaid card online, by hand or by auto-reload.topup.failedAn online top-up or auto-reload charge failed.topup.refundedAn online top-up was refunded and the money taken off the card.topup.disputedThe customer’s bank opened a dispute over a top-up and the money was taken off the card.topup.dispute_wonA top-up dispute was won and the money put back on the card.customer.updatedA customer’s name, email, phone, birthday, tags or member reference changed, whoever changed it.customer.consent_changedA customer said yes or no to marketing by email or Wallet offers.customer.erasedA customer’s personal data was erased (their request, or your account closing), with your member reference so you can erase your copy.card.completedA stamp card filled up. Sent once per card per round.card.voidedA card was voided.card.tier_changedA tier card moved up or down a level.visit.recordedA customer’s first visit of the day was counted (a till action, a scan or a stamp).membership.payment_failedA membership renewal payment failed. Stripe tries again; the membership is past due until it pays.membership.benefit_usedA member used a benefit at the till.multipass.usedUnits were used from a pack, with the units left.coupon.issuedA customer got a coupon card.reward.expiredA reward passed its expiry date without being used.card_message.sentA message reached customers’ cards: a campaign, an automation, or one sent to a single card. One event per send, with how many it reached.program.createdA card programme was created.program.updatedA card programme’s rules or tiers changed, or it was paused or resumed.program.archivedA card programme was stopped (no new cards, balances still honoured) or closed.location.createdA location was added.location.updatedA location’s name, address, time zone or public contact details changed.location.removedA location was switched off or deleted.By using the TAPPI API, you agree: