v49

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-081445491.8 MB
Invoice

Create a one-off invoice

This endpoint is used to create a one-off invoice for a customer.

post/invoices

Request body

metadataobject nullable

User-specified key/value pairs for the resource. Individual keys can be removed by setting the value to null, and the entire metadata mapping can be cleared by setting metadata to null.

customer_idstring nullable

The id of the Customer to create this invoice for. One of customer_id and external_customer_id are required.

external_customer_idstring nullable

The external_customer_id of the Customer to create this invoice for. One of customer_id and external_customer_id are required.

currencystring required

An ISO 4217 currency string. Must be the same as the customer's currency if it is set.

memostring nullable

An optional memo to attach to the invoice. If no memo is provided, we will attach the default memo

will_auto_issueboolean

When true, this invoice will be submitted for issuance upon creation. When false, the resulting invoice will require manual review to issue. Defaulted to false.

invoice_datestring date-time required

Optional invoice date to set. Must be in the past, if not set, invoice_date is set to the current time in the customer's timezone.

net_termsinteger nullable

The net terms determines the due date of the invoice. Due date is calculated based on the invoice or issuance date, depending on the account's configured due date calculation method. A value of '0' here represents that the invoice is due on issue, whereas a value of '30' represents that the customer has 30 days to pay the invoice. Do not set this field if you want to set a custom due date.

auto_collectionboolean nullable

Determines whether this invoice will automatically attempt to charge a saved payment method, if any. If not specified, the invoice inherits the customer's auto_collection setting.

Example request

{
  "customer_id": "4khy3nwzktxv7",
  "external_customer_id": "external-customer-id",
  "currency": "USD",
  "memo": "An optional memo for my invoice.",
  "line_items": [
    {
      "start_date": "2023-09-22",
      "end_date": "2023-09-22",
      "quantity": 1,
      "name": "Line Item Name",
      "item_id": "4khy3nwzktxv7",
      "model_type": "unit"
    }
  ],
  "discount": {
    "applies_to_price_ids": [
      "h74gfhdjvn7ujokd",
      "7hfgtgjnbvc3ujkl"
    ],
    "percentage_discount": 0.15
  }
}

Response

Created

metadataobject required

User specified key-value pairs for the resource. If not present, this defaults to an empty dictionary. Individual keys can be removed by setting the value to null, and the entire metadata mapping can be cleared by setting metadata to null.

voided_atstring date-time nullable required

If the invoice has a status of void, this gives a timestamp when the invoice was voided.

paid_atstring date-time nullable required

If the invoice has a status of paid, this gives a timestamp when the invoice was paid.

issued_atstring date-time nullable required

If the invoice has been issued, this will be the time it transitioned to issued (even if it is now in a different state.)

scheduled_issue_atstring date-time nullable required

If the invoice is in draft, this timestamp will reflect when the invoice is scheduled to be issued.

issue_failed_atstring date-time nullable required

If the invoice failed to issue, this will be the last time it failed to issue (even if it is now in a different state.)

sync_failed_atstring date-time nullable required

If the invoice failed to sync, this will be the last time an external invoicing provider sync was attempted. This field will always be null for invoices using Orb Invoicing.

payment_failed_atstring date-time nullable required

If payment was attempted on this invoice but failed, this will be the time of the most recent attempt.

payment_started_atstring date-time nullable required

If payment was attempted on this invoice, this will be the start time of the most recent attempt. This field is especially useful for delayed-notification payment mechanisms (like bank transfers), where payment can take 3 days or more.

amount_duestring required

This is the final amount required to be charged to the customer and reflects the application of the customer balance to the total of the invoice.

created_atstring date-time required

The creation time of the resource in Orb.

currencystring required

An ISO 4217 currency string or credits

due_datestring date-time nullable required

When the invoice payment is due. The due date is null if the invoice is not yet finalized.

idstring required
invoice_pdfstring nullable required

The link to download the PDF representation of the Invoice.

invoice_numberstring required

Automatically generated invoice number to help track and reconcile invoices. Invoice numbers have a prefix such as RFOBWG. These can be sequential per account or customer.

totalstring required

The total after any minimums and discounts have been applied.

status'issued' | 'paid' | 'synced' | 'void' | 'draft' required
invoice_source'subscription' | 'partial' | 'one_off' required
hosted_invoice_urlstring nullable required

A URL for the customer-facing invoice portal. This URL expires 60 days after the link is generated, or 30 days after the invoice's due date — whichever is later.

will_auto_issueboolean required

This is true if the invoice will be automatically issued in the future, and false otherwise.

eligible_to_issue_atstring date-time nullable required

If the invoice has a status of draft, this will be the time that the invoice will be eligible to be issued, otherwise it will be null. If auto-issue is true, the invoice will automatically begin issuing at this time.

memostring nullable required

Free-form text which is available on the invoice PDF and the Orb invoice portal.

{"stackTrail":"components:schemas:DEPRECATED_InvoiceLevelDiscount","oasType":"schema","type":"unknown","title":"DEPRECATED_InvoiceLevelDiscount"}
minimum_amountstring nullable required
maximum_amountstring nullable required
subtotalstring required

The total before any discounts and minimums are applied.

invoice_datestring date-time required

The scheduled date of the invoice