Get Transaction by Reference

GET https://api.rohopay.com/api/v1/transactions/{reference}
Authorization: Bearer {api_key}
The reference parameter accepts:
  • internal_reference (e.g., RHP-2024-ABC123)
  • provider_reference (provider-assigned ID)

Response

{
  "success": true,
  "data": {
    "id": "01j2k3m4n5p6q7r8s9t0uvwx",
    "internal_reference": "RHP-2024-ABC123",
    "provider_reference": "9876543210",
    "type": "collection",
    "status": "successful",
    "payment_method": "mobile_money",
    "provider": "relworx",
    "phone_number": "256700123456",
    "amount": 50000,
    "currency": "UGX",
    "commission_amount": 1000,
    "commission_rate": 0.02,
    "provider_fee_amount": 0,
    "provider_fee_rate": 0,
    "net_amount": 49000,
    "description": "Order #1001",
    "callback_url": "https://your-app.com/webhooks/rohopay",
    "provider_status": "SUCCESSFUL",
    "failover_reason": "",
    "environment": "live",
    "created_at": "2024-07-15T08:30:00Z",
    "updated_at": "2024-07-15T08:31:47Z"
  }
}

List Transactions

GET https://api.rohopay.com/api/v1/transactions
Authorization: Bearer {api_key}

Query Parameters

ParameterTypeDescription
statusstringFilter: pending, successful, or failed
typestringFilter: collection or disbursement
environmentstringFilter: test or live
fromstringISO 8601 start date
tostringISO 8601 end date
limitintegerMax records (default 20, max 100)
offsetintegerPagination offset

Example

# Get last 10 successful live collections
GET /api/v1/transactions?status=successful&type=collection&environment=live&limit=10

Response

{
  "success": true,
  "data": [
    {
      "internal_reference": "RHP-2024-ABC123",
      "status": "successful",
      "amount": 50000,
      ...
    }
  ]
}

Error Responses

HTTPCodeDescription
401UNAUTHORIZEDInvalid API key
404NOT_FOUNDTransaction reference not found
429RATE_LIMIT_EXCEEDEDToo many requests