Skip to main content

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​

HeaderValueRequired
AuthorizationBearer <token>Yes

Path parameters​

ParameterTypeRequiredMax lengthDescription
unique_order_numberstringYes50Unique 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"
}
}
}
FieldDescription
unique_order_numberUnique identifier of the order.
payment_referenceYego Paycash payment reference associated with the order.
is_paidIndicates whether the payment has been confirmed. true when the order has been paid; otherwise false.
current_statusCurrent status of the order.
{
"code": 200,
"success": {
"arguments": {
"unique_order_number": "Test-Reference-002",
"payment_reference": "1676355200011",
"is_paid": true,
"current_status": "PLACED"
}
}
}

Errors​

StatusError codeCause
401unauthorizedMissing or invalid Bearer token.
404order_not_foundNo order exists for the specified unique_order_number and client.

Error example​

{
"code": 404,
"fault": {
"arguments": {},
"type": "order.not_found",
"message": "order not found."
}
}