Developer documentation
Build with NuePay.
One clear API for collecting and sending mobile money in Uganda. Go from your first request to a confirmed payment.
UGX payments · MTN MoMo · Airtel Money
↙
Collect payments
Send a mobile money approval prompt and credit your wallet after confirmation.
Collections API →↗Send money
Pay an MTN or Airtel number from your NuePay wallet with safe retries built in.
Disbursements API →A small request. A complete payment flow.
Start in the sandbox. The same endpoints support both environments; your secret determines whether the payment is simulated or live.
curl https://api.nuepay.net/v1/collections \
-H "Authorization: Bearer $NUEPAY_TEST_KEY" \
-H "Idempotency-Key: $PAYMENT_UUID" \
-H 'Content-Type: application/json' \
-d '{
"amount": "500.00",
"currency": "UGX",
"phone": "0772000000",
"merchant_reference": "order-123"
}'// Persist this UUID with your order; reuse it when retrying.
const response = await fetch('https://api.nuepay.net/v1/collections', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.NUEPAY_TEST_KEY}`,
'Idempotency-Key': paymentUuid,
'Content-Type': 'application/json',
},
body: JSON.stringify({
amount: '500.00', currency: 'UGX',
phone: '0772000000', merchant_reference: 'order-123',
}),
});
const result = await response.json();
if (!response.ok) throw new Error(result.message);
console.log(result.data);$curl = curl_init('https://api.nuepay.net/v1/collections');
curl_setopt_array($curl, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer '.getenv('NUEPAY_TEST_KEY'),
'Idempotency-Key: '.$paymentUuid, // Reuse for retries.
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'amount' => '500.00', 'currency' => 'UGX',
'phone' => '0772000000', 'merchant_reference' => 'order-123',
]),
]);
$body = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);
if ($body === false || $status < 200 || $status >= 300) {
throw new RuntimeException('Inspect the error and retry safely.');
}
$result = json_decode($body, true, 512, JSON_THROW_ON_ERROR);import json, os, urllib.request
request = urllib.request.Request(
'https://api.nuepay.net/v1/collections',
method='POST',
headers={
'Authorization': 'Bearer ' + os.environ['NUEPAY_TEST_KEY'],
'Idempotency-Key': payment_uuid, # Reuse for retries.
'Content-Type': 'application/json',
},
data=json.dumps({
'amount': '500.00', 'currency': 'UGX',
'phone': '0772000000', 'merchant_reference': 'order-123',
}).encode(),
)
with urllib.request.urlopen(request, timeout=30) as response:
result = json.load(response)
print(result['data'])Set NUEPAY_TEST_KEY and generate a payment UUID before running this request. Keep the UUID with your order for safe retries.

