Billing

Get invoice

One invoice: its amount, status and links to pay online or download the PDF.

GEThttps://api.scaledmail.com/v2/invoices/:id
Rate limit
Read: 300 calls per minute per token

A main workspace can read its sub-workspaces' invoices with its own Workspace.

Path parameters

  • idstringrequired

    The invoice id (inv_...).

Headers

  • Authorizationstringrequired

    Bearer <your API token>. Tokens start with sm_live_.

  • Workspacestringrequired

    The workspace id to act on (from GET /workspaces or Settings › API tokens). Required on every call except the /workspaces calls; without it: 400 workspace_required.

Response (200)

  • idstringrequired

    The invoice id (inv_...).

  • numberstringrequired

    The invoice number printed on the PDF.

  • workspace_idstringrequired

    The workspace it belongs to (org_...). Differs from yours for a sub's invoice.

  • order_idstringoptional

    The order it bills (ord_...). Not on a one-time payment.

  • descriptionstringrequired

    What it is for: the order's products (e.g. Google Inboxes), or for a one-time payment Domain purchase, Domain renewal, Domain purchase + renewal, Credits top-up, Domain Masking, Domain Masking added or One-time payment (Subscription when an order invoice has no lines).

  • statusenumrequired

    open = not paid yet, paid, failed = could not be collected, partly_refunded, refunded, void = cancelled, nothing owed.

    One of: open paid failed partly_refunded refunded void

  • amountnumberrequired

    What the invoice charges, after any promotion code. Paid once status is paid.

  • amount_refundednumberoptional

    Paid back so far. Only on an invoice with a refund.

  • period_startstringoptional

    Start of the period it covers (YYYY-MM-DD). Only on an order invoice.

  • period_endstringoptional

    End of the period it covers (YYYY-MM-DD). Only on an order invoice.

  • hosted_urlstringoptional

    Web page where the invoice can be viewed and paid. Left out when Stripe has none.

  • pdf_urlstringoptional

    Download link for the PDF. Left out when Stripe has none.

  • created_atstringrequired

    When the invoice was made, as a date: YYYY-MM-DD (UTC).

Responses

  • 200OK. The invoice belongs to this workspace or one of its sub-workspaces.
  • 403Not allowed. The token can't use the workspace in Workspace (workspace_not_allowed). Or the token's creator is not an owner or admin of this workspace (not_allowed): invoices are for owners and admins only.
  • 404Not found. No invoice with this id in this workspace (or its subs).
  • 429Rate limited. More than 300 read calls in a minute with this token. Wait for the Retry-After seconds.

Like every call, it can also answer 401 (bad key), 400 workspace_required, 403 workspace_not_allowed. See Errors.