> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shoply.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# List invoices

> The invoices the store has raised, a page at a time, newest first. An invoice is an order the store made for a buyer to pay: `orderId` is that order, and `payUrl` the page it is paid on. A payment link is listed with them (`kind` is `link`): an amount and what it is for (`title`), with no buyer on it (`email` is empty) until it is emailed to somebody or paid. One made in another currency than the store's says what the buyer is asked for in `charge`.

Needs the `invoices.read` permission (Read Invoices).



## OpenAPI

````yaml /api-reference/openapi.json get /stores/{storeId}/invoices
openapi: 3.1.0
info:
  title: Shoply API
  version: '1'
  description: >-
    Everything a store's own server can do with a secret API key: its catalogue,
    orders, customers, marketing, finance and the rest of what the dashboard
    does. And the Customer API, which a buyer's own device asks with a token of
    theirs.
servers:
  - url: https://api.shoply.gg/v1
security:
  - apiKey: []
tags:
  - name: API key
  - name: Store
  - name: Domain
  - name: Payment methods
  - name: Analytics
  - name: Storefronts
  - name: Storefront code
  - name: Payment Routing
  - name: Custom payment methods
  - name: Products
  - name: Product pictures
  - name: Stock
  - name: Categories
  - name: Upsells
  - name: Subscriptions
  - name: Orders
  - name: Invoices
  - name: Reviews
  - name: Coupons
  - name: Coupon categories
  - name: Coupon pop-up
  - name: Sales
  - name: Blog
  - name: Search settings
  - name: Redirects
  - name: Sitemap
  - name: Cart Recovery
  - name: Email Marketing
  - name: Email Templates
  - name: Customers
  - name: Affiliates
  - name: Support Tickets
  - name: Blacklist
  - name: Fraud protection
  - name: Disputes
  - name: Finance
  - name: Tax
  - name: Expenses
  - name: Expense setup
  - name: API requests
  - name: Webhook endpoints
  - name: Webhook deliveries
  - name: Customer API
paths:
  /stores/{storeId}/invoices:
    get:
      tags:
        - Invoices
      summary: List invoices
      description: >-
        The invoices the store has raised, a page at a time, newest first. An
        invoice is an order the store made for a buyer to pay: `orderId` is that
        order, and `payUrl` the page it is paid on. A payment link is listed
        with them (`kind` is `link`): an amount and what it is for (`title`),
        with no buyer on it (`email` is empty) until it is emailed to somebody
        or paid. One made in another currency than the store's says what the
        buyer is asked for in `charge`.


        Needs the `invoices.read` permission (Read Invoices).
      operationId: invoices.list
      parameters:
        - name: storeId
          in: path
          required: true
          description: >-
            The store's ID. A key reaches the store it was made in: `GET /key`
            answers which.
          schema:
            type: string
        - name: page
          in: query
          required: false
          description: Which page of the list. The first is 1.
          schema:
            type: integer
            default: 1
        - name: perPage
          in: query
          required: false
          description: How many a page holds, up to 100.
          schema:
            type: integer
            default: 20
        - name: status
          in: query
          required: false
          description: Only invoices whose order is in this status.
          schema:
            type: string
            enum:
              - pending
              - completed
              - refunded
              - cancelled
              - chargeback
        - name: search
          in: query
          required: false
          description: >-
            An invoice's number, part of a buyer's email or name, or part of
            what a payment link is for.
          schema:
            type: string
        - name: kind
          in: query
          required: false
          description: Only invoices written for a buyer, or only payment links.
          schema:
            type: string
            enum:
              - invoice
              - link
      responses:
        '200':
          description: It worked.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    nullable: true
                  code:
                    nullable: true
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        orderId:
                          type: string
                        number:
                          type: integer
                        label:
                          type: string
                        recipientName:
                          type: string
                        note:
                          type: string
                        gateways:
                          type: array
                          items:
                            type: string
                        dueAt:
                          type: string
                        overdue:
                          type: boolean
                        sentAt:
                          nullable: true
                        sendCount:
                          type: integer
                        dateCreated:
                          type: string
                        payUrl:
                          type: string
                        kind:
                          type: string
                        title:
                          type: string
                        uses:
                          nullable: true
                        linkOf:
                          type: string
                        charge:
                          nullable: true
                        email:
                          type: string
                        amount:
                          type: integer
                        currencyCode:
                          type: string
                        status:
                          type: string
                        itemCount:
                          type: integer
                        paidAt:
                          nullable: true
                  pages:
                    type: integer
                  total:
                    type: integer
                  meta:
                    type: object
                    properties:
                      statusCounts:
                        type: object
                        properties:
                          completed:
                            type: integer
                          pending:
                            type: integer
                          refunded:
                            type: integer
                          cancelled:
                            type: integer
                          chargeback:
                            type: integer
                          all:
                            type: integer
                      kindCounts:
                        type: object
                        properties:
                          all:
                            type: integer
                          invoice:
                            type: integer
                          link:
                            type: integer
                      nextNumber:
                        type: string
                      currencyCode:
                        type: string
                      methods:
                        type:
                          - array
                          - object
                      sendWait:
                        type: integer
                      sendEvery:
                        type: integer
                      dueDays:
                        type: object
                        properties:
                          min:
                            type: integer
                          max:
                            type: integer
                          default:
                            type: integer
                      canEmail:
                        type: boolean
                      linkCurrencies:
                        type: array
                        items:
                          type: object
                          properties:
                            code:
                              type: string
                            name:
                              type: string
              example:
                success: true
                message: null
                code: null
                data:
                  - orderId: 479a5h0p1ya-150cadc3a07-1006663
                    number: 1
                    label: INV-0001
                    recipientName: ''
                    note: ''
                    gateways:
                      - stripe
                    dueAt: '2026-10-29T16:20:19Z'
                    overdue: false
                    sentAt: null
                    sendCount: 0
                    dateCreated: '2026-10-22T16:20:19Z'
                    payUrl: >-
                      http://localhost:3002/checkout/479a5h0p1ya-150cadc3a07-1006663
                    kind: link
                    title: Logo design deposit
                    uses: null
                    linkOf: ''
                    charge: null
                    email: ''
                    amount: 100
                    currencyCode: USD
                    status: pending
                    itemCount: 1
                    paidAt: null
                pages: 1
                total: 1
                meta:
                  statusCounts:
                    completed: 0
                    pending: 1
                    refunded: 0
                    cancelled: 0
                    chargeback: 0
                    all: 1
                  kindCounts:
                    all: 1
                    invoice: 0
                    link: 1
                  nextNumber: INV-0002
                  currencyCode: USD
                  methods: []
                  sendWait: 0
                  sendEvery: 300
                  dueDays:
                    min: 1
                    max: 30
                    default: 7
                  canEmail: true
                  linkCurrencies:
                    - code: USD
                      name: US dollar
        '401':
          $ref: '#/components/responses/NoKey'
        '403':
          $ref: '#/components/responses/NotAllowed'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooMany'
      x-codeSamples:
        - lang: javascript
          label: Node.js
          source: |
            import Shoply from "@shoplygg/node";

            const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });

            const page = await shoply.invoices.list();

            // Or every row of every page:
            for await (const row of shoply.invoices.list()) {
              console.log(row);
            }
        - lang: php
          label: PHP
          source: |
            <?php

            require 'vendor/autoload.php';

            $shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);

            $page = $shoply->invoices->list();

            // Or every row of every page:
            foreach ($shoply->invoices->list() as $row) {
                print_r($row);
            }
        - lang: python
          label: Python
          source: |
            import shoply

            client = shoply.Client()  # reads SHOPLY_API_KEY

            page = client.invoices.list()

            # Or every row of every page:
            for row in client.invoices.list():
                print(row)
components:
  responses:
    NoKey:
      description: >-
        No API key was sent, or the one sent is not a live key:
        `api_key_required`, `invalid_api_key`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Refusal'
    NotAllowed:
      description: >-
        The key is real and may not do this: `missing_scope` (with
        `requiredScope`), `ip_not_allowed`, `account_unavailable`, or
        `dashboard_only` for something only a person in the dashboard may do.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Refusal'
    NotFound:
      description: >-
        There is no such thing in this store: `not_found`. A store that is not
        the key's own is answered the same way.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Refusal'
    TooMany:
      description: >-
        The key has used up its budget for now: `rate_limited`. `Retry-After`
        says how many seconds to wait.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Refusal'
  schemas:
    Refusal:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
          description: What is wrong, in words for a person.
        code:
          type: string
          description: What is wrong, as a word that does not change.
        data:
          nullable: true
        errors:
          type: object
          description: >-
            For `validation_failed`: what is wrong with each field, by the
            field's name.
          additionalProperties:
            type: string
      required:
        - success
        - message
        - code
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        A secret API key, made under Developers in the dashboard:
        `Authorization: Bearer shoply_sk_...`

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.