Docs

MoonX, PayBox, and x402 for people who still have email.

Agent pays via PayBox

you want an agent to spend money. you do not want to paste a private key into a chat. paybox exists so that particular form of natural selection stops happening.

stack

  • paybox credentials + agent clients + scoped grants
  • MCP URL: https://api.paybox.sh/mcp (streamable HTTP)
  • oauth 2.1 + PKCE under the hood when you add the connector
  • passkey approval for above-threshold / sensitive ops (moonx MPC)

official: paybox · MCP connector · MCP tools · requests

pick your host shape

connector hosts (cursor, claude, chatgpt, …)

paste the MCP URL into the host's connector list. sign in. approve a scoped grant. the host usually renders paybox UI (including signing windows). start here.

server-side agents (bots, next.js loops, telegram, …)

you run oauth yourself (public client, PKCE S256, often dynamic client registration). persist access tokens and rotating refresh tokens. call MCP or the REST agent API with the bearer.

wallet sign/swap will sit at pending_signature unless you finish signing via @paybox-sh/sdk with a provisioned pbxk1. signing key. payment and secret flows that complete server-side still work without that key. see paybox sdk/cli for the current surface.

steps

1. vault something

in paybox, connect a wallet (and optionally cards/secrets). this is the human side. the agent never sees raw credentials.

2. connect the agent

connector path: paste https://api.paybox.sh/mcp, sign in, approve grants on only the credentials that agent should touch.

server path: implement authorize → token exchange → store tokens; then call tools with the access token.

3. let the agent call tools

typical tools (see official list; names can grow):

  • list_credentials
  • request_payment / claim_payment_credentials
  • request_wallet_sign
  • pay_x402 / use_service / discover_services
  • get_request / list_requests

every sensitive step can pause for your passkey. that is not a bug.

4. respect the request lifecycle

write tools return statuses like success, pending_approval, pending_signature, denied, error.

  1. submit the write once
  2. keep the request_id
  3. if pending_approval, send the human the approval link — do not re-call the write
  4. poll get_request until terminal

re-issuing a write to "finish" a pending op is how you invent double charges.

5. revoke when done

clients are revocable. treat "temporary agent access" as temporary. the void does not care about your convenience.

pitfalls

  • broad grants are how you cosplay as a victim in an incident report.
  • k4d products (escrow / pay / sign) are human UI. they do not replace paybox MCP for agents.
  • do not invent tool schemas. read MCP tools.
  • paybox is not a writable secret store for stuffing google/notion tokens. humans vault in the app; agents get scoped outputs.

next