Landing Platform Landing Platform
Developer Affiliate
POST /api/affiliate/conversions Token + HMAC

Record a conversion (S2S)

Record an attributed sale from an external store.

The request body is signed with the program's S2S secret: X-LP-Signature: hex(hmac_sha256(raw_body, secret)), X-LP-Program: <id>. Idempotent on external_id — replaying a sale is a safe no-op.

Rate limited.

Body parameters

auto-derived
external_id
string required
Your store's unique id for the sale (idempotency key). max: 255
amount_cents
integer required
The sale value in minor units (e.g. pence). min: 0
ref
string optional
The affiliate's referral code that drove the sale (required unless `coupon` is sent).
coupon
string optional
The affiliate's coupon code, if the buyer used one instead of a link (required unless `ref` is sent).
currency
string optional
ISO-4217 code (default GBP).
kind
string optional
"initial" (default) or "renewal". one of: initial, renewal, refund
customer_ref
string optional
Your opaque id for the buyer (optional). max: 255
occurred_at
string · date optional
—

Responses

201 { "success": true, "recorded": true, "conversion_id": 4821 }
401 { "success": false, "message": "Invalid signature" }
response
{ "success": true, "recorded": true, "conversion_id": 4821 }