# Flutterwave

> Collect mobile money with Flutterwave: the payer approves a PIN prompt on their phone. Covers the API keys, the webhook secret hash and payment checks.

Source: https://docs.centipidbilling.com/billing/payment-gateways/flutterwave

## Collect payments with Flutterwave

`FLUTTERWAVE` collects by **mobile money**. In Kenya the payer gets a PIN
prompt on their phone. In Uganda, Ghana, Rwanda and Senegal, and for Orange
in Côte d'Ivoire, Flutterwave sends them to its own page to approve the
payment (Ghana adds a code there). Other francophone networks send a PIN
prompt.

Offered in the country catalog for **Kenya (KE), Ghana (GH), Uganda (UG),
Tanzania (TZ), Rwanda (RW), Cameroon (CM), Côte d'Ivoire (CI) and Senegal
(SN)**. The payer's network is read from the start of their number: MTN and
Airtel in Uganda; MTN, Telecel and AirtelTigo in Ghana; Vodacom, Airtel, Tigo
and Halotel in Tanzania; MTN and Orange in Cameroon; MTN, Orange and Moov in
Côte d'Ivoire; Orange in Senegal. Wave and Burkina Faso are not offered.

Your billing currency must be the country's own (KES, UGX, GHS, TZS, RWF, XAF
or XOF). Checkout is refused if your prices are in another currency.

Nothing is credited until Centipid asks Flutterwave
(`GET /v3/transactions/verify_by_reference`) and the transaction is
`successful`, for at least the expected amount, in the expected currency, with
our own reference. A forged callback credits nothing.

## Configure the gateway

#### Copy your API keys from Flutterwave

In the Flutterwave dashboard open Settings → API and copy the public and
secret keys.

#### Open Settings → Payments → Flutterwave in Centipid

Enter the **Public key** and **Secret key**.

#### Add the webhook

Required: without it a payer who closes the page is only credited by
Centipid's own checks. In Flutterwave Settings → Webhooks set the URL to
the **Webhook URL** shown under Callback URLs in Centipid
(`https://<your portal domain>/api/flutterwave/callback`) and a **Secret
hash**. Enter the same hash in Centipid.

#### Run a controlled test payment

Pay a small amount from the captive portal and confirm it reaches the
ledger.

## Credentials

| Field | Required | Notes |
|---|---|---|
| Public key | Yes | From Settings → API. |
| Secret key | Yes | Used for charges and verification, from Centipid's servers only. |
| Encryption key | No | Not used for mobile money charges. |
| Secret hash | No | Checked against the `verif-hash` header. When set, webhooks without it are refused. |

The webhook only tells Centipid to look sooner. Centipid also checks the
payment every 5 seconds for about 3 minutes, and only that check credits a payment.
