Uygulamayı aç
Moonborn — API · billing

Fetch an invoice with line items

GET/v1/billing/invoices/{id}scope · Bearer (API key or session JWT)
Path parameters
FieldTypeDescription
idreqstringInternal invoice id (e.g. `inv_*`).

Responses

200OK
Body
FieldTypeDescription
invoiceIdreqstring
stripeInvoiceIdreqstring
numberreqstring
statusreqstring · "draft" | "open" | "paid" | "uncollectible" | "void"
currencyreqstring
amountDueMinorreqnumber
amountPaidMinorreqnumber
periodStartreqstring
periodEndreqstring
dueDatereqstring
paidAtreqstring
lineItemsreqobject[]
401Unauthenticated
Body
FieldTypeDescription
errorreqobject
error.codereqstring
error.messagereqstring
404Invoice not found
Body
FieldTypeDescription
errorreqobject
error.codereqstring
error.messagereqstring

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>",
)