Invoices API
Note: The invoices API is only available in HCP Terraform.
Organizations on credit-card-billed plans may view their previous and upcoming invoices.
List Invoices
This endpoint lists the previous invoices for an organization.
It uses a pagination scheme that's somewhat different from our standard pagination. The page size is always 10 items and is not configurable; if there are no more items, meta.continuation
will be null. The current page is controlled by the cursor
parameter, described below.
GET /organizations/:organization_name/invoices
Parameter | Description |
---|---|
:organization_name | The name of the organization you'd like to view invoices for |
:cursor | Optional. The ID of the invoice where the page should start. If omitted, the endpoint will return the first page. |
Sample Request
Sample Response
Get Next Invoice
This endpoint lists the next month's invoice for an organization.
GET /organizations/:organization_name/invoices/next
Parameter | Description |
---|---|
organization_name | The name of the organization |
Sample Request
Sample Response