Une API REST unifiée, des clés sandbox immédiates et une documentation complète. Testez sans KYC, passez en production après validation.
# 1. Signer la requête (timestamp + body brut)
BODY='{"merchant_order_id":"ord_42","amount":50000,"currency":"XOF","customer_msisdn":"+22376123456","country_code":"ML"}'
TS=$(date +%s)
SIG=$(echo -n "${TS}${BODY}" | openssl dgst -sha256 -hmac "$NEKAPAY_API_SECRET" | cut -d' ' -f2)
# 2. Appeler l'API
curl -X POST "https://nekapaie.com/api/v1/payments/cashin" \
-H "Content-Type: application/json" \
-H "X-NekaPay-Key: nk_test_xxx" \
-H "X-NekaPay-Timestamp: $TS" \
-H "X-NekaPay-Signature: $SIG" \
-d "$BODY"
→ HTTP 202 Accepted
{ "data": { "status": "PENDING", "payment_method": "USSD_PUSH" } }
# le client confirme le push USSD sur son téléphone
$body = json_encode([
'merchant_order_id' => 'ord_42',
'amount' => 50000,
'currency' => 'XOF',
'customer_msisdn' => '+22376123456',
'country_code' => 'ML',
]);
$ts = (string) time();
$sig = hash_hmac('sha256', $ts . $body, getenv('NEKAPAY_API_SECRET'));
$ch = curl_init(getenv('NEKAPAY_BASE_URL') . '/payments/cashin');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $body,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'X-NekaPay-Key: ' . getenv('NEKAPAY_API_KEY'),
'X-NekaPay-Timestamp: ' . $ts,
'X-NekaPay-Signature: ' . $sig,
],
]);
echo curl_exec($ch);
const crypto = require('crypto');
const axios = require('axios');
const body = JSON.stringify({
merchant_order_id: 'ord_42',
amount: 50000,
currency: 'XOF',
customer_msisdn: '+22376123456',
country_code: 'ML'
});
const ts = Math.floor(Date.now() / 1000).toString();
const sig = crypto.createHmac('sha256', process.env.NEKAPAY_API_SECRET)
.update(ts + body).digest('hex');
axios.post(process.env.NEKAPAY_BASE_URL + '/payments/cashin', body, {
headers: {
'Content-Type': 'application/json',
'X-NekaPay-Key': process.env.NEKAPAY_API_KEY,
'X-NekaPay-Timestamp': ts,
'X-NekaPay-Signature': sig
}
}).then(r => console.log(r.data));
import hashlib, hmac, json, os, time
import requests
body = json.dumps({
"merchant_order_id": "ord_42",
"amount": 50000,
"currency": "XOF",
"customer_msisdn": "+22376123456",
"country_code": "ML",
}, separators=(",", ":"))
ts = str(int(time.time()))
sig = hmac.new(
os.environ["NEKAPAY_API_SECRET"].encode(),
(ts + body).encode(),
hashlib.sha256,
).hexdigest()
r = requests.post(
os.environ["NEKAPAY_BASE_URL"] + "/payments/cashin",
data=body,
headers={
"Content-Type": "application/json",
"X-NekaPay-Key": os.environ["NEKAPAY_API_KEY"],
"X-NekaPay-Timestamp": ts,
"X-NekaPay-Signature": sig,
},
)
print(r.json())
https://nekapaie.com/api/v1
De la réception de vos identifiants au passage en production.
L'administrateur Neka Paie crée votre compte et vous transmet vos clés sandbox nk_test_* par email.
Signez votre requête en HMAC-SHA256 et lancez votre premier cashin. Aucun KYC requis pour les tests.
Soumettez vos documents KYC. Validation sous 48 h, puis vous recevez vos clés nk_live_*.
Une API pensée pour l'Afrique de l'Ouest : sécurité standard, statuts explicites et outils de test.
Tout est public : lisez avant même d'avoir vos clés.
Accès sandbox immédiat, documentation complète et support technique inclus.