Skip to content

REST API · MCP server

Mobile Money for your code and your AI agents

Fosia Pay Pro exposes a REST API on your own WordPress site, and the Fosia MCP server (early access) lets Claude, Codex, Cursor or VS Code read transactions and manage links, payouts and refunds.

  • Bearer key per site
  • Idempotent payouts and refunds
  • Responses never cached
Terminal
curl https://shop.example/wp-json/fosia/v1/transactions?limit=5 \
  -H "Authorization: Bearer fpk_..."

Reference

REST API

Namespace /wp-json/fosia/v1 on your own store. Authenticate with the site key shown under WooCommerce › Settings › Payments › Fosia Pay Pro (it starts with fpk_, and you can regenerate it at any time).

MethodRouteWhat it doesPlan feature
GET/transactionsRecent orders paid by Mobile Money (filter by status, limit up to 100)—
GET/transactions/{id}Full detail of one order—
GET · POST/linksList or create payment links (fixed or open amount, with QR code)links
GET · POST/payoutsList payouts or send one Mobile Money payoutpayouts
GET/payouts/anomaliesRepeated failures, amount spikes, high failure rate, possible duplicatesai_reconciliation
GET · POST/refundsList refunds or refund an order, fully or in partrefunds

Plan-gated

Every route needs the AI / MCP feature (Pro + AI, Agency). Links, payouts, refunds and anomalies also check their own feature and answer 403 otherwise.

Safe retries

Payouts and refunds accept an Idempotency-Key header. A retried request returns the first result instead of moving money twice.

Bounded

Payouts between 50 and 10,000,000 in a PawaPay currency; refunds never above the remaining refundable amount.

MCP server

Let an AI agent run the back office

Early access

The Fosia MCP server is a small local program your AI client starts on your computer. Your key only ever travels from your machine to your own site, and it is never your PawaPay token.

  • N
    Works with Claude Code, Claude Desktop, Codex CLI, Cursor, VS Code and other MCP clients
  • N
    Read-only tools are marked read-only; payout and refund tools ask for confirmation
  • N
    HTTPS only, no redirects followed, no telemetry
  • N
    Node.js 22 or later on the computer running the client

Early access: the MCP server is not on npm yet. Pro + AI and Agency customers get the package from us, with help to install it: write to infos@fosiarw.com or on WhatsApp. The REST API below is available today.

Claude Code (early access package)
npm install -g ./fosialtd-fosia-mcp-server-1.0.0.tgz

claude mcp add fosia-pay --scope user \
  --env FOSIA_SITE_URL=https://shop.example \
  --env FOSIA_API_KEY=fpk_... \
  -- fosia-mcp-server
Ask your agent
> Show me today's failed Mobile Money payments,
  grouped by operator.

> Create a payment link "Invoice #42" for 25,000 RWF.

> Check my recent payouts for anomalies.

MCP tools

Nine tools, one per API route

In the early-access MCP server.

ToolWhat it does
list_transactionsRecent Mobile Money orders
get_transactionOne order in detail
list_payment_linksExisting payment links
create_payment_linkNew link with QR code
list_payoutsRecent payouts
create_payoutSend one payout (moves money)
list_payout_anomaliesSuspicious payout patterns
list_refundsRecent refunds
create_refundRefund an order (moves money)

Build on Mobile Money

API and MCP access come with Pro + AI ($39.99/year or $119 once) and Agency ($79.99/year or $249 once).