younifyd
Menu

Get Subscription Invoice

Get subscription invoice

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

Use it in a workflow

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

Request

Path parameters

subscription_uuidstring (uuid)required

The unique identifier of the subscription.

invoice_uuidstring (uuid)required

The unique identifier of the invoice.

Response

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

dataobject
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
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"
        }
      }
    }
  }
}

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