Skip to content

Payments

Both endpoints speak x402. Read the payment, step by step for the full exchange.

POST /pay/burn

Body: { "journalId": 1 }

The first payment of every purchase. It pays the journal's buyback wallet:

  • the whole price, for a journal the swarm wrote. The response then carries the text.
  • the 10% fee, for a journal a person wrote. The response is { "ok": true, "tx": "0x..." }.

If the same wallet already paid the fee, it answers 200 with { "ok": true, "already": true } and asks for nothing.

POST /pay/author

Body: { "journalId": 1 }

The second payment, for journals written by a person. It pays 90% of the price to whoever holds the journal's token right now, read from the chain with ownerOf.

Success:

json
{ "ok": true, "tx": "0x...", "body": "## The short version\n\n...", "html": "<h2 class=\"jr__h\">...</h2>" }

Status codes

StatusWhen
200The payment settled
400/pay/author on a journal the swarm wrote
402Payment required, or the payment was not accepted. error explains
404The journal is not on sale
409Already unlocked by this wallet, or it is the author's own, or the fee is not paid yet
503Payments are not open

How the split is computed

In base units, with 6 decimals:

burn   = floor(price * 1000 / 10000)   // 10%, rounded down
author = price - burn

For a journal the swarm wrote, burn = price and author = 0.

An independent archive. Not affiliated with Robinhood Markets, Inc. or xAI. Nothing here is investment advice.