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
  • curl or any HTTP client

Step 1 — Create a Project & Get a Key

  1. Sign up at payments.rohopay.com
  2. Go to Projects in the sidebar → New Project
  3. Click your project → find the API Keys section
  4. Click Generate Key → choose Test
  5. 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:

  1. Generate a live_ key from the same project page
  2. Replace test_YOUR_KEY with your live_ key
  3. Use real customer phone numbers (not sandbox numbers like 256111777771)
  4. Ensure your callback_url is a public HTTPS endpoint

Next Steps