xtopaydocs

Build with AI

Give your AI coding assistant Xtopay's docs and a skill, and connect an AI assistant to your Xtopay account through the MCP server.

Two ways AI works with Xtopay: coding assistants that write your integration (Claude Code, Cursor, Copilot, Codex), and AI assistants that work with your account itself (your balance, payments, links and invoices) through Xtopay's MCP server.

For coding assistants

The docs, as plain text

AddressWhat it is
docs.xtopay.co/llms.txtEvery page, with a line on each
docs.xtopay.co/llms-full.txtAll the docs in one file
Any page's address with .mdThat page as Markdown, like /api/checkouts.md

Paste one into your assistant's chat, or point it at them.

The Xtopay skill

A skill teaches your assistant how to integrate Xtopay well: the checkout flow, checking webhook signatures, retrying with an Idempotency-Key, test numbers, and a checklist to finish with (keys only on the server, orders fulfilled from the webhook, never from the redirect).

For Claude Code, in your project:

mkdir -p .claude/skills/xtopay
curl -fsSL https://docs.xtopay.co/skills/xtopay/SKILL.md \
  -o .claude/skills/xtopay/SKILL.md

Claude Code picks it up on its own when you work on payments. For Cursor, save the same file as .cursor/rules/xtopay.mdc; for Copilot, Codex and others, add it to your project's AGENTS.md or .github/copilot-instructions.md.

The MCP server

New

The MCP server reads your account, and makes payment links, invoices and checkouts. It never moves money out of your business or charges anyone: transfers, payouts and direct charges stay with your server and your dashboard.

Connect an AI assistant to your Xtopay account, then ask it things like:

  • "How much came in this week, and from how many customers?"
  • "Why did Kofi's payment this morning fail?"
  • "Make a GH₵250 payment link for the catering deposit."
  • "Draft an invoice for Ama Serwaa: 4 trays of kenkey and fish at GH₵25, due on Friday." Then: "Send it."
  • "When did my last payout land?"

It's at https://api.xtopay.co/mcp (Streamable HTTP). Connect by signing in with Xtopay, or with your secret key as a bearer token.

Connect it

claude.ai and ChatGPT: add a custom connector (in Claude, Settings → Connectors → Add custom connector; in ChatGPT, a connector in developer mode) with the address https://api.xtopay.co/mcp. It sends you to Xtopay to sign in: you see what it's asking for, choose test or live data, and connect. The owner, admins and developers can connect apps, for the business they're signed in to.

Connected apps are listed in the dashboard under Developers → AI apps, where anyone who can connect them can disconnect them. Connecting one to live data asks for a code from your authenticator app, and the owner is emailed.

The rest connect with a secret key. A test key works with test data only; start with it.

Claude Code

claude mcp add --transport http xtopay https://api.xtopay.co/mcp \
  --header "Authorization: Bearer sk_test_…"

Cursor, in .cursor/mcp.json (or your user one):

{
  "mcpServers": {
    "xtopay": {
      "url": "https://api.xtopay.co/mcp",
      "headers": { "Authorization": "Bearer sk_test_…" }
    }
  }
}

Claude Desktop, in claude_desktop_config.json, through mcp-remote (it needs Node.js):

{
  "mcpServers": {
    "xtopay": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://api.xtopay.co/mcp",
        "--header",
        "Authorization:${XTOPAY_AUTH}"
      ],
      "env": { "XTOPAY_AUTH": "Bearer sk_test_…" }
    }
  }
}

Tools

ToolWhat it does
get_businessWhich business and mode the key is for
get_balanceAvailable and pending balance
list_payments, get_paymentPayments, by status and dates; one by its reference, with why it failed
list_customersYour customers, searchable
list_payment_links, list_invoices, get_invoiceYour links and invoices
list_payouts, list_transfers, list_subscriptionsMoney paid out and sent, and subscriptions (reading only)
create_payment_link, set_payment_link_statusMake a link; pause or resume one
create_invoice, send_invoiceDraft an invoice; send it to the customer
create_checkoutA one-off checkout to pay, with its address

How it keeps your account safe

  • It's your key, or your sign-in. Every tool is a call to the API in your mode, within its limits, and each call is in your request log under Developers. With a key, its IP allowlist applies, and rolling the key stops the connection at once. An app connected by signing in acts as the person who connected it, only while they're a developer, admin or owner on the team; disconnecting it stops it at once, and its access only works with the MCP server's tools, never the rest of the API.
  • Nothing moves money out. No tool sends transfers, payouts or charges.
  • Asking twice makes one. A link, invoice or checkout asked for twice (an assistant retrying) gets the first one back.
  • You approve. Assistants ask you before using a tool that changes anything. Sending an invoice reaches your customer, so it says so.
  • Keep the key in your assistant's settings on your own computer, and use a test key unless you need your real figures.

On this page