How-to
How to Use Webhooks with AddToWallet
What the webhook sends
A webhook is your HTTPS endpoint. AddToWallet sends one HTTP POST when a pass is saved and one when a pass is removed. You do not subscribe to each event separately. Every webhook you create receives both.
- pass-saved when someone adds a pass to a wallet.
- pass-removed when someone removes a pass from a wallet.
API keys for your own calls to AddToWallet are documented in API authentication. A webhook is the opposite direction: AddToWallet calls you. To create passes from another app, start with the Zapier guide.
Create a webhook
- Open Settings, then Webhooks, and create a webhook.
- Enter the URL AddToWallet should call.
- Optionally set a password. Store that password in your server environment. Do not put the live password in source code, tickets, or logs.
Example URL: https://example.com/webhooks/atw

Payload fields
The body is JSON. A password, if you set one, is sent in the Authorization header so you can compare it. The body itself has no signature, and the password does not encrypt the body.
Synthetic payload:
{
"eventType": "pass-saved",
"passid": "example-pass-alex"
}
| Field | Description |
|---|---|
eventType |
pass-saved or pass-removed. |
passid |
The pass id for that event. The sample value above is not a real pass. |
Delivery, retry, and order
Each event is one POST with a 10 second timeout. A response from 200 to 299 is success. Any other status, a timeout, or a connection error is stored as a failed delivery and is not retried. If your endpoint is down at that moment, that event is not sent again. Two events close together are separate requests. Do not assume they arrive in order.
Check the password without logging it
When you set a password, AddToWallet sends it in the Authorization header. Compare the header to the value in your environment. Reject anything else with HTTP 401. Do not write the header, the password, or the raw request to logs.
const expected = process.env.ATW_WEBHOOK_PASSWORD || "";
const header = req.headers.authorization || "";
const passwordMatches = expected.length > 0 && header === expected;
if (!passwordMatches) {
res.statusCode = 401;
res.end("unauthorized");
return;
}
const eventType = req.body && req.body.eventType;
const passid = req.body && req.body.passid;
if (eventType === "pass-saved" || eventType === "pass-removed") {
// Store eventType and passid. Do not store the Authorization header.
}
res.statusCode = 200;
res.end("ok");
Point the webhook at a local tunnel only while you are developing. Send the synthetic body above, expect HTTP 200 when the password matches, and expect HTTP 401 when it does not. A successful live delivery is a 2xx response from your URL at the moment AddToWallet calls it.
Create Wallet Pass Now