Skip to main content
GET /admin/monetization/x402-earnings returns the per-merchant rollup of x402 settlement events captured by the platform — gross settled amount, settlement count, and pagination. The endpoint reads X402SettlementLog.
This endpoint requires:
  • JWT with role = SUPER_ADMIN
  • IpAllowlistGuard — caller IP must be in the operator allowlist
  • GeoBlockGuard — caller geo must be permitted
Calls that miss any of the three return 403. Missing or invalid JWT returns 401.

GET /admin/monetization/x402-earnings

Authentication

Obtain a SUPER_ADMIN JWT via POST /merchant/admin/login — see Authentication.

Query parameters

Example

Response — 200 OK

Fields

Errors

Notes

  • X402_ENABLED gating. Until the platform flag X402_ENABLED is set to true, X402SettlementLog accepts no writes and this endpoint always returns rows: [], totalAmountUsdCents: 0, totalSettlements: 0. The endpoint itself is always reachable — the gate is at the write path, not the read path.
  • Fail-open semantics. If the underlying X402SettlementLog aggregation throws, the endpoint returns the empty-state envelope (rows: [], totals 0) with 200 OK rather than propagating the error. Inspect server logs / Sentry for the underlying failure.
  • Currency. All monetary fields are USD cents, integer. x402 settles natively in USDC on Base; the read path converts at the settlement timestamp’s FX snapshot.
  • Pagination. total is the number of merchant rows, not the number of settlements. A merchant with 50 settlements counts as 1 for pagination.