Postback URLs

Get real-time GET notifications when referrals, sales, or commissions happen.

Postback URLs send a GET request to your URL when events happen — perfect for ad networks, trackers, or automations.

Quick Setup

  1. Go to Settings → Postback in your affiliate portal
  2. Click Add Postback URL
  3. Pick your events, enter your URL with placeholders, save

Events

EventFires when…
referral.leadNew referral tracked
referral.convertedReferral becomes a customer
sale.createdPayment recorded
commission.createdCommission calculated

Placeholders

Insert these into your URL — they get replaced with real values:

PlaceholderExample
{event_type}commission.created
{referral_id}ref_abc123
{tracking_id}john
{affiliate_id}aff_xyz789
{status}CONVERTED
{sale_amount}99.00
{sale_currency}USD
{commission_amount}12.50
{commission_currency}USD
{transaction_id}txn_123
{sub1}demo-sub1
{sub2}demo-sub2
{sub3}demo-sub3
{sub4}demo-sub4
{sub5}demo-sub5
{timestamp}2026-03-05T10:30:45Z

Sub parameters

Postbacks can pass back the sub parameters stored on the referral. Use {sub1}, {sub2}, {sub3}, {sub4}, and {sub5} in your URL to match a postback to your own campaign, placement, or click data.

They work in all four events: referral.lead, referral.converted, sale.created, and commission.created.

  • URL-encoded once: Affonso encodes each value a single time when it fills in the placeholder, so reserved characters are safe in a query string. Don't encode the placeholder yourself. For example, news & sale is sent as news%20%26%20sale.
  • Empty if missing: If the referral has no value for a sub parameter, the placeholder is replaced with an empty string. a={sub1}&b={sub2} becomes a=&b= when neither is set.
  • Repeatable: You can use the same placeholder more than once in a URL.

Send Test fills {sub1} – {sub5} with demo-sub1 – demo-sub5.

Example

Template:

https://tracker.com/pb?event={event_type}&rid={referral_id}&amount={commission_amount}

What gets sent:

https://tracker.com/pb?event=commission.created&rid=ref_abc123&amount=12.50

Template with a sub parameter:

https://tracker.com/pb?event={event_type}&click={sub1}&amount={commission_amount}

What gets sent when sub1 is news & sale:

https://tracker.com/pb?event=commission.created&click=news%20%26%20sale&amount=12.50

Testing

Click Send Test on any saved postback URL. You'll see the HTTP status code and response time instantly.

Limits

  • Max 5 postback URLs
  • HTTPS only
  • 10s timeout per request
  • Up to 3 delivery attempts with exponential backoff (5 s → 30 s)

Was this article helpful?