Connect a payment-capable MCP client to https://pay.axiv.cc/public/mcp with your own Pay API key. The agent can create quotes and payments, request funding instructions, register wallet transaction hashes, and read payment evidence. Your wallet signs and sends transactions.
Read-only discovery with OAuth
The ChatGPT Axiv Pay app and other discovery clients connect to https://pay.axiv.cc/mcp using OAuth. Its catalog:read scope offers search_capabilities, get_capability, compare_capabilities and check_payment_route. It does not authorize payment creation.
codex mcp add axiv_pay --url https://pay.axiv.cc/mcp
Confirm the client and callback, select Connect read-only tools, and wait for authentication to complete. Old .chatgpt.site connections must reconnect to the new URL.
1. Connect your agent for payments
Get a write-capable key on Get started. Configure it in your client's secret store or environment as AXIV_PAY_API_TOKEN. Send it only in the MCP HTTP Authorization header. Keep it out of prompts, tool arguments, source control and payment state files. A read-only key cannot create payments.
codex mcp add axiv_payments \
--url https://pay.axiv.cc/public/mcp \
--bearer-token-env-var AXIV_PAY_API_TOKEN
Start the client with that environment variable available. This payment connection is separate from the discovery OAuth app. Clients that only support the discovery OAuth scope cannot use it as a payment credential.
[mcp_servers.axiv_payments]
url = "https://pay.axiv.cc/public/mcp"
bearer_token_env_var = "AXIV_PAY_API_TOKEN"
| Tools | Purpose |
|---|---|
search_capabilities, get_capability, compare_capabilities, check_payment_route | Public catalog and route availability. No Pay API key needed. |
create_quote | Price a source amount, destination recipient and route; returns fees, minimum output and expiry. |
create_payment | Create one payment per idempotency key; returns CREATED or REPLAYED. |
get_funding_step | Prepare the next wallet transaction. An approval can authorize token spending; a bridge deposit moves the payment amount. |
submit_funding_transaction | Register a hash your wallet already sent. A submitted hash is not a confirmed deposit. |
get_payment_status | Read the order reference, payment terms, receipt evidence and settlement model. |
create_payment_link, get_payment_link, get_usage | Hosted links and account usage. Link tools require paymentLinks: true. |
2. Create, fund and track a payment
Check availability
When paymentLinks is false, link tools return PAYMENT_LINKS_UNAVAILABLE. The public manifest and search_capabilities also expose the live paymentSurfaces summary.
Read live capabilities first. paymentExecutionEnabled enables creation; quoteRouting describes quotable routes; liveRoutes records routes verified with a real transfer. A successful quote alone does not prove a previous payout.
create_quote → create_payment → get_funding_step
→ review and send the transaction in your own wallet
→ submit_funding_transaction with that step ID and hash
→ read get_payment_status
→ request another step only for REQUEST_FUNDING_INSTRUCTIONS
→ stop at PAID for settlementModel EXTERNAL
- Use decimal-string chain IDs.
amountAtomicis the payer's source amount: 2 USDC with 6 decimals is"2000000". The route-check and payment-linkamountinstead describes the recipient's decimal amount. - Check recipient, source amount, minimum output, fees, gas and expiry before asking the wallet to fund. Creating the payment itself sends nothing.
- Keep one idempotency key and the same create arguments per order. After a lost or unreadable response, repeat with that same key. Do not create a replacement payment while funding or a wallet result is uncertain.
- Send
step.payloadunchanged from its payer on its source chain. After an unknown wallet result, find the existing transaction hash instead of signing again. Never sign a simulated response. WAITmeans poll the status with backoff.NONEmeans no new funding step.REVIEW_REQUIRED,FAILED,EXPIREDandREFUNDEDare not paid.
3. Run the resumable MCP example
Download mcp-payment.mjs and run it with Node.js 24+. It uses the public MCP endpoint and your client environment key. It never signs or broadcasts. Use your own payer and recipient addresses; do not copy a fixture address into a real payment.
# AXIV_PAY_API_TOKEN is already loaded from your secret store.
export AXIV_PAY_PAYER="<your source-chain wallet>"
export AXIV_PAY_RECIPIENT="<the destination recipient>"
export AXIV_PAY_AMOUNT_ATOMIC="2000000"
# Defaults: Base USDC → Arbitrum USDC, allowedRoutes ["ACROSS"].
node mcp-payment.mjs prepare ./order-1042.json
node mcp-payment.mjs instructions ./order-1042.json
# Review and send the returned transaction in your own wallet.
node mcp-payment.mjs register ./order-1042.json "$STEP_ID" "$TX_HASH"
node mcp-payment.mjs status ./order-1042.json
node mcp-payment.mjs watch ./order-1042.json
After registration, request instructions again only when the status asks for them; an approval may be followed by the bridge-deposit transaction. Save each actual step ID and transaction hash. Repeating prepare with the same state file safely replays creation. The private state file stores the quote, payment ID, order reference and idempotency key, and contains no API key. Keep it after errors; do not switch to a new file for the same funded order. Polling is bounded to five minutes and can be resumed.
4. Confirm payout and understand settlement
get_payment_status exposes merchantReference, quoteId, payer, paymentSource, destination, sourceFunding, payout and orderLink. Compare them with the saved order; the MCP field paymentSource corresponds to source in the REST payment.
For a production payment, fulfill only after PAID, matching recipient/token/chain and order reference, source and payout receipt evidence, and a payout at least the quoted minimum. Across also requires the matched orderLink. The example reports fulfill: true only after these checks; simulated runs always report false.
{
"status": "PAID",
"settlementModel": "EXTERNAL",
"settlement": null,
"settlementStatus": "NOT_TRACKED",
"nextAction": "NONE"
}
This is the current external-channel completion model. The execution channel manages solver reimbursement outside Axiv Pay. Do not wait for SETTLED, and do not infer reimbursement success or failure from a null settlement. RECEIPT means Axiv Pay checked the chain receipt; it is not independent finality verification. See payment lifecycle and evidence.
5. Sell to AI agents
Keep the merchant's API key on the merchant server. Create an order with a canonical merchant reference and the buyer's payer address; return its totals and funding step to the buyer's wallet. Register the wallet's hash and verify that same order before fulfillment. Do not give the buyer your merchant key. A buyer-created payment is visible to the buyer's account, not automatically to the merchant.
For a hosted checkout, create a payment link while capabilities report paymentLinks: true, share the returned URL and confirm its actual payment before fulfillment. See the merchant quickstart, tool arguments and Agent Skill.