For Publishers
If you operate an x402 endpoint using the Dexter facilitator, your settlements are already eligible for sponsored recommendations.
Model A: Zero Effort
You do not need to install anything, change any code, or register anywhere.
When an agent pays for your endpoint through the Dexter facilitator, the facilitator may include a sponsored recommendation in the settlement receipt. Your API response is completely untouched. The recommendation travels in the PAYMENT-RESPONSE header (HTTP) or _meta (MCP), separate from your response body.
You can optionally receive a hosting incentive for impressions served through your endpoint. Contact us to set this up.
Model B: Publisher Middleware
For more control and higher revenue, install the publisher middleware:
For publishers using the core @dexterai/x402 server middleware, enable response body injection with sponsoredAccess: true:
When enabled, the middleware reads recommendations from the facilitator's settlement response and injects them into the JSON response body as _x402_sponsored. The agent receives a response like:
The original response fields are preserved; _x402_sponsored is prepended so the LLM can see the recommendations.
What Model B Adds
Price discounts: The middleware reduces the payment amount in your PaymentRequired response. The advertiser subsidizes the difference. Your users pay less, which can increase volume. You set a net revenue target (price floor) so you never earn less than your minimum.
Response body injection: Set sponsoredAccess: true in your x402 middleware config to inject recommendations into the response body as _x402_sponsored. Off by default.
Higher revenue share: Publishers who actively participate through the middleware earn a larger share of the ad revenue than the passive Model A hosting incentive.
Analytics: View impression counts, fill rates, and revenue per endpoint.
What Model B Does Not Change
- Your API logic and response content remain entirely yours
- Endpoints you don't wrap with the middleware are unaffected
- You choose which endpoints participate
- Body injection is off by default; it only activates if you explicitly enable it per endpoint
Opting Out
If you do not want recommendations delivered on your settlements, contact us and we will exclude your endpoints from campaign matching. Model A is opt-out, not opt-in, but opting out is straightforward.
Revenue
Model A: Optional hosting incentive paid per impression on your endpoints. Passive, requires no integration.
Model B: Higher revenue share per impression, plus the ability to offer discounted pricing to your users (subsidized by the advertiser). You set a price floor to guarantee your minimum net revenue.
Revenue is tracked in the admin dashboard. Payouts are batch-settled on-chain (USDC on Solana or Base).