sdk.orders namespace provides access to a customer’s order history, subscriptions, and courses. All methods require the customer to be authenticated (Bearer token set via sdk.setAuthToken()).
Methods
orders.getAll(params?)
Get a paginated list of the customer’s orders.
| Field | Type | Default | Description |
|---|---|---|---|
page | number | 1 | Page number |
per_page | number | 10 | Orders per page |
{ data: Order[]; pagination?: Pagination }
orders.getById(id)
Get a specific order by its ID.
Order
orders.getSubscriptions()
Get the customer’s active subscriptions.
any[]
orders.getCourses()
Get courses the customer has purchased access to.
any[]
orders.submitReview(orderId, reviewData)
Submit a review for a completed order.
| Field | Type | Description |
|---|---|---|
orderId | number | Order ID to review |
reviewData | object | Review content |
reviewData.rating | number | Rating (1-5) |
reviewData.comment | string | Review text |
any

