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

cURL
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": "256700000000",
    "amount": 10000,
    "currency": "UGX",
    "description": "Order #1001"
  }'
256700000000 is the RohoPay test number. Use it with any test_ key — it always succeeds immediately without sending a real USSD prompt.
You’ll get back:
{
  "success": true,
  "data": {
    "internal_reference": "RHP-2024-ABC123",
    "status": "pending",
    "amount": 10000,
    "currency": "UGX",
    "environment": "test"
  }
}

Step 3 — Check the Status

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:
{
  "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 256700000000)
  4. Ensure your callback_url is a public HTTPS endpoint

Next Steps

Card Payments

Accept Visa and Mastercard with 3D Secure.

Webhooks

Verify signatures and handle payment events.

Digital Products

Create payment links and sell digital goods.

Error Handling

Handle errors gracefully.