Policy-controlled payments for agents

The universal payment interface for AI agents.

One MCP endpoint for policy enforcement, wallet authorization, routing, stablecoin settlement, and receipts. Solana is the first settlement layer; connectors keep the agent interface consistent.

MCP endpoint/mcp
01 · Connect an MCP client

One endpoint. Every payment primitive.

Point any MCP-compatible agent at the hosted endpoint. Tool discovery is automatic, and the HTTP transport never receives a seed phrase or private key.

{
  "mcpServers": {
    "chainpay": {
      "url": "https://chainpay-mcp.onrender.com/mcp"
    }
  }
}
Use /mcp in your client configCopy
Try this read-only promptCopy
Use ChainPay to inspect the protocol config, then quote a payment for this demo invoice without executing it.
21payment and policy tools exposed
2supported Solana token programs
0private keys held by MCP
02 · Agent payments

A payment flow agents can explain.

Keep payment decisions inspectable. Preflight first, sign only in the wallet boundary, then submit and observe the receipt.

01

Inspect

Read the mandate, protocol config, and asset registry.

02

Quote

Ask for a policy result without signing or submitting.

03

Prepare

Build a mandate-checked transaction plan.

04

Execute

Relay a wallet-signed transaction through the backend.

05

Confirm

Wait for status and fetch the durable receipt.

{
  "mandate": "MANDATE_PDA",
  "agent": "AGENT_PUBLIC_KEY",
  "invoiceHash": "32_BYTE_HEX_HASH",
  "paymentId": "32_BYTE_HEX_PAYMENT_ID",
  "signatureReference": "32_BYTE_HEX_REFERENCE",
  "mint": "TOKEN_MINT",
  "recipient": "RECIPIENT_TOKEN_ACCOUNT",
  "amount": "1000000",
  "tokenProgram": "spl-token"
}
Safe default: use quote_payment while the agent is deciding. It returns the policy preflight result but does not sign, submit, or move funds.
03 · x402 connector

One connector. x402 connected.

ChainPay exposes one connector boundary for agents. x402 is connected to the same payment interface, so a paid API challenge becomes a mandate-checked Solana transaction without a second agent integration.

01

Challenge

A paid resource returns an x402 exact challenge with asset, recipient, amount, nonce, resource, and optional expiry.

02

Normalize

prepare_x402_payment accepts Solana Devnet and the exact scheme, then derives deterministic payment references.

03

Preflight

ChainPay checks the mandate, mint, token program, supplied recipient, limits, expiry, and available policy authority.

04

Sign

An external wallet or signer reviews the prepared transaction. MCP never receives a seed phrase or private key.

05

Relay

Pass the wallet-signed transaction back to the connector for idempotent Rust backend relay and receipt tracking.

How agents use it

Call execute_x402_payment with the resource, mandate PDA, and approved-agent public key. The first call fetches and validates the live 402 challenge and returns an unsigned transaction. After an external signer approves it, call execute_x402_payment again with signedTransaction; ChainPay verifies finality and the receipt before retrying the resource.

Connector boundaryx402 does not bypass ChainPay policy.The adapter validates the challenge.It binds the challenge to a deterministic invoice hash.It sends only a wallet-signed transaction to:/v1/paymentsIt is not a key custodian or hosted facilitator.
04 · Stablecoin settlement

One policy surface for every supported token rail.

Stablecoin payments use the same mandate and receipt model whether the asset is classic SPL Token or Token-2022. A mandate limits the agent, mint, amount, and time; each payment supplies one recipient and settles only to that destination.

01

Choose the rail

Set the stablecoin mint and choose spl-token or token-2022.

02

Set the boundary

Bind the source account, approved agent, per-payment and total limits. The recipient is supplied with each payment request.

03

Quote in base units

Use quote_payment or prepare_payment before any signature is requested.

04

Transfer on Solana

The program enforces the mandate and transfers through the selected token program. The SDK capability scan admits only extension combinations supported by the current transparent transfer path.

05

Reconcile

Read the receipt PDA and backend status to give the agent and merchant durable proof.

$

Classic SPL Token

For standard SPL stablecoins and tokens. Every mint and token account must belong to the classic Token program.

spl-token

Token-2022

For enabled registry mints whose live mint, source, and recipient capability scan is compatible. Active hooks, non-zero fees, confidential-only transfers, and unknown transfer-affecting extensions fail closed.

token-2022
05 · Use cases

Every agent payment, one interface.

Select a scenario to open its complete flow. Each sequence keeps the agent, ChainPay MCP, connector, wallet, Solana settlement, and receipt boundary visible.

01AI accounting assistantPay invoice #123 from the USDC treasury.Open flow

The assistant retrieves the invoice, asks ChainPay for a policy quote, requests wallet approval, settles the approved amount, and returns a receipt.

ResultA reconciled USDC payment and receipt PDA for the accounting system.
02AI payroll agentIt is Friday. Pay 120 employees.Open flow

The payroll agent creates the payment batch, while ChainPay enforces the payroll wallet, supplied destinations, batch limits, and required approval workflow.

ResultA controlled batch settlement with receipts that payroll can reconcile per employee.
03Robots and machinesA delivery robot pays a charging station or a taxi pays a toll.Open flow

The machine does not implement wallet, token-account, or settlement logic. Its application calls the same ChainPay MCP interface used by every other agent.

ResultA machine-service payment that remains inside a bounded mandate.
04Customer support AIRefund this customer 45 USDC.Open flow

The support agent routes the refund through ChainPay instead of integrating directly with Stripe or custom blockchain code, keeping the refund inside an approved policy.

ResultA verified refund receipt linked to the support case.
05Treasury AIMove 50,000 USDC from operations to payroll.Open flow

Treasury rules decide which wallets can move funds, how much can move per day, which approvals are required, and whether the request is inside business hours.

ResultAn approved treasury transfer with policy evidence and durable proof.
06AI shopping assistantBuy this software subscription.Open flow

The shopping agent retrieves the invoice and calls ChainPay. The connector resolves the merchant payment path while ChainPay handles policy, approval, settlement, and proof.

ResultA subscription payment routed through the merchant’s supported connector.
07Subscription managerRenew Copilot and cancel unused subscriptions.Open flow

The manager finds invoices and presents only renewals covered by the approved policy. Cancellation is a separate merchant action; ChainPay executes only the payments that pass policy.

ResultApproved renewals with receipts and no unapproved recurring spend.
08Crypto commerce agentA merchant accepts USDC at checkout.Open flow

Checkout calls ChainPay MCP instead of embedding custom Solana payment logic. The merchant receives a consistent request, settlement, and receipt path.

ResultA merchant checkout completed in USDC with a verifiable receipt.
09Cross-border freelancer platformA client approves a worldwide freelancer payout.Open flow

The platform’s agent prepares payouts worldwide through ChainPay, keeping limits, supplied destinations, token choice, and receipts consistent across the platform.

ResultA payout record with recipient-level settlement proof.
10DAO operations AIPay contributors after proposal #56 passed.Open flow

The DAO agent checks governance state first. ChainPay settles only when the proposal condition, contributor list, treasury mandate, and spending policy are satisfied.

ResultContributor payments tied to a governance decision and receipt trail.
06 · Policy firewall

Make the mandate the firewall.

ChainPay turns an owner-approved mandate into a narrow spending boundary enforced by the on-chain program.

Who can spend

Bind the mandate to one approved agent public key. Owner updates, pauses, and revocation remain wallet-signed actions.

create_mandate →

Where funds can go

Lock the allowed mint and require every payment request to provide one destination. The transfer settles only to the supplied recipient.

prepare_payment →

How much, how often

Set per-payment and total limits, expiry, payment count, and cooldown slots to make agent spending predictable.

update_mandate →
07 · Assets and token programs

SPL-compatible by design.

ChainPay supports classic SPL Token and Token-2022 settlement, with explicit program selection so an agent cannot accidentally mix account types.

Classic SPL Token

Set tokenProgram to spl-token. The mint, source account, and destination account must belong to the classic Token program.

Inspect an asset →

Token-2022

Register a Token-2022 mint, then ChainPay verifies its program identity and scans the live mint and token-account extensions before every prepared payment. Unsupported transfer behavior is rejected until a tested adapter exists.

Read protocol config →
Important: token amounts are passed as unsigned base units. The protocol validates the configured mint and token program before a payment can settle.
08 · Tool reference

Tools any agent can discover.

The catalog below is generated from the same definitions returned by MCP tools/list. Required fields are shown to make orchestration easier.

Open JSON catalog ↗
01 list_mandates MCP tool

Discover all ChainPay mandates owned by a wallet and report their live status, limits, and token-account delegation.

requiredowner
02 find_compatible_mandate MCP tool

Find an active mandate compatible with an invoice mint, amount, token program, and optional approved agent.

requiredownermintamount
03 get_mandate MCP tool

Read an on-chain ChainPay payment mandate and its current status.

requiredaddress
04 get_protocol_config MCP tool

Read the ChainPay protocol configuration and bootstrap asset list.

inputnone
05 get_asset MCP tool

Read whether a mint is enabled in the ChainPay asset registry.

requiredmint
06 get_supported_assets MCP tool

List every mint in the scalable on-chain SupportedAsset registry, including enabled state and exact token program.

inputnone
07 quote_payment_request MCP tool

Verify a merchant-signed request, derive deterministic payment references, and quote it against a mandate without signing or submitting.

requiredrequestmandateagent
08 create_demo_payment_request MCP tool

Create a valid, merchant-signed Devnet demo payment request using a real token account.

inputnone
09 create_mandate MCP tool

Prepare a wallet-signed spending mandate. Each payment supplies its own recipient.

requiredownerapprovedAgentsourceTokenAccountallowedMintmaxPerPaymenttotalLimitexpiresAtSlottokenProgram
10 update_mandate MCP tool

Prepare an owner-signed update to a mandate's agent, limits, expiry, and cooldown policy.

requiredownerapprovedAgentmaxPerPaymenttotalLimitexpiresAtSlotmaxPaymentCountcooldownSlots
11 check_payment_requirements MCP tool

Check whether a payment has the token, recipient, amount, expiry, mandate limits, and policy details needed to proceed. Ask the user for missing details before quoting or settling.

inputnone
12 prepare_payment MCP tool

Validate a payment request against the on-chain mandate and prepare a transaction for the approved agent signer.

requiredmandateagentinvoiceHashpaymentIdsignatureReferencemintrecipientamount
13 execute_payment MCP tool

Settle through an explicitly selected human or delegated signing path. Delegated mode uses the mandate-bound provider signer through Axum.

requiredmandateagentinvoiceHashpaymentIdsignatureReferencemintrecipientamountsigningMode
14 quote_payment MCP tool

Return a policy quote and preflight result without signing or submitting a transaction.

requiredmandateagentinvoiceHashpaymentIdsignatureReferencemintrecipientamount
15 verify_payment_request MCP tool

Verify a merchant-signed payment request before ChainPay settlement.

requiredrequest
16 prepare_x402_payment MCP tool

Normalize a Solana x402 challenge and prepare a mandate-checked payment transaction.

requiredchallengemandateagent
17 execute_x402_payment MCP tool

Run the live x402 GET/402 flow, prepare an externally signed ChainPay settlement, verify its receipt, and retry the resource with proof.

requiredresourcemandateagentsigningMode
18 get_payment MCP tool

Fetch a ChainPay receipt PDA and join it with Axum's persisted transaction signature.

inputnone
19 wait_for_payment MCP tool

Poll the Rust backend until a relayed payment is confirmed or failed.

requiredpaymentId
20 pause_mandate MCP tool

Prepare an owner-signed transaction that pauses a ChainPay mandate.

requiredowner
21 revoke_mandate MCP tool

Prepare an owner-signed transaction that permanently revokes a ChainPay mandate.

requiredowner
09 · HTTP reference

A small surface area.

Use the MCP transport for agents and the read-only routes for humans, health checks, and integration discovery.