# Machine Payments on Content's Not Dead

This service accepts machine payments via the Machine Payments Protocol (MPP,
https://mpp.dev). Accepted methods:

- `stripe`: a Stripe Shared Payment Token (cards and Link)
- `tempo`: a stablecoin transfer on Tempo testnet (chainId 42431, pathUSD); mainnet wallets will refuse this challenge, and `tempo wallet fund` tops up a test wallet

## Pay per item ($0.50)

1. Request the resource:

   GET https://api.contentsnotdead.com/api/content/{id}

2. If payment is required, you receive HTTP 402 with one `WWW-Authenticate`
   challenge per accepted method, describing the amount and how to pay.

3. Pay one challenge, then retry the request with the MPP credential in the
   `Authorization` header.

4. On success you receive HTTP 200 with the full markdown body and a
   `Payment-Receipt` header.

The `mppx` client (https://www.npmjs.com/package/mppx) implements this flow,
and the Tempo CLI (`tempo request https://api.contentsnotdead.com/api/content/{id}`) pays the Tempo
challenge directly.

## Troubleshooting

Every failed payment returns `application/problem+json` with `detail`
(what happened), `hint` (what to do), and `charged` (`no`, `unlikely`, or
`possible`). A 402 always carries a fresh `WWW-Authenticate` challenge to
pay next. When `charged` isn't `no`, check your wallet or statement before
paying again; the `support` field says who to contact.

| Problem | Charged? | What to do |
| --- | --- | --- |
| `payment-required`: Payment Required | no | Pay $0.50 using one of the challenges in the WWW-Authenticate header, then retry with the credential in the Authorization header. Accepted methods: `stripe`: a Stripe Shared Payment Token (cards and Link); `tempo`: a stablecoin transfer on Tempo testnet (chainId 42431, pathUSD); mainnet wallets will refuse this challenge, and `tempo wallet fund` tops up a test wallet. |
| `payment-expired`: Payment Expired | unlikely | The challenge expired before the payment reached this server. Pay the fresh challenge in this response's WWW-Authenticate header. |
| `invalid-challenge`: Invalid Challenge | unlikely | The credential answers a challenge this server didn't issue for this item (each challenge is bound to one content id). Pay the fresh challenge in this response instead. |
| `verification-failed`: Verification Failed | possible | The payment didn't match the challenge. Check it was sent on the network, token, amount, and recipient the challenge names (for Tempo: Tempo testnet (chainId 42431, pathUSD)), then pay the fresh challenge in this response. |
| `payment-insufficient`: Payment Insufficient | possible | Less than $0.50 arrived. Pay the full amount named in the fresh challenge in this response. |
| `method-unsupported`: Method Unsupported | no | This server doesn't accept that payment method. Accepted methods: `stripe`: a Stripe Shared Payment Token (cards and Link); `tempo`: a stablecoin transfer on Tempo testnet (chainId 42431, pathUSD); mainnet wallets will refuse this challenge, and `tempo wallet fund` tops up a test wallet. |
| `malformed-credential`: Malformed Credential | no | The Authorization header isn't a valid MPP credential. Build it from one of the challenges in this response with an MPP client such as mppx or the Tempo CLI. |
| `invalid-payload`: Invalid Payload | no | The credential's payload doesn't fit the payment method it names. Rebuild it from one of the challenges in this response with an MPP client. |
| `payment-action-required`: Payment Action Required | no | The card issuer needs an extra step, such as authentication. Complete it in your wallet, then retry. |
| `internal-payment-error`: Internal Payment Error | possible | We couldn't confirm your payment because of a temporary problem on our side. Check your wallet or card statement before paying again. |
| `verification-failed`: Verification Failed (already used) | no | That transaction or proof already unlocked a request, and each payment unlocks one. Pay the fresh challenge in this response to read again. |
| `payments-unavailable` (503) | no, or unlikely if you sent a credential | Retry after the `Retry-After` interval. |
| `payments-error` (503) | no, or unlikely if you sent a credential | Retrying is unlikely to help; report it. |

## Discover content

- OpenAPI contract: https://api.contentsnotdead.com/openapi.json
- Machine-readable config: https://api.contentsnotdead.com/.well-known/mpp.json
- Agent directory: https://api.contentsnotdead.com/agents
- LLM overview: https://api.contentsnotdead.com/llms.txt

## Subscribe instead

Unlimited access is available at https://www.contentsnotdead.com/subscribe ($5/month or $50/year).
