Skip to main content
POST
Mark invoice as paid

Authorizations

Authorization
string
header
required

API Keys can be issued in the Orb's web application.

Path Parameters

invoice_id
string
required

Body

application/json
payment_received_date
string<date>
required

A date string to specify the date of the payment.

Example:

"2023-09-22"

external_id
string | null

An optional external ID to associate with the payment.

Example:

"external_payment_id_123"

notes
string | null

An optional note to associate with the payment.

Response

OK

An Invoice is a fundamental billing entity, representing the request for payment for a single subscription. This includes a set of line items, which correspond to prices in the subscription's plan and can represent fixed recurring fees or usage-based fees. They are generated at the end of a billing period, or as the result of an action, such as a cancellation.

metadata
Metadata · object
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_at
string<date-time> | null
required

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

paid_at
string<date-time> | null
required

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

issued_at
string<date-time> | null
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_at
string<date-time> | null
required

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

auto_collection
AutoCollection · object
required
issue_failed_at
string<date-time> | null
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_at
string<date-time> | null
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_at
string<date-time> | null
required

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

payment_started_at
string<date-time> | null
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_due
string
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.

Example:

"8.00"

created_at
string<date-time>
required

The creation time of the resource in Orb.

Example:

"2022-05-01T07:01:31+00:00"

currency
string
required

An ISO 4217 currency string or credits

Example:

"USD"

customer
CustomerMinified · object
required
due_date
string<date-time> | null
required

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

Example:

"2022-05-30T07:00:00+00:00"

id
string
required
invoice_pdf
string | null
required

The link to download the PDF representation of the Invoice.

Example:

"https://assets.withorb.com/invoice/rUHdhmg45vY45DX/qEAeuYePaphGMdFb"

invoice_number
string
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.

Example:

"JYEFHK-00001"

subscription
SubscriptionMinified · object | null
required
total
string
required

The total after any minimums and discounts have been applied.

Example:

"8.00"

customer_balance_transactions
CustomerBalanceTransaction · object[]
required
status
enum<string>
required
Available options:
issued,
paid,
synced,
void,
draft
invoice_source
enum<string>
required
Available options:
subscription,
partial,
one_off
shipping_address
Address · object | null
required
billing_address
Address · object | null
required
hosted_invoice_url
string | null
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_issue
boolean
required

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

eligible_to_issue_at
string<date-time> | null
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.

customer_tax_id
CustomerTaxId · object | null
required

Tax IDs are commonly required to be displayed on customer invoices, which are added to the headers of invoices.

Supported Tax ID Countries and Types

memo
string | null
required

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

credit_notes
CreditNoteSummary · object[]
required

A list of credit notes associated with the invoice

payment_attempts
PaymentAttempt · object[]
required

A list of payment attempts associated with the invoice

discount
any | null
required
deprecated

This field is deprecated in favor of discounts. If a discounts list is provided, the first discount in the list will be returned. If the list is empty, None will be returned.

discounts
(PercentageDiscount · object | AmountDiscount · object | TrialDiscount · object | TieredPercentageDiscount · object)[]
required
minimum
Minimum · object | null
required
minimum_amount
string | null
required
maximum
Maximum · object | null
required
maximum_amount
string | null
required
line_items
InvoiceLineItem · object[]
required

The breakdown of prices in this invoice.

subtotal
string
required

The total before any discounts and minimums are applied.

Example:

"8.00"

invoice_date
string<date-time>
required

The scheduled date of the invoice

Example:

"2022-05-01T07:00:00+00:00"