Topup Status
Retrieve the current status and details of a specific topup transaction.
Topup Status
Get the current status and full details of a specific topup transaction by its ID.
GET /v2/topups/:id
Permission required: airtime.transactions.read
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The topup transaction ID (UUID) |
Example Request
curl -X GET "https://api.clickairtime.com/v2/topups/a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
-H "Authorization: Bearer ce_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"const topupId = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890';
const response = await fetch(`https://api.clickairtime.com/v2/topups/${topupId}`, {
headers: {
'Authorization': 'Bearer ce_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
},
});
const data = await response.json();import requests
topup_id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'
response = requests.get(
f'https://api.clickairtime.com/v2/topups/{topup_id}',
headers={
'Authorization': 'Bearer ce_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
}
)
data = response.json()Example Response
{
"success": true,
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "completed",
"phone_number": "+233541112259",
"network": {
"id": 42,
"name": "MTN Ghana",
"country": "Ghana",
"country_code": "GH"
},
"amount": {
"value": 50,
"currency": "GHS"
},
"cost": {
"value": 4.05,
"currency": "USD"
},
"product_id": null,
"product_name": null,
"sms": {
"enabled": true,
"message": "Airtime top-up from Acme Corp"
},
"reference": "invoice-12345",
"provider_reference": "DT-123456789",
"failure_reason": null,
"metadata": {
"customer_id": "cust_001"
},
"created_at": "2024-01-15T10:30:00.000Z",
"completed_at": "2024-01-15T10:30:02.500Z"
},
"meta": {
"request_id": "req_x1y2z3a4b5c6",
"timestamp": "2024-01-15T10:31:00.000Z"
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique transaction ID (UUID) |
status | string | Current status: pending, processing, completed, failed |
phone_number | string | Recipient phone number |
network | object | Network operator details |
amount | object | null | Local currency amount delivered |
cost | object | USD cost charged to your wallet |
product_id | string | null | Bundle product ID (if applicable) |
product_name | string | null | Bundle product name (if applicable) |
sms | object | SMS notification settings |
reference | string | Your reference for this transaction |
provider_reference | string | null | Provider's transaction reference |
failure_reason | string | null | Reason for failure (if status is failed) |
metadata | object | Custom metadata you attached |
created_at | string | ISO 8601 creation timestamp |
completed_at | string | null | ISO 8601 completion timestamp |
