Methods
(async, inner) fetchCustomerPayments(options) → {Promise.<CustomerOrdersResponse>}
- Description:
- Fetches a list of orders (from Shopify) for the authenticated user (customer).
- Source:
Examples
// Fetch first page with default page size (40)
const response = await fetchCustomerPayments()
// Fetch first page with custom page size
const response = await fetchCustomerPayments({ perPage: 20 })
// Fetch next page using cursor from previous response
const response = await fetchCustomerPayments({
perPage: 20,
cursor: previousResponse.meta.pagination.endCursor
})
Parameters:
| Name |
Type |
Description |
options |
FetchCustomerPaymentsOptions
|
Pagination options
Properties
| Name |
Type |
Description |
perPage |
number
|
Number of orders per page (1-100, default: 40) |
cursor |
string
|
null
|
Cursor for pagination |
|
Throws:
-
- Throws HttpError if the request fails.
-
-
Type
-
HttpError
Returns:
- A promise that resolves to customer orders with pagination metadata
-
Type
-
Promise.<CustomerOrdersResponse>