Publisher S2S Integration
Publisher APIWhen 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.
https://publisher.example.com
{your-endpoint}
PubAdHub calls your URL
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
Location: query
Transaction ID for this postback.
Example: {transactionID}
cid
Location: query
Your click ID from the original click.
Example: {clickID}
payout
Location: query
Commission for this postback. A negative amount is a cancellation.
Example: {payout}
status
Location: query
Pending, Cancel_1, Cancel_2, and so on, or Cancelled.
Allowed: Pending, Cancel_1, Cancel_2, Cancelled
Example: Pending
edate
Location: query
Event date. Use YYYY-MM-DD in UTC.
Example: YYYY-MM-DD
sales
Location: query
Order amount. This may be empty.
Example: {sales}
currency
Location: query
Currency of the payout, for example USD. This may be empty.
Example: USD
| Name | Type | Required | Location | Description | Example |
|---|---|---|---|---|---|
| txnid | String | REQUIRED | query | Transaction ID for this postback. | {transactionID} |
| cid | String | REQUIRED | query | Your click ID from the original click. | {clickID} |
| payout | Number | REQUIRED | query | Commission for this postback. A negative amount is a cancellation. | {payout} |
| status | String | REQUIRED | query | Pending, Cancel_1, Cancel_2, and so on, or Cancelled. Allowed values as written: Pending, Cancel_1, Cancel_2, Cancelled | Pending |
| edate | Date | REQUIRED | query | Event date. Use YYYY-MM-DD in UTC. | YYYY-MM-DD |
| sales | Number | OPTIONAL | query | Order amount. This may be empty. | {sales} |
| currency | String | OPTIONAL | query | Currency of the payout, for example USD. This may be empty. | USD |
API format
{your-endpoint}?txnid={transactionID}&cid={clickID}&payout={payout}&status={status}&sales={sales}¤cy={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
https://publisher.example.com/s2s/postback?txnid=15694728_15694728&cid=6d39a6e6-ab02-4b45-a38c-5a35a13e281d&payout=12.50&status=Pending&sales=99.00¤cy=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
| Event | txnid | status | payout |
|---|---|---|---|
| Credit | 15694728_15694728 | Pending | 12.50 |
| Cancellation, new transaction | 15694728_15695450 | Pending | -12.50 |
Credit
https://publisher.example.com/s2s/postback?txnid=15694728_15694728&cid=6d39a6e6-ab02-4b45-a38c-5a35a13e281d&payout=12.50&status=Pending&sales=99.00¤cy=USD&edate=2026-10-08
Cancellation, new transaction
https://publisher.example.com/s2s/postback?txnid=15694728_15695450&cid=6d39a6e6-ab02-4b45-a38c-5a35a13e281d&payout=-12.50&status=Pending¤cy=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
| Event | txnid | status | payout |
|---|---|---|---|
| Credit | 15694728_15694729 | Pending | 12.50 |
| Partial cancellation | 15694728_15694729 | Cancel_1 | 10.00 |
| Partial cancellation | 15694728_15694729 | Cancel_2 | 5.00 |
| Full cancellation | 15694728_15694729 | Cancelled | 0.00 |
Credit
https://publisher.example.com/s2s/postback?txnid=15694728_15694729&cid=6d39a6e6-ab02-4b45-a38c-5a35a13e281d&payout=12.50&status=Pending&sales=99.00¤cy=USD&edate=2026-10-08
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¤cy=USD&edate=2026-10-08
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¤cy=USD&edate=2026-10-08
Full cancellation (Cancelled)
https://publisher.example.com/s2s/postback?txnid=15694728_15694729&cid=6d39a6e6-ab02-4b45-a38c-5a35a13e281d&payout=0.00&status=Cancelled¤cy=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
Original PDF
This page is sourced from the official API PDF. The original file remains available.
PubAdHub Publisher S2S Integration.pdf
Related documentation
Click-Level Conversion Report
Retrieve click-level conversion data (click_id, revenue, click_date) with pagination metadata for a date range of at most 2 days.
https://statsapi.pubadhub.com/api/reporting/clicklevel
S2S Postback API
Server-to-server conversion postbacks for platforms / affiliate networks. Authenticate with a platform access_key in the URL path.
https://statsapi.pubadhub.com/api/postback/{access_key}