Post conversions from your backend for maximum reliability: retries, idempotency, and complete auditability.
You’ll use the Discount Capture Secret to authenticate conversion posts. Keep it in server-side env vars only.
Supported headers: x-pepf-discount-secret or x-referlabs-discount-secret.
When a transaction is confirmed (paid/complete), call the discount capture endpoint from your backend.
HTTP request
POST https://referlabs.com.au/api/discount-codes/redeem
Headers:
Content-Type: application/json
x-pepf-discount-secret: <YOUR_SECRET>
Body:
{
"discountCode": "VIP100",
"orderReference": "ORDER-12345",
"amount": "199.00",
"metadata": {
"platform": "custom_api",
"customerEmail": "buyer@example.com"
}
}Use the real discount code used in the transaction. This is what drives correct ambassador attribution.
orderReference on retries./api/discount-codes/redeem from your server and confirm a 200 response.