younifyd
Menu

List Subscription Invoices

List subscription invoices

GET/v2/subscriptions/subscriptions/{subscription_uuid}/invoices

Use it in a workflow

  1. Add a step and choose the Elastic Path connector.
  2. Pick the List Subscription Invoices action (under Subscriptions).
  3. Fill in the fields below, then reference the result from later steps as {{listSubscriptionInvoices.response.data}}.

Request

Path parameters

subscription_uuidstring (uuid)required

The unique identifier of the subscription.

Query parameters

page[offset]integer (int64)

The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the [page length](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.

page[limit]integer (int64)

The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the [page length](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.

Response

Returns 200 with an object. Read it in later steps with {{listSubscriptionInvoices.response.data.<field>}}.

dataarray<object>
idstring (uuid)

The unique identifier.

typestringrequired

This represents the type of resource object being returned. Always `subscription_invoice`.

One ofsubscription_invoice

attributesobjectrequired12 fields
relationshipsany

Relationships are established between different subscription entities. For example, a plan and a pricing option are related to an offering, as both are attached to it.

metaobjectrequired9 fields
linksobject
json
{
  "data": [
    {
      "type": "subscription_invoice",
      "attributes": {
        "billing_period": {
          "start": "2017-07-21T17:32:28Z",
          "end": "2017-07-21T17:32:28Z"
        },
        "invoice_items": [
          {
            "description": "Magazine issue",
            "price": {
              "currency": "USD",
              "amount": 100,
              "includes_tax": false
            },
            "plan_id": "11111111-2222-3333-4444-555555555555",
            "from_time_period": "2017-01-10T11:41:19.244842Z",
            "until_time_period": "2017-01-10T11:41:19.244842Z"
          }
        ],
        "outstanding": true,
        "tax_required": true,
        "payment_retries_limit_reached": false,
        "pro_forma": false,
        "manual_payment_pending": true,
        "tax_items": [
          {}
        ],
        "number": 1,
        "updated_at": "2017-01-10T11:41:19.244842Z",
        "created_at": "2017-01-10T11:41:19.244842Z",
        "valid_from": "2017-01-10T11:41:19.244842Z"
      },
      "meta": {
        "owner": "store",
        "display_price": {
          "without_tax": {
            "amount": 100,
            "currency": "USD",
            "formatted": "$1.00"
          },
          "with_tax": {
            "amount": 110,
            "currency": "USD",
            "formatted": "$1.10"
          },
          "tax": {
            "amount": 10,
            "currency": "USD",
            "formatted": "$0.10"
          }
        },
        "timestamps": null,
        "proration_events": [
          {
            "proration_policy_id": "11111111-2222-3333-4444-555555555555",
            "billing_cost_before_proration": 100,
            "refunded_amount_for_unused_pricing_option": 100,
            "new_pricing_option_cost": 100,
            "prorated_at": "2017-01-10T11:41:19.244842Z"
          }
        ],
        "pro_rata_remaining_value": 500,
        "subscription_id": "11111111-2222-3333-4444-555555555555",
        "subscriber_id": "11111111-2222-3333-4444-555555555555",
        "price": {
          "currency": "USD",
          "amount": 100,
          "includes_tax": false
        },
        "notifications": [
          {
            "name": "7 days before renewal",
            "due": "2024-01-24T00:00:00Z",
            "sent_at": "2024-01-24T00:00:00Z"
          }
        ]
      },
      "id": "11111111-2222-3333-4444-555555555555",
      "relationships": {
        "pricing-options": {
          "links": {
            "related": "/offerings/:offering-id/pricing-options",
            "self": "/offerings/:offering-id"
          },
          "data": {
            "type": "offering-pricing-option",
            "id": "625fe958-7b4b-40a0-a2c0-dbb8f31eec0d"
          }
        }
      }
    }
  ],
  "links": {}
}

Need more? See the Elastic Path guide for connection setup and behaviour shared by every action.

List Subscription Invoices — Elastic Path — Documentation