# How to redeem a payment for a pass

`POST /v1/redeem` turns finished work into a pass. When payments are on, it can also turn a valid payment for a live offer into a pass. The write itself still has to present that pass, as `Authorization: Attackfee <pass>`, or as the cookie or hidden field a browser would use.

A work pass covers 20 actions for 15 minutes. A paid pass covers one write and lasts at most 60 seconds. If the store that tracks used challenges is down, redeem returns 503 and nothing is accepted unchecked.

People never call this path to pay money. Their browser earns a work pass in the background. The `@attackfee/agent` package does the work and retries once; a runnable payment example lives in the project's examples directory.

On a self-hosted issuer, a stub backend is the default, so redeem is a work path unless you have configured payments yourself.

## Where Attackfee fits

Redeem is the step between a 402 or a work challenge and a usable pass. See [How does a paid write work?](/learn/payments/how-does-a-paid-write-work) and the [server docs](/docs/server).

- [Attackfee](/)
- [Learn](/learn)
- [Payments](/learn/payments)
- [How to redeem a payment for a pass](/learn/payments/v1-redeem-endpoint)

## Related

- [Attackfee Learning Center](/learn)
- [How does a paid write work?](/learn/payments/how-does-a-paid-write-work)
- [What is an Attackfee pass?](/learn/concepts/what-is-a-write-pass)
- [Server](/docs/server)
- [Agent](/docs/agent)

## Questions



### "Can I redeem without doing the work or paying?"

"No. The issuer accepts finished work, or a valid payment when that path is on. Otherwise redeem is refused."

### "Does redeem by itself complete the write?"

"No. Redeem returns a pass. You send that pass on the write, as Authorization: Attackfee, or as the cookie or hidden field a browser would use."

### "How long is a paid pass good for after redeem?"

"One write, and at most 60 seconds."

### "Do people call this endpoint?"

"No. The page script redeems work in the background. People never pay money."

### "What if the store is down?"

"Redeem and protected writes return 503. Nothing is accepted unchecked."
