API Reference

Complete reference for all RohoPay REST API endpoints.

Base URL

output.txtText
https://api.rohopay.com

Authentication

Endpoint GroupAuth Method
/api/v1/*Authorization: Bearer {api_key}
/api/v1/checkoutapi_key in request body
/dashboard/*Session cookie rohopay_token
/api/v2/digital/*Session cookie rohopay_token
/api/v2/plugins/*Session cookie rohopay_token
/api/v2/reports/*Session cookie rohopay_token
/api/v2/public/*No auth required
/webhooks/*HMAC or token verification

Security Model & Hardening

RohoPay's API enforces the following security invariants — integrate with them in mind:

  • API keys are server-side only. All /api/v1/* calls authenticate with Authorization: Bearer {api_key}. Never embed a live_ key in client-side code, mobile apps, or public repos. The card /api/v1/checkout endpoint takes api_key in the request body instead of the header.
  • Dashboard sessions use a Secure cookie, not a JS token. Authenticated app calls (/dashboard/*, /api/v2/digital/*, /api/v2/plugins/*, /api/v2/reports/*) are authenticated by the httpOnly, Secure, SameSite=None rohopay_token cookie. The token is never returned in JSON responses, URLs, or localStorage.
  • CORS is allowlist-only. The API reflects Access-Control-Allow-Origin solely for configured origins and sends Access-Control-Allow-Credentials: true for them. Unknown origins receive no CORS headers and are blocked by the browser.
  • Currency is required and validated. Collection/checkout requests must supply a valid ISO-4217 currency. There is no silent default — an invalid or missing currency returns INVALID_CURRENCY.
  • Refunds are strictly scoped. A refund must belong to the project and user on the API key; anything else is rejected with FORBIDDEN. Refund amounts are capped to the remaining refundable balance (computed inside the wallet lock).
  • Withdrawals/disbursements are guarded. They enforce a per-day ceiling and a short in-flight window, computed under the wallet lock, to prevent double-spend.
  • Idempotency is enforced on mutations. Send an Idempotency-Key header on create/pay/withdraw requests; duplicate keys are deduplicated rather than double-charged.
  • Webhooks are the source of truth. Payment status from redirect query params is a UX hint only — always confirm final status via the webhook (HMAC-SHA256 in X-RohoPay-Signature) or a status poll. Provider webhooks are verified (x-webhook-secret for Iotec, HMAC for Relworx).

Response Envelope

All responses follow the same JSON structure:

response.jsonJSON
{
  "success": true | false,
  "data": { ... },         // present when success: true
  "message": "...",        // optional human-readable message
  "error": {               // present when success: false
    "code": "ERROR_CODE",
    "message": "Human description",
    "reference": "RHP-..."  // optional transaction reference
  }
}

Complete Endpoint Index

Health

MethodPathAuthDescription
GET/healthNoneAPI health check

Authentication (User)

MethodPathAuthDescription
POST/auth/user/loginNoneEmail/password login
POST/auth/user/signupNoneCreate account
POST/auth/user/verify-emailNoneVerify email with code
POST/auth/user/resend-verificationNoneResend verification email
GET/auth/google/loginNoneGoogle OAuth redirect
GET/auth/meSessionGet current user
POST/auth/logoutSessionInvalidate session

Payments API (v1)

MethodPathAuthDescription
POST/api/v1/collectAPI KeyCollect mobile money
POST/api/v1/disburseAPI KeySend mobile money (live only)
GET/api/v1/transactionsAPI KeyList transactions
GET/api/v1/transactions/:refAPI KeyGet transaction by reference
GET/api/v1/wallet/balanceAPI KeyGet wallet balances
POST/api/v1/checkoutBody (api_key)Initiate card payment
POST/api/v1/checkout/:reference/verify-card-otpNone (reference is the trust token)Submit card OTP to complete a payment
💡

RohoPay also receives internal, server-to-server status callbacks on its own payment rails. Those routes aren't meant to be called by your app and aren't part of the public API surface — see Webhooks Reference for the webhooks you receive from RohoPay.

Dashboard API (Session Auth)

MethodPathDescription
GET/dashboard/meCurrent user profile
GET/dashboard/walletWallet details + balances
POST/dashboard/wallet/topupTop up via mobile money
POST/dashboard/wallet/card-topupTop up via card
POST/dashboard/wallet/withdrawWithdraw to mobile money
GET/dashboard/statsDashboard statistics
GET/dashboard/projectsList projects
POST/dashboard/projectsCreate project
PUT/dashboard/projects/:idUpdate project
DELETE/dashboard/projects/:idDelete project
GET/dashboard/projects/:id/api-keysList API keys
POST/dashboard/projects/:id/api-keysCreate API key
DELETE/dashboard/projects/:id/api-keys/:keyIDRevoke API key
POST/dashboard/projects/:id/api-keys/:keyID/rotateRotate API key
GET/dashboard/transactionsList all transactions
POST/dashboard/transactions/:ref/syncForce-sync transaction status
GET/dashboard/webhook-configGet webhook configuration
GET/dashboard/wallets/lookupLook up wallet by email
POST/dashboard/transfersCreate P2P transfer
GET/dashboard/transfersList transfers

Digital Products API (v2, Session Auth)

MethodPathDescription
GET/POST/api/v2/digital/productsList / create products
GET/PUT/DELETE/api/v2/digital/products/:idGet / update / delete product
GET/POST/api/v2/digital/linksList / create payment links
GET/PUT/DELETE/api/v2/digital/links/:idGet / update / delete link
GET/api/v2/digital/links/:id/revenueRevenue for a link
GET/api/v2/digital/ordersList orders
GET/api/v2/digital/orders/:idGet order
PUT/api/v2/digital/orders/:id/statusUpdate order status
PUT/api/v2/digital/orders/:id/deliveryUpdate delivery content
GET/api/v2/digital/orders/:id/resourceGet order resource (buyer)
GET/PUT/api/v2/digital/settingsDigital product settings
POST/api/v2/digital/uploadUpload product file

Public Checkout API (v2, No Auth)

MethodPathDescription
GET/api/v2/public/checkout/:slugGet checkout page details
POST/api/v2/public/checkout/:slug/payProcess payment on checkout page
GET/api/v2/public/checkout/:slug/order/:idPoll order status

WordPress Plugin API (v2, Session Auth)

MethodPathDescription
GET/POST/api/v2/plugins/connectionsList / create connections
GET/DELETE/api/v2/plugins/connections/:idGet / delete connection
PUT/api/v2/plugins/connections/:id/settingsUpdate settings
POST/api/v2/plugins/connections/:id/regenerate-tokenNew site token
GET/api/v2/plugins/transactionsList plugin transactions
GET/PUT/api/v2/plugins/routingGet / update routing rules

Reporting API (v2, Session Auth)

MethodPathDescription
GET/api/v2/reports/transactionsTransactions with filters
GET/api/v2/reports/analyticsAnalytics & volume breakdown
GET/api/v2/reports/settlementsSettlement records
GET/POST/api/v2/reports/exportsList / create data exports
GET/api/v2/reports/reconciliationReconciliation items
PUT/api/v2/reports/reconciliation/:idMark item reconciled

Pagination

Endpoints that return lists accept optional query parameters:

ParameterDefaultDescription
limit20Max items per page (max 100)
offset0Number of items to skip
fromISO 8601 date filter (start)
toISO 8601 date filter (end)
statusFilter by transaction status
typeFilter by transaction type
environmentFilter by test or live