List All Subscription Invoices

GET

/v1/subscription-invoices

Returns a paginated list of subscription invoices.


Filter parameters

store_id

Only return subscription invoices belonging to the store with this ID.

status

Only return subscription invoices with this status.

refunded

Only return subscription invoices that are refunded (the value should be true or false).

subscription_id

Only return subscription invoices belonging to a subscription with this ID.


curl "https://api.lemonsqueezy.com/v1/subscription-invoices" \
  -H 'Accept: application/vnd.api+json' \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {api_key}'
curl "https://api.lemonsqueezy.com/v1/subscription-invoices?filter[status]=past_due" \
  -H 'Accept: application/vnd.api+json' \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {api_key}'
curl "https://api.lemonsqueezy.com/v1/subscription-invoices?filter[subscription_id]=6" \
  -H 'Accept: application/vnd.api+json' \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {api_key}'

Returns

Returns a paginated list of Subscription Invoice objects ordered by created_at in descending order.

{
  "meta": {
    "page": {
      "currentPage": 1,
      "from": 1,
      "lastPage": 1,
      "perPage": 10,
      "to": 10,
      "total": 10
    }
  },
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "first": "https://api.lemonsqueezy.com/v1/subscription-invoices?page%5Bnumber%5D=1&page%5Bsize%5D=10&sort=-createdAt",
    "last": "https://api.lemonsqueezy.com/v1/subscription-invoices?page%5Bnumber%5D=1&page%5Bsize%5D=10&sort=-createdAt"
  },
  "data": [
    {
      "type": "subscription-invoices",
      "id": "1",
      "attributes": {
        "store_id": 1,
        "subscription_id": 1,
        "customer_id": 1,
        "user_name": "John Doe",
        "user_email": "[email protected]",
        "billing_reason": "initial",
        "card_brand": "visa",
        "card_last_four": "4242",
        "currency": "USD",
        "currency_rate": "1.00000000",
        "status": "paid",
        "status_formatted": "Paid",
        "refunded": false,
        "refunded_at": null,
        "subtotal": 999,
        "discount_total": 0,
        "tax": 0,
        "tax_inclusive": false,
        "total": 999,
        "refunded_amount": 0,
        "subtotal_usd": 999,
        "discount_total_usd": 0,
        "tax_usd": 0,
        "total_usd": 999,
        "refunded_amount_usd": 0,
        "subtotal_formatted": "$9.99",
        "discount_total_formatted": "$0.00",
        "tax_formatted": "$0.00",
        "total_formatted": "$9.99",
        "refunded_amount_formatted": "$0.00",
        "urls": {
          "invoice_url": "https://app.lemonsqueezy.com/my-orders/.../subscription-invoice/..."
        },
        "created_at": "2023-01-18T12:16:24.000000Z",
        "updated_at": "2023-01-18T12:16:24.000000Z",
        "test_mode": false
      },
      "relationships": {
        "store": {
          "links": {
            "related": "https://api.lemonsqueezy.com/v1/subscription-invoices/1/store",
            "self": "https://api.lemonsqueezy.com/v1/subscription-invoices/1/relationships/store"
          }
        },
        "subscription": {
          "links": {
            "related": "https://api.lemonsqueezy.com/v1/subscription-invoices/1/subscription",
            "self": "https://api.lemonsqueezy.com/v1/subscription-invoices/1/relationships/subscription"
          }
        },
        "customer": {
          "links": {
            "related": "https://api.lemonsqueezy.com/v1/subscription-invoices/1/customer",
            "self": "https://api.lemonsqueezy.com/v1/subscription-invoices/1/relationships/customer"
          }
        }
      },
      "links": {
        "self": "https://api.lemonsqueezy.com/v1/subscription-invoices/1"
      }
    },
    {...},
    {...},
  ]
}

Was this page helpful?