Skip to content
Cipay
Esc
navigateopen⌘Jpreview

List Orders

GET/v2/orders
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.
Query parameters
statusstring
Allowed:pendingpaidcompleted_freefailedcanceledpartially_refunded_externalrefunded_external
customerIdstring<uuid>
productIdstring<uuid>
planIdstring<uuid>
subscriptionIdstring<uuid>
createdFromstring<date-time>
createdTostring<date-time>
limitinteger
min 1 · max 100 · default: 25
cursorstring
matches ^\d{1,16}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
Header parameters
x-request-idstring
Optional caller-provided request correlation ID.
min length 1
Responses
200OK
nextCursorstring | anyrequired
Show properties
Any of:
string
string
any
any
ordersobject[]required
Show properties
Array of object
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
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" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "nextCursor": "string",
  "orders": [
    {
      "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"
    }
  ]
}