Skip to content

Payments

Two endpoints, called in order. Both follow x402: call once to get the terms, sign, then call again with the payment.

MethodPOST
Body{ "pressId": 322 }
Payment headerpayment-signature (the x-payment header is also accepted)
TokenUSDG on Robinhood Chain

Pay the platform fee

POST /api/pay/treasury

Charges 10% of the press's priceUnits, rounded down, to the treasury.

Without a payment402 with the terms.

With a valid payment200

json
{ "paid": true, "tx": "0x…" }

If this wallet already paid the fee for this press, the payment is not settled again:

json
{ "paid": true, "tx": "0x…", "already": true }

Pay the publisher

POST /api/pay/publisher

Charges the remaining 90% to the wallet that currently owns the press NFT, read from the chain at request time.

With a valid payment200

json
{ "paid": true, "tx": "0x…", "body": "The full text of the press…" }

The response also sets a session cookie for the paying wallet, so a browser can read the press again later without paying.

StatusWhen
409 "Pay the platform fee first."No fee payment is recorded for this wallet and press
409 "You've already unlocked this press."This wallet already bought it. Nothing is charged

Headers

HeaderDirectionContent
payment-requiredResponse, on 402Base64 JSON of the terms (same as the body)
payment-signatureRequestBase64 JSON of the signed payment
payment-responseResponse, on 200Base64 JSON receipt: { success, transaction, network, payer }

What the server checks

Before settling anything, the signed terms must match what the server charges right now: same network, token, amount and recipient. A payment signed for a lower amount or a different recipient is refused with a fresh 402.

Settlement happens before the response. When you get 200, the USDG has already moved onchain, and tx is the transaction.

Errors

See the response table in the payment guide.

Nothing published on Capital Press is investment advice.