Proforma Invoices

List Subscription Proforma Invoices

GET
/subscriptions/{subscription_id}/proforma_invoices.json

Lists proforma invoices for a subscription. By default, results only include totals, not detailed breakdowns for line_items, discounts, taxes, credits, payments, or custom_fields. To include breakdowns, pass the specific field as a key in the query with a value set to true.

Authorization

BasicAuth
AuthorizationBasic <token>

The username is a Maxio Chargify API key. The password is x.

In: header

Path Parameters

subscription_id*integer

The Chargify id of the subscription.

Query Parameters

start_date?string

The beginning date range for the invoice's Due Date, in the YYYY-MM-DD format.

end_date?string

The ending date range for the invoice's Due Date, in the YYYY-MM-DD format.

status?Proforma Invoice Status

The current status of the invoice. Allowed Values: draft, open, paid, pending, voided

Value in

  • "draft"
  • "voided"
  • "archived"
page?integer

Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned. Use in query page=1.

Range1 <= value
Default1
per_page?integer

This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200. Use in query per_page=200.

Rangevalue <= 200
Default20
direction?string

The sort direction of the returned invoices.

Default"desc"

Value in

  • "asc"
  • "desc"
line_items?boolean

Include line items data.

Defaultfalse
discounts?boolean

Include discounts data.

Defaultfalse
taxes?boolean

Include taxes data.

Defaultfalse
credits?boolean

Include credits data.

Defaultfalse
payments?boolean

Include payments data.

Defaultfalse
custom_fields?boolean

Include custom fields data.

Defaultfalse

Response Body

application/json

curl -X GET "https://example.com/subscriptions/0/proforma_invoices.json"
{  "proforma_invoices": [    {      "uid": "string",      "site_id": 0,      "customer_id": 0,      "subscription_id": 0,      "number": 0,      "sequence_number": 0,      "created_at": "2019-08-24T14:15:22Z",      "delivery_date": "2019-08-24",      "status": "draft",      "collection_method": "automatic",      "payment_instructions": "string",      "currency": "string",      "consolidation_level": "none",      "product_name": "string",      "product_family_name": "string",      "role": "unset",      "seller": {        "name": "string",        "address": {          "street": null,          "line2": null,          "city": null,          "state": null,          "zip": null,          "country": null        },        "phone": "string",        "logo_url": "string"      },      "customer": {        "chargify_id": 0,        "first_name": "string",        "last_name": "string",        "organization": null,        "email": "string",        "vat_number": "string",        "reference": "string"      },      "memo": "string",      "billing_address": {        "street": null,        "line2": null,        "city": null,        "state": null,        "zip": null,        "country": null      },      "shipping_address": {        "street": null,        "line2": null,        "city": null,        "state": null,        "zip": null,        "country": null      },      "subtotal_amount": "string",      "discount_amount": "string",      "tax_amount": "string",      "total_amount": "string",      "credit_amount": "string",      "paid_amount": "string",      "refund_amount": "string",      "due_amount": "string",      "line_items": [        {          "uid": "string",          "title": "string",          "description": "string",          "quantity": "string",          "unit_price": "string",          "subtotal_amount": "string",          "discount_amount": "string",          "tax_amount": "string",          "tax_included": true,          "total_amount": "string",          "tiered_unit_price": true,          "period_range_start": "2019-08-24",          "period_range_end": "2019-08-24",          "transaction_id": 0,          "product_id": 0,          "product_version": 0,          "component_id": 0,          "price_point_id": 0,          "billing_schedule_item_id": 0,          "hide": true,          "component_cost_data": null,          "product_price_point_id": null,          "custom_item": true,          "kind": "string",          "prepaid_allocation_expires_at": "2019-08-24"        }      ],      "discounts": [        {          "uid": "string",          "title": "string",          "code": "string",          "source_type": "Coupon",          "discount_type": "percentage",          "eligible_amount": "string",          "discount_amount": "string",          "line_item_breakouts": [            {              "uid": "string",              "eligible_amount": "string",              "discount_amount": "string"            }          ]        }      ],      "taxes": [        {          "uid": "string",          "title": "string",          "source_type": "Tax",          "percentage": "string",          "taxable_amount": "string",          "tax_amount": "string",          "line_item_breakouts": [            {              "uid": "string",              "taxable_amount": "string",              "tax_amount": "string",              "tax_exempt_amount": "string"            }          ]        }      ],      "credits": [        {          "uid": "string",          "memo": "string",          "original_amount": "string",          "applied_amount": "string"        }      ],      "payments": [        {          "memo": "string",          "original_amount": "string",          "applied_amount": "string",          "prepayment": true        }      ],      "custom_fields": [        {          "owner_id": 0,          "owner_type": "Customer",          "name": "string",          "value": "string",          "metadatum_id": 0        }      ],      "public_url": "string",      "available_actions": {        "send_email": {          "can_execute": true,          "url": "string"        }      }    }  ],  "meta": {    "total_count": 0,    "current_page": 0,    "total_pages": 0,    "status_code": 0  }}