ccowemaPay
REST API · v1 stable

The REST API for African Mobile Money.

One clean HTTP API. MTN Mobile Money, Airtel Money, HMAC-signed webhooks. No SDK required — a simple curl is enough.

Create an account → See examples
Unlimited free sandbox HMAC-SHA256 webhooks Native idempotency keys
POST · api.cowemapay.com/v1/checkout/sessions ● 200 OK · 184ms
# Create a hosted-checkout payment session
curl https://api.cowemapay.com/v1/checkout/sessions \
  -u sk_live_••••: \
  -H "Idempotency-Key: $(uuidgen)" \
  -d amount=5000 \
  -d currency=XAF \
  -d method=momo.mtn \
  -d customer_phone="+24206…" \
  -d success_url="https://marie.cg/ok" \
  -d cancel_url="https://marie.cg/nope"

# Response · 184ms
{
  "id":        "cs_3K2pX9z",
  "status":    "awaiting_pin",
  "url":       "https://pay.cowemapay.com/cs_3K2pX9z",
  "expires_at": 1715812938,
  "livemode":  true
}
Quickstart

From zero to first payment in 4 steps.

Instant sandbox at signup, one-click production switch after account verification.

01

Create an account

Email + password. Sandbox keys generated automatically.

02

Get your keys

Dashboard → API → sk_test_… and webhook secret.

03

First curl

POST /v1/checkout/sessions. You get a payment URL.

04

Receive the webhook

payment.succeeded HMAC-signed. Close your business logic.

Round-trip

One request, one response, one webhook.

The full flow of a successful transaction. The response contains the checkout URL to present to the customer, then you receive a signed webhook when the payment is confirmed.

REQUEST POST · /v1/checkout/sessions
# Headers Authorization: "Basic c2tfbGl…" Idempotency-Key: "3a9z-2026" # Body (form-encoded) amount=5000 currency=XAF method=momo.mtn customer_phone=+24206… success_url=https://marie.cg/ok metadata[order_id]=ord_4421
RESPONSE 200 OK 184 ms
{ "id": "cs_3K2pX9z", "object": "checkout_session", "status": "awaiting_pin", "amount": 5000, "currency": "XAF", "method": "momo.mtn", "url": "https://pay.cowemapay.com/cs_3K2pX9z", "expires_at": 1715812938, "livemode": true, "metadata": { "order_id": "ord_4421" } }
01 · Your server
POST /v1/checkout/sessions

You create the session

02 · Customer
Hosted Checkout

Pays on pay.cowemapay.com

03 · Your server
Webhook payment.succeeded

HMAC-SHA256 signed

Supported languages

No SDK required. Everything is HTTP.

But if you prefer an official library, we publish them for the 6 most common languages. You can also do everything with a simple HTTP client.

JS
Node.js

npm i cowema

PHP
PHP

composer require cowema

PY
Python

pip install cowema

GO
Go

go get cowema

JV
Java

maven · gradle

RB
Ruby

gem install cowema

Sandbox

Test for free, with no limits, no prior verification.

Your test keys are available at signup. No validation required. All operators simulated, all failure scenarios covered. One-click switch to production.

Get my keys → Read the guide
# Sandbox keys
publishable: pk_test_8a3b…copy
secret: sk_test_e2f9…copy
webhook: whsec_c4d1…copy

# Test numbers
MTN ok: +242 06 0000 0001
MTN fail: +242 06 0000 0002
Airtel: +242 05 0000 0001
Endpoints
REST v1
+ webhooks
Checkout, payments, refunds, payouts, balances. Pure JSON, standard HTTP.
Security
HMAC-SHA256 signed
Signed webhooks, replay protection, timing-safe comparison, secret rotation.
Reliability
Idempotency keys
Replay risk-free, automatic retries on network errors and timeouts.
Sandbox
Unlimited free
Test numbers, failure simulation, replay dashboard, one-click switch.

Start integrating
in 5 minutes.

Get your sandbox keys, read the guide, make your first API call. It's free, unlimited, and no payment method is required.