Skip to content
PubAdHub

Publisher S2S Integration

Publisher API

When a conversion matches one of your clicks, PubAdHub calls the server-to-server (S2S) URL you host. The request is an HTTP GET, and the conversion details are query parameters. You may later receive a cancellation for that same conversion. Store the details and respond with HTTP 2xx. This is a publisher integration: PubAdHub calls you. It is not the Platform S2S Postback API, where platforms send conversions to PubAdHub.

Base URL https://publisher.example.com
GET {your-endpoint}
warning

PubAdHub calls your URL

You host the endpoint. PubAdHub sends an HTTP GET when a conversion matches your click. Do not confuse this with the Platform S2S Postback API, which platforms use to send conversions to PubAdHub.
lock

Authentication

No AccessKey, PublisherKey, or path credential is documented for this integration. PubAdHub calls the S2S URL you host. Share your full S2S URL with PubAdHub before go-live (for example https://publisher.example.com/s2s/postback).

Query Parameters

All fields are on the query string. Required parameters are marked Yes. Use these names exactly as written.

txnid
String REQUIRED

Location: query

Transaction ID for this postback.

Example: {transactionID}

cid
String REQUIRED

Location: query

Your click ID from the original click.

Example: {clickID}

payout
Number REQUIRED

Location: query

Commission for this postback. A negative amount is a cancellation.

Example: {payout}

status
String REQUIRED

Location: query

Pending, Cancel_1, Cancel_2, and so on, or Cancelled.

Allowed: Pending, Cancel_1, Cancel_2, Cancelled

Example: Pending

edate
Date REQUIRED

Location: query

Event date. Use YYYY-MM-DD in UTC.

Example: YYYY-MM-DD

sales
Number OPTIONAL

Location: query

Order amount. This may be empty.

Example: {sales}

currency
String OPTIONAL

Location: query

Currency of the payout, for example USD. This may be empty.

Example: USD

API format

API Format
{your-endpoint}?txnid={transactionID}&cid={clickID}&payout={payout}&status={status}&sales={sales}&currency={currency}&edate={eventDate}

Examples

Each example below stands alone. Currency is USD and edate is 2026-10-08. A sales amount of 99.00 is sent only with a credit.

5.1 Credit request

5.1 Credit request
https://publisher.example.com/s2s/postback?txnid=15694728_15694728&cid=6d39a6e6-ab02-4b45-a38c-5a35a13e281d&payout=12.50&status=Pending&sales=99.00&currency=USD&edate=2026-10-08

5.2 Credit request and Cancellation on a new transaction

Both calls use cid 6d39a6e6-ab02-4b45-a38c-5a35a13e281d. Keep both records. Do not change the original credit. Link the two records with cid, then add the payouts together.

Credit

txnid: 15694728_15694728

status: Pending

payout: 12.50

Cancellation, new transaction

txnid: 15694728_15695450

status: Pending

payout: -12.50

info
Keep both records. Add 12.50 and -12.50. The result for this click is 0.00.

Credit

Credit
https://publisher.example.com/s2s/postback?txnid=15694728_15694728&cid=6d39a6e6-ab02-4b45-a38c-5a35a13e281d&payout=12.50&status=Pending&sales=99.00&currency=USD&edate=2026-10-08

Cancellation, new transaction

Cancellation, new transaction
https://publisher.example.com/s2s/postback?txnid=15694728_15695450&cid=6d39a6e6-ab02-4b45-a38c-5a35a13e281d&payout=-12.50&status=Pending&currency=USD&edate=2026-10-08

5.3 Credit request and Cancellation on the same transaction (partial and full)

This example is separate from sections 5.1 and 5.2. Every call uses txnid 15694728_15694729 and cid 6d39a6e6-ab02-4b45-a38c-5a35a13e281d. Each later call replaces the payout and status stored for that txnid. Cancel_1, Cancel_2, and later numbers are partial cancellations — the payout is the amount that remains. Cancelled is a full cancellation — the payout is 0.00.

Credit

txnid: 15694728_15694729

status: Pending

payout: 12.50

Partial cancellation

txnid: 15694728_15694729

status: Cancel_1

payout: 10.00

Partial cancellation

txnid: 15694728_15694729

status: Cancel_2

payout: 5.00

Full cancellation

txnid: 15694728_15694729

status: Cancelled

payout: 0.00

info
Cancel_1 leaves 10.00. Cancel_2 leaves 5.00. Cancelled leaves 0.00.

Credit

Credit
https://publisher.example.com/s2s/postback?txnid=15694728_15694729&cid=6d39a6e6-ab02-4b45-a38c-5a35a13e281d&payout=12.50&status=Pending&sales=99.00&currency=USD&edate=2026-10-08

Partial cancellation (Cancel_1)

Partial cancellation (Cancel_1)
https://publisher.example.com/s2s/postback?txnid=15694728_15694729&cid=6d39a6e6-ab02-4b45-a38c-5a35a13e281d&payout=10.00&status=Cancel_1&currency=USD&edate=2026-10-08

Partial cancellation (Cancel_2)

Partial cancellation (Cancel_2)
https://publisher.example.com/s2s/postback?txnid=15694728_15694729&cid=6d39a6e6-ab02-4b45-a38c-5a35a13e281d&payout=5.00&status=Cancel_2&currency=USD&edate=2026-10-08

Full cancellation (Cancelled)

Full cancellation (Cancelled)
https://publisher.example.com/s2s/postback?txnid=15694728_15694729&cid=6d39a6e6-ab02-4b45-a38c-5a35a13e281d&payout=0.00&status=Cancelled&currency=USD&edate=2026-10-08

Response

A successful response is HTTP 2xx. A response body is optional. PubAdHub waits about 30 seconds. Any other status code is retried.

Notes

info
Protocol: HTTP GET on the S2S URL you host. All fields are query parameters. Share your full S2S URL with PubAdHub (for example https://publisher.example.com/s2s/postback).
info
Each call follows three steps: PubAdHub matches the conversion to your click; PubAdHub calls your S2S URL; you store the details and respond with HTTP 2xx.
info
Required query parameters: txnid, cid, payout, status, edate. Optional: sales, currency. Use these names exactly as written.
info
Credit: create a new record when status is Pending and payout is positive. Keep the record under its txnid, and store the cid with it.
info
Cancellation on a new transaction: this cancellation uses a new txnid, and the payout is negative. The status may still be Pending. Save the new txnid as its own record, and do not change the original credit. Link the two records with cid, then add the payouts together.
info
Cancellation on the same transaction: PubAdHub sends the original txnid again. Replace the payout and status stored for that txnid. Cancel_1, Cancel_2, and later numbers are partial cancellations — the payout is the amount that remains. Cancelled is a full cancellation — the payout is 0.00.
info
Before you go live: share your full S2S URL with PubAdHub; accept HTTP GET requests on that URL; return HTTP 2xx after you have stored the details.
info
If anything in this guide is unclear, contact your PubAdHub representative.

Original PDF

This page is sourced from the official API PDF. The original file remains available.

PubAdHub Publisher S2S Integration.pdf

Related documentation