Skip to content
DocsReferencePOST /api/v1/convert

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

FieldRequiredDescription
order_idYesUnique order / invoice ID per campaign (idempotency key)
amountYesRevenue number in major units (e.g. 49.99 = $49.99)
click_idPreferredClick ID from redirect. Alias: cnv_id
affiliate_codeFallbackOnly if click_id unavailable
statusNoDefault lead
eventNoConversion event, e.g. registration or ftd. Counted per event in reports; fires postbacks set for that event
currencyNoDefault 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.