Docs / Connect
Webhook
Send purchases from any store or tool to Testimoon with a signed webhook.
Use the webhook when your store isn't one of the built-in integrations. Anything that can send an HTTP request works: your own backend, Zapier, Make or n8n.
Set it up
Open Integrations and connect Webhook. You get two values:
- Webhook URL, where you send purchases
- Signing secret, to sign each request
Send a purchase
Send a POST request with a JSON body:
{
"type": "purchase",
"email": "[email protected]",
"name": "Maria Lindqvist",
"product": "Pro plan",
"order_id": "4021",
"amount": 290,
"currency": "USD",
"paid_at": "2026-12-01T10:00:00Z"
}
Only email is required. Send product if your automations ask about specific products. Send order_id so a repeated request isn't counted twice and refunds can find the order.
Sign the request
Put an HMAC-SHA256 hex digest of the raw request body, made with your signing secret, in the Testimoon-Signature header. In Node.js:
const crypto = require('crypto');
const body = JSON.stringify(purchase);
const signature = crypto
.createHmac('sha256', process.env.TESTIMOON_SECRET)
.update(body)
.digest('hex');
await fetch(webhookUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Testimoon-Signature': signature,
},
body,
});
Sign the exact bytes you send. Re-encoding the JSON after signing breaks the signature.
Refunds
Send "type": "refund" with the same order_id. An invite that hasn't gone out is cancelled, and reminders stop for one that has.
Responses
| Status | Meaning |
|---|---|
202 |
Received. The body says accepted, duplicate or ignored. |
401 |
The signature didn't match. |
429 |
Too many requests. The limit is 120 a minute. |
The same order_id and type are only processed once within 30 days, so retrying is safe.