# Developers

URL: https://pay.fosiarw.com/developers/
Updated: 2026-10-28
Site: Fosia Pay

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.

[Get Pro + AI](/buy/pro_ai/) [Request MCP early access](mailto:infos@fosiarw.com?subject=MCP%20server%20early%20access)

- 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).

| 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 prepare one Mobile Money payout that waits for a person to approve it | 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 the local 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.

- NWorks with Claude Code, Claude Desktop, Codex CLI, Cursor, VS Code and other MCP clients
- NRead-only tools are marked read-only; payout and refund tools ask for confirmation
- NHTTPS only, no redirects followed, no telemetry
- NNode.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](mailto:infos@fosiarw.com?subject=MCP%20server%20early%20access) or [on WhatsApp](https://wa.me/250794410487). 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.

| 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` | Prepare one payout (moves money once a person approves it) |
| `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).

[Get Pro + AI](/buy/pro_ai/) [Request MCP early access](mailto:infos@fosiarw.com?subject=MCP%20server%20early%20access) [Compare plans](/pricing/)
