# Get invoice

> Source: https://truto.one/docs/api-reference/admin/billing/get/

`GET /billing/invoice/{id}`

Resource: **Billing**

## Path parameters

- **`id`** _(string, required)_

## Response body

- **`id`** _(string)_
  Truto's id for the mirrored invoice row.
- **`team_id`** _(string)_
- **`stripe_invoice_id`** _(string)_
- **`stripe_customer_id`** _(string)_
- **`source`** _(string)_
  `automated` when Truto generated it from a plan; `stripe_manual` when it was raised by hand in Stripe.
  Allowed: `automated`, `stripe_manual`
- **`status`** _(string)_
  Raw Stripe invoice status.
  Allowed: `draft`, `open`, `paid`, `void`, `uncollectible`
- **`number`** _(string)_
- **`currency`** _(string)_
- **`amount_due_cents`** _(integer)_
- **`amount_paid_cents`** _(integer)_
- **`amount_remaining_cents`** _(integer)_
- **`period_start`** _(string)_
- **`period_end`** _(string)_
- **`hosted_invoice_url`** _(string)_
  Stripe-hosted page to view and pay the invoice.
- **`invoice_pdf`** _(string)_
- **`stripe_created_at`** _(string)_
- **`finalized_at`** _(string)_
- **`paid_at`** _(string)_
- **`voided_at`** _(string)_
- **`attempt_count`** _(integer)_
- **`last_payment_error`** _(string)_

## Code examples

### curl

```bash
curl -X GET 'https://api.truto.one/billing/invoice/{id}' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json'
```

### JavaScript

```javascript
const response = await fetch('https://api.truto.one/billing/invoice/{id}', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

url = "https://api.truto.one/billing/invoice/{id}"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}

response = requests.get(url, headers=headers, params=params)
print(response.json())
```
