Skip to main content
Postbacks let your server report sales and sign-ups directly, without code in the browser. Use them when the purchase happens in your backend, in an app, or on a platform where you can’t run tapfiliate.js. Each postback is a single GET or POST request. Authenticate it with your API key in the X-Api-Key header, as described in Authentication.

Who referred the visitor

To attribute a conversion or customer, send one of these. If you send several, the first one in this list wins:
  1. coupon — the affiliate’s coupon code.
  2. click_id — the click ID, if you stored it when the visitor arrived.
  3. referral_code — the affiliate’s referral code, the value of ref= in their link.
  4. asset_id and source_id — from the affiliate’s link.

Create a conversion

A successful request returns 200 with the created conversion:

Update a conversion

Approve or disapprove a conversion, or correct its amount, by its external_id. Commission amounts are recalculated.

Create a customer

Track a sign-up before the first payment. Later conversions with the same customer_id are attributed to the same affiliate.

Update a customer

Passing affiliate data through

Affiliates can add tm_ parameters to their links, for example ?tm_foo=bar&tm_baz=qux. To keep this data, read the parameters from the landing URL and send them as meta_data, here { "foo": "bar", "baz": "qux" }.
Track a test conversion before you launch your program to check the whole flow.