A webhook is a URL that another tool gives you. Paste it into Settings → Integrations → Webhooks and GYMSNA sends that tool a message the moment a client buys, renews, pauses or cancels, a pack runs out or expires, or a payment fails or is refunded: who they are (name and email), which pack or membership, the status, the dates and the amount. It works with Zapier, GoHighLevel (including white-label versions), Make, n8n and your own code. It is one-way: GYMSNA tells the other tool what happened.
"test": true, so you can map the fields before a real purchase happens.A gym can have up to 5 webhooks. The URL must start with https://.
https://hooks.zapier.com/hooks/catch/) and add it in GYMSNA as above.client email, product name and subscription status.type lets one Zap treat a purchase and a cancellation differently.Webhooks by Zapier is one of Zapier's premium apps, so it needs a paid Zapier plan. Zapier's own prices apply; GYMSNA does not charge for webhooks.
client.email, client.first_name and client.last_name. Then add Add Contact Tag, Remove Contact Tag or an If/Else on type, product.name or subscription.status to run the right steps.A simple pattern: one workflow per webhook, an If/Else on type, and tags as the hand-off (for example add member-active on subscription.started and swap it for member-cancelled on subscription.cancelled). Your other workflows can then start from "tag added". Inbound Webhook is a premium trigger in GoHighLevel, so whether it carries a usage charge depends on your plan or agency.
| Event | When it is sent |
|---|---|
purchase.completed | A one-off payment went through: a class pack, a drop-in, a personal training session or a shop item. |
subscription.started | The first payment of a membership or a recurring pack went through. |
subscription.renewed | A membership or recurring pack was paid for another period. |
subscription.payment_failed | A renewal could not be collected. Stripe retries; subscription.renewed follows if a retry succeeds. subscription.booking_allowed says whether the client can still book (see the grace period). |
subscription.access_suspended | The renewal is still unpaid and the client can no longer book on it: straight after the failed payment, or when the gym's grace period runs out. subscription.renewed follows if they pay. |
subscription.cancellation_scheduled | The client or the gym asked for it to stop. It runs to the end of the period already paid for, and subscription.ends_at says when. |
subscription.reactivated | That request was withdrawn before the period ended. |
subscription.paused | The subscription was put on hold: payments stop and the client cannot book on it. |
subscription.resumed | The hold ended. |
subscription.cancelled | The membership or recurring pack has ended and will not renew. |
pack.used_up | A one-off class pack has no credits left. |
pack.expired | A one-off class pack reached its expiry date with credits still on it. |
pack.reactivated | A used-up or expired pack can be used again: a cancelled booking gave a credit back, or the gym added credits or extended it. |
purchase.refunded | A payment was refunded, in full or in part, from GYMSNA or from Stripe's dashboard. refund.full says which. |
To manage access accurately:
subscription.cancellation_scheduled as "still has access until ends_at", remove access on subscription.access_suspended or subscription.cancelled, and give it back on subscription.renewed.purchase.completed, remove it on pack.used_up, pack.expired or a full purchase.refunded, and give it back on pack.reactivated.subscription.id for a subscription, pack.id for a pack), so ending one never has to touch the others.A checkout that was started and never paid sends nothing. Pack events are sent within about two minutes of the change. A webhook set to receive every event also receives event types added later, so a workflow should ignore a type it does not know.
When a renewal fails, Stripe tries the card again over the following days. In Settings → Booking Policy → Failed payments the gym chooses how many days (0 to 30) the client can keep booking in the meantime. 0, the default, stops booking straight away.
subscription.payment_failed is sent for every failed attempt. Inside a grace period it carries subscription.booking_allowed: true and subscription.grace_until, the moment booking stops if it is still unpaid.subscription.access_suspended is sent once, when booking actually stops: with the failed payment when there is no grace period, otherwise when the grace runs out.subscription.renewed is sent when the client pays, whether by a retry or from their account page. Booking works again at once.Every event is a JSON document with the same shape. Parts that do not apply are null (a one-off purchase has no subscription, a cancellation has no payment).
{
"id": "evt_4c1d9a7e03b25f6c8a1b2d3e",
"type": "subscription.renewed",
"created_at": "2026-11-24T09:30:12.000Z",
"livemode": true,
"test": false,
"gym": { "id": 123, "name": "Northside Coaching" },
"client": {
"id": 1042,
"name": "Alex Sample",
"first_name": "Alex",
"last_name": "Sample",
"email": "alex.sample@example.com",
"has_account": true
},
"product": {
"type": "membership",
"id": 7,
"name": "Monthly Coaching Membership",
"recurring": true,
"billing_interval": "month",
"credits": null,
"valid_days": null,
"price": 149
},
"subscription": {
"id": "sub_1Qx7...",
"status": "active",
"started_at": "2026-09-24T09:30:00.000Z",
"current_period_end": "2026-12-24T09:30:00.000Z",
"next_renewal_at": "2026-12-24T09:30:00.000Z",
"cancel_at_period_end": false,
"ends_at": null,
"cancellation_requested_at": null,
"paused": false,
"resumes_at": null,
"credits_remaining": null,
"booking_allowed": true,
"grace_until": null
},
"payment": {
"amount": 149,
"amount_minor": 14900,
"currency": "USD",
"original_amount": 149,
"discount_code": null,
"payment_intent_id": "pi_3Qx9...",
"invoice_id": "in_1Qx9..."
},
"pack": null,
"refund": null
}
| Field | Meaning |
|---|---|
id | The event's id. A retry carries the same id, so use it to ignore an event you have already handled. |
type | One of the events above. |
test | true only for the samples sent by Send test. |
client | Name, first and last name, and email address. has_account is false for a guest who paid from a share link and has not finished creating their account yet; id is then null. |
product.type | pack, membership, or for other one-off payments class (a drop-in), upsell (shop items) and similar. |
product.credits, valid_days | For packs: how many sessions it holds and how long they last. |
subscription.status | active, past_due (a renewal failed), paused or cancelled. |
subscription.next_renewal_at | When the next payment is due. null when it is paused, set to stop, or ended. |
subscription.ends_at | When access ends, once a cancellation is requested or has happened. |
subscription.credits_remaining | For a recurring pack: sessions left when the event was sent. |
subscription.booking_allowed | Whether the client can book on it right now. true on a failed payment only inside the gym's grace period. |
subscription.grace_until | On payment_failed and access_suspended: when the grace period ends (or ended). null when there is none. |
pack | On pack.* and on a refund of a pack: the client's own pack. id, state (active, used_up, expired, ended), credits_total, credits_remaining, expires_at, purchased_at, and granted (true when the gym gave it without a payment). null on other events. |
refund | On purchase.refunded: id, amount (this refund), total_refunded (everything refunded on the payment so far), full, currency, reason. The payment itself is in payment. |
payment.amount | The amount as a decimal in payment.currency; amount_minor is the same in cents or pence. For subscription.payment_failed it is the amount that could not be collected, with attempt and next_attempt_at. |
Dates are UTC in ISO 8601 format. New fields may be added over time; existing ones keep their meaning.
POST with a JSON body.2xx answer within 10 seconds counts as delivered. Anything else is retried after 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours, 12 hours and 24 hours: eight tries over about two days.id to spot a repeat and created_at for the order.410), GYMSNA switches it off and emails the gym's owner. Fix the URL, send a test and switch it back on.Optional, for your own code. Zapier and GoHighLevel do not need it: their URLs are long and private. Each webhook has a signing secret (shown in the dashboard) and every request carries these headers:
Gymsna-Signature | t=<unix time>,v1=<signature> |
Gymsna-Event | The event type |
Gymsna-Event-Id | The event's id |
The signature is the HMAC-SHA256, in hex, of the timestamp, a full stop and the raw request body, keyed with the signing secret:
const crypto = require('crypto');
function isFromGymsna(rawBody, header, secret) {
const [, t, v1] = /^t=(\d+),v1=([a-f0-9]+)$/.exec(header || '') || [];
if (!t || Math.abs(Date.now() / 1000 - Number(t)) > 300) return false; // older than 5 minutes
const expected = crypto.createHmac('sha256', secret).update(`${t}.${rawBody}`).digest('hex');
return v1.length === expected.length && crypto.timingSafeEqual(Buffer.from(v1), Buffer.from(expected));
}
Use the body exactly as received, before any JSON parsing. New secret in the dashboard replaces the secret at once.
Need an event or a direction that is not here? Email support@gymsna.com.
purchase.completed; a membership is subscription.started.subscription.cancellation_scheduled. They keep access until ends_at, when subscription.cancelled follows.