Movatterモバイル変換


[0]ホーム

URL:


HashiConf 2025Don't miss the live stream of HashiConf Day 2 happening now View live stream

You are viewing documentation for version v202409-3.View latest version.

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 fromour 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 thecursor parameter, described below.

GET /organizations/:organization_name/invoices

ParameterDescription
:organization_nameThe name of the organization you'd like to view invoices for
:cursorOptional. The ID of the invoice where the page should start. If omitted, the endpoint will return the first page.

Sample Request

curl \  --header "Authorization: Bearer $TOKEN" \  --header "Content-Type: application/vnd.api+json" \  https://app.terraform.io/api/v2/organizations/hashicorp/invoices

Sample Response

{  "data": [    {      "id": "in_1I4sraHcjZv6Wm0g7nC34mAi",      "type": "billing-invoices",      "attributes": {        "created-at": "2021-01-01T19:00:38Z",        "external-link": "https://pay.stripe.com/invoice/acct_1Eov7THcjZv6Wm0g/invst_IgFMMfdzAZzMQq8GXyUbrk9lFMqvp9SX/pdf",        "number": "2F8CA1AE-0006",        "paid": true,        "status": "paid",        "total": 21000      }    },    {...}    {      "id": "in_1Hte5nHcjZv6Wm0g2Q8hFctH",      "type": "billing-invoices",      "attributes": {        "created-at": "2020-06-01T19:00:51Z",        "external-link": "https://pay.stripe.com/invoice/acct_1Eov7THcjZv6Wm0g/invst_IUdMM6wl0JfA95tgWGZxpBGXYtJwmBgY/pdf",        "number": "2F8CA1AE-0005",        "paid": true,        "status": "paid",        "total": 21000      }    }  ],  "meta": {    "continuation": "in_1IBpkEHcjZv6Wm0gHcgc2uwN"  }}

Get Next Invoice

This endpoint lists the next month's invoice for an organization.

GET /organizations/:organization_name/invoices/next

ParameterDescription
organization_nameThe name of the organization

Sample Request

curl \  --header "Authorization: Bearer $TOKEN" \  --header "Content-Type: application/vnd.api+json" \  https://app.terraform.io/api/v2/organizations/hashicorp/invoices/next

Sample Response

{  "data": {    "id": "in_upcoming_510DEB1F-0002",    "type": "billing-invoices",    "attributes": {      "created-at": "2021-02-01T20:00:00Z",      "external-link": "",      "number": "510DEB1F-0002",      "paid": false,      "status": "draft",      "total": 21000    }  }}
Edit this page on GitHub

[8]ページ先頭

©2009-2025 Movatter.jp