Checkout sales
Sales webhook: any platform in TraceClose
Create the Sales webhook (any platform) connection in Settings › Integrations, generate the secret and send each sale, as JSON, to the URL the connection shows, with the secret in the header. It works with Zapier, Make, n8n or a snippet of code in your own system.
Use this route when your platform isn’t on the list of ready-made integrations (Hotmart, Kiwify, Eduzz and Shopify): another checkout, your own system or a spreadsheet. You need an automation tool that can make an HTTP call, or someone who can write a few lines of code.
Step by step
Create the connection
In Settings › Integrations, click New connection and choose Sales webhook (any platform). It’s the same connection as the website lead: it handles both leads and sales.
Generate and keep the secret
Click Generate secret and then Copy secret. Keep it in the tool that will do the sending: after you save, it isn’t shown again.
Copy the URL
Open the connection: the screen shows the Webhook URL, in the format
https://t.traceclose.com/webhooks/leads/site/<connection-id>, along with examples ready to copy.Set up the request in your tool
When the platform reports an approved sale, make a POST to the URL with the sale JSON (example below) and the
Authorization: Bearer <secret>header.Test with a sale
Send a test sale with your own email and check the lead and the sale in the dashboard.
The sale JSON
POST https://t.traceclose.com/webhooks/leads/site/<connection-id>
Content-Type: application/json
Authorization: Bearer <secret>
{
"version": 1,
"event": "sale",
"data": {
"externalId": "order-5001",
"email": "maria@example.com",
"phone": "+12125550188",
"amountMinor": 49700,
"currency": "USD",
"occurredAt": "2026-10-12T10:15:00-04:00"
}
}
externalId: the order ID on the platform. Sending the same order again never duplicates the sale.emailorphone: at least one, to find the lead. Phone with the country code (+1…) or in the format of the country your business operates in.amountMinor: the amount in cents (the currency’s minor unit), with no comma or decimal point: $497.00 is sent as49700.currency: the order’s currency (USD,BRL…).- Optional:
occurredAt(when it was paid, with the time zone offset),leadExternalId(if you already sent the lead earlier) andeventId(the pixel’s Purchase ID, so Meta doesn’t count it twice).
Refunds
To cancel a sale, send the refund event with the order’s same externalId. Sending the same refund twice doesn’t cause an error.
{
"version": 1,
"event": "refund",
"data": { "externalId": "order-5001" }
}
Buyer source (optional)
If the platform stores the UTMs or the fbclid, first send the lead event with the attribution field (utmSource, utmCampaign, utmContent, fbclid, fbc, fbp…). The full format is in website form leads.
Zapier, Make and n8n
- Zapier: your platform’s trigger (“new sale”) and the Webhooks by Zapier action, POST event (or Custom Request), with a JSON body and the
Authorizationheader. - Make: your platform’s module and the HTTP › Make a request module, POST method, JSON body and the header.
- n8n: your platform’s node (or Webhook) and the HTTP Request node, POST method, JSON body and the header.
- If the platform sends the amount with decimals (
497.00), add a formula step in your tool to multiply by 100 and round before sending.
Webhook responses
- 200: received (also when it’s a repeat).
- 401: wrong secret, disabled connection or a URL from another connection.
- 400: body in the wrong format; the response points out the field.
- 5xx or network error: send it again. The same sale never comes in twice.
If the Meta pixel is already installed on the platform’s checkout and sends Purchase, choose who sends the purchase: turn off Purchase sending in this connection with one click (or turn off Purchase in the checkout pixel). That way Meta gets the sale only once, and it still shows up in the dashboard and in ROAS.
Didn’t work? See…
- 400 on every sale: almost always the amount was sent with a comma or decimal point, or both email and phone were missing.
- Lost the secret: generate a new one in Edit and replace it in your tool.
- Sale with no source in the report: the platform didn’t send UTMs; see URL parameters in your ads.
Frequently asked questions
Do I need to know how to code?
Not if you use Zapier, Make or n8n: you just set up the request with the example JSON. With your own code, it takes a few lines.
Can I sign the request instead of sending the secret?
Yes: send the x-traceclose-signature header with sha256= and the HMAC-SHA256 of the body, computed with the secret.
Does the sale go to Meta?
Yes, as a Purchase with amount and currency, if conversion sending is on and the lead is in a won stage that has Purchase.
See the path from ad to sale in your WhatsApp.
Try TraceClose free for 7 days with your team. No card needed to try.