Getting Started
- Sign up on Yolliepay and log in to your dashboard
- Generate an API Key & Secret in the API Keys section
- Use the API to collect payments (STK push) or disburse payouts (send money)
- Pass a webhook_url in each request to receive real-time transaction updates
Base URL: https://pay.yollie.live/api
Authentication & Origin Lock
All API requests require both your API key and API secret in headers:
x-api-key: ypk_your_api_key_here
x-api-secret: yps_your_api_secret_here
🔒 Allowed Website (Origin Lock): Every API key is bound to a single website
(e.g. mystore.com) chosen when you created the key. Yolliepay
inspects the Origin / Referer
header on each request and rejects with 403 if it does not match.
This protects you even if your keys leak — an attacker cannot use them from a different domain.
Rate limiting: Max 30 requests / minute / key. Identical request
bodies sent within 30s are rejected as duplicates (HTTP 409) to prevent double-charging.
Security: Never expose credentials in client-side code. Make API calls from
your server only. The Origin header from a server-to-server
call should be set to your website's domain.
Collect Payment (STK Push)
POST /api/api-create-payment
Initiate a payment collection from a customer's mobile money account.
Request Body
{
"amount": 5000,
"phone_number": "0712345678",
"provider": "mtn",
"note": "Payment for order #123",
"webhook_url": "https://your-server.com/webhook"
}
Parameters
| Parameter | Type | Required | Description |
| amount | number | Yes | Amount in UGX (min: 500) |
| phone_number | string | Yes | Uganda phone number |
| provider | string | Yes | "mtn" or "airtel" |
| note | string | No | Payment description |
| webhook_url | string | No | URL to receive status callbacks |
Success Response (200)
{
"success": true,
"message": "Payment initiated successfully",
"transaction_id": "uuid",
"reference": "API_COL_...",
"amount": 5000,
"phone_number": "256712345678"
}
JavaScript Example
const response = await fetch('https://pay.yollie.live/api/api-create-payment', {
method: 'POST',
headers: {
'x-api-key': 'ypk_your_api_key_here',
'x-api-secret': 'yps_your_api_secret_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 50000,
phone_number: '0712345678',
provider: 'mtn',
note: 'Payment for services',
webhook_url: 'https://your-server.com/webhook'
})
});
const data = await response.json();
console.log('Transaction ID:', data.transaction_id);
Payout / Disburse (Send Money)
POST /api/api-disburse
Send money to a mobile money number. Funds are deducted from your Yolliepay wallet.
Request Body
{
"amount": 10000,
"phone_number": "0712345678",
"provider": "mtn",
"recipient_name": "John Doe",
"note": "Salary payment",
"webhook_url": "https://your-server.com/webhook"
}
Parameters
| Parameter | Type | Required | Description |
| amount | number | Yes | Amount in UGX (min: 1000) |
| phone_number | string | Yes | Recipient phone number |
| provider | string | Yes | "mtn" or "airtel" |
| recipient_name | string | No | Recipient's name |
| note | string | No | Payout description |
| webhook_url | string | No | URL to receive status callbacks |
Success Response (200)
{
"success": true,
"message": "Payout initiated successfully",
"transaction_id": "uuid",
"reference": "...",
"amount": 10000,
"phone_number": "256712345678"
}
JavaScript Example
const response = await fetch('https://pay.yollie.live/api/api-disburse', {
method: 'POST',
headers: {
'x-api-key': 'ypk_your_api_key_here',
'x-api-secret': 'yps_your_api_secret_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 10000,
phone_number: '0712345678',
provider: 'mtn',
recipient_name: 'John Doe',
note: 'Salary payment',
webhook_url: 'https://your-server.com/webhook'
})
});
const data = await response.json();
console.log('Payout ID:', data.transaction_id);
cURL Example
curl -X POST "https://pay.yollie.live/api/api-disburse" \
-H "x-api-key: ypk_your_api_key_here" \
-H "x-api-secret: yps_your_api_secret_here" \
-H "Content-Type: application/json" \
-d '{
"amount": 10000,
"phone_number": "0712345678",
"provider": "mtn",
"recipient_name": "John Doe",
"note": "Payout"
}'
Webhooks
Pass a webhook_url in each API request to receive transaction status updates at that URL.
Webhook Payload
{
"id": "evt_abc12345",
"type": "transaction.completed",
"created": 1642000000,
"data": {
"id": "transaction-uuid",
"type": "deposit",
"amount": 50000,
"currency": "UGX",
"status": "completed",
"description": "Payment for services",
"recipient_phone": "256712345678",
"recipient_name": "John Doe",
"created_at": "2026-01-12T10:30:00Z"
},
"api_version": "2025-01"
}
Webhook Headers
User-Agent: Yolliepay-Webhooks/1.0
Content-Type: application/json
X-Yolliepay-Event: transaction.completed
X-Yolliepay-Timestamp: 1642000000
Available Events
| Event | Description |
| transaction.completed | Payment/payout successfully processed |
| transaction.failed | Payment/payout failed or cancelled |
| transaction.pending | Payment initiated, awaiting approval |
| payout.completed | Payout successfully sent |
| payout.failed | Payout failed |
Fee Structure
Deposits (Collections)
| Type | Fee |
| All deposits (including API) | 3% |
Payouts (Withdrawals & Send Money)
| Amount Range (UGX) | Fee (UGX) |
| 1,000 – 10,000 | 600 |
| 10,001 – 50,000 | 1,500 |
| 50,001 – 100,000 | 2,500 |
| 100,001 – 500,000 | 5,000 |
| 500,001 – 1,000,000 | 10,000 |
Yolliepay-to-Yolliepay Transfers
| Type | Fee |
| Internal transfers | 5% |
Daily Withdrawal Limits
| Account Type | Limit |
| Personal | UGX 500,000/day |
| Business | UGX 5,000,000/day |
| Sandbox (unverified) | Withdrawals disabled |
Error Codes
| Code | Description |
| 400 | Bad Request — missing or invalid parameters (validation details in response) |
| 401 | Unauthorized — invalid or missing API credentials |
| 403 | Forbidden — key deactivated, deposits/withdrawals disabled, or origin not allowed |
| 409 | Duplicate — identical request received recently. Wait before retrying. |
| 429 | Rate limit exceeded — slow down (max 30 req/min/key) |
| 500 | Server error — internal processing error |