---
name: paychannels-pay
description: Pay an x402 resource through Paychannels (batch-settlement channels on Polygon). Use when an HTTP API answers 402 with a batch-settlement accepts entry, or when asked to buy from https://paychannels.mudit.blog.
---

# Paychannels — pay per request

1. Read https://paychannels.mudit.blog/PAYING.md end to end. It discovers everything from the site's `/meta` — never hardcode addresses.
2. Fastest path (bash, curl, jq, openssl, cast): `curl -sL https://paychannels.mudit.blog/session.sh | SITE_URL=https://paychannels.mudit.blog bash`.
   Re-run with `REUSE_DIR=~/.tp-demo-wallet` to prove fund-once, pay-many.
3. Manual path: fund via `POST /dispenser/fund {"address"}` → `approve` + `deposit(payer, sessionKey, amount)` → read the 402 → `POST /facilitator/quote {resource, price, payTo, payer, hub}` → sign the EIP-712 `Voucher` with the SESSION key → `GET <resource>` with `X-PAYMENT: <base64>`.
4. Errors: `invalid-signature` right after a deposit = the hub's watcher has not seen it yet — wait and retry (PAYING.md §8). `stale-epoch` / `unauthorized-cumulative` = re-quote and resync.
5. Never print private keys.

To take payments instead, read https://paychannels.mudit.blog/MERCHANTS.md.
