POST /api/v1/convert
Server-side JSON endpoint. Use when your backend already handles checkout — never call from browser JavaScript (secret would leak).
Authentication
Header X-Program-Secret — campaign secret from the dashboard (shown once at creation).
Request body
| Field | Required | Description |
|---|---|---|
| order_id | Yes | Unique order / invoice ID per campaign (idempotency key) |
| amount | Yes | Revenue number in major units (e.g. 49.99 = $49.99) |
| click_id | Preferred | Click ID from redirect. Alias: cnv_id |
| affiliate_code | Fallback | Only if click_id unavailable |
| status | No | Default lead |
| event | No | Conversion event, e.g. registration or ftd. Counted per event in reports; fires postbacks set for that event |
| currency | No | Default USD |
Example
curl -X POST "https://capve.app/api/v1/convert" \
-H "Content-Type: application/json" \
-H "X-Program-Secret: sk_your_program_secret" \
-d '{
"order_id": "in_2026_000145",
"amount": 99.00,
"click_id": "clk_from_redirect_url"
}'Response
{
"ok": true,
"status": "created",
"conversion": {
"affiliate_code": "abc123xyz",
"click_id": "clk_from_redirect_url",
"order_id": "in_2026_000145",
"amount": 99,
"amount_cents": 9900,
"status": "lead",
"currency": "USD"
}
}status is created or duplicate when the same order_id was already recorded for this campaign.