```mermaid
flowchart LR
  A["Agent: tools/call send_tzs<br/>remit.paymentrequired.com/mcp"] --> V["validate()<br/>tools.js"]
  V --> D["callTool send_tzs<br/>mcp.js"]
  D --> O{"orderId + proof?"}
  O -->|"no orderId"| N["engine.createOrder<br/>journal"]
  N --> Q["402 offers, valid 1800 s"]
  O -->|"orderId + proof"| F["engine.fulfil: verify proof"]
  F --> P{"destination"}
  P -->|"mobile / merchant"| PO["automatic payout"]
  P -->|bank| AP["payout_pending_approval<br/>operator /admin approve"]
  PO --> CP(("ClickPesa"))
  AP --> CP
```

# `send_tzs` (Remit)

[← Index](../index.md) · [Overview](../overview.md) · [Signer](../signer.md) · [Issued links](../links.md)

> Evidence labels: **CODE** = read in the cited file at the recorded revision/hash; **FIXTURE** = parent-accepted combined cloud fixture run 99/99 (`directory-wave/parent-directory-wave-acceptance.json`), not live; **LIVE-RO** = observed read-only on the live host 2026-10-14 (raw files in `evidence/live-probes/`); **UNVERIFIED** = not executed here. Topology = accepted directory-wave source, **not deployed**. Nothing in this handbook moved money, signed, or activated a card.

## What it does

Creates a payout order to mobile money (`phone`), bank (`accountNumber`+`bic`), Lipa Namba (`lipaNamba`+`providerCode`) or TanQR (`qrCode`). The first call returns a payment request (HTTP 402 on plain JSON; MCP result with `status: awaiting_payment`) with `orderId`, recipient name, `payWith` offers (each with `automaticDetection`), valid 30 min. People then pay once via `get_payment`; L402/x402 agents may retry with the same `orderId` + `amountTZS` and a proof header. Mobile/merchant payouts are automatic after verified payment; bank payouts accept USDC only and need operator approval.

**Catalog:** remit.paymentrequired.com/mcp (own MCP, independent). **Schema & dispatch:** Definition [`remit:src/tools.js:247`](https://github.com/nuri-com/nuri-clickpesa-remit-mcp/blob/212886c7eedfa314f7de790622ea95632630057b/src/tools.js#L247); dispatch [`remit:src/mcp.js:539`](https://github.com/nuri-com/nuri-clickpesa-remit-mcp/blob/212886c7eedfa314f7de790622ea95632630057b/src/mcp.js#L539)

## Actions / operations

| action | what happens | effect | source |
|---|---|---|---|
| `send_tzs` | Send Tanzanian shillings | MONEY MOVE (customer pays crypto → TZS payout) | [`remit:src/mcp.js:539`](https://github.com/nuri-com/nuri-clickpesa-remit-mcp/blob/212886c7eedfa314f7de790622ea95632630057b/src/mcp.js#L539) |

## Prerequisites

No account, registration or API key (instructions text). 

## How to use it (exact `tools/call` JSON)

Endpoint: `POST https://remit.paymentrequired.com/mcp` (JSON-RPC 2.0). Placeholders in `<…>` are never real values; secrets (`session`, `wallet_key`) are never pasted into docs or logs.

**send_tzs**

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "send_tzs",
    "arguments": {
      "amountTZS": 5000,
      "phone": "+255712345678"
    }
  }
}
```

Expected result (`structuredContent`, shape from code; values illustrative):

```json
{"orderId":"NURI-…","status":"awaiting_payment","validForSeconds":1800,"amountTZS":5000,"recipient":{"name":"…","provider":"…","checked":true},"payWith":[{…,"automaticDetection":true}],"nextAction":"The money will go to \"…\". If this is correct, call get_payment …"}
```

Plain-JSON form (same handler): `POST /mcp` with `{"tool":"send_tzs", …arguments}`; a payment request then comes back as HTTP 402 ([`remit:src/mcp.js:799`](https://github.com/nuri-com/nuri-clickpesa-remit-mcp/blob/212886c7eedfa314f7de790622ea95632630057b/src/mcp.js#L799)).

## Approval, signature and money

Money is paid by the agent/person into the offered rail (USDC/EURC on Base, BTC, Lightning, or x402/L402 proof); payout to Tanzania follows **after** the incoming payment is verified. Bank payouts wait for an operator approve/reject in the authenticated `/admin` dashboard ([`remit:src/admin-dashboard.js:172`](https://github.com/nuri-com/nuri-clickpesa-remit-mcp/blob/212886c7eedfa314f7de790622ea95632630057b/src/admin-dashboard.js#L172)).

## Failure, peer-down and retry

A retry with `orderId` never creates a new order or re-bills a paid one; amount/destination mismatch → `invalid_arguments` ([`remit:src/mcp.js:564`](https://github.com/nuri-com/nuri-clickpesa-remit-mcp/blob/212886c7eedfa314f7de790622ea95632630057b/src/mcp.js#L564)). Never pay again once `get_order` leaves `awaiting_payment`.

## What was actually observed

UNVERIFIED: not called by this handbook.
