App öffnen
Moonborn — API · billing

Redirect to a short-lived Stripe PDF URL for the invoice

Returns `307 Temporary Redirect` with a `Location` header pointing at a signed Stripe URL valid for ~30s. No JSON body. Clients that cannot follow redirects should issue a HEAD request to retrieve the URL.

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

Responses

307Redirect to Stripe-signed PDF URL
401Unauthenticated
Body
FieldTypeDescription
errorreqobject
error.codereqstring
error.messagereqstring
404Invoice not found
Body
FieldTypeDescription
errorreqobject
error.codereqstring
error.messagereqstring
410PDF no longer available (Stripe expired the asset)
Body
FieldTypeDescription
errorreqobject
error.codereqstring
error.messagereqstring

Examples

cURL
curl -X GET https://api.moonborn.co/v1/billing/invoices/<id>/pdf \
  -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.downloadInvoicePdf({
  id: '<id>',
});
Python
import os
from moonborn import Moonborn

client = Moonborn(api_key=os.environ["MOONBORN_API_KEY"])

result = client.billing.download_invoice_pdf(
    id="<id>",
)