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
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).
| Method | Route | What it does | Plan feature |
|---|---|---|---|
GET | /transactions | Recent orders paid by Mobile Money (filter by status, limit up to 100) | — |
GET | /transactions/{id} | Full detail of one order | — |
GET · POST | /links | List or create payment links (fixed or open amount, with QR code) | links |
GET · POST | /payouts | List payouts or send one Mobile Money payout | payouts |
GET | /payouts/anomalies | Repeated failures, amount spikes, high failure rate, possible duplicates | ai_reconciliation |
GET · POST | /refunds | List refunds or refund an order, fully or in part | refunds |
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.
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.
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> 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.
| Tool | What it does |
|---|---|
list_transactions | Recent Mobile Money orders |
get_transaction | One order in detail |
list_payment_links | Existing payment links |
create_payment_link | New link with QR code |
list_payouts | Recent payouts |
create_payout | Send one payout (moves money) |
list_payout_anomalies | Suspicious payout patterns |
list_refunds | Recent refunds |
create_refund | Refund 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).
