# FedaPay

> Connect FedaPay to Centipid Billing to collect mobile money in XOF across Togo, Niger, and Benin using live API keys, signed webhooks, and status checks.

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

FedaPay collects mobile money directly on your subscribers' phones in **XOF** (whole francs only) in **Togo**, **Niger**, and **Benin**. Subscribers enter their mobile number, confirm the PIN prompt on their handset, and come online automatically once FedaPay confirms the transaction.

**Note:**
**Before you connect FedaPay**
- **Business account required:** FedaPay freelance accounts are capped at 10 payments per week. Activate a verified business account before routing live ISP traffic.
- **Payout timing:** FedaPay releases collected funds for payout after **3 working days**.
- **Currency:** FedaPay only collects in **XOF** (whole francs, minimum XOF 100). Workspaces priced in another currency (such as GNF or USD) cannot switch to FedaPay.
- **Live only:** Centipid always talks to FedaPay's live API (`https://api.fedapay.com/v1`). Paste live credentials only — there is no sandbox toggle.

## Supported countries and wallets

| Country | Mobile money networks | Network picker at checkout |
| --- | --- | --- |
| **Togo (`TG`)** | Mixx by Yas (`togocel`), Moov Money (`moov_tg`) | Pre-selected from phone prefix; subscriber can change it |
| **Niger (`NE`)** | Airtel Money (`airtel_ne`) | Automatic (no picker shown) |
| **Benin (`BJ`)** | MTN Mobile Money (`mtn_open`), Moov Money (`moov`), Celtiis Cash (`sbin`) | Pre-selected from phone prefix (supports 10-digit `01…` and 8-digit numbers); subscriber can change it |

## 1. Create live credentials in FedaPay

1. Sign in to your live **FedaPay Dashboard**.
2. Open **API** and copy your **Live Secret Key** (`sk_live_…`).
3. Open **Settings → Webhooks**, add a new webhook endpoint, and paste the **Webhook URL** shown on your Centipid FedaPay settings page:
   ```text
   https://<your-workspace-domain>/api/fedapay/callback
   ```
4. Subscribe to transaction events (`transaction.approved`, `transaction.declined`, `transaction.canceled`, `transaction.transferred`) and copy the endpoint's **Webhook signing secret**.

## 2. Connect FedaPay in Centipid

1. Open **Settings → Payments** and choose **FedaPay**.
2. Paste your **Secret key** and **Webhook secret**.
3. Save your credentials and switch your default gateway (or assign FedaPay to specific routers under **Payment accounts**).

Both secrets are encrypted at rest and masked when you return to the page.

## How payments are verified

Centipid never credits a subscriber from a webhook payload alone:

- Every webhook must carry a valid `X-FEDAPAY-SIGNATURE` header (HMAC-SHA256 over `timestamp.raw_body`) signed with your stored webhook secret and within a **5-minute** clock window. Requests with a missing, forged, expired, or unconfigured secret are rejected with `401`.
- A valid webhook queues a status verification against `GET /v1/transactions/{id}?include=currency`, and a background status poll also checks pending transactions so a lost webhook still settles automatically.
- Centipid verifies the transaction ID, our unique `FDP…` reference, `XOF` currency, and full expected amount before crediting once.
- Both `approved` and `transferred` settle the payment once (FedaPay moves approved transactions to `transferred` after 72 hours). If a `declined` or `canceled` transaction is later approved on retry, Centipid still credits it once.
