The table below provides an overview of the supported resources, the schema, and any notes on their sync behavior:

ResourceSync CadenceNotesSchema
Billable MetricDailyMetricBillable Metric Export.
CouponDailyCouponsCoupon Export.
Coupon RedemptionDailyHow to use CouponsCoupon Redemption Export.
Credit Ledger EntryDailyOrb syncs all committed (i.e. non-pending) ledger entries.This mirrors the schema returned by the Fetch credits ledger endpoint.
Credit noteDailyCredit notesCredit note export.
Credit note line itemDailyCredit note line item export.
CustomerDailyCustomerThis mirrors the schema returned by the Fetch customer endpoint.
Customer Balance TransactionDailyCustomer Balance Transaction Export.
Daily Line Item RevenueDailyDaily Line Item Revenue Export.
InvoiceDailyOrb syncs invoices, except draft invoices which are filtered out.This mirrors the schema returned by the Fetch invoice endpoint.
Invoice Line Item BillingDailyInvoice Line Item Billing Export.
ItemDailyItemItem Export.
PlanDailyPlan and PriceThis mirrors the schema returned by the Fetch plan endpoint.
SubscriptionDailySubscriptionThis mirrors the schema returned by the Fetch subscription endpoint.
Subscription versionDailyThis captures the subscription schedule of a subscription, specifically allowing you to understand plan transitions.A JSON object with the following keys: start_date, ended_at, plan, subscription_id, subscription_start_date, subscription_ended_at

Billable Metric

Overview

A billable metric defines an aggregation over usage events.

Schema

Field NameTypeDescription
idstringThe ID of the coupon.
updated_attimestampThe last updated date of the coupon.
metadatajsonUser specified key-value pairs for the resource. If not present, this defaults to an empty dictionary.
namestringThe user provided name of this billable metric.
descriptionstringThe user provided description of this billable metric.
item_idstringThe id of the item, see the Item export.
statusstringAvailable options: active, draft, or archived.

Coupon

Overview

A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription.

Schema

Field NameTypeDescription
idstringThe ID of the coupon.
updated_attimestampThe last updated date of the coupon.
redemption_codestringThis string can be used to redeem this coupon for a given subscription.
discountjsonA JSON blob representing either a PercentageDiscount or AmountDiscount
times_redeemedintThe number of times this coupon has been redeemed.
duration_in_monthsnullable intThis allows for a coupon’s discount to apply for a limited time (determined in months); a null value here means “unlimited time”.
max_redemptionsnullable intThe maximum number of redemptions allowed for this coupon before it is exhausted; null here means “unlimited”.
archived_atnullable timestampAn archived coupon can no longer be redeemed. Active coupons will have a value of null for archived_at; this field will be non-null for archived coupons.

Coupon Redemption

Overview

The Coupon Redemption resource represents a coupon that has been redeemed by a customer.

Schema

Field NameTypeDescription
idstringThe ID of the coupon redemption.
updated_attimestampThe last updated date of the coupon redemption.
start_datetimestampThe start date of the coupon redemption.
end_datenullable timestampAn optional end date of the coupon redemption.
coupon_idstringThe ID of the coupon.
adjustment_idstringThe ID of the adjustment.
subscription_idstringThe ID of the subscription.
customer_idstringThe ID of the customer.
unredeemed_timenullable timestampAn optional timestamp of when the coupon was unredeemed, if it was unredeemed.

Credit note

Overview

The Credit note resource represents a credit note that has been issued to a customer. A credit note is a document that can be used to decrease the amount due or issue a credit for an already issued invoice.

Schema

Field NameTypeDescription
idstringThe ID of the credit note.
updated_attimestampThe last updated date of the credit note.
created_attimestampThe creation time of the resource in Orb.
voided_atnullable timestampThe time at which the credit note was voided in Orb, if applicable.
credit_note_numberstringThe unique identifier for credit notes.
invoice_idstringThe id of the invoice resource that this credit note is applied to.
memonullable stringAn optional memo supplied on the credit note.
reasonnullable stringAn optional reason for the credit note. Available options: “Duplicate”, “Fraudulent”, “Order change”, “Product unsatisfactory”.
typestringThe type of credit note. Available options: refund, adjustment.
currencystringThe currency of the credit note.
subtotalstringThe total prior to any creditable invoice-level discounts or minimums.
totalstringThe total including creditable invoice-level discounts or minimums, and tax.
customer_idstringThe id of the customer resource that this credit note is applied to.
credit_note_pdfnullable stringA URL to a PDF of the credit note.

Credit Note Line Item

Overview

The Credit Note Line Item resource represents a line item that is associated with a credit note.

Schema

Field NameTypeDescription
idstringThe ID of the credit note line item.
updated_attimestampThe last updated date of the credit note line item.
created_attimestampThe creation time of the resource in Orb.
voided_atnullable timestampThe date and time when the credit note was voided.
credit_note_idstringThe ID of the credit note.
namestringThe name of the corresponding invoice line item.
amountstringThe amount of the line item, excluding any line item minimums and discounts.
quantitynullable numberAn optional quantity credited.
tax_amountsdict[]Any tax amounts applied onto the line item.

Customer Balance Transaction

Overview

The customer balance is an amount in the customer’s currency, which Orb automatically applies to subsequent invoices. This balance can be adjusted manually via Orb’s webapp on the customer details page.

Schema

Field NameTypeDescription
created_attimestampThe creation time of this transaction.
starting_balancedecimalThe original value of the customer’s balance prior to the transaction, in the customer’s currency.
ending_balancedecimalThe new value of the customer’s balance after the transaction, in the customer’s currency.
amountdecimalThe value of the amount changed in the transaction.
actionstringAvailable options: applied_to_invoice, manual_adjustment, prorated_refund, revert_prorated_refund, return_from_voiding, credit_note_applied, credit_note_voided, overpayment_refund
typestringAvailable options: increment, decrement
descriptionnullable stringAn optional description provided for manual customer balance adjustments.
invoice_idnullable stringAn optional ID if there is an associated invoice.
credit_note_idnullable stringAn optional ID if there is an associated credit note.
customer_idstringThe ID of the customer.

Daily Line Item Revenue

Overview

The Daily Line Item Revenue resource can be used to track the daily quantity and associated costs for invoice line items. This resource will function similarly to the subscription costs endpoint, but with more fine grained access to information.

This information can be used to power use cases like:

  • Daily revenue recognition workflows
  • Running pricing exercises

As mentioned, this resource will track daily quantities, but will reflect intra-day plan changes where applicable. This means that rows may span time periods less than a day in cases where a plan changes. Values in the export are periodic values (as opposed to cumulative values) and only relevant to the applicable timeframe.

The Daily Line Item Revenue resource is conceptually an append only resource. Entries in this table can be reverted. For example, when a backdated operation occurs, this may result in old values changing. When entries are reverted, they will have a corresponding timestamp in their reverted_at field but will still exist in the table. This means that historical queries can be constructed to understand what values were returned in the past.

The Daily Line Item Revenue resource relies on upstream processes running to calculate these values. Importantly, this processing relies on the grace period ending before it can run. This means that entries in this resource will be delayed. On average, we expect this delay to be approximately three days.

Schema

Field NameTypeDescription
customer_idstringThe ID of the customer.
subscription_idnullable stringThe ID of the subscription.

Note that a subscription ID may not always be present due to things like one-off invoices.
pricing_currencystringThe currency of the underlying price.
invoicing_currencynullable stringThe currency used for invoicing if it differs from the price’s currency.

Today, this only occurs if you are using virtual pricing units.
item_idstringThe ID of the item
invoice_idstringThe ID of the invoice
invoice_line_item_idstringThe ID of the invoice line item
price_idstringThe ID of the price
billable_metric_idnullable stringThe ID of the billable metric.

Note that a billable metric ID may not be present if the associated price is not usage based.
plan_idnullable stringThe ID of the plan.

Note that it may not always be present due to things like one-off invoices.
timeframe_starttimestampThe inclusive timestamp for the start of the relevant period.

Note that entries are scoped to day boundaries, but may start or end in the middle of the day if a plan change occurs.
timeframe_endtimestampThe exclusive timestamp for the end of the relevant period.

Note that entries are scoped to day boundaries, but may start or end in the middle of the day if a plan change occurs.
quantitydecimalThe price’s quantity for the relevant timeframe.
subtotaldecimalThe list price before any adjustments have been applied.
adjusted_subtotaldecimalThe list price after adjustments have been applied.

Called the “total” in the subscription costs API. This has been renamed to avoid confusion.
amountdecimalThe list price after: adjustments have been applied, prepaid credits have been applied, overage conversions have been applied, and partial invoice amounts have been applied.
credits_applieddecimalThe number of credits used.
conversion_ratedecimalThe conversion rate between the price currency and the invoicing currency.

If they are the same, this is 1.
adjustmentsJSONB

An array of dictionaries with: adjustment ID, adjustment type, amount, and price IDs.
The adjustments made to line items to account for maximums, minimums, and discounts.
sub_line_itemsnullable JSONB

If this field is null, the number of sub-line items exceeds 100. This is differentiated from cases with no sub-line items, where the column will be empty JSON.
The serialized sub-line items from the invoice.

This field can contain up to 100 sub-line items for a given line item. If the number of sub-line items exceeds 100, this field will not contain any sub-line items.
is_partial_invoicebooleanTrue if this line item was part of a Threshold invoice
partially_invoiced_amountnullable decimalIf this is from a threshold invoice, the amount that was partially invoiced.
reverted_atnullable timestampWhen this entry was reverted.

Entries are reverted when backdated operations occur that change the amounts for a given invoice line item on a specified day. Entries are never deleted and are only marked as reverted to allow for historical tracking of values returned on a given day in the past.

A row is valid in this table if reverted_at is null.

Invoice Line Item Billing

Overview

The Invoice Line Item Billing resource can be used to track the individual line item values for invoices that have been issued / billed.

This information can be used to power use cases like:

  • Calculating the precise amounts discounted per line item
  • Breaking down the amounts billed for a specific price or billable metric

The Invoice Line Item Billing resource is conceptually an append only resource. There are infrequent cases where entries can be voided (usually from a requested manual intervention). If this has occurred, it will be reflected in the voided_at column.

The Invoice Line Item Revenue resource relies on an invoice being issued before rows are written. Importantly, invoice issuing relies on the grace period ending before it can occur. This means that entries in this resource will be delayed.

Schema

Field NameTypeDescription
customer_idstringThe ID of the customer.
subscription_idnullable stringThe ID of the subscription.

Note that a subscription ID may not always be present due to things like one-off invoices.
pricing_currencystringThe currency of the underlying price.
invoicing_currencynullable stringThe currency used for invoicing if it differs from the price’s currency.

Today, this only occurs if you are using virtual pricing units.
item_idstringThe ID of the item
invoice_idstringThe ID of the invoice
invoice_line_item_idstringThe ID of the invoice line item
price_idstringThe ID of the price
billable_metric_idnullable stringThe ID of the billable metric.

Note that a billable metric ID may not be present if the associated price is not usage based.
plan_idnullable stringThe ID of the plan.

Note that it may not always be present due to things like one-off invoices.
timeframe_starttimestampThe inclusive timestamp for the start of the relevant period.

Note that entries are scoped to day boundaries, but may start or end in the middle of the day if a plan change occurs.
timeframe_endtimestampThe exclusive timestamp for the end of the relevant period.

Note that entries are scoped to day boundaries, but may start or end in the middle of the day if a plan change occurs.
quantitydecimalThe price’s quantity for the relevant timeframe.
subtotaldecimalThe list price before any adjustments have been applied.
adjusted_subtotaldecimalThe list price after adjustments have been applied.

Called the “total” in the subscription costs API. This has been renamed to avoid confusion.
amountdecimalThe list price after: adjustments have been applied, prepaid credits have been applied, overage conversions have been applied, and partial invoice amounts have been applied.
credits_applieddecimalThe number of credits used.
conversion_ratedecimalThe conversion rate between the price currency and the invoicing currency.

If they are the same, this is 1.
adjustmentsJSONB

An array of dictionaries with: adjustment ID, adjustment type, amount, and price IDs.
The adjustments made to line items to account for maximums, minimums, and discounts.
sub_line_itemsnullable JSONB

If this field is null, the number of sub-line items exceeds 100. This is differentiated from cases with no sub-line items, where the column will be empty JSON.
The serialized sub-line items from the invoice.

This field can contain up to 100 sub-line items for a given line item. If the number of sub-line items exceeds 100, this field will not contain any sub-line items.
is_partial_invoicebooleanTrue if this line item was part of a Threshold invoice
partially_invoiced_amountnullable decimalIf this is from a threshold invoice, the amount that was partially invoiced.
voided_atnullable timestampWhen this entry was voided.

Entries are very infrequently voided and usually correspond to manual actions that have taken place at the request of the customer.

Item

Overview

The Item resource represents a sellable product or good. Items are associated with all line items, billable metrics, and prices and are used for defining external sync behavior for invoices and tax calculation purposes.

Schema

Field NameTypeDescription
namestringThe name of the item.