Documentation menu
Postbacks

Postbacks (S2S)

Server-to-server conversion notifications: delivery methods, URL macros, request signing.

A postback is a server-to-server request EdgeCash sends to your endpoint the moment a transaction fires on your traffic — a conversion, a milestone completion, a reversal. It is the reliable way to credit your users: no pixels, no client-side tracking, just your server hearing from ours.

Publisher portal — postback URLs with macros
Postback URLs in the portal: URL templates with macros, scope, method and status.

Scopes: which postback fires

You can configure postbacks at three levels — Global (the whole account), per Offer Wall (one placement) and per Offer. The most specific rule wins: per-Offer beats per-OfferWall beats Global.

Delivery methods

  • GET — your URL template is taken verbatim, the macros in it are replaced with transaction values, and the resulting URL is requested. Supports signing.
  • POST (JSON) — your URL is requested as-is, and the request body is a JSON object with the full fixed field set.
  • POST (Form) — same as POST (JSON) but the fields arrive as form data.
Macro replacement and signing are GET-only; POST postbacks always carry the complete fixed field set. The full macro and field reference lives in the publisher portal — Postback URLs → Variables (requires a publisher login).

Example GET postback

edgecash / postback-url
1
2
3
4
5
6
7
https://api.example.com/postback
    ?offerid=[OID]
    &rate=[PAY]
    &sub1=[SB1]
    &ip=[IP]
    &status=[STS]
    &hash=[HSH=MyPrivateKey]offerid=[OID]&rate=[PAY]&sub1=[SB1]&ip=[IP][/HSH]
postback-url.txt url template UTF-8 LF

The parameter names on your side (offerid, rate, …) are yours to choose — only the bracketed macros are ours. [SB1] echoes back the subid1 user identifier you passed on the wall URL or API request.

Signing and verification

Wrap any part of a GET postback URL in [HSH=KEY]...[/HSH] and EdgeCash replaces the whole block with a signature of the enclosed content — an HMAC-MD5 with your key, computed after all other macros are expanded. Recompute the same hash on your server and reject requests that don't match — that is how you know a postback really came from EdgeCash:

edgecash / postback-verifier
1
2
3
4
5
6
7
8
9
10
11
12
13
14
$key     = 'MyPrivateKey';
$content = 'offerid=' . $_GET['offerid']
         . '&rate='   . $_GET['rate']
         . '&sub1='   . $_GET['sub1']
         . '&ip='     . $_GET['ip'];

$expected = hash_hmac('md5', $content, $key);

if (! hash_equals($expected, $_GET['hash'] ?? '')) {
    http_response_code(403);
    exit('Invalid signature');
}

// signature OK — credit the user
verify-postback.php php UTF-8 LF

Delivery and retries

  • Respond with HTTP 200 once you have accepted the postback.
  • Responses of 500 and above are retried: 3 attempts with 10 / 30 / 60 second backoff. 4xx responses are not retried.
  • Reversals arrive as regular postbacks with a reversal status and negative amounts — handle them by debiting the user.

Every postback URL in the portal has a test send button and a full delivery history — you can verify your endpoint before any real traffic arrives.

Ready to start earning?

Tell us about your app, site or traffic — and start monetizing with EdgeCash.

Apply as a publisher