Get Payment Reference Order Status
Retrieves the payment status and current status of a prepaid order associated with a Yego Paycash payment reference.
This endpoint is read-only. It does not create, modify, cancel, or otherwise change the order.
Authenticationβ
This endpoint requires a Bearer token issued for your client account.
Authorization: Bearer <your_token>
Endpointβ
GET /v1/shipments/prepaid-orders/payment-reference/:unique_order_number
The unique_order_number identifies the order whose payment information should be retrieved.
Requestβ
Headersβ
| Header | Value | Required |
|---|---|---|
Authorization | Bearer <token> | Yes |
Path parametersβ
| Parameter | Type | Required | Max length | Description |
|---|---|---|---|---|
unique_order_number | string | Yes | 50 | Unique order identifier previously provided when creating the prepaid order. |
Request exampleβ
curl -X GET "https://api.eon.example.com/api/v1/shipments/prepaid-orders/payment-reference/Test-Reference-002" \
-H "Authorization: Bearer $TOKEN"
Responseβ
200 OKβ
Returns the payment reference and the current payment and order status.
{
"code": 200,
"success": {
"arguments": {
"unique_order_number": "Test-Reference-002",
"payment_reference": "1676355200011",
"is_paid": false,
"current_status": "CANCELLED"
}
}
}
| Field | Description |
|---|---|
unique_order_number | Unique identifier of the order. |
payment_reference | Yego Paycash payment reference associated with the order. |
is_paid | Indicates whether the payment has been confirmed. true when the order has been paid; otherwise false. |
current_status | Current status of the order. |
Paid order exampleβ
{
"code": 200,
"success": {
"arguments": {
"unique_order_number": "Test-Reference-002",
"payment_reference": "1676355200011",
"is_paid": true,
"current_status": "PLACED"
}
}
}
Errorsβ
| Status | Error code | Cause |
|---|---|---|
| 401 | unauthorized | Missing or invalid Bearer token. |
| 404 | order_not_found | No order exists for the specified unique_order_number and client. |
Error exampleβ
{
"code": 404,
"fault": {
"arguments": {},
"type": "order.not_found",
"message": "order not found."
}
}