Skip to main content

orderSearch

Type: Query

Returns the current state of one order. Use it to reconcile (for example after your webhook endpoint was down) or to double-check a payment from your server when the buyer returns via the return URL. For day-to-day updates rely on webhooks instead of polling.

Request​

Pass one of the identifiers:

FieldDescription
orderIdSevi order.id
referenceNumberSevi order reference, e.g. D123456
platformReferenceYour invoice number sent on orderCreate
query OrderSearch($input: OrderSearchInput!) {
orderSearch(input: $input) {
order {
id
referenceNumber
platformReference
status
paymentStatus
amount
currency
paymentLink
}
}
}
{ "input": { "platformReference": "INV-1001" } }

Response​

{
"data": {
"orderSearch": {
"order": {
"id": "0b9f6f7e-5a8c-4a57-9a52-3c2f0e1d9a11",
"referenceNumber": "D123456",
"platformReference": "INV-1001",
"status": "AWAITING_SHIPMENT",
"paymentStatus": "PAID",
"amount": 5000,
"currency": "KES",
"paymentLink": "https://p.sevi.io/D123456"
}
}
}
}

Interpret status / paymentStatus with the status table: PAID + AWAITING_SHIPMENT means the buyer paid and you can deliver; DELIVERED means your wallet has been credited.