# How does a paid write work?

On attackfee.dev, an automated client that sends `Attackfee-Client: agent` can pay the offer in an HTTP 402, or it can do the background work instead. A paid pass covers one write and lasts at most 60 seconds. People never see this path and never pay money.

## What is live, and what is not

Payments are on for the attackfee.dev worker. A POST to a protected write with the agent header and no pass returns 402, with offers and a `challenge_url`. Current prices are at `/v1/price`. The dollar figure can move. The write class has been under a cent. Do not ship a hardcoded amount.

A self-hosted Node issuer uses a stub backend by default. You can run work-only. If you turn payments on, you configure that yourself. The WordPress plugin takes no payments itself. Its test mode is work only. An optional payment server is a separate piece.

This is the cost of a write, paid by the client to complete the request. It is not a payout to the site owner, and this page does not describe a payout to the site owner.

## The client steps

- Read `/.well-known/attackfee.json` and `/v1/price`.
- POST the write with `Attackfee-Client: agent`.
- On 402, either pay an offer that the site lists as live, or complete the work at `challenge_url`.
- Retry with `Authorization: Attackfee <pass>`.

A work pass still covers 20 actions for 15 minutes. Paying 20 times is what happens if you choose the paid pass for 20 writes. You can choose work instead.

The `@attackfee/agent` package does the work path and retries once. A runnable payment example is in the project's examples directory. Install from a clone; the packages are not on a public package registry yet.

## Where Attackfee fits

Use this when an automated client should pay for a write on a site that has payments on. Browsers keep using work. See [What kinds of payment can an agent use?](/learn/payments/what-kinds-of-payment-can-an-agent-use) and [What is HTTP 402 Payment Required?](/learn/payments/what-is-http-402).

- [Attackfee](/)
- [Learn](/learn)
- [Payments](/learn/payments)
- [How does a paid write work?](/learn/payments/how-does-a-paid-write-work)

## Related

- [Attackfee Learning Center](/learn)
- [What is HTTP 402 Payment Required?](/learn/payments/what-is-http-402)
- [Why a paid path exists alongside background work](/learn/payments/why-a-paid-path-exists)
- [What kinds of payment can an agent use?](/learn/payments/what-kinds-of-payment-can-an-agent-use)
- [How agents write to an Attackfee site](/learn/agents/how-agents-write-to-an-attackfee-site)
- [What is /.well-known/attackfee.json?](/learn/agents/well-known-attackfee-json)
- [Agent](/docs/agent)

## Questions



### "Do people ever pay this price?"

"No. People never pay money. Their browser earns a work pass in the background."

### "What if I self-host and never configure payments?"

"Agents can still write by doing the work. There is no live payment offer."

### "How long does a paid pass last?"

"At most 60 seconds, and it is good for one write."

### "Where do I see the amount?"

"At /v1/price on attackfee.dev, and in the 402 body. Do not hardcode it."

### "Does a payment mean the site owner gets paid?"

"Not as a claim this page makes. A payment, when the path is on, is what settles the write. Typical self-hosted and WordPress installs do not take that payment themselves."
