For developers
Postbacks for partners
Set a postback URL from your tracker on a program in the portal, and ViralPayouts calls it when a sale is recorded, approved or reversed, with your sub ID and the payout filled in. The buyer's details and the brand's order id are never sent.
Set it up
- Put your tracker's click id in your link:
/r/<handle>/<program>?sub={your tracker click id macro}. - In the portal, open the program, paste your tracker's postback URL with ViralPayouts macros, and save. You need a full sign-in from an emailed link to do this.
- Press Send a test postback to fire one postback with sample values and check your tracker receives it.
https://tracker.example.com/postback?cid={sub_id}&payout={payout}¤cy={currency}&status={status}&txid={conversion_id}Macros
| Macro | Filled with |
|---|---|
{sub_id} | The sub ID on the link, or carried on the brand's event. Empty if none. |
{sub2} to {sub5} | Sub IDs 2 to 5 the same way. |
{click_id} | ViralPayouts' click id for the click that earned the sale. Empty for a code-only sale. |
{conversion_id} | ViralPayouts' id for the sale. Stable, so your tracker can de-duplicate on it. |
{payout} | What you earned on it, in major units with two decimals, such as 30.00. |
{currency} | The program's currency, upper case. |
{status} | pending, approved or reversed. |
{event} | conversion, approved, reversed or test. |
{program} | The program's slug. |
Allowed macros: {sub_id}, {sub2}, {sub3}, {sub4}, {sub5}, {click_id}, {conversion_id}, {payout}, {currency}, {status}, {event}, {program}. Any other macro is refused when you save. Every value is URL-encoded.
Delivery rules
- One postback per sale per event, ever. A replayed or retried sale never calls your tracker twice.
- One GET request, 5 second timeout. Redirects are not followed.
- A 2xx answer is success. A 4xx (except 408 and 429) is final and not retried.
- No answer, a timeout, a 5xx, 408 or 429 is retried by the job queue, up to 6 attempts in all.
- The URL must be a public internet address on the standard port, checked when you save and again before every request.
- Test sales never send a postback.
Something here does not match what you see in the product? Email max@viralpayouts.com.