ClonifyDevelopersOpen panel

Getting started

  • Authentication
  • Errors
  • Pagination
  • Rate limits
  • Webhooks
  • For AI agents
  • MCP server

API reference

  • Student learning activity6
  • External API deliveries6
  • Chat with the clone1
  • Contacts & tags5
  • Academy access4
  • Conversations4
  • Product catalogue11
  • External sales2
  • Knowledge12
  • Multimedia4
  • Clones (versions in the API)3
  • Meetings & bookings3
  • Webinars6
  • Account & usage1
Clonify

External sales

POST/api/v1/sales

Record a sale charged elsewhere

If you charge outside Clonify (your own gateway, Hotmart, ThriveCart…), record each sale here and the affiliate program works as if the charge were ours: the sale is attributed by the buyer’s email (the lead rules) or by the affiliate’s ref code if it travelled to your checkout, and the commission uses your rate and your terms. The affiliate sees it in their portal right away. Idempotent by order_ref: resending the same sale returns already_recorded and duplicates nothing — retry without fear. Built to be fired from n8n, Make or Zapier when a sale closes.

Write permissionPro and Scale plans (Affiliates)

Body (JSON)

emailstring (email)required

The buyer’s email. It links the sale to its lead — and to the affiliate who brought them.

amount_centsintegerrequired

Amount charged, in cents (€1,997 → 199700).

order_refstring 1..120required

Your system’s order number: the sale’s identity. Resending never duplicates, and the refund is recorded against it.

product_idintegerrequired

The Clonify product card for what was sold (GET /api/v1/products for ids). Selling elsewhere? The external-link card works.

refstring

Affiliate code (?ref=) carried to your checkout, if you have it. The safety net in case the buyer pays with a different email.

currencystring ISO-3

EUR only for now ("eur" or omitted). Any other currency returns 400: convert to euro cents before sending.

namestring
bash
curl -X POST "https://www.clonify.com/api/v1/sales" \
  -H "Authorization: Bearer clk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"email":"…","amount_cents":1,"order_ref":"…","product_id":1}'
json
{
  "object": "sale",
  "order_ref": "PED-1042",
  "product_id": 12,
  "product_title": "Máster Ejecutivo",
  "amount_cents": 199700,
  "already_recorded": false,
  "affiliate": { "name": "Ana Ruiz", "code": "a7fk29" }
}
POST/api/v1/sales/refund

Record a refund

Reflects the refund of a sale recorded through the API. The affiliate’s commission drops on its own (it is always computed net of refunds); the sale is never deleted — it stays flagged so everything squares with your gateway.

Write permissionPro and Scale plans (Affiliates)

Body (JSON)

order_refstring 1..120required

The same order number the sale was recorded with.

refunded_amount_centsintegerrequired

The ACCUMULATED amount refunded for that sale, in cents — not the delta. Sending the same value twice leaves it unchanged, and the accumulated amount CAN ONLY GROW: a recorded refund cannot be undone, so double-check the order_ref before sending. Full refund = the whole amount.

bash
curl -X POST "https://www.clonify.com/api/v1/sales/refund" \
  -H "Authorization: Bearer clk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"order_ref":"…","refunded_amount_cents":1}'
json
{
  "object": "refund",
  "order_ref": "PED-1042",
  "refunded_amount_cents": 199700
}