DEV Community

chovy
chovy

Posted on

pay.agent: get paid in crypto with one link

pay.agent: get paid in crypto with one link

pay.agent gives you a link, pay.agent/yourname, that anyone can pay in crypto. A person opens it, types an amount in dollars, picks a coin and scans a QR code. An agent does the same thing with one API call. The money goes to your own CoinPay wallet or CoinPay business. pay.agent never holds it.

Try it: pay.agent.pit.world. On Moshpit DNS it is just pay.agent.

Setting up takes two choices

  1. Sign in with CoinPay. No account yet? You make one on the way.
  2. Pick your name, and pick where money lands: your CoinPay wallet, or one of your CoinPay businesses.

That is the whole form. Behind it, pay.agent does the CoinPay side for you in one pass: it makes a small business to take your payments if you need one, adds the payout address you paste (if you have none yet), points the payment webhook at itself, and reads back which coins your link can take. You land on a page with your link, a QR code, and a list of exactly what it set up.

Paying someone

Open their link, enter an amount, choose a coin (USDC on Solana, Polygon or Ethereum, USDT, BTC, ETH, SOL, and more), and send the exact amount shown to the address shown. The page turns green when CoinPay sees the payment. Each address is good for an hour.

pay.agent adds no fee. CoinPay takes its normal fee when it forwards the payment, and the payer pays their own network fee.

Built for agents

Every link is an API, and paying someone needs no key:

curl -X POST https://pay.agent.pit.world/api/v1/users/profullstack/payments \
  -H 'content-type: application/json' \
  -d '{"amount_usd": 5, "coin": "usdc_sol", "note": "thanks"}'
Enter fullscreen mode Exit fullscreen mode

The answer is an address, an exact amount and an expiry. Poll GET /api/v1/payments/:id until it says confirmed or forwarded. The same thing ships as a CLI and terminal UI (bunx @profullstack/payagent profullstack 5 usdc_sol) and as an MCP server (claude mcp add payagent -- bunx @profullstack/payagent mcp), so a coding agent can pay a person by name.

The onboarding is a package

The one-pass setup is @profullstack/coinpay-onboard. pay.agent is its first user, and every new site we launch runs it too: coinpay-onboard site <name> --webhook <url> makes the site's CoinPay business, copies the payout wallets in, sets the webhook, and writes the keys into the site's vault. Taking payment is now part of launching, not a project after it.

To make that possible, CoinPay's OAuth merchant permission now covers adding payout addresses, importing them into a business and setting its webhook, so an app you sign in to can finish the setup instead of sending you to a dashboard. Routes that send money out stay dashboard-only.

Source

pay.agent is open source: github.com/moshcoder/pay.agent. It is a Bun and Hono app with SQLite, and it is on the Moshpit ring.

Top comments (0)