Webhooks
Clickmax has two kinds of webhook: inbound (in), which receives events from an external platform, and outbound (out), which sends an event from Clickmax to an external URL when a trigger fires.
Role required: authenticated workspace member. Webhooks are managed in the Integrations area.
Direction
Values accepted when creating an inbound webhook.
Destinations accepted when creating an outbound webhook.
Triggers
Events that fire an outbound webhook (the trigger field).
Card declined vs transaction failed
REFUSED_CARD fires once per payment attempt in which the card was sent to the charge and refused. A second attempt by the buyer with the same card, minutes later, is a new refusal and fires again.
A purchase that never reaches the charge — required card missing, product out of stock, pending seller account, missing delivery address — is not a card refusal: it only fires TRANSACTION_FAILED. Pix and Boleto failures also use TRANSACTION_FAILED only.
Purchase or renewal invoice in SALE_MADE
SALE_MADE fires on the purchase and also on every paid renewal invoice of a subscription, from the second charge on. The isSubscriptionInvoice field tells them apart: false on the purchase, true on the renewal invoice.
On renewal invoices of subscriptions sold on your checkout, the body also carries subscriptionId, subscriptionExternalId (subscription code in the gateway), occurrence and purchaseDate (date of the original purchase). On those invoices, saleDate is the date of the installment charge.
The occurrence field is the charge number reported by the gateway and may skip numbers, because the gateway also counts a resent overdue charge. To know which cycle the subscription is in, count the invoices received with the same subscriptionId.
When SUBSCRIPTION_CANCELLED fires
On any subscription cancellation, whatever its origin: cancelled by the buyer, by you or by support, the automatic cancellation for missed payment after the tolerance period, and the cancellation that comes with a refund.
A subscription that reached the end of its contracted duration (the plan's last scheduled charge) is not a cancellation and does not fire this trigger.
When a trigger fires, Clickmax sends a request to the integration URL in this format:
Authentication
The request is authenticated by the cm-token header. On your endpoint, compare the received value with the token shown on the integration and reject the request (for example, with 401) if they differ. The token is fixed per integration; there is no HMAC signature of the body.
How to tell which event arrived
The body does not carry the trigger name. One integration can listen to several triggers and all of them arrive at the same URL, so use one of these options to know which event arrived:
- create one integration per trigger, each with a different URL (for example,
https://your-system.com/webhook?event=SALE_MADE);
- or tell them apart by the body fields, which differ from one event to another (see the tables below).
Response, retries and deactivation
- Any
2xx response counts as a completed delivery (COMPLETED). The response content is kept in the history.
- Any other response (such as
4xx or 5xx) or a connection failure triggers a retry. There are up to 3 attempts per event, with a growing wait between them (about 10 and 20 seconds). While waiting, the record is DELAYED; after the last failure, FAILED.
- If the integration's last 15 attempts fail, it is deactivated automatically. Fix the endpoint, reactivate the integration and resend the records from the history.
- Respond quickly and process the event afterwards: the same event may arrive more than once (for example, on a manual resend), so handle the body idempotently, using IDs such as
transactionId or leadId.
The format above applies to generic destinations (Zapier, Make, n8n, Pluga, your own system's URL, etc.). ActiveCampaign, Nota do Infoprodutor, Notazz, UTMify and VK Metrics receive the event already converted to the format and authentication each platform requires, and do not follow the tables below.
Body of each event
Each table lists the fields exactly as they arrive in the JSON:
- Required: the field is always in the body. When it is
No, the field may be missing from the JSON.
- Accepts
null: the field may arrive with the value null.
- May be empty: the text field may arrive as an empty string (
""), for example when the data was not collected.
parent.child fields are inside an object; parent[].child fields are in each item of a list.
- Dates are ISO 8601 strings in UTC (for example,
2026-01-15T14:30:00.000Z).
- Money amounts are integers in cents (
9700 = 97.00). The currency is not sent.
The examples use fictitious data. They are the same bodies sent by the integration's test button, except IDs and dates, which the test generates on the fly.
Lead created and lead captured
Triggers: LEAD_CREATED, LEAD_CAPTURED.
LEAD_CREATED fires once, when the lead comes into existence. LEAD_CAPTURED fires on every capture, including when an existing lead fills in a form again. Fields with no value on the lead are left out of the body.
Example body:
{
"fullname": "Fullname",
"email": "example@email.com",
"telephone": "9538374457",
"pageId": "cc37fec6-85c0-423b-b704-a80d195d7fe9",
"pageUrl": "https://clickmax.io",
"pageName": "Page name",
"funnelId": "a01f1d8e-c418-4217-9d80-9b4a29438a52",
"funnelName": "Funnel name",
"utmSource": "source",
"utmMedium": "medium",
"utmCampaign": "campaign",
"utmTerm": "term",
"utmContent": "content",
"src": "vturb_vsl_01",
"sck": "lote2",
"capturedAt": "2026-01-15T14:30:00.000Z"
}
Sale made
Triggers: SALE_MADE.
Example body:
{
"email": "example@email.com",
"document": "12345678909",
"firstName": "First Name",
"lastName": "Last Name",
"phone": "5538933008932",
"city": "São Paulo",
"state": "SP",
"country": "BR",
"address": "Avenida Paulista, 1000, Sala 123, Bela Vista, 01310-100",
"offerId": "cc37fec6-85c0-423b-b704-a80d195d7fe9",
"productId": "a01f1d8e-c418-4217-9d80-9b4a29438a52",
"productName": "Product Name",
"saleDate": "2026-01-15T14:30:00.000Z",
"price": 9700,
"utmSource": "source",
"utmMedium": "medium",
"utmCampaign": "campaign",
"utmTerm": "term",
"utmContent": "content",
"src": "vturb_vsl_01",
"sck": "lote2",
"pageUrl": "https://test.clickmax.io/test-clickmax",
"pageName": "Test Clickmax",
"gateway": "iopay",
"orderBumps": [
{
"offerId": "d3429377-199d-4075-aa4c-9a32d327a877",
"productId": "0b03581c-8f7e-4269-81a9-063f6e8ea6c0",
"price": 2700,
"productName": "Product Name"
}
],
"transactionId": "a19950fa-f965-4415-84d8-73e102a9ab7e",
"isSubscriptionInvoice": true,
"subscriptionId": "1fd8c3f0-8d15-4228-951f-f1d6c5df1015",
"subscriptionExternalId": "SUB-8F3K2L",
"occurrence": 3,
"purchaseDate": "2025-11-16T14:30:00.000Z"
}
Sale cancelled, refund and chargeback
Triggers: SALE_CANCELLED, REFUND_MADE, CHARGEBACK_REQUESTED.
The three triggers send the same body; only the reason changes. Set up one URL per trigger to tell them apart.
Example body:
{
"buyerId": "cc37fec6-85c0-423b-b704-a80d195d7fe9",
"leadId": "a01f1d8e-c418-4217-9d80-9b4a29438a52",
"email": "example@email.com",
"name": "Buyer Name",
"phone": "5538933008932",
"document": "12345678900",
"city": "São Paulo",
"state": "SP",
"country": "BR",
"address": "Avenida Paulista, 1000, Sala 123, Bela Vista, 01310-100",
"offerId": "d3429377-199d-4075-aa4c-9a32d327a877",
"productId": "0b03581c-8f7e-4269-81a9-063f6e8ea6c0",
"productName": "Product Name",
"price": 9700,
"transactionId": "a19950fa-f965-4415-84d8-73e102a9ab7e",
"gateway": "iopay",
"cancelledDate": "2026-01-15T14:30:00.000Z",
"utmSource": "source",
"utmMedium": "medium",
"utmCampaign": "campaign",
"utmTerm": "term",
"utmContent": "content",
"src": "vturb_vsl_01",
"sck": "lote2"
}
Subscription started
Triggers: SUBSCRIPTION_STARTED.
Example body:
{
"email": "example@email.com",
"document": "12345678900",
"firstName": "John",
"lastName": "Doe",
"phone": "5538933008932",
"offerId": "cc37fec6-85c0-423b-b704-a80d195d7fe9",
"orderBumps": [
{
"offerId": "a01f1d8e-c418-4217-9d80-9b4a29438a52",
"productId": "d3429377-199d-4075-aa4c-9a32d327a877",
"price": 2700,
"productName": "Product Name"
}
],
"transactionId": "0b03581c-8f7e-4269-81a9-063f6e8ea6c0",
"utmSource": "source",
"utmMedium": "medium",
"utmCampaign": "campaign",
"utmTerm": "term",
"utmContent": "content",
"src": "vturb_vsl_01",
"sck": "lote2"
}
Subscription cancelled
Triggers: SUBSCRIPTION_CANCELLED.
Example body:
{
"buyerId": "cc37fec6-85c0-423b-b704-a80d195d7fe9",
"leadId": "a01f1d8e-c418-4217-9d80-9b4a29438a52",
"email": "example@email.com",
"name": "Buyer Name",
"telephone": "5538933008932",
"document": "12345678900",
"city": "São Paulo",
"state": "SP",
"country": "BR",
"address": "Avenida Paulista, 1000, Sala 123, Bela Vista, 01310-100",
"productName": "Product Name",
"price": 9700,
"subscriptionStatus": "canceled",
"subscriptionId": "d3429377-199d-4075-aa4c-9a32d327a877",
"offerId": "0b03581c-8f7e-4269-81a9-063f6e8ea6c0",
"productId": "a19950fa-f965-4415-84d8-73e102a9ab7e",
"frequency": "monthly",
"gateway": "iopay",
"cancelledDate": "2026-01-15T14:30:00.000Z",
"utmSource": "source",
"utmMedium": "medium",
"utmCampaign": "campaign",
"utmTerm": "term",
"utmContent": "content",
"src": "vturb_vsl_01",
"sck": "lote2"
}
Abandoned cart
Triggers: ABANDONED_CART.
Example body:
{
"leadId": "cc37fec6-85c0-423b-b704-a80d195d7fe9",
"leadName": "Lead Name",
"leadEmail": "lead@email.com",
"leadDocument": "12345678909",
"leadCity": "City",
"leadTelephone": "5538933008932",
"leadWhatsappNumber": "5538933008932",
"offerId": "a01f1d8e-c418-4217-9d80-9b4a29438a52",
"offerName": "Meu produto",
"offerPrice": 9700,
"offerType": "software",
"ownerId": "d3429377-199d-4075-aa4c-9a32d327a877",
"projectId": "0b03581c-8f7e-4269-81a9-063f6e8ea6c0",
"productId": "a19950fa-f965-4415-84d8-73e102a9ab7e",
"abandonedDate": "2026-01-15T14:30:00.000Z",
"stage": "personal_data",
"utmSource": "source",
"utmMedium": "medium",
"utmCampaign": "campaign",
"utmTerm": "term",
"utmContent": "content",
"src": "vturb_vsl_01",
"sck": "lote2"
}
Card refused
Triggers: REFUSED_CARD.
Example body:
{
"buyerId": "cc37fec6-85c0-423b-b704-a80d195d7fe9",
"leadId": "a01f1d8e-c418-4217-9d80-9b4a29438a52",
"offerId": "d3429377-199d-4075-aa4c-9a32d327a877",
"offerName": "Meu produto",
"offerPrice": 9700,
"offerType": "software",
"buyerEmail": "buyer@email.com",
"buyerName": "Buyer Name",
"buyerTelephone": "5538933008932",
"ownerId": "0b03581c-8f7e-4269-81a9-063f6e8ea6c0",
"projectId": "a19950fa-f965-4415-84d8-73e102a9ab7e",
"productId": "1fd8c3f0-8d15-4228-951f-f1d6c5df1015",
"refusedDate": "2026-01-15T14:30:00.000Z",
"failReason": "Cartão recusado pela operadora",
"utmSource": "source",
"utmMedium": "medium",
"utmCampaign": "campaign",
"utmTerm": "term",
"utmContent": "content",
"src": "vturb_vsl_01",
"sck": "lote2"
}
Transaction failed
Triggers: TRANSACTION_FAILED.
Example body:
{
"buyerId": "cc37fec6-85c0-423b-b704-a80d195d7fe9",
"leadId": "a01f1d8e-c418-4217-9d80-9b4a29438a52",
"offerId": "d3429377-199d-4075-aa4c-9a32d327a877",
"offerName": "Meu produto",
"offerPrice": 9700,
"offerType": "software",
"buyerEmail": "buyer@email.com",
"buyerName": "Buyer Name",
"buyerTelephone": "5538933008932",
"ownerId": "0b03581c-8f7e-4269-81a9-063f6e8ea6c0",
"projectId": "a19950fa-f965-4415-84d8-73e102a9ab7e",
"productId": "1fd8c3f0-8d15-4228-951f-f1d6c5df1015",
"paymentType": "credit",
"failedDate": "2026-01-15T14:30:00.000Z",
"failReason": "Falha ao processar a transação",
"utmSource": "source",
"utmMedium": "medium",
"utmCampaign": "campaign",
"utmTerm": "term",
"utmContent": "content",
"src": "vturb_vsl_01",
"sck": "lote2"
}
Pix or boleto expired or overdue
Triggers: PIX_OR_BOLETO_EXPIRED_OR_OVERDUE.
Example body:
{
"buyerId": "cc37fec6-85c0-423b-b704-a80d195d7fe9",
"leadId": "a01f1d8e-c418-4217-9d80-9b4a29438a52",
"offerId": "d3429377-199d-4075-aa4c-9a32d327a877",
"offerName": "Meu produto",
"offerPrice": 9700,
"offerType": "software",
"buyerEmail": "buyer@email.com",
"buyerName": "Buyer Name",
"buyerDocument": "12345678909",
"buyerTelephone": "5538933008932",
"city": "São Paulo",
"state": "SP",
"country": "BR",
"address": "Avenida Paulista, 1000, Sala 123, Bela Vista, 01310-100",
"ownerId": "0b03581c-8f7e-4269-81a9-063f6e8ea6c0",
"projectId": "a19950fa-f965-4415-84d8-73e102a9ab7e",
"productId": "1fd8c3f0-8d15-4228-951f-f1d6c5df1015",
"expiredDate": "2026-01-15T14:30:00.000Z",
"utmSource": "source",
"utmMedium": "medium",
"utmCampaign": "campaign",
"utmTerm": "term",
"utmContent": "content",
"src": "vturb_vsl_01",
"sck": "lote2"
}
Tag added and tag removed
Triggers: TAG_ADDED, TAG_REMOVED.
The contact fields belong to the lead that got or lost the tag.
Example body:
{
"id": "cc37fec6-85c0-423b-b704-a80d195d7fe9",
"email": "example@email.com",
"name": "Buyer Name",
"telephone": "5538933008932",
"whatsappNumber": "5538933008932",
"secondaryEmail": "example2@email.com",
"nameTag": "Tag Name",
"colorTag": "1b0570"
}
Funnel created and funnel deleted
Triggers: FUNNEL_CREATED, FUNNEL_DELETED.
Example body:
{
"name": "Funnel name",
"description": "Funnel description",
"funnelUrl": "new-project-5250.clickmax.localhost/funnel-name",
"path": "funnel-name",
"type": "sequentialSales",
"category": "basic"
}
Funnel edited
Triggers: FUNNEL_EDITED.
Carries the whole funnel before (oldFields) and after (newFields) the edit. Only fires when one of these fields changed.
Example body:
{
"oldFields": {
"name": "Old funnel name",
"description": "Old funnel description",
"funnelUrl": "new-project-5250.clickmax.localhost/old-funnel-name",
"path": "old-funnel-name",
"type": "sequentialSales",
"category": "basic"
},
"newFields": {
"name": "Funnel name",
"description": "Funnel description",
"funnelUrl": "new-project-5250.clickmax.localhost/funnel-name",
"path": "funnel-name",
"type": "sequentialSales",
"category": "basic"
}
}
Page deleted
Triggers: PAGE_DELETED.
Also fires for each page when the whole project is deleted.
Example body:
{
"name": "Page name",
"slug": "page-slug",
"pageUrl": "https://test.clickmax.io/page-slug",
"type": "sales"
}
Project created and project deleted
Triggers: PROJECT_CREATED, PROJECT_DELETED.
Example body:
{
"name": "Project name"
}
Record statuses
Every delivery creates a record with one of these statuses.
If it didn't work
- The platform gets a
401 when sending inbound: the webhook is inactive, has been deleted, or the token/signature does not match — see Error codes.
- An outbound webhook never reaches its destination: check the record status and the endpoint's response in Error codes.
- General questions about integrations: see the Frequently asked questions.