GET /api/v1/transactions

Retrieve transaction status and list transaction history.

Get Transaction by Reference

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

The reference parameter is the reference returned when you created the payment (and sent in webhooks). It appears in this response as internal_reference, and transaction_id from the other responses appears here as id. Provider references are not exposed and cannot be used for lookup. Only transactions belonging to the project of the API key you use are returned.

Response

response.jsonJSON
{
  "success": true,
  "data": {
    "id": "01j2k3m4n5p6q7r8s9t0uvwx",
    "internal_reference": "ref_ab12cd34ef56ab78",
    "type": "collection",
    "status": "successful",
    "payment_method": "mobile_money",
    "provider": "rohopay",
    "phone_number": "256700123456",
    "amount": 50000,
    "currency": "UGX",
    "commission_amount": 500,
    "commission_rate": 0.01,
    "provider_fee_amount": 0,
    "provider_fee_rate": 0,
    "net_amount": 49500,
    "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

output.txtText
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

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

Response

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

Error Responses

HTTPCodeDescription
401INVALID_API_KEYMissing or invalid API key
404TRANSACTION_NOT_FOUNDUnknown reference, or it belongs to another project
429RATE_LIMITEDToo many requests