Skip to content
Cipay
Esc
navigateopen⌘Jpreview

Get Order Detail

GET/v2/orders/{id}
Authorization
AuthorizationBearer token · headerrequired
Merchant 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>required
Header parameters
x-request-idstring
Optional caller-provided request correlation ID.
min length 1
Responses
200OK
orderobjectrequired
Show properties
idstring<uuid>required
invoiceIdstring<uuid>required
invoiceNumberstringrequired
min length 1 · max length 80
merchantIdstring<uuid>required
environmentstringrequired
Allowed:sandboxproduction
sourceTypestringrequired
Allowed:checkout_sessionrenewal
checkoutSessionIdstring<uuid> | anyrequired
Show properties
Any of:
string<uuid>
string<uuid>
any
any
subscriptionIdstring<uuid> | anyrequired
Show properties
Any of:
string<uuid>
string<uuid>
any
any
customerIdstring<uuid>required
productIdstring<uuid> | anyrequired
Show properties
Any of:
string<uuid>
string<uuid>
any
any
offerIdstring<uuid> | anyrequired
Show properties
Any of:
string<uuid>
string<uuid>
any
any
priceVersionIdstring<uuid> | anyrequired
Show properties
Any of:
string<uuid>
string<uuid>
any
any
statusstringrequired
Allowed:pendingpaidcompleted_freefailedcanceledpartially_refunded_externalrefunded_external
currencyanyrequired
subtotalHalalasintegerrequired
min 0 · max 9007199254740991
discountHalalasintegerrequired
min 0 · max 9007199254740991
taxableAmountHalalasintegerrequired
min 0 · max 9007199254740991
vatRateBpsintegerrequired
min 0 · max 10000
vatAmountHalalasintegerrequired
min 0 · max 9007199254740991
totalHalalasintegerrequired
min 0 · max 9007199254740991
customerNamestring | anyrequired
Show properties
Any of:
string
string
any
any
customerEmailstring<email>required
max length 320
productNamestring | anyrequired
Show properties
Any of:
string
string
any
any
paymentMethodBrandstring | anyrequired
Show properties
Any of:
string
string
any
any
paymentMethodLast4string | anyrequired
Show properties
Any of:
string
string
any
any
externalRefundAmountHalalasintegerrequired
min 0 · max 9007199254740991
periodobject | anyrequired
Show properties
Any of:
object
startedAtstring<date-time>required
endsAtstring<date-time>required
any
any
createdAtstring<date-time>required
updatedAtstring<date-time>required
invoiceobjectrequired
Show properties
idstring<uuid>required
orderIdstring<uuid>required
invoiceNumberstringrequired
min length 1 · max length 80
statusstringrequired
Allowed:draftfinalizedissuedpaidvoid
currencyanyrequired
subtotalHalalasintegerrequired
min 0 · max 9007199254740991
discountHalalasintegerrequired
min 0 · max 9007199254740991
taxableAmountHalalasintegerrequired
min 0 · max 9007199254740991
vatRateBpsintegerrequired
min 0 · max 10000
vatAmountHalalasintegerrequired
min 0 · max 9007199254740991
totalHalalasintegerrequired
min 0 · max 9007199254740991
dueAtstring<date-time>required
finalizedAtstring<date-time> | anyrequired
Show properties
Any of:
string<date-time>
string<date-time>
any
any
issuedAtstring<date-time> | anyrequired
Show properties
Any of:
string<date-time>
string<date-time>
any
any
paidAtstring<date-time> | anyrequired
Show properties
Any of:
string<date-time>
string<date-time>
any
any
401Standard Cipay error response.
errorobjectrequired
Show properties
codestringrequired
min length 1
messagestringrequired
min length 1
requestIdstringrequired
min length 1
detailsobject
403Standard Cipay error response.
errorobjectrequired
Show properties
codestringrequired
min length 1
messagestringrequired
min length 1
requestIdstringrequired
min length 1
detailsobject
404Standard Cipay error response.
errorobjectrequired
Show properties
codestringrequired
min length 1
messagestringrequired
min length 1
requestIdstringrequired
min length 1
detailsobject
409Standard Cipay error response.
errorobjectrequired
Show properties
codestringrequired
min length 1
messagestringrequired
min length 1
requestIdstringrequired
min length 1
detailsobject
422Standard Cipay error response.
errorobjectrequired
Show properties
codestringrequired
min length 1
messagestringrequired
min length 1
requestIdstringrequired
min length 1
detailsobject
429Standard Cipay error response.
errorobjectrequired
Show properties
codestringrequired
min length 1
messagestringrequired
min length 1
requestIdstringrequired
min length 1
detailsobject
500Standard Cipay error response.
errorobjectrequired
Show properties
codestringrequired
min length 1
messagestringrequired
min length 1
requestIdstringrequired
min length 1
detailsobject
Request
curl -X GET "https://api.cipay.net/v2/orders/%3Cuuid%3E" \
  -H "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"
  }
}