Quickstart
Collect your first mobile money payment in under 5 minutes.
What You Need
- A RohoPay account → payments.rohopay.com
- Your test API key from Dashboard → Projects → your project
curlor any HTTP client
Step 1 — Create a Project & Get a Key
- Sign up at payments.rohopay.com
- Go to Projects in the sidebar → New Project
- Click your project → find the API Keys section
- Click Generate Key → choose Test
- Copy the
test_...key shown — it appears once only
Step 2 — Make Your First Collection
cURLBash
curl -X POST https://api.rohopay.com/api/v1/collect \
-H "Authorization: Bearer test_YOUR_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"phone": "256111777771",
"amount": 10000,
"currency": "UGX",
"description": "Order #1001"
}'
💡
256111777771 is an Iotec sandbox success number. Use it with any test_ key — it resolves to successful via the sandbox without sending a real USSD prompt. See Test Numbers for the full set (success / failed / pending / sent-to-vendor).
You'll get back:
response.jsonJSON
{
"success": true,
"data": {
"internal_reference": "RHP-2024-ABC123",
"status": "pending",
"amount": 10000,
"currency": "UGX",
"environment": "test"
}
}
Step 3 — Check the Status
terminal.shBash
curl https://api.rohopay.com/api/v1/transactions/RHP-2024-ABC123 \
-H "Authorization: Bearer test_YOUR_KEY"
In test mode the status resolves to successful within seconds.
Step 4 — Receive Webhooks
Add a callback_url to your collection request. RohoPay will POST a deposit.successful event to that URL when the payment is confirmed:
response.jsonJSON
{
"event": "deposit.successful",
"internal_reference": "RHP-2024-ABC123",
"status": "successful",
"amount": 10000,
"net_amount": 9900,
"currency": "UGX"
}
See Webhooks for signature verification.
Step 5 — Go Live
When ready for real payments:
- Generate a
live_key from the same project page - Replace
test_YOUR_KEYwith yourlive_key - Use real customer phone numbers (not sandbox numbers like
256111777771) - Ensure your
callback_urlis a public HTTPS endpoint
