Skip to content

221 Pay

Collect mobile money payments in XOF in five West African countries, refund customers, withdraw received funds and follow every operation by webhook.

221 Pay collects mobile money payments in CFA francs (XOF) in Senegal, Côte d’Ivoire, Burkina Faso, Togo and Benin. A server calls the API with a key; 221 Pay follows each operation to its outcome, credits the merchant balance and reports the result by webhook.

Get started in 3 steps

Create a key

Open the 221 Pay dashboard (create an account if needed), then Developers > API keys: create a key with the payments scope. The link opens the dashboard of the environment serving this documentation, the one of the base URL below. A test key starts with sk_221_pay_test_; its secret is shown only once.

Terminal
export API_KEY="sk_221_pay_test_…"
export API_URL="<base URL below>"

Create a payment

Terminal
curl -X POST "$API_URL/v1/payments" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Idempotency-Key: order-1042" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": "5000",
    "currency": "XOF",
    "rail": "sn_wave",
    "merchant_reference": "order-1042",
    "return_url": "https://shop.example/payment/return",
    "customer_phone": "77 123 45 67"
  }'

Redirect the customer to checkout_url, or follow next_action.

Receive the result

On confirmation, 221 Pay sends the payment.succeeded event to the project's webhook endpoints. The payment can also be read at any time:

Terminal
curl "$API_URL/v1/payments/$PAYMENT_ID" -H "Authorization: Bearer $API_KEY"

status is then confirmed; fee and net give the fees and the credited amount.

Base URL

https://apps.orvlabs.com

All 221 Pay routes live under /v1/. Amounts are digit strings in whole XOF: "5000" means 5,000 CFA francs. The full OpenAPI contract is served at GET /v1/openapi.json.

Guides