Provider quickstart
Paste one prompt into your coding agent and it will set up pay-per-call selling for your API.
Copy this into Claude Code, Cursor, or Codex. It will figure out where you are and what you need to start selling your API to agents:
Read https://www.getbags.app/merchants.md and follow it to put a
pay-per-call paywall in front of my API with Bags. Do everything
automatically. Only ask me if you need input you can't determine
yourself.The human-in-the-loop steps the agent can't do for you: creating the BAGS account and minting an API key from Account Settings → API keys. Sign up at getbags.app (alias agent.getbags.app) — live in minutes, no business KYB — then hand $BAGS_KEY to the agent.
When the agent finishes
- An agentic payment link exists with your endpoint as its target and your per-call price.
- Your x402 URL (
https://www.getbags.app/api/agent/link/pl-{paymentLinkId}) answers unpaid requests with402and payment metadata. - Your API rejects unsigned direct calls but still accepts Bags-signed proxied requests (and your existing customers' API keys).
- A testnet payment shows up in your dashboard as a test transaction.
Rather do it by hand?
The dashboard flow, end to end:
Activate your account. Sign up at getbags.app, accept the terms, and activate your agentic account. You land in the dashboard immediately. Mint an API key from Account Settings → API keys if you want the agent (or your scripts) to create links via the API — that key is $BAGS_KEY in /merchants.md.
Create a product. Dashboard → Products. The product's price is your per-call price. (Prices below ~$0.20 get eaten by settlement gas — the dashboard warns you.)
Create the payment link. Dashboard → Payment Links → Create New Link: select your product, leave Agentic Proxy (x402) on (it's the default), and set the Target API URL — the endpoint Bags calls after payment. Use Test target URL to confirm it responds before saving. Then pick the upstream method (POST or GET), a pricing scheme (fixed exact or metered upto), and your network(s) — testnets like Base Sepolia in test mode.
Copy your x402 URL. The success screen shows your agent endpoint (https://www.getbags.app/api/agent/link/pl-…) with a copy button. Publish it — that's what agents pay.
For the one piece the dashboard can't do — making your API reject unpaid direct calls — see Suggested frameworks.