> For the complete documentation index, see [llms.txt](https://docs.enclaive.cloud/enclaive-multi-cloud-platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.enclaive.cloud/enclaive-multi-cloud-platform/developers/api/client-api/billing/invoice.md).

# Invoice

The "Invoice" section allows clients to access their invoice history, providing details on all past invoices. Additionally, users can retrieve information about their latest invoice, facilitating easy tracking of financial transactions and ensuring transparency in billing.

## Get last invoice

<mark style="color:blue;">`GET`</mark> `{{BASE_URL}}/api/teams/{id}/last-invoice`

Get information about your last bill.

#### Path Parameters

| Name                                 | Type   | Description |
| ------------------------------------ | ------ | ----------- |
| id<mark style="color:red;">\*</mark> | String | Team ID     |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer Token |

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "_id": "65490130ff600e06af2a9694",
    "invoiceId": "in_1O9UOhA0ZUrt0vQJoum7M20X",
    "user": "6548a41138406c14db33b606",
    "status": "paid",
    "amount": 3300,
    "invoicePdf": "https://pay.stripe.com/invoice/acct_1NOaelA0ZUrt0vQJ/test_YWNjdF8xTk9hZWxBMFpVcnQwdlFKLF9PeFBENUF5elR4cDU3bU5ycVVreUVuVVd3dm5hTmhnLDg5ODI0MDY202009yaqn40z/pdf?s=ap",
    "createdAt": "2023-11-06T15:07:28.550Z",
    "updatedAt": "2023-11-06T15:07:46.295Z"
}
```

{% endtab %}
{% endtabs %}

## Get billing history

<mark style="color:blue;">`GET`</mark> `{{BASE_URL}}/api/teams/{id}/billing-history`

Get all invoices for a specific team.

#### Path Parameters

| Name                                 | Type   | Description |
| ------------------------------------ | ------ | ----------- |
| id<mark style="color:red;">\*</mark> | String | Team ID     |

#### Query Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| page | String | page number |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer Token |

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "docs": [
        {
            "_id": "65490130ff600e06af2a9694",
            "status": "paid",
            "amount": 3300,
            "invoicePdf": "https://pay.stripe.com/invoice/acct_1NOaelA0ZUrt0vQJ/test_YWNjdF8xTk9hZWxBMFpVcnQwdlFKLF9PeFBENUF5elR4cDU3bU5ycVVreUVuVVd3dm5hTmhnLDg5ODI0MDY202009yaqn40z/pdf?s=ap"
        }
    ],
    "totalDocs": 1,
    "limit": 10,
    "totalPages": 1,
    "page": 1,
    "pagingCounter": 1,
    "hasPrevPage": false,
    "hasNextPage": false,
    "prevPage": null,
    "nextPage": null
}
```

{% endtab %}
{% endtabs %}
