Using the Passtastic API | Passtastic Help
Passtastic
No account yet? Sign up free

Using the Passtastic API

What the API lets you do

The Passtastic API lets you connect your own systems — a custom POS, a CRM, an internal app — directly to your loyalty program. With it you can:

  • Enroll customers and issue wallet passes from your own signup flow
  • Add stamps or points, and check a customer's balance, from your own checkout or back office
  • Get notified in real time with webhooks — instead of polling, Passtastic pushes an event to your system the moment something happens (a customer enrolls, a reward is redeemed, and more)
  • Reuse the customers you already have — if someone your system enrolls already signed up through your sign-up page, Passtastic recognises them by email or phone and adds your reference to the card they already carry, instead of issuing a second one

This is for merchants building a custom integration. If you just want an out-of-the-box connection, see Connect Square POS or POS Systems & Integrations — no code required.

API access depends on your plan. If it isn't included, you'll see an upgrade prompt when you open API & Webhooks in Settings.

Get an API key

1. Open Settings, then API & Webhooks (under Business).

2. On the API keys tab, click Create test key to try it out safely, or Create live key once you're ready to connect real customers.

3. Give it a key name so you know what it's for later (e.g. "Production CRM").

4. Your new key is shown once, in the Your new API key window (Your new test key for a test key). Copy it now — you won't be able to see it again. Click Copy, or Show to reveal it first.

Treat this key like a password. Anyone with it can act on your account through the API.

5. Store the key securely in your own system (an environment variable, a secrets manager) and send it as the request's authentication header — see the technical reference below for the exact header format.

Only admins can create or revoke API keys.

Try it first with a test key

Test keys work on every plan, including your trial — no upgrade needed. Test customers get a real Wallet pass marked TEST and are removed after 30 days, so there's nothing to clean up by hand.

Follow the Quickstart in the technical docs with your test key — it walks through enrolling a test customer and adding a card to your own phone, so you can see the whole flow before it ever touches a real one.

Once your integration works end-to-end, come back to API & Webhooks and click Create live key to switch to real customers. Live keys are available on Multi-Location and above.

Lost or compromised a key?

Keys aren't shown again after creation. If you've lost one, or think it's been exposed, open API keys and click Revoke on it — this stops it from working immediately — then create a new one and update your integration.

Set up a webhook

Webhooks let your system react the moment something happens in Passtastic, without you having to keep asking the API for updates.

1. On the Webhooks tab, click Add endpoint.

2. Enter the Endpoint URL — the address on your own system that will receive the event (e.g. `https://your-system.com/hook`).

3. Under Events, choose which events to receive:

  • Customer enrolled
  • Balance updated
  • Level changed
  • Reward redeemed
  • Card expired
  • Card renewed

4. Save it. Your signing secret is shown once, in the Signing secret window — copy it now. Use it to verify that a webhook request really came from Passtastic (the technical reference explains how to check the signature).

Only admins can create or edit webhooks.

Each webhook endpoint shows its recent deliveries, so you can check whether a call succeeded or failed, and replay a failed delivery once your system is back up — no need to wait for the next event.

Editing or turning off a webhook

Open the endpoint and click Edit to change its URL or events, or set its status to Disabled to pause deliveries without deleting it. Click Delete to remove it for good.

Where to find the full technical reference

This guide covers the dashboard side — creating keys and webhooks. For endpoints, request/response formats, authentication headers, error codes, and code samples, see the full API documentation, or jump straight to the API reference for every endpoint's request/response schema. You can also reach both any time from the Read the API docs and API reference links at the top of the API & Webhooks page — the API reference opens in a new tab.

Common questions

Do I need a POS to use the API?
No. The API is for connecting your own systems — a custom POS, CRM, or app. If you'd rather use a ready-made connection, see Connect Square POS or POS Systems & Integrations.
Will my integration create duplicate customers?
No. When your system enrolls someone, Passtastic first checks whether that customer already exists in your account — by the reference your system sends, then by email, then by phone. If they do, it links your reference to their existing card instead of issuing a second one, so their stamps and points stay where they are. If two customers share the same email or phone, Passtastic won't guess between them — it returns an error naming both, so your developer can pick the right one.
Can my system tell when a customer's card expires?
Yes. If your card has a validity period (Card validity under Card details on the program's Setup tab), tick Card expired and Card renewed on your webhook: your system hears when a card expires and when it's renewed, including renewals you do in Passtastic. Your developer can also read each customer's end date and renew a card from your system. To try it before a real card expires, a test key can end a test customer's card right away. The API documentation has the details.
Is API access included in my plan?
The API comes with Multi-Location and Groups & Brands. On Single Location, API & Webhooks in Settings shows an upgrade prompt instead of your keys.
Where do I find a card's ID?
Open the program's Share tab. Under Share in Social Media or Website you'll see its link: the part after `/get-pass/` is the card ID. Don't copy the ID from the address of the program page, as it can be a different one. Your developer can also list all your cards and their IDs through the API (`GET /api/v1/cards`).
My developer gets "Missing scope(s): cards:read". What do I do?
The key was created before the API could list cards. Create a new key (API keys → Create key), give it to your developer, then Revoke the old one.
Who can manage API keys and webhooks?
Only admins. Editors and viewers won't see the option to create, edit, or revoke a key or webhook.
Can I have more than one API key?
Yes — create a separate key per system or environment (e.g. one for your CRM, one for a staging environment) so you can revoke one without breaking the others.
A webhook stopped receiving events — what happened?
Open the endpoint and check its recent deliveries for the failure reason (e.g. your server returned an error or timed out). Fix the issue on your end, then click Replay on the failed delivery to resend it.