curl, php ou Node.js installé.
1Recevoir vos identifiants
Compte créé par l'administrateur Neka PaieVotre compte développeur est créé par l'administrateur Neka Paie. Vous recevez par email :
- Une
API_KEYde la formenk_test_xxxxxxxxxxxxxxxx... - Un
API_SECRETde 64 caractères hexadécimaux - Un
MERCHANT_ID(UUID)
Pas encore de compte ? Contactez-nous : contact@nekapaie.com
2Stocker vos clés en variables d'environnement
~30 secondesBASHexport NEKAPAY_API_KEY="nk_test_xxxxxxxxxxxx..."
export NEKAPAY_API_SECRET="0b2cc4dc6e9c250dc4ac2367b6947d98..."
export NEKAPAY_BASE_URL="https://nekapaie.com/api/v1"
Ne stockez jamais ces valeurs en clair dans votre code. Pour la production, utilisez un coffre-fort (Vault, AWS Secrets Manager).
3Faire votre premier Cash-In
~2 minutesInitiez un paiement test depuis un wallet Mali Orange Money (+22376xxxxxxxx) :
cURL (le plus simple)
BASHBODY='{"merchant_order_id":"order_001","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)
curl -X POST "$NEKAPAY_BASE_URL/payments/cashin" \
-H "Content-Type: application/json" \
-H "X-NekaPay-Key: $NEKAPAY_API_KEY" \
-H "X-NekaPay-Timestamp: $TS" \
-H "X-NekaPay-Signature: $SIG" \
-d "$BODY"
PHP
PHP$body = json_encode([
'merchant_order_id' => 'order_001',
'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,
],
]);
$response = curl_exec($ch);
echo $response;
Node.js
JSconst crypto = require('crypto');
const axios = require('axios');
const body = JSON.stringify({
merchant_order_id: 'order_001',
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));
4Lire la réponse
~30 secondesSi tout se passe bien, vous recevez un statut HTTP 202 Accepted avec une URL de paiement :
JSON{
"data": {
"transaction_id": "550e8400-e29b-41d4-a716-446655440000",
"merchant_order_id": "order_001",
"type": "CASHIN",
"status": "PENDING",
"amount": 50000,
"currency": "XOF",
"country_code": "ML",
"msisdn": "+223******56",
"payment_url": "https://webpayment.orange.com/pay/abc123",
"provider_tx_id": "OM_2026042900012345",
"created_at": "2026-04-29T14:30:00Z"
}
}
Redirigez votre utilisateur vers data.payment_url pour qu'il complète le paiement Orange Money.
5Suivre le statut
~1 minuteTrois moyens pour connaître le résultat final :
Méthode A : Webhook (recommandé)
Vous recevez un POST signé HMAC à chaque changement d'état terminal. Voir la doc webhooks →
Méthode B : Polling de statut
BASHTS=$(date +%s)
SIG=$(echo -n "${TS}" | openssl dgst -sha256 -hmac "$NEKAPAY_API_SECRET" | cut -d' ' -f2)
curl "$NEKAPAY_BASE_URL/payments/$TX_ID" \
-H "X-NekaPay-Key: $NEKAPAY_API_KEY" \
-H "X-NekaPay-Timestamp: $TS" \
-H "X-NekaPay-Signature: $SIG"
Méthode C : Dashboard web
Connectez-vous à votre espace marchand pour voir toutes vos transactions en temps réel.
Et après ?
- Exemples SDK complets — PHP, Node.js, Python, Java, Go, cURL
- Guide sandbox — numéros de test et scénarios prédéfinis
- Collection Postman — pour tester sans coder
- Recevoir les webhooks — handler PHP/Node clé en main
- Passage en production — checklist KYC + bascule des clés