List orders

get
https://api.clakta.com/v1/orders

List a project's orders, newest first by default. The owning project is passed as the `projectId` query parameter. Requires an API key with `orders.read`.

Results are paginated with a cursor. Each page returns up to `limit` orders (25 by default, 100 at most). When `hasMore` is `true`, request the next page by sending the returned `nextCursor` as the `cursor` parameter, keeping every other parameter the same. The last page returns `hasMore: false` and `nextCursor: null`.

Filter by `status`, `paymentMethod`, `subscriptionId` and the order date range (`createdFrom`, `createdTo`). `status` and `paymentMethod` accept several values separated by commas.

`totalPrice` and each product `price` are returned in the smallest unit of the order currency (`1040` for $10.40). The `customer` object carries the name, email, phone, gender, date of birth and address of the customer record the order is attached to. Fields are null when unknown, and the shopper's IP and User-Agent are never returned.

Authentication

Send your API key as a bearer token in the Authorization header.

See Authentication for how to create and scope an API key.

Query parameters

projectIdstringrequired

The project ID (e.g. proj_xxx) or slug that owns the order.

limitintegeroptionaldefault: 25

The number of orders to return, from 1 to 100. Defaults to 25.

cursorstringoptional

The `nextCursor` returned by the previous page. Omit it to fetch the first page.

statusstringoptional

Only return orders with one of these statuses, comma separated (e.g. `paid,refunded`). One of: paid, pending, rejected, refunded, canceled.

paymentMethodstringoptional

Only return orders paid with one of these payment methods, comma separated (e.g. `credit_card,pix`). One of: credit_card, debit_card, pix, boleto, paypal, apple_pay, google_pay, samsung_pay, stripe_link, other.

subscriptionIdstringoptional

Only return the charges of this subscription, the `subscription.id` sent when they were created.

createdFromdate-timeoptional

Only return orders placed at or after this date (ISO 8601).

createdTodate-timeoptional

Only return orders placed at or before this date (ISO 8601).

sortDirectionenum<string>optionaldefault: desc

Sort by order date, newest first (`desc`) or oldest first (`asc`). Keep it the same across the pages of one listing.

Allowed values:ascdesc

Response

A page of orders

dataobject[]required

The orders on this page.

hasMorebooleanrequired

Whether more orders follow this page.

nextCursorstring | nullrequired

The cursor to send as `cursor` to fetch the next page, or null on the last page.