Get Order Detail
GET
/v2/orders/{id}Authorization
AuthorizationBearer token · headerrequiredMerchant API key scoped to one merchant and environment. Read operations require api:read, normal write operations require api:write, and broadcast mutations also require explicit broadcasts:write.
Path parameters
idstring<uuid>requiredHeader parameters
x-request-idstringOptional caller-provided request correlation ID.
min length 1
Responses
200OK
orderobjectrequiredShow propertiesHide properties
idstring<uuid>requiredinvoiceIdstring<uuid>requiredinvoiceNumberstringrequiredmin length 1 · max length 80
merchantIdstring<uuid>requiredenvironmentstringrequiredAllowed:
sandboxproductionsourceTypestringrequiredAllowed:
checkout_sessionrenewalcheckoutSessionIdstring<uuid> | anyrequiredShow propertiesHide properties
Any of:
string<uuid>
string<uuid>any
anysubscriptionIdstring<uuid> | anyrequiredShow propertiesHide properties
Any of:
string<uuid>
string<uuid>any
anycustomerIdstring<uuid>requiredproductIdstring<uuid> | anyrequiredShow propertiesHide properties
Any of:
string<uuid>
string<uuid>any
anyofferIdstring<uuid> | anyrequiredShow propertiesHide properties
Any of:
string<uuid>
string<uuid>any
anypriceVersionIdstring<uuid> | anyrequiredShow propertiesHide properties
Any of:
string<uuid>
string<uuid>any
anystatusstringrequiredAllowed:
pendingpaidcompleted_freefailedcanceledpartially_refunded_externalrefunded_externalcurrencyanyrequiredsubtotalHalalasintegerrequiredmin 0 · max 9007199254740991
discountHalalasintegerrequiredmin 0 · max 9007199254740991
taxableAmountHalalasintegerrequiredmin 0 · max 9007199254740991
vatRateBpsintegerrequiredmin 0 · max 10000
vatAmountHalalasintegerrequiredmin 0 · max 9007199254740991
totalHalalasintegerrequiredmin 0 · max 9007199254740991
customerNamestring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
anycustomerEmailstring<email>requiredmax length 320
productNamestring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
anypaymentMethodBrandstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
anypaymentMethodLast4string | anyrequiredShow propertiesHide properties
Any of:
string
stringany
anyexternalRefundAmountHalalasintegerrequiredmin 0 · max 9007199254740991
periodobject | anyrequiredShow propertiesHide properties
Any of:
object
startedAtstring<date-time>requiredendsAtstring<date-time>requiredany
anycreatedAtstring<date-time>requiredupdatedAtstring<date-time>requiredinvoiceobjectrequiredShow propertiesHide properties
idstring<uuid>requiredorderIdstring<uuid>requiredinvoiceNumberstringrequiredmin length 1 · max length 80
statusstringrequiredAllowed:
draftfinalizedissuedpaidvoidcurrencyanyrequiredsubtotalHalalasintegerrequiredmin 0 · max 9007199254740991
discountHalalasintegerrequiredmin 0 · max 9007199254740991
taxableAmountHalalasintegerrequiredmin 0 · max 9007199254740991
vatRateBpsintegerrequiredmin 0 · max 10000
vatAmountHalalasintegerrequiredmin 0 · max 9007199254740991
totalHalalasintegerrequiredmin 0 · max 9007199254740991
dueAtstring<date-time>requiredfinalizedAtstring<date-time> | anyrequiredShow propertiesHide properties
Any of:
string<date-time>
string<date-time>any
anyissuedAtstring<date-time> | anyrequiredShow propertiesHide properties
Any of:
string<date-time>
string<date-time>any
anypaidAtstring<date-time> | anyrequiredShow propertiesHide properties
Any of:
string<date-time>
string<date-time>any
any401Standard Cipay error response.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmin length 1
messagestringrequiredmin length 1
requestIdstringrequiredmin length 1
detailsobject403Standard Cipay error response.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmin length 1
messagestringrequiredmin length 1
requestIdstringrequiredmin length 1
detailsobject404Standard Cipay error response.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmin length 1
messagestringrequiredmin length 1
requestIdstringrequiredmin length 1
detailsobject409Standard Cipay error response.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmin length 1
messagestringrequiredmin length 1
requestIdstringrequiredmin length 1
detailsobject422Standard Cipay error response.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmin length 1
messagestringrequiredmin length 1
requestIdstringrequiredmin length 1
detailsobject429Standard Cipay error response.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmin length 1
messagestringrequiredmin length 1
requestIdstringrequiredmin length 1
detailsobject500Standard Cipay error response.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmin length 1
messagestringrequiredmin length 1
requestIdstringrequiredmin length 1
detailsobjectRequest
curl -X GET "https://api.cipay.net/v2/orders/%3Cuuid%3E" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://api.cipay.net/v2/orders/%3Cuuid%3E", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});Response
{
"order": {
"id": "<uuid>",
"invoiceId": "<uuid>",
"invoiceNumber": "string",
"merchantId": "<uuid>",
"environment": "sandbox",
"sourceType": "checkout_session",
"checkoutSessionId": "<uuid>",
"subscriptionId": "<uuid>",
"customerId": "<uuid>",
"productId": "<uuid>",
"offerId": "<uuid>",
"priceVersionId": "<uuid>",
"status": "pending",
"currency": "SAR",
"subtotalHalalas": 0,
"discountHalalas": 0,
"taxableAmountHalalas": 0,
"vatRateBps": 0,
"vatAmountHalalas": 0,
"totalHalalas": 0,
"customerName": "string",
"customerEmail": "<email>",
"productName": "string",
"paymentMethodBrand": "string",
"paymentMethodLast4": "string",
"externalRefundAmountHalalas": 0,
"period": {
"startedAt": "2024-01-01T00:00:00Z",
"endsAt": "2024-01-01T00:00:00Z"
},
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-01T00:00:00Z"
},
"invoice": {
"id": "<uuid>",
"orderId": "<uuid>",
"invoiceNumber": "string",
"status": "draft",
"currency": "SAR",
"subtotalHalalas": 0,
"discountHalalas": 0,
"taxableAmountHalalas": 0,
"vatRateBps": 0,
"vatAmountHalalas": 0,
"totalHalalas": 0,
"dueAt": "2024-01-01T00:00:00Z",
"finalizedAt": "2024-01-01T00:00:00Z",
"issuedAt": "2024-01-01T00:00:00Z",
"paidAt": "2024-01-01T00:00:00Z"
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": {}
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": {}
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": {}
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": {}
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": {}
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": {}
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": {}
}
}