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 a RohoPay 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": {
    "transaction_id": "01j2k3m4n5p6q7r8s9t0uvwx",
    "reference": "ref_ab12cd34ef56ab78",
    "status": "pending",
    "amount": 10000,
    "currency": "UGX",
    "commission": 100,
    "provider": "rohopay",
    "net_amount": 9900
  },
  "message": "Payment request initiated"
}

Save the reference — it is how you track this payment. pending means the request was accepted, not that the customer has paid.

Step 3 — Check the Status

terminal.shBash
curl https://api.rohopay.com/api/v1/transactions/ref_ab12cd34ef56ab78 \
  -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",
  "transaction_id": "01j2k3m4n5p6q7r8s9t0uvwx",
  "reference": "ref_ab12cd34ef56ab78",
  "status": "successful",
  "amount": 10000,
  "currency": "UGX",
  "type": "collection",
  "environment": "test",
  "provider": "rohopay",
  "timestamp": "2026-07-15T08:31:47Z"
}

See Webhooks for signature verification, and the Integration Guide for a complete, production-grade deposit and payout flow.

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