Service Status
Check the operational status of SwiftWallet services and M-Pesa connectivity.
/v3/service-status/
GET
/v3/service-status/
Auth Required
Get Service Status
Check current status for core services.
Headers
| Header | Value |
|---|---|
Authorization |
Bearer YOUR_API_KEY |
Example Response
JSON
{
"success": true,
"data": {
"status": "operational",
"timestamp": "2024-12-31T12:00:00Z",
"components_summary": {
"stk_push": {
"status": "operational",
"failure_rate": 0,
"last_updated": "2024-12-31T11:58:00Z"
},
"b2c": {
"status": "operational",
"failure_rate": 0,
"last_updated": "2024-12-31T11:58:00Z"
},
"b2b": {
"status": "operational",
"failure_rate": 0,
"last_updated": "2024-12-31T11:58:00Z"
},
"wallet": {
"status": "operational",
"failure_rate": 0,
"last_updated": "2024-12-31T11:58:00Z"
}
}
}
}
cURL Example
bash
curl -X GET 'https://swiftwallet.co.ke/v3/service-status/' \
-H 'Authorization: Bearer YOUR_API_KEY'
GET
/v3/service-status/history
Auth Required
Status History
Retrieve historical status events for services.
Headers
| Header | Value |
|---|---|
Authorization |
Bearer YOUR_API_KEY |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
service_type |
string | No | Filter by service (stk_push, b2c, b2b, wallet) |
hours |
integer | No | Time range in hours (max 168) |
Example Response
JSON
{
"success": true,
"data": {
"time_range_hours": 24,
"service_filter": "stk_push",
"history": [
{
"service_type": "stk_push",
"status": "operational",
"failure_rate": 0,
"created_at": "2024-12-31T11:00:00Z"
}
]
}
}
cURL Example
bash
curl -X GET 'https://swiftwallet.co.ke/v3/service-status/history?service_type=stk_push&hours=24' \
-H 'Authorization: Bearer YOUR_API_KEY'
GET
/v3/service-status/components
Auth Required
Component Status
Detailed component status with recent failure metrics.
Headers
| Header | Value |
|---|---|
Authorization |
Bearer YOUR_API_KEY |
Example Response
JSON
{
"success": true,
"data": {
"components": {
"stk_push": {
"status": "operational",
"failure_rate": 0,
"last_updated": "2024-12-31T11:58:00Z",
"metrics_15min": {
"failure_rate": 0,
"total_requests": 50,
"failed_requests": 0
}
}
},
"timestamp": "2024-12-31T12:00:00Z"
}
}
cURL Example
bash
curl -X GET 'https://swiftwallet.co.ke/v3/service-status/components' \
-H 'Authorization: Bearer YOUR_API_KEY'
GET
/v3/service-status/transaction/{id}
Auth Required
Transaction Timeline
Fetch service events for a specific transaction.
Headers
| Header | Value |
|---|---|
Authorization |
Bearer YOUR_API_KEY |
Example Response
JSON
{
"success": true,
"data": {
"transaction_id": 789,
"events": [
{
"event": "stk.initiated",
"message": "STK request sent",
"created_at": "2024-12-31T12:00:05Z"
}
]
}
}
cURL Example
bash
curl -X GET 'https://swiftwallet.co.ke/v3/service-status/transaction/789' \
-H 'Authorization: Bearer YOUR_API_KEY'