curl --request GET \
--url https://starpayqa.starpayethiopia.com/v1/starpay-api/erp/api/txn-sse \
--header 'x-api-secret: <x-api-secret>'{
"streamType": "text/event-stream",
"events": [
{
"event": "data",
"payload": {
"status": "UNPAID"
}
},
{
"event": "data",
"payload": {
"amount": 1,
"billRefNo": "T584KP095O",
"externalReference": "DE50JURNL0",
"merchantId": "698856835bf6c24fd5ff3dac",
"merchantName": "jimma merchant",
"paymentChannel": "USSD_PUSH",
"status": "PAID",
"transactionId": "a407e6fa-3a77-49db-93fb-02e8a9c2d28f",
"paidAt": "05 May 2026, 8:15 AM",
"customerName": "tesfaye",
"customerPhoneNumber": "+251944719460",
"commissionAmount": 0.02,
"redirectUrl": "",
"paidAmount": 0.98,
"updatedAt": "2026-05-05T05:15:41.341Z"
}
},
{
"event": "data",
"payload": {
"amount": 1,
"billRefNo": "T584KP095O",
"status": "PAID",
"_closed": true,
"updatedAt": "2026-05-05T05:15:41.341Z"
}
}
]
}Opens an SSE (text/event-stream) connection that pushes status updates for the given billRefNo in real time. Typical events include an initial status (for example UNPAID), then updates when the payment completes. A final event may include "_closed": true.
Request format example: /txn-sse?billRefNo=T584KP095O (gateway route in this spec: /erp/api/txn-sse?billRefNo=...).
Important: the full HTTP response is an SSE stream, not one JSON object. Parse each data: event payload as JSON.
Raw text/event-stream example:
data: {"status":"UNPAID"}
data: {"amount":1,"billRefNo":"T584KP095O","externalReference":"DE50JURNL0","merchantId":"698856835bf6c24fd5ff3dac","merchantName":"jimma merchant","paymentChannel":"USSD_PUSH","status":"PAID","transactionId":"a407e6fa-3a77-49db-93fb-02e8a9c2d28f","paidAt":"05 May 2026, 8:15 AM","customerName":"tesfaye","customerPhoneNumber":"+251944719460","commissionAmount":0.02,"redirectUrl":"","paidAmount":0.98,"updatedAt":"2026-05-05T05:15:41.341Z"}
data: {"amount":1,"status":"PAID","_closed":true}
If you do not receive a definitive update within 15 seconds, close the stream and use POST /erp/check-txn with the same billRefNo to poll status.
curl --request GET \
--url https://starpayqa.starpayethiopia.com/v1/starpay-api/erp/api/txn-sse \
--header 'x-api-secret: <x-api-secret>'{
"streamType": "text/event-stream",
"events": [
{
"event": "data",
"payload": {
"status": "UNPAID"
}
},
{
"event": "data",
"payload": {
"amount": 1,
"billRefNo": "T584KP095O",
"externalReference": "DE50JURNL0",
"merchantId": "698856835bf6c24fd5ff3dac",
"merchantName": "jimma merchant",
"paymentChannel": "USSD_PUSH",
"status": "PAID",
"transactionId": "a407e6fa-3a77-49db-93fb-02e8a9c2d28f",
"paidAt": "05 May 2026, 8:15 AM",
"customerName": "tesfaye",
"customerPhoneNumber": "+251944719460",
"commissionAmount": 0.02,
"redirectUrl": "",
"paidAmount": 0.98,
"updatedAt": "2026-05-05T05:15:41.341Z"
}
},
{
"event": "data",
"payload": {
"amount": 1,
"billRefNo": "T584KP095O",
"status": "PAID",
"_closed": true,
"updatedAt": "2026-05-05T05:15:41.341Z"
}
}
]
}Use this endpoint for real-time transaction status updates using Server-Sent Events (SSE). The response is not one JSON object. It is an SSE stream (Documentation Index
Fetch the complete documentation index at: https://erp-developer.starpayethiopia.com/llms.txt
Use this file to discover all available pages before exploring further.
text/event-stream) containing multiple events over time.
GET request to /erp/api/txn-sse?billRefNo=..../txn-sse?billRefNo=T584KP095O (gateway route: /erp/api/txn-sse?billRefNo=...).data: {"status":"UNPAID"}data: {"status":"PAID", ...}data: line as JSON._closed: true.JSON.parse() on the entire HTTP response body. Parse each data: event payload separately.
POST /erp/check-txn with the same billRefNo for manual status check.
x-api-secret header.billRefNo unless needed.data: {"status":"UNPAID"}
data: {"amount":1,"billRefNo":"T584KP095O","externalReference":"DE50JURNL0","merchantId":"698856835bf6c24fd5ff3dac","merchantName":"jimma merchant","paymentChannel":"USSD_PUSH","status":"PAID","transactionId":"a407e6fa-3a77-49db-93fb-02e8a9c2d28f","paidAt":"05 May 2026, 8:15 AM","customerName":"tesfaye","customerPhoneNumber":"+251944719460","commissionAmount":0.02,"redirectUrl":"","paidAmount":0.98,"updatedAt":"2026-05-05T05:15:41.341Z"}
data: {"amount":1,"billRefNo":"T584KP095O","status":"PAID","_closed":true,"updatedAt":"2026-05-05T05:15:41.341Z"}
API secret key.
"X0Lkj979tyUv1IPGQkd+qsx0N6o1LQPSUpfBa6ZCKvXosp0HVnciXSIyWmgyBl0B"
Bill reference to subscribe to. Example call format: /txn-sse?billRefNo=T584KP095O.
"T584KP095O"
Open SSE stream. Each event is one or more lines of the form data: <json> per the Server-Sent Events format. Do not parse the entire stream as one JSON object.
SSE text stream payload. This is protocol framing, not a single JSON document. Parse each data: payload as JSON; shape varies (minimal status only, full payment detail, or final object with _closed).