List invoices
GET/subscriptions/invoices
Retrieves a list of all invoices.
Filtering
This endpoint supports filtering. For the general syntax, see Filtering.
The following attributes and operators are supported.
Operator | Attribute | Description |
---|---|---|
eq | subscriber_id , subscription_id , outstanding , tax_required | Equals. Checks if the values of two operands are equal. If they are, the condition is true. |
Request
Query Parameters
Possible values: <= 10000
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 store setting is used.
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 store setting is used.
Responses
- 200
- 400
- 500
Success. A list of invoices is returned.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- Array [
- ]
- Array [
- ]
- Array [
- ]
- ]
data SubscriptionInvoice[]
The unique identifier.
Possible values: [subscription_invoice
]
This represents the type of resource object being returned. Always subscription_invoice
.
attributes SubscriptionInvoiceAttributesrequired
billing_period TimePeriodrequired
A period of time between a start and end point.
The date and time a billing period started.
The date and time a billing period ended.
invoice_items SubscriptionInvoiceItem[]required
A description of the subscribed item.
price SingleCurrencyPricerequired
A price in a single currency.
Possible values: <= 1024 characters
The three-letter ISO currency code in uppercase, associated with a price.
The value as a whole number of the currency's smallest subdivision.
Whether the amount includes any taxes.
The unique identifier.
The start date and time of the billing period in this price
The end date and time of the billing period in this price
tax_items TaxItem[]
Possible values: [tax_item
]
This represents the type of resource object being returned. Always tax_item
.
Possible values: <= 1024 characters
The name that appears on your customer's invoice and usually describes the specific type of tax, for example, Sales
, VAT
or GST
.
Possible values: <= 1024 characters
The unique identifier assigned to goods and services for taxation purposes.
The tax rate is the percentage of the subscription amount that is required to be paid as tax.
Possible values: <= 1024 characters
The geographic area or political entity that has authority to levy and collect taxes.
The invoice still requires payment if true
.
A sequential number assigned by the billing run.
Whether tax is required for this invoice.
Whether the limit of payment retries has been reached.
The date and time an invoice was updated.
The date and time an invoice was created.
meta SubscriptionInvoiceMetarequired
The owner of a resource, either store
or organization
.
The unique identifier.
The unique identifier.
price SingleCurrencyPrice
A price in a single currency.
Possible values: <= 1024 characters
The three-letter ISO currency code in uppercase, associated with a price.
The value as a whole number of the currency's smallest subdivision.
Whether the amount includes any taxes.
timestamps Timestampsrequired
The date and time a resource was updated.
The date and time a resource was created.
The date and time taxes were added to an invoice.
proration_events ProrationEvent[]required
The unique identifier.
The value as a whole number of the currency's smallest subdivision
The value as a whole number of the currency's smallest subdivision.
The value as a whole number of the currency's smallest subdivision.
The date and time the subscription was prorated.
links object
{
"data": [
{
"id": "00000000-0000-0000-0000-000000000000",
"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
},
"product_id": "00000000-0000-0000-0000-000000000000",
"from_time_period": "2017-01-10T11:41:19.244842Z",
"until_time_period": "2017-01-10T11:41:19.244842Z"
}
],
"tax_items": [
{
"type": "tax_item",
"name": "GST",
"code": "20.0 % S",
"rate": 0.2,
"jurisdiction": "USA"
}
],
"outstanding": true,
"number": 1,
"tax_required": true,
"payment_retries_limit_reached": false,
"updated_at": "2017-01-10T11:41:19.244842Z",
"created_at": "2017-01-10T11:41:19.244842Z"
},
"meta": {
"owner": "store",
"subscription_id": "00000000-0000-0000-0000-000000000000",
"subscriber_id": "00000000-0000-0000-0000-000000000000",
"price": {
"currency": "USD",
"amount": 100,
"includes_tax": false
},
"timestamps": {
"updated_at": "2017-01-10T11:41:19.244842Z",
"created_at": "2017-01-10T11:41:19.244842Z",
"taxes_added_at": "2017-01-10T11:41:19.244842Z"
},
"proration_events": [
{
"proration_policy_id": "00000000-0000-0000-0000-000000000000",
"billing_cost_before_proration": 100,
"refunded_amount_for_unused_plan": 100,
"new_plan_cost": 100,
"prorated_at": "2017-01-10T11:41:19.244842Z"
}
]
}
}
],
"links": {}
}
Bad request. The request failed validation.
- application/json
- Schema
- Example (from schema)
- missing-name
Schema
- Array [
- ]
errors Error[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Additional supporting meta data for the error.
{
"errors": [
{
"status": 500,
"title": "Internal server error",
"detail": "An internal error has occurred.",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Validation Error",
"status": "400",
"detail": "data.attributes.name: \"name\" is required"
}
]
}
Internal server error. There was a system failure in the platform.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
- Array [
- ]
errors Error[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Additional supporting meta data for the error.
{
"errors": [
{
"status": 500,
"title": "Internal server error",
"detail": "An internal error has occurred.",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Internal Server Error",
"status": "500"
}
]
}