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
| Parameter | Type | Description |
|---|---|---|
status | string | Filter: pending, successful, or failed |
type | string | Filter: collection or disbursement |
environment | string | Filter: test or live |
from | string | ISO 8601 start date |
to | string | ISO 8601 end date |
limit | integer | Max records (default 20, max 100) |
offset | integer | Pagination 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
| HTTP | Code | Description |
|---|---|---|
| 401 | INVALID_API_KEY | Missing or invalid API key |
| 404 | TRANSACTION_NOT_FOUND | Unknown reference, or it belongs to another project |
| 429 | RATE_LIMITED | Too many requests |
