# Tanzania

| | |
|---|---|
| Currency | `TZS` |
| Country code | `TZ` |
| Phone format | Country code `255` + number, digits only, no `+` (e.g. `255754123456`) |
| Collect with | [Mobile money push](https://developers.intasend.com/guides/collections/mobile-money-push/), [Checkout](https://developers.intasend.com/guides/collections/checkout/) |
| Send with | `provider: "INTASEND-XB"`
| Amount limits | TZS 500 to 5,000,000 | |

## Networks

| Network | Detected by prefix / `operator_code` |
|---|---|
| Vodacom M-Pesa | `VODACOM` |
| Airtel Money | `AIRTEL` |
| Tigo Pesa / Yas | `TIGO` |
| HaloPesa | `HALOTEL` |

## Collect a payment

Send a mobile money prompt to the customer's phone:

```bash
curl -X POST https://api.intasend.com/api/v1/payment/intasend-xb-push/ \
  -H "Authorization: Bearer $INTASEND_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "amount": 5000,
  "currency": "TZS",
  "country": "TZ",
  "phone_number": "255754123456",
  "api_ref": "order-123",
  "operator_code": "VODACOM"
}'
```

`operator_code` is recommended for Tanzania. On [Checkout](https://developers.intasend.com/guides/collections/checkout/) with `currency: "TZS"`, customers can choose M-Pesa, Tigo Pesa, Airtel or HaloPesa (amount 500 to 5,000,000).

The response contains an `invoice` in `PENDING` or `PROCESSING` state. Wait for the
`collection_event` [webhook](https://developers.intasend.com/guides/webhooks/) or poll [payment status](https://developers.intasend.com/guides/collections/overview/#check-payment-status)
until `state` is `COMPLETE` or `FAILED`.

## Send money

### Initiate the payout

```bash
curl -X POST https://api.intasend.com/api/v1/send-money/initiate/ \
  -H "Authorization: Bearer $INTASEND_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "currency": "TZS",
  "country": "TZ",
  "provider": "INTASEND-XB",
  "requires_approval": "NO",
  "callback_url": "https://example.com/intasend/payouts",
  "transactions": [
    {
      "name": "Asha Juma",
      "account": "255754123456",
      "operator_code": "VODACOM",
      "amount": "5000",
      "narrative": "Payout"
    }
  ]
}'
```

> **operator_code is required**
Tanzanian payouts must include `operator_code`: `VODACOM`, `AIRTEL`, `TIGO` or `HALOTEL`. List them with [`GET /send-money/operator-codes/tz/?channel_type=MOBILE_MONEY`](https://developers.intasend.com/guides/send-money/validate-accounts/#operator-codes).

Track it with [`/send-money/status/`](https://developers.intasend.com/guides/send-money/overview/#3-check-status) using the returned `tracking_id`.
