Moonborn — API · billing
Fetch an invoice with line items
GET/v1/billing/invoices/{id}scope · Bearer (API key or session JWT)
Path parameters
| Field | Type | Description |
|---|---|---|
| idreq | string | Internal invoice id (e.g. `inv_*`). |
Responses
200OK
Body
| Field | Type | Description |
|---|---|---|
| invoiceIdreq | string | |
| stripeInvoiceIdreq | string | |
| numberreq | string | |
| statusreq | string · "draft" | "open" | "paid" | "uncollectible" | "void" | |
| currencyreq | string | |
| amountDueMinorreq | number | |
| amountPaidMinorreq | number | |
| periodStartreq | string | |
| periodEndreq | string | |
| dueDatereq | string | |
| paidAtreq | string | |
| lineItemsreq | object[] |
401Unauthenticated
Body
| Field | Type | Description |
|---|---|---|
| errorreq | object | |
| error.codereq | string | |
| error.messagereq | string |
404Invoice not found
Body
| Field | Type | Description |
|---|---|---|
| errorreq | object | |
| error.codereq | string | |
| error.messagereq | string |
Examples
cURL
curl -X GET https://api.moonborn.co/v1/billing/invoices/<id> \ -H "Authorization: Bearer $MOONBORN_API_KEY"
TypeScript
import Moonborn from '@moonborn/sdk';
const client = new Moonborn({ apiKey: process.env.MOONBORN_API_KEY });
const result = await client.billing.getInvoice({
id: '<id>',
});Python
import os
from moonborn import Moonborn
client = Moonborn(api_key=os.environ["MOONBORN_API_KEY"])
result = client.billing.get_invoice(
id="<id>",
)