One clean HTTP API. MTN Mobile Money, Airtel Money, HMAC-signed webhooks. No SDK required — a simple curl is enough.
# 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 }
// Node 18+ · native fetch, no SDK required const auth = Buffer.from('sk_live_••••:').toString('base64'); const res = await fetch( 'https://api.cowemapay.com/v1/checkout/sessions', { method: 'POST', headers: { 'Authorization': `Basic ${auth}`, 'Idempotency-Key': crypto.randomUUID(), 'Content-Type': 'application/x-www-form-urlencoded', }, body: new URLSearchParams({ amount: '5000', currency: 'XAF', method: 'momo.mtn', customer_phone: '+24206…', }), } ); const session = await res.json();
// PHP · native curl, no SDK required $ch = curl_init('https://api.cowemapay.com/v1/checkout/sessions'); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_USERPWD => 'sk_live_••••:', CURLOPT_HTTPHEADER => ['Idempotency-Key: ' . uniqid()], CURLOPT_POST => true, CURLOPT_POSTFIELDS => http_build_query([ 'amount' => 5000, 'currency' => 'XAF', 'method' => 'momo.mtn', 'customer_phone' => '+24206…', ]), ]); $session = json_decode(curl_exec($ch));
# Python · requests import requests, uuid res = requests.post( 'https://api.cowemapay.com/v1/checkout/sessions', auth=('sk_live_••••', ''), headers={'Idempotency-Key': str(uuid.uuid4())}, data={ 'amount': 5000, 'currency': 'XAF', 'method': 'momo.mtn', 'customer_phone': '+24206…', }, ) session = res.json()
// Go · native net/http package main import ( "net/http" "net/url" "strings" ) func createSession() (*http.Response, error) { data := url.Values{} data.Set("amount", "5000") data.Set("method", "momo.mtn") req, _ := http.NewRequest("POST", "https://api.cowemapay.com/v1/checkout/sessions", strings.NewReader(data.Encode())) req.SetBasicAuth("sk_live_••••", "") return http.DefaultClient.Do(req) }
Instant sandbox at signup, one-click production switch after account verification.
Email + password. Sandbox keys generated automatically.
Dashboard → API → sk_test_… and webhook secret.
curlPOST /v1/checkout/sessions. You get a payment URL.
payment.succeeded HMAC-signed. Close your business logic.
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.
You create the session
Pays on pay.cowemapay.com
HMAC-SHA256 signed
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.
npm i cowema
composer require cowema
pip install cowema
go get cowema
maven · gradle
gem install cowema
Your test keys are available at signup. No validation required. All operators simulated, all failure scenarios covered. One-click switch to production.
Get your sandbox keys, read the guide, make your first API call. It's free, unlimited, and no payment method is required.