Skip to the content

Postbacks and webhooks

See a sale in seconds with postbacks

A sync can take minutes to show a new sale. A postback shows the sale in seconds, and a webhook sends it to your own server.

What it looks like

Webhook eventsSample data
  1. conversion.createdpending14:02:11

    Awin commission €4.20 on /boots-review

  2. conversion.status_changedapproved13:47:30

    Adtraction pending approved

  3. commission.changed11:05:02

    Daisycon 8% 10%

  4. payout.createdpaid09:00:14

    Partner-Ads €312.40

  1. Each row is one event. The name is the event type, for example conversion.created.
  2. A new conversion is pending until the network decides. A later event shows the change of the status.
  3. Other events, such as a payout, use the same webhook.

Why this matters

A fast sale signal lets you act while the visitor is still on your mind: thank a reader, update a report or watch a campaign that you just started.

It also lets you check your tracking at once. You make a test sale and you see it in seconds.

Why most tools cannot tell you

A sync reads the API of a network on a schedule. Between two syncs, a sale is not visible.

A raw postback is only a hint. Without a second check, a lost request or a wrong value gives a wrong number.

A webhook without a signature can come from anyone. Your server needs a way to know that the request is real.

How AffFast does it

You make a postback source for a connection. AffFast gives you a secret URL. The network calls that URL for each conversion, and AffFast answers 200 at once.

A worker makes a provisional conversion and sends the conversion.created event to your webhooks. The requests follow the Standard Webhooks specification, and each one has a signature.

The next sync overwrites the provisional conversion with the data of the network. The same transaction ID is in both, so you never get a duplicate.

How to do it

  1. Make a postback source for a connection with POST /v1/postback_sources.
  2. Paste template_url from the response into the network. The docs show the steps for Awin, Impact, Tradedoubler and other platforms.
  3. Make a webhook endpoint with POST /v1/webhook_endpoints and choose the events. Save the whsec_ secret. The API shows it one time.
  4. Verify the signature of each request with the secret. The docs have the code.
  5. Treat the postback as a hint. The sync of the connection is the source of truth.

Learn more

Features that this guide uses

Start your free trial

Free for 14 days. No card needed. Cancel any time.