Developers
TOTUM can send your member and payment events to your own web addresses, so your code or another tool can act on them. An Owner or Administrator sets them up on the Integrations page, under Webhooks. It is free on every plan.
How sends work
Up to 5 https addresses per business, each with the events you pick and its own signing secret. Each event is sent as a POST with a JSON body within a minute of it happening. Answer with any 2xx code within 10 seconds. Redirects are not followed.
Anything else is tried again with growing gaps (1 minute, 5, 15, then 1, 2, 4 and 8 hours) for 24 hours. An address that fails every send for 3 days is turned off, and the owner is emailed. Turning it back on is one click. The card lists the last 30 days of sends, with a Resend button.
Health data, nutrition, body measurements, injuries, waiver answers, Kids Club, anyone under 18, and card numbers are never sent. Payment events carry amounts in cents.
Headers
TOTUM-Signature: t=<unix seconds>,v1=<hex>, where v1 is the HMAC-SHA256 of <t>.<body> under your secret.TOTUM-Event-Id: the event id. A retry or a Resend keeps it, so use it to skip events you have already handled.TOTUM-Event: the event type.
Checking a signature (Node)
import { createHmac, timingSafeEqual } from 'node:crypto';
import express from 'express';
const SECRET = 'whsec_...'; // copy it from the Webhooks card; keep it out of source control
const app = express();
// Read the raw body: the signature is over the exact bytes that were sent.
app.post('/totum', express.raw({ type: 'application/json' }), (req, res) => {
const header = req.get('TOTUM-Signature') ?? '';
const parts = Object.fromEntries(header.split(',').map((part) => part.split('=')));
const body = req.body.toString('utf8');
const expected = createHmac('sha256', SECRET).update(`${parts.t}.${body}`).digest('hex');
const given = Buffer.from(parts.v1 ?? '', 'hex');
const fresh = Math.abs(Date.now() / 1000 - Number(parts.t)) < 300; // within 5 minutes
if (!fresh || given.length !== 32 || !timingSafeEqual(given, Buffer.from(expected, 'hex'))) {
return res.status(400).send('Bad signature');
}
const event = JSON.parse(body);
// The same event can arrive twice (a retry, or Resend). Skip ids you have already handled.
// req.get('TOTUM-Event-Id') is the same as event.id.
console.log(event.type, event.data);
res.sendStatus(200);
});
app.listen(3000);Events
Send test on the Webhooks card sends a sample of the first event the address gets, with "test": true.
member.joined
Someone starts a plan (once it is paid for, when it waits on payment).
{
"id": "3d5e7f90-1a2b-4c3d-8e9f-0a1b2c3d4e5f",
"type": "member.joined",
"createdAt": "2026-12-01T14:03:22.000Z",
"test": false,
"businessId": "8a9b0c1d-2e3f-4a5b-9c6d-7e8f9a0b1c2d",
"data": {
"memberId": "6f1c2d0e-8a4b-4c3d-9e2f-1a2b3c4d5e6f",
"name": "Jordan Reyes",
"email": "jordan@example.com",
"membershipId": "0b7e5a19-3c2d-4f6e-8a1b-9c8d7e6f5a4b",
"plan": "Unlimited Monthly",
"location": "Downtown",
"startDate": "2026-12-01"
}
}member.canceled
A plan is canceled, now or at the end of its period.
{
"id": "3d5e7f90-1a2b-4c3d-8e9f-0a1b2c3d4e5f",
"type": "member.canceled",
"createdAt": "2026-12-01T14:03:22.000Z",
"test": false,
"businessId": "8a9b0c1d-2e3f-4a5b-9c6d-7e8f9a0b1c2d",
"data": {
"memberId": "6f1c2d0e-8a4b-4c3d-9e2f-1a2b3c4d5e6f",
"name": "Jordan Reyes",
"email": "jordan@example.com",
"membershipId": "0b7e5a19-3c2d-4f6e-8a1b-9c8d7e6f5a4b",
"plan": "Unlimited Monthly",
"location": "Downtown",
"lastDay": "2026-12-31",
"reason": null
}
}member.frozen
A plan is frozen.
{
"id": "3d5e7f90-1a2b-4c3d-8e9f-0a1b2c3d4e5f",
"type": "member.frozen",
"createdAt": "2026-12-01T14:03:22.000Z",
"test": false,
"businessId": "8a9b0c1d-2e3f-4a5b-9c6d-7e8f9a0b1c2d",
"data": {
"memberId": "6f1c2d0e-8a4b-4c3d-9e2f-1a2b3c4d5e6f",
"name": "Jordan Reyes",
"email": "jordan@example.com",
"membershipId": "0b7e5a19-3c2d-4f6e-8a1b-9c8d7e6f5a4b",
"plan": "Unlimited Monthly",
"location": "Downtown",
"frozenFrom": "2026-12-05",
"frozenUntil": null
}
}member.unfrozen
A freeze ends.
{
"id": "3d5e7f90-1a2b-4c3d-8e9f-0a1b2c3d4e5f",
"type": "member.unfrozen",
"createdAt": "2026-12-01T14:03:22.000Z",
"test": false,
"businessId": "8a9b0c1d-2e3f-4a5b-9c6d-7e8f9a0b1c2d",
"data": {
"memberId": "6f1c2d0e-8a4b-4c3d-9e2f-1a2b3c4d5e6f",
"name": "Jordan Reyes",
"email": "jordan@example.com",
"membershipId": "0b7e5a19-3c2d-4f6e-8a1b-9c8d7e6f5a4b",
"plan": "Unlimited Monthly",
"location": "Downtown",
"frozenFrom": "2026-12-05",
"unfrozenOn": "2027-01-05"
}
}payment.succeeded
A charge goes through, by card or at the desk.
{
"id": "3d5e7f90-1a2b-4c3d-8e9f-0a1b2c3d4e5f",
"type": "payment.succeeded",
"createdAt": "2026-12-01T14:03:22.000Z",
"test": false,
"businessId": "8a9b0c1d-2e3f-4a5b-9c6d-7e8f9a0b1c2d",
"data": {
"memberId": "6f1c2d0e-8a4b-4c3d-9e2f-1a2b3c4d5e6f",
"name": "Jordan Reyes",
"email": "jordan@example.com",
"paymentId": "9a3b8c7d-6e5f-4a1b-8c2d-3e4f5a6b7c8d",
"amountCents": 8900,
"currency": "usd",
"description": "Unlimited Monthly",
"purpose": "membership"
}
}payment.failed
A charge fails, including each retry of a renewal.
{
"id": "3d5e7f90-1a2b-4c3d-8e9f-0a1b2c3d4e5f",
"type": "payment.failed",
"createdAt": "2026-12-01T14:03:22.000Z",
"test": false,
"businessId": "8a9b0c1d-2e3f-4a5b-9c6d-7e8f9a0b1c2d",
"data": {
"memberId": "6f1c2d0e-8a4b-4c3d-9e2f-1a2b3c4d5e6f",
"name": "Jordan Reyes",
"email": "jordan@example.com",
"paymentId": "9a3b8c7d-6e5f-4a1b-8c2d-3e4f5a6b7c8d",
"amountCents": 8900,
"currency": "usd",
"description": "Unlimited Monthly",
"purpose": "membership",
"nextRetryAt": null
}
}payment.refunded
A refund is made, of all or part of a charge or a day pass.
{
"id": "3d5e7f90-1a2b-4c3d-8e9f-0a1b2c3d4e5f",
"type": "payment.refunded",
"createdAt": "2026-12-01T14:03:22.000Z",
"test": false,
"businessId": "8a9b0c1d-2e3f-4a5b-9c6d-7e8f9a0b1c2d",
"data": {
"memberId": "6f1c2d0e-8a4b-4c3d-9e2f-1a2b3c4d5e6f",
"name": "Jordan Reyes",
"email": "jordan@example.com",
"refundedCents": 4450,
"currency": "usd",
"originalPaymentId": "9a3b8c7d-6e5f-4a1b-8c2d-3e4f5a6b7c8d",
"originalAmountCents": 8900,
"originalDescription": "Unlimited Monthly"
}
}daypass.purchased
A day pass is bought, in the app or at the desk.
{
"id": "3d5e7f90-1a2b-4c3d-8e9f-0a1b2c3d4e5f",
"type": "daypass.purchased",
"createdAt": "2026-12-01T14:03:22.000Z",
"test": false,
"businessId": "8a9b0c1d-2e3f-4a5b-9c6d-7e8f9a0b1c2d",
"data": {
"memberId": "6f1c2d0e-8a4b-4c3d-9e2f-1a2b3c4d5e6f",
"name": "Jordan Reyes",
"email": "jordan@example.com",
"dayPassId": "17ce2b4a-5d6e-4f70-8a91-b2c3d4e5f607",
"location": "Downtown",
"priceCents": 2000,
"currency": "usd"
}
}