API documentation
Alert
Customer
- GETList customers
- POSTCreate customer
- GETFetch customer by external ID
- PUTUpdate customer by external ID
- GETFetch customer costs by external ID
- POSTUpdate payment methods from payment provider
- GETFetch customer
- PUTUpdate customer
- DELDelete customer
- GETList balance transactions
- POSTCreate customer balance transaction
- GETFetch customer costs
- POSTUpdate payment methods from payment provider
Credit
- GETFetch customer credit balance by external customer id
- GETFetch customer credits ledger by external ID
- POSTCreate ledger entry by external ID
- GETList top-ups by external ID
- POSTCreate top-up by external ID
- DELDeactivate top-up by external ID
- GETFetch customer credit balance
- GETFetch customer credits ledger
- POSTCreate ledger entry
- GETList top-ups
- POSTCreate top-up
- DELDeactivate top-up
Dimensional Price Group
Event
Invoice
Availability
Plan
Price
Subscription Change
Subscription
- GETList subscriptions
- POSTCreate subscription
- GETFetch subscription
- PUTUpdate subscription
- POSTCancel subscription
- GETFetch subscription costs
- GETFetch subscription schedule
- POSTSchedule plan change
- POSTTrigger phase
- POSTUnschedule subscription cancellation
- POSTUnschedule fixed fee quantity updates
- POSTUnschedule plan change
- POSTUpdate price quantity
- POSTUpdate trial for subscription
- GETFetch subscription usage
Price interval
Add or edit price intervals
This endpoint is used to add and edit subscription price intervals. By making modifications to a subscription’s price intervals, you can flexibly and atomically control the billing behavior of a subscription.
Adding price intervals
Prices can be added as
price intervals to a subscription by specifying them in the add
array. A price_id
or external_price_id
from an
add-on price or previously removed plan price can be specified to reuse an existing price definition (however, please
note that prices from other plans cannot be added to the subscription). Additionally, a new price can be specified using
the price
field — this price will be created automatically.
A start_date
must be specified for the price
interval. This is the date when the price will start billing on the subscription, so this will notably result in an
immediate charge at this time for any billed in advance fixed fees. The end_date
will default to null, resulting in a
price interval that will bill on a continually recurring basis. Both of these dates can be set in the past or the future
and Orb will generate or modify invoices to ensure the subscription’s invoicing behavior is correct.
Additionally, a discount, minimum, or maximum can be specified on the price interval. This will only apply to this price interval, not any other price intervals on the subscription.
Adjustment intervals
An adjustment interval represents the time period that a particular adjustment (a discount, minimum, or maximum) applies
to the prices on a subscription. Adjustment intervals can be added to a subscription by specifying them in the
add_adjustments
array, or modified via the edit_adjustments
array. When creating an adjustment interval, you’ll need
to provide the definition of the new adjustment (the type of adjustment, and which prices it applies to), as well as
the start and end dates for the adjustment interval. The start and end dates of an existing adjustment interval can be edited
via the edit_adjustments
field (just like price intervals). (To “change” the amount of a discount, minimum, or maximum,
then, you’ll need to end the existing interval, and create a new adjustment interval with the new amount and a start date
that matches the end date of the previous interval.)
Editing price intervals
Price intervals can be adjusted by
specifying edits to make in the edit
array. A price_interval_id
to edit must be specified — this can be retrieved
from the price_intervals
field on the subscription.
A new start_date
or end_date
can be specified to change the
range of the price interval, which will modify past or future invoices to ensure correctness. If either of these dates
are unspecified, they will default to the existing date on the price interval. To remove a price interval entirely from
a subscription, set the end_date
to be equivalent to the start_date
.
Fixed fee quantity transitions
The fixed fee quantity transitions for a fixed fee price interval can also be specified when adding or editing by passing an
array for fixed_fee_quantity_transitions
. A fixed fee quantity transition must have a quantity
and an
effective_date
, which is the date after which the new quantity will be used for billing. If a fixed fee quantity
transition is scheduled at a billing period boundary, the full quantity will be billed on an invoice with the other
prices on the subscription. If the fixed fee quantity transition is scheduled mid-billing period, the difference between
the existing quantity and quantity specified in the transition will be prorated for the rest of the billing period and
billed immediately, which will generate a new invoice.
Notably, the list of fixed fee quantity transitions passed
will overwrite the existing fixed fee quantity transitions on the price interval, so the entire list of transitions must
be specified to add additional transitions. The existing list of transitions can be retrieved using the
fixed_fee_quantity_transitions
property on a subscription’s serialized price intervals.
curl --request POST \
--url https://api.withorb.com/v1/subscriptions/{subscription_id}/price_intervals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"add": [
{
"usage_customer_ids": [
"<string>"
],
"filter": "my_property > 100 AND my_other_property = '\''bar'\''",
"price_id": "h74gfhdjvn7ujokd",
"external_price_id": "external_price_id",
"price": {
"metadata": {},
"external_price_id": "<string>",
"name": "Annual fee",
"billable_metric_id": "<string>",
"item_id": "<string>",
"billed_in_advance": true,
"fixed_price_quantity": 123,
"invoice_grouping_key": "<string>",
"cadence": "annual",
"billing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"invoicing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"conversion_rate": 123,
"model_type": "unit",
"unit_config": {
"unit_amount": "<string>"
},
"currency": "<string>"
},
"allocation_price": {
"currency": "USD",
"amount": "10.00",
"cadence": "monthly",
"expires_at_end_of_cadence": true
},
"start_date": "2023-05-01",
"end_date": "2023-07-10",
"fixed_fee_quantity_transitions": [
{
"quantity": 5,
"effective_date": "2023-05-01"
}
],
"discounts": [
{
"discount_type": "amount",
"amount_discount": "10.00"
}
],
"minimum_amount": "1.23",
"maximum_amount": "1.23"
}
],
"edit": [
{
"usage_customer_ids": [
"<string>"
],
"filter": "my_property > 100 AND my_other_property = '\''bar'\''",
"price_interval_id": "sdfs6wdjvn7ujokd",
"start_date": "2023-05-01",
"end_date": "2023-07-10",
"fixed_fee_quantity_transitions": [
{
"quantity": 5,
"effective_date": "2023-05-01"
}
],
"billing_cycle_day": 123
}
],
"add_adjustments": [
{
"adjustment": {
"applies_to_price_ids": [
"price_1",
"price_2"
],
"is_invoice_level": true,
"adjustment_type": "percentage_discount",
"percentage_discount": 123
},
"start_date": "2023-05-01",
"end_date": "2023-07-10"
}
],
"edit_adjustments": [
{
"adjustment_interval_id": "sdfs6wdjvn7ujokd",
"start_date": "2023-05-01",
"end_date": "2023-07-10"
}
],
"allow_invoice_credit_or_void": true
}'
{
"metadata": {},
"id": "<string>",
"customer": {
"metadata": {},
"id": "<string>",
"external_customer_id": "<string>",
"name": "<string>",
"email": "<string>",
"timezone": "<string>",
"payment_provider_id": "<string>",
"payment_provider": "quickbooks",
"created_at": "2023-11-07T05:31:56Z",
"shipping_address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"billing_address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"balance": "<string>",
"currency": "<string>",
"tax_id": {
"country": "AD",
"type": "ad_nrt",
"value": "<string>"
},
"auto_collection": true,
"exempt_from_automated_tax": true,
"email_delivery": true,
"additional_emails": [
"<string>"
],
"portal_url": "<string>",
"accounting_sync_configuration": {
"excluded": true,
"accounting_providers": [
{
"provider_type": "quickbooks",
"external_provider_id": "<string>"
}
]
},
"reporting_configuration": {
"exempt": true
},
"hierarchy": {
"parent": {
"id": "<string>",
"external_customer_id": "<string>"
},
"children": [
{
"id": "<string>",
"external_customer_id": "<string>"
}
]
}
},
"plan": {
"metadata": {},
"id": "<string>",
"name": "<string>",
"description": "<string>",
"maximum_amount": "<string>",
"minimum_amount": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"status": "active",
"maximum": {
"maximum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"minimum": {
"minimum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"discount": {
"discount_type": "percentage",
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"reason": "<string>",
"percentage_discount": 0.15
},
"product": {
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"name": "<string>"
},
"version": 123,
"trial_config": {
"trial_period": 123,
"trial_period_unit": "days"
},
"plan_phases": [
{
"id": "<string>",
"description": "<string>",
"duration": 123,
"duration_unit": "daily",
"name": "<string>",
"order": 123,
"minimum": {
"minimum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"maximum": {
"maximum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"minimum_amount": "<string>",
"discount": {
"discount_type": "percentage",
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"reason": "<string>",
"percentage_discount": 0.15
}
}
],
"base_plan": {
"id": "m2t5akQeh2obwxeU",
"external_plan_id": "m2t5akQeh2obwxeU",
"name": "Example plan"
},
"base_plan_id": "<string>",
"external_plan_id": "<string>",
"currency": "<string>",
"invoicing_currency": "<string>",
"net_terms": 123,
"default_invoice_memo": "<string>",
"prices": [
{
"metadata": {},
"id": "<string>",
"name": "<string>",
"external_price_id": "<string>",
"price_type": "usage_price",
"model_type": "unit",
"created_at": "2023-11-07T05:31:56Z",
"cadence": "one_time",
"billing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"invoicing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"billable_metric": {
"id": "<string>"
},
"dimensional_price_configuration": {
"dimensional_price_group_id": "<string>",
"dimension_values": [
"<string>"
]
},
"fixed_price_quantity": 123,
"plan_phase_order": 123,
"currency": "<string>",
"conversion_rate": 123,
"item": {
"id": "<string>",
"name": "<string>"
},
"credit_allocation": {
"currency": "<string>",
"allows_rollover": true
},
"discount": {
"discount_type": "percentage",
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"reason": "<string>",
"percentage_discount": 0.15
},
"minimum": {
"minimum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"unit_config": {
"unit_amount": "<string>"
}
}
],
"adjustments": [
{
"id": "<string>",
"is_invoice_level": true,
"applies_to_price_ids": [
"<string>"
],
"reason": "<string>",
"adjustment_type": "usage_discount",
"usage_discount": 123,
"plan_phase_order": 123
}
]
},
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"current_billing_period_start_date": "2023-11-07T05:31:56Z",
"current_billing_period_end_date": "2023-11-07T05:31:56Z",
"status": "active",
"trial_info": {
"end_date": "2023-11-07T05:31:56Z"
},
"active_plan_phase_order": 123,
"fixed_fee_quantity_schedule": [
{
"price_id": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"quantity": 123
}
],
"default_invoice_memo": "<string>",
"auto_collection": true,
"net_terms": 123,
"redeemed_coupon": {
"coupon_id": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z"
},
"billing_cycle_day": 16,
"billing_cycle_anchor_configuration": {
"day": 16,
"month": 6,
"year": 123
},
"invoicing_threshold": "<string>",
"price_intervals": [
{
"id": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"price": {
"metadata": {},
"id": "<string>",
"name": "<string>",
"external_price_id": "<string>",
"price_type": "usage_price",
"model_type": "unit",
"created_at": "2023-11-07T05:31:56Z",
"cadence": "one_time",
"billing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"invoicing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"billable_metric": {
"id": "<string>"
},
"dimensional_price_configuration": {
"dimensional_price_group_id": "<string>",
"dimension_values": [
"<string>"
]
},
"fixed_price_quantity": 123,
"plan_phase_order": 123,
"currency": "<string>",
"conversion_rate": 123,
"item": {
"id": "<string>",
"name": "<string>"
},
"credit_allocation": {
"currency": "<string>",
"allows_rollover": true
},
"discount": {
"discount_type": "percentage",
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"reason": "<string>",
"percentage_discount": 0.15
},
"minimum": {
"minimum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"unit_config": {
"unit_amount": "<string>"
}
},
"billing_cycle_day": 123,
"fixed_fee_quantity_transitions": [
{
"price_id": "<string>",
"effective_date": "2023-11-07T05:31:56Z",
"quantity": 123
}
],
"current_billing_period_start_date": "2023-11-07T05:31:56Z",
"current_billing_period_end_date": "2023-11-07T05:31:56Z",
"filter": "<string>",
"usage_customer_ids": [
"<string>"
]
}
],
"adjustment_intervals": [
{
"id": "<string>",
"adjustment": {
"id": "<string>",
"is_invoice_level": true,
"applies_to_price_ids": [
"<string>"
],
"reason": "<string>",
"adjustment_type": "usage_discount",
"usage_discount": 123,
"plan_phase_order": 123
},
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"applies_to_price_interval_ids": [
"<string>"
]
}
],
"discount_intervals": [
{
"discount_type": "amount",
"amount_discount": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"applies_to_price_ids": [
"<string>"
],
"applies_to_price_interval_ids": [
"<string>"
]
}
],
"minimum_intervals": [
{
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"applies_to_price_ids": [
"<string>"
],
"applies_to_price_interval_ids": [
"<string>"
],
"minimum_amount": "<string>"
}
],
"maximum_intervals": [
{
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"applies_to_price_ids": [
"<string>"
],
"applies_to_price_interval_ids": [
"<string>"
],
"maximum_amount": "<string>"
}
],
"pending_subscription_change": {
"id": "<string>"
},
"changed_resources": {
"created_credit_notes": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"voided_at": "2023-11-07T05:31:56Z",
"credit_note_number": "<string>",
"invoice_id": "<string>",
"memo": "<string>",
"reason": "Duplicate",
"type": "refund",
"subtotal": "<string>",
"total": "<string>",
"customer": {
"id": "<string>",
"external_customer_id": "<string>"
},
"credit_note_pdf": "<string>",
"minimum_amount_refunded": "<string>",
"discounts": [
{
"discount_type": "percentage",
"percentage_discount": 123,
"amount_applied": "<string>",
"reason": "<string>",
"applies_to_prices": [
{
"id": "<string>",
"name": "<string>"
}
]
}
],
"maximum_amount_adjustment": {
"discount_type": "percentage",
"percentage_discount": 123,
"amount_applied": "<string>",
"reason": "<string>",
"applies_to_prices": [
{
"id": "<string>",
"name": "<string>"
}
]
},
"line_items": [
{
"id": "<string>",
"name": "<string>",
"subtotal": "<string>",
"amount": "<string>",
"quantity": 123,
"discounts": [
{
"id": "<string>",
"discount_type": "percentage",
"percentage_discount": 123,
"amount_discount": "<string>",
"amount_applied": "<string>",
"reason": "<string>",
"applies_to_price_ids": [
"<string>"
]
}
],
"tax_amounts": [
{
"tax_rate_description": "<string>",
"tax_rate_percentage": "<string>",
"amount": "<string>"
}
],
"item_id": "<string>"
}
]
}
],
"voided_credit_notes": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"voided_at": "2023-11-07T05:31:56Z",
"credit_note_number": "<string>",
"invoice_id": "<string>",
"memo": "<string>",
"reason": "Duplicate",
"type": "refund",
"subtotal": "<string>",
"total": "<string>",
"customer": {
"id": "<string>",
"external_customer_id": "<string>"
},
"credit_note_pdf": "<string>",
"minimum_amount_refunded": "<string>",
"discounts": [
{
"discount_type": "percentage",
"percentage_discount": 123,
"amount_applied": "<string>",
"reason": "<string>",
"applies_to_prices": [
{
"id": "<string>",
"name": "<string>"
}
]
}
],
"maximum_amount_adjustment": {
"discount_type": "percentage",
"percentage_discount": 123,
"amount_applied": "<string>",
"reason": "<string>",
"applies_to_prices": [
{
"id": "<string>",
"name": "<string>"
}
]
},
"line_items": [
{
"id": "<string>",
"name": "<string>",
"subtotal": "<string>",
"amount": "<string>",
"quantity": 123,
"discounts": [
{
"id": "<string>",
"discount_type": "percentage",
"percentage_discount": 123,
"amount_discount": "<string>",
"amount_applied": "<string>",
"reason": "<string>",
"applies_to_price_ids": [
"<string>"
]
}
],
"tax_amounts": [
{
"tax_rate_description": "<string>",
"tax_rate_percentage": "<string>",
"amount": "<string>"
}
],
"item_id": "<string>"
}
]
}
],
"created_invoices": [
{
"metadata": {},
"voided_at": "2023-11-07T05:31:56Z",
"paid_at": "2023-11-07T05:31:56Z",
"issued_at": "2023-11-07T05:31:56Z",
"scheduled_issue_at": "2023-11-07T05:31:56Z",
"auto_collection": {
"next_attempt_at": "2023-11-07T05:31:56Z",
"previously_attempted_at": "2023-11-07T05:31:56Z",
"enabled": true,
"num_attempts": 123
},
"issue_failed_at": "2023-11-07T05:31:56Z",
"sync_failed_at": "2023-11-07T05:31:56Z",
"payment_failed_at": "2023-11-07T05:31:56Z",
"payment_started_at": "2023-11-07T05:31:56Z",
"amount_due": "8.00",
"created_at": "2022-05-01T07:01:31+00:00",
"currency": "USD",
"customer": {
"id": "<string>",
"external_customer_id": "<string>"
},
"discount": "<any>",
"discounts": [
{
"discount_type": "percentage",
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"reason": "<string>",
"percentage_discount": 0.15
}
],
"due_date": "2022-05-30T07:00:00+00:00",
"id": "<string>",
"invoice_pdf": "https://assets.withorb.com/invoice/rUHdhmg45vY45DX/qEAeuYePaphGMdFb",
"invoice_number": "JYEFHK-00001",
"minimum": {
"minimum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"line_items": [
{
"amount": "7.00",
"discount": {
"discount_type": "percentage",
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"reason": "<string>",
"percentage_discount": 0.15
},
"end_date": "2022-02-01T08:00:00+00:00",
"grouping": "<string>",
"minimum": {
"minimum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"adjustments": [
{
"id": "<string>",
"is_invoice_level": true,
"applies_to_price_ids": [
"<string>"
],
"reason": "<string>",
"adjustment_type": "usage_discount",
"usage_discount": 123,
"amount": "<string>"
}
],
"name": "Fixed Fee",
"quantity": 1,
"start_date": "2022-02-01T08:00:00+00:00",
"subtotal": "9.00",
"adjusted_subtotal": "5.00",
"credits_applied": "6.00",
"partially_invoiced_amount": "4.00",
"sub_line_items": [
{
"amount": "9.00",
"name": "Tier One",
"quantity": 5,
"grouping": {
"key": "region",
"value": "west"
},
"type": "matrix",
"matrix_config": {
"dimension_values": [
"<string>"
]
}
}
],
"tax_amounts": [
{
"tax_rate_description": "<string>",
"tax_rate_percentage": "<string>",
"amount": "<string>"
}
],
"id": "<string>",
"price": {
"metadata": {},
"id": "<string>",
"name": "<string>",
"external_price_id": "<string>",
"price_type": "usage_price",
"model_type": "unit",
"created_at": "2023-11-07T05:31:56Z",
"cadence": "one_time",
"billing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"invoicing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"billable_metric": {
"id": "<string>"
},
"dimensional_price_configuration": {
"dimensional_price_group_id": "<string>",
"dimension_values": [
"<string>"
]
},
"fixed_price_quantity": 123,
"plan_phase_order": 123,
"currency": "<string>",
"conversion_rate": 123,
"item": {
"id": "<string>",
"name": "<string>"
},
"credit_allocation": {
"currency": "<string>",
"allows_rollover": true
},
"discount": {
"discount_type": "percentage",
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"reason": "<string>",
"percentage_discount": 0.15
},
"minimum": {
"minimum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"unit_config": {
"unit_amount": "<string>"
}
},
"usage_customer_ids": [
"<string>"
],
"filter": "<string>"
}
],
"subscription": {
"id": "VDGsT23osdLb84KD"
},
"subtotal": "8.00",
"total": "8.00",
"customer_balance_transactions": [
{
"id": "cgZa3SXcsPTVyC4Y",
"created_at": "2022-05-01T07:01:31+00:00",
"starting_balance": "33.00",
"ending_balance": "22.00",
"amount": "11.00",
"action": "applied_to_invoice",
"description": "An optional description",
"invoice": {
"id": "gXcsPTVyC4YZa3Sc"
},
"type": "increment",
"credit_note": {
"id": "<string>"
}
}
],
"status": "issued",
"invoice_source": "subscription",
"shipping_address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"billing_address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"hosted_invoice_url": "<string>",
"will_auto_issue": true,
"eligible_to_issue_at": "2023-11-07T05:31:56Z",
"customer_tax_id": {
"country": "AD",
"type": "ad_nrt",
"value": "<string>"
},
"memo": "<string>",
"credit_notes": [
{
"id": "<string>",
"credit_note_number": "<string>",
"reason": "<string>",
"total": "<string>",
"voided_at": "2022-05-01T07:01:31+00:00",
"type": "<string>",
"memo": "<string>"
}
],
"payment_attempts": [
{
"id": "<string>",
"payment_provider": "stripe",
"payment_provider_id": "<string>",
"amount": "<string>",
"succeeded": true,
"created_at": "2023-11-07T05:31:56Z"
}
],
"invoice_date": "2022-05-01T07:00:00+00:00"
}
],
"voided_invoices": [
{
"metadata": {},
"voided_at": "2023-11-07T05:31:56Z",
"paid_at": "2023-11-07T05:31:56Z",
"issued_at": "2023-11-07T05:31:56Z",
"scheduled_issue_at": "2023-11-07T05:31:56Z",
"auto_collection": {
"next_attempt_at": "2023-11-07T05:31:56Z",
"previously_attempted_at": "2023-11-07T05:31:56Z",
"enabled": true,
"num_attempts": 123
},
"issue_failed_at": "2023-11-07T05:31:56Z",
"sync_failed_at": "2023-11-07T05:31:56Z",
"payment_failed_at": "2023-11-07T05:31:56Z",
"payment_started_at": "2023-11-07T05:31:56Z",
"amount_due": "8.00",
"created_at": "2022-05-01T07:01:31+00:00",
"currency": "USD",
"customer": {
"id": "<string>",
"external_customer_id": "<string>"
},
"discount": "<any>",
"discounts": [
{
"discount_type": "percentage",
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"reason": "<string>",
"percentage_discount": 0.15
}
],
"due_date": "2022-05-30T07:00:00+00:00",
"id": "<string>",
"invoice_pdf": "https://assets.withorb.com/invoice/rUHdhmg45vY45DX/qEAeuYePaphGMdFb",
"invoice_number": "JYEFHK-00001",
"minimum": {
"minimum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"line_items": [
{
"amount": "7.00",
"discount": {
"discount_type": "percentage",
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"reason": "<string>",
"percentage_discount": 0.15
},
"end_date": "2022-02-01T08:00:00+00:00",
"grouping": "<string>",
"minimum": {
"minimum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"adjustments": [
{
"id": "<string>",
"is_invoice_level": true,
"applies_to_price_ids": [
"<string>"
],
"reason": "<string>",
"adjustment_type": "usage_discount",
"usage_discount": 123,
"amount": "<string>"
}
],
"name": "Fixed Fee",
"quantity": 1,
"start_date": "2022-02-01T08:00:00+00:00",
"subtotal": "9.00",
"adjusted_subtotal": "5.00",
"credits_applied": "6.00",
"partially_invoiced_amount": "4.00",
"sub_line_items": [
{
"amount": "9.00",
"name": "Tier One",
"quantity": 5,
"grouping": {
"key": "region",
"value": "west"
},
"type": "matrix",
"matrix_config": {
"dimension_values": [
"<string>"
]
}
}
],
"tax_amounts": [
{
"tax_rate_description": "<string>",
"tax_rate_percentage": "<string>",
"amount": "<string>"
}
],
"id": "<string>",
"price": {
"metadata": {},
"id": "<string>",
"name": "<string>",
"external_price_id": "<string>",
"price_type": "usage_price",
"model_type": "unit",
"created_at": "2023-11-07T05:31:56Z",
"cadence": "one_time",
"billing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"invoicing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"billable_metric": {
"id": "<string>"
},
"dimensional_price_configuration": {
"dimensional_price_group_id": "<string>",
"dimension_values": [
"<string>"
]
},
"fixed_price_quantity": 123,
"plan_phase_order": 123,
"currency": "<string>",
"conversion_rate": 123,
"item": {
"id": "<string>",
"name": "<string>"
},
"credit_allocation": {
"currency": "<string>",
"allows_rollover": true
},
"discount": {
"discount_type": "percentage",
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"reason": "<string>",
"percentage_discount": 0.15
},
"minimum": {
"minimum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"unit_config": {
"unit_amount": "<string>"
}
},
"usage_customer_ids": [
"<string>"
],
"filter": "<string>"
}
],
"subscription": {
"id": "VDGsT23osdLb84KD"
},
"subtotal": "8.00",
"total": "8.00",
"customer_balance_transactions": [
{
"id": "cgZa3SXcsPTVyC4Y",
"created_at": "2022-05-01T07:01:31+00:00",
"starting_balance": "33.00",
"ending_balance": "22.00",
"amount": "11.00",
"action": "applied_to_invoice",
"description": "An optional description",
"invoice": {
"id": "gXcsPTVyC4YZa3Sc"
},
"type": "increment",
"credit_note": {
"id": "<string>"
}
}
],
"status": "issued",
"invoice_source": "subscription",
"shipping_address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"billing_address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"hosted_invoice_url": "<string>",
"will_auto_issue": true,
"eligible_to_issue_at": "2023-11-07T05:31:56Z",
"customer_tax_id": {
"country": "AD",
"type": "ad_nrt",
"value": "<string>"
},
"memo": "<string>",
"credit_notes": [
{
"id": "<string>",
"credit_note_number": "<string>",
"reason": "<string>",
"total": "<string>",
"voided_at": "2022-05-01T07:01:31+00:00",
"type": "<string>",
"memo": "<string>"
}
],
"payment_attempts": [
{
"id": "<string>",
"payment_provider": "stripe",
"payment_provider_id": "<string>",
"amount": "<string>",
"succeeded": true,
"created_at": "2023-11-07T05:31:56Z"
}
],
"invoice_date": "2022-05-01T07:00:00+00:00"
}
]
}
}
Authorizations
API Keys can be issued in the Orb's web application.
Path Parameters
Body
A list of price intervals to add to the subscription.
The start date of the price interval. This is the date that the price will start billing on the subscription.
"2023-05-01"
A list of customer IDs whose usage events will be aggregated and billed under this subscription. By default, a subscription only considers usage events associated with its attached customer's customer_id. When usage_customer_ids is provided, the subscription includes usage events from the specified customers only. Provided usage_customer_ids must be either the customer for this subscription itself, or any of that customer's children.
An additional filter to apply to usage queries. This filter must be expressed as a boolean computed property. If null, usage queries will not include any additional filter.
"my_property > 100 AND my_other_property = 'bar'"
The id of the price to add to the subscription.
"h74gfhdjvn7ujokd"
The external price id of the price to add to the subscription.
"external_price_id"
The definition of a new price to create and add to the subscription.
The name of the price.
"Annual fee"
The id of the item the price will be associated with.
The cadence to bill for this price on.
annual
, semi_annual
, monthly
, quarterly
, one_time
, custom
unit
Rate per unit of usage
An ISO 4217 currency string for which this price is billed in.
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
.
An alias for the price.
The id of the billable metric for the price. Only needed if the price is usage-based.
If the Price represents a fixed cost, the price will be billed in-advance if this is true, and in-arrears if this is false.
If the Price represents a fixed cost, this represents the quantity of units applied.
The property used to group this price on an invoice
For custom cadence: specifies the duration of the billing period in days or months.
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
The per unit conversion rate of the price currency to the invoicing currency.
The definition of a new allocation price to create and add to the subscription.
An ISO 4217 currency string or a custom pricing unit identifier in which to bill this price.
"USD"
An amount of the currency to allocate to the customer at the specified cadence.
"10.00"
The cadence at which to allocate the amount to the customer.
one_time
, monthly
, quarterly
, semi_annual
, annual
, custom
"monthly"
Whether the allocated amount should expire at the end of the cadence or roll over to the next period.
The end date of the price interval. This is the date that the price will stop billing on the subscription.
"2023-07-10"
A list of fixed fee quantity transitions to initialize on the price interval.
The minimum amount that will be billed for this price interval for a given billing period.
"1.23"
The maximum amount that will be billed for this price interval for a given billing period.
"1.23"
A list of price intervals to edit on the subscription.
The id of the price interval to edit.
"sdfs6wdjvn7ujokd"
A list of customer IDs whose usage events will be aggregated and billed under this subscription. By default, a subscription only considers usage events associated with its attached customer's customer_id. When usage_customer_ids is provided, the subscription includes usage events from the specified customers only. Provided usage_customer_ids must be either the customer for this subscription itself, or any of that customer's children.
An additional filter to apply to usage queries. This filter must be expressed as a boolean computed property. If null, usage queries will not include any additional filter.
"my_property > 100 AND my_other_property = 'bar'"
The updated start date of this price interval. If not specified, the start date will not be updated.
"2023-05-01"
The updated end date of this price interval. If not specified, the start date will not be updated.
"2023-07-10"
A list of fixed fee quantity transitions to use for this price interval. Note that this list will overwrite all existing fixed fee quantity transitions on the price interval.
The updated billing cycle day for this price interval. If not specified, the billing cycle day will not be updated. Note that overlapping price intervals must have the same billing cycle day.
A list of adjustments to add to the subscription.
The definition of a new adjustment to create and add to the subscription.
The set of price IDs to which this adjustment applies.
["price_1", "price_2"]
percentage_discount
When false, this adjustment will be applied to a single price. Otherwise, it will be applied at the invoice level, possibly to multiple prices.
The start date of the adjustment interval. This is the date that the adjustment will start affecting prices on the subscription. The adjustment will apply to invoice dates that overlap with this start_date
. This start_date
is treated as inclusive for in-advance prices, and exclusive for in-arrears prices.
"2023-05-01"
The end date of the adjustment interval. This is the date that the adjustment will stop affecting prices on the subscription. The adjustment will apply to invoice dates that overlap with this end_date
.This end_date
is treated as exclusive for in-advance prices, and inclusive for in-arrears prices.
"2023-07-10"
A list of adjustments to edit on the subscription.
The id of the adjustment interval to edit.
"sdfs6wdjvn7ujokd"
The updated start date of this adjustment interval. If not specified, the start date will not be updated.
"2023-05-01"
The updated end date of this adjustment interval. If not specified, the start date will not be updated.
"2023-07-10"
If false, this request will fail if it would void an issued invoice or create a credit note. Consider using this as a safety mechanism if you do not expect existing invoices to be changed.
Response
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
.
A customer is a buyer of your products, and the other party to the billing relationship.
In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these
match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an
external_customer_id
with your own identifier. See
Customer ID Aliases for further information about how these
aliases work in Orb.
In addition to having an identifier in your system, a customer may exist in a payment provider solution like
Stripe. Use the payment_provider_id
and the payment_provider
enum field to express this mapping.
A customer also has a timezone (from the standard IANA timezone database), which defaults to your account's timezone. See Timezone localization for information on what this timezone parameter influences within Orb.
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
.
An optional user-defined ID for this customer resource, used throughout the system as an alias for this Customer. Use this field to identify a customer by an existing identifier in your system.
The full name of the customer
A valid customer email, to be used for notifications. When Orb triggers payment through a payment gateway, this email will be used for any automatically issued receipts.
A timezone identifier from the IANA timezone database, such as "America/Los_Angeles". This "defaults to your account's timezone if not set. This cannot be changed after customer creation.
The ID of this customer in an external payments solution, such as Stripe. This is used for creating charges or invoices in the external system via Orb.
This is used for creating charges or invoices in an external system via Orb. When not in test mode, the connection must first be configured in the Orb webapp.
quickbooks
, bill.com
, stripe_charge
, stripe_invoice
, netsuite
The customer's current balance in their currency.
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
Country | Type | Description |
---|---|---|
Andorra | ad_nrt | Andorran NRT Number |
Argentina | ar_cuit | Argentinian Tax ID Number |
Australia | au_abn | Australian Business Number (AU ABN) |
Australia | au_arn | Australian Taxation Office Reference Number |
Austria | eu_vat | European VAT Number |
Bahrain | bh_vat | Bahraini VAT Number |
Belgium | eu_vat | European VAT Number |
Bolivia | bo_tin | Bolivian Tax ID |
Brazil | br_cnpj | Brazilian CNPJ Number |
Brazil | br_cpf | Brazilian CPF Number |
Bulgaria | bg_uic | Bulgaria Unified Identification Code |
Bulgaria | eu_vat | European VAT Number |
Canada | ca_bn | Canadian BN |
Canada | ca_gst_hst | Canadian GST/HST Number |
Canada | ca_pst_bc | Canadian PST Number (British Columbia) |
Canada | ca_pst_mb | Canadian PST Number (Manitoba) |
Canada | ca_pst_sk | Canadian PST Number (Saskatchewan) |
Canada | ca_qst | Canadian QST Number (Québec) |
Chile | cl_tin | Chilean TIN |
China | cn_tin | Chinese Tax ID |
Colombia | co_nit | Colombian NIT Number |
Costa Rica | cr_tin | Costa Rican Tax ID |
Croatia | eu_vat | European VAT Number |
Cyprus | eu_vat | European VAT Number |
Czech Republic | eu_vat | European VAT Number |
Denmark | eu_vat | European VAT Number |
Dominican Republic | do_rcn | Dominican RCN Number |
Ecuador | ec_ruc | Ecuadorian RUC Number |
Egypt | eg_tin | Egyptian Tax Identification Number |
El Salvador | sv_nit | El Salvadorian NIT Number |
Estonia | eu_vat | European VAT Number |
EU | eu_oss_vat | European One Stop Shop VAT Number for non-Union scheme |
Finland | eu_vat | European VAT Number |
France | eu_vat | European VAT Number |
Georgia | ge_vat | Georgian VAT |
Germany | eu_vat | European VAT Number |
Greece | eu_vat | European VAT Number |
Hong Kong | hk_br | Hong Kong BR Number |
Hungary | eu_vat | European VAT Number |
Hungary | hu_tin | Hungary Tax Number (adószám) |
Iceland | is_vat | Icelandic VAT |
India | in_gst | Indian GST Number |
Indonesia | id_npwp | Indonesian NPWP Number |
Ireland | eu_vat | European VAT Number |
Israel | il_vat | Israel VAT |
Italy | eu_vat | European VAT Number |
Japan | jp_cn | Japanese Corporate Number (Hōjin Bangō) |
Japan | jp_rn | Japanese Registered Foreign Businesses' Registration Number (Tōroku Kokugai Jigyōsha no Tōroku Bangō) |
Japan | jp_trn | Japanese Tax Registration Number (Tōroku Bangō) |
Kazakhstan | kz_bin | Kazakhstani Business Identification Number |
Kenya | ke_pin | Kenya Revenue Authority Personal Identification Number |
Latvia | eu_vat | European VAT Number |
Liechtenstein | li_uid | Liechtensteinian UID Number |
Lithuania | eu_vat | European VAT Number |
Luxembourg | eu_vat | European VAT Number |
Malaysia | my_frp | Malaysian FRP Number |
Malaysia | my_itn | Malaysian ITN |
Malaysia | my_sst | Malaysian SST Number |
Malta | eu_vat | European VAT Number |
Mexico | mx_rfc | Mexican RFC Number |
Netherlands | eu_vat | European VAT Number |
New Zealand | nz_gst | New Zealand GST Number |
Nigeria | ng_tin | Nigerian Tax Identification Number |
Norway | no_vat | Norwegian VAT Number |
Norway | no_voec | Norwegian VAT on e-commerce Number |
Oman | om_vat | Omani VAT Number |
Peru | pe_ruc | Peruvian RUC Number |
Philippines | ph_tin | Philippines Tax Identification Number |
Poland | eu_vat | European VAT Number |
Portugal | eu_vat | European VAT Number |
Romania | eu_vat | European VAT Number |
Romania | ro_tin | Romanian Tax ID Number |
Russia | ru_inn | Russian INN |
Russia | ru_kpp | Russian KPP |
Saudi Arabia | sa_vat | Saudi Arabia VAT |
Serbia | rs_pib | Serbian PIB Number |
Singapore | sg_gst | Singaporean GST |
Singapore | sg_uen | Singaporean UEN |
Slovakia | eu_vat | European VAT Number |
Slovenia | eu_vat | European VAT Number |
Slovenia | si_tin | Slovenia Tax Number (davčna številka) |
South Africa | za_vat | South African VAT Number |
South Korea | kr_brn | Korean BRN |
Spain | es_cif | Spanish NIF Number (previously Spanish CIF Number) |
Spain | eu_vat | European VAT Number |
Sweden | eu_vat | European VAT Number |
Switzerland | ch_vat | Switzerland VAT Number |
Taiwan | tw_vat | Taiwanese VAT |
Thailand | th_vat | Thai VAT |
Turkey | tr_tin | Turkish Tax Identification Number |
Ukraine | ua_vat | Ukrainian VAT |
United Arab Emirates | ae_trn | United Arab Emirates TRN |
United Kingdom | eu_vat | Northern Ireland VAT Number |
United Kingdom | gb_vat | United Kingdom VAT Number |
United States | us_ein | United States EIN |
Uruguay | uy_ruc | Uruguayan RUC Number |
Venezuela | ve_rif | Venezuelan RIF Number |
Vietnam | vn_tin | Vietnamese Tax ID Number |
AD
, AE
, AR
, AT
, AU
, BE
, BG
, BH
, BO
, BR
, CA
, CH
, CL
, CN
, CO
, CR
, CY
, CZ
, DE
, DK
, EE
, DO
, EC
, EG
, ES
, EU
, FI
, FR
, GB
, GE
, GR
, HK
, HR
, HU
, ID
, IE
, IL
, IN
, IS
, IT
, JP
, KE
, KR
, KZ
, LI
, LT
, LU
, LV
, MT
, MX
, MY
, NG
, NL
, NO
, NZ
, OM
, PE
, PH
, PL
, PT
, RO
, RS
, RU
, SA
, SE
, SG
, SI
, SK
, SV
, TH
, TR
, TW
, UA
, US
, UY
, VE
, VN
, ZA
ad_nrt
, ae_trn
, ar_cuit
, eu_vat
, au_abn
, au_arn
, bg_uic
, bh_vat
, bo_tin
, br_cnpj
, br_cpf
, ca_bn
, ca_gst_hst
, ca_pst_bc
, ca_pst_mb
, ca_pst_sk
, ca_qst
, ch_vat
, cl_tin
, cn_tin
, co_nit
, cr_tin
, do_rcn
, ec_ruc
, eg_tin
, es_cif
, eu_oss_vat
, gb_vat
, ge_vat
, hk_br
, hu_tin
, id_npwp
, il_vat
, in_gst
, is_vat
, jp_cn
, jp_rn
, jp_trn
, ke_pin
, kr_brn
, kz_bin
, li_uid
, mx_rfc
, my_frp
, my_itn
, my_sst
, ng_tin
, no_vat
, no_voec
, nz_gst
, om_vat
, pe_ruc
, ph_tin
, ro_tin
, rs_pib
, ru_inn
, ru_kpp
, sa_vat
, sg_gst
, sg_uen
, si_tin
, sv_nit
, th_vat
, tr_tin
, tw_vat
, ua_vat
, us_ein
, uy_ruc
, ve_rif
, vn_tin
, za_vat
The hierarchical relationships for this customer.
The Plan resource represents a plan that can be subscribed to by a customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices in the Price resource.
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
.
active
, archived
, draft
percentage
List of price_ids that this discount applies to. For plan/plan phase discounts, this can be a subset of prices.
["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"]
Only available if discount_type is percentage
. This is a number between 0 and 1.
0 <= x <= 1
0.15
How many terms of length duration_unit
this phase is active for. If null, this phase is evergreen and active indefinitely
daily
, monthly
, quarterly
, semi_annual
, annual
Determines the ordering of the phase in a plan's lifecycle. 1 = first phase.
percentage
List of price_ids that this discount applies to. For plan/plan phase discounts, this can be a subset of prices.
["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"]
Only available if discount_type is percentage
. This is a number between 0 and 1.
0 <= x <= 1
0.15
"m2t5akQeh2obwxeU"
An optional user-defined ID for this plan resource, used throughout the system as an alias for this Plan. Use this field to identify a plan by an existing identifier in your system.
"m2t5akQeh2obwxeU"
"Example plan"
The parent plan id if the given plan was created by overriding one or more of the parent's prices
An optional user-defined ID for this plan resource, used throughout the system as an alias for this Plan. Use this field to identify a plan by an existing identifier in your system.
An ISO 4217 currency string or custom pricing unit (credits
) for this plan's prices.
An ISO 4217 currency string for which this plan is billed in. Matches currency
unless currency
is a custom pricing unit.
Determines the difference between the invoice issue date and the due date. A value of "0" here signifies that invoices are due on issue, whereas a value of "30" means that the customer has a month to pay the invoice before its overdue. Note that individual subscriptions or invoices may set a different net terms configuration.
The default memo text on the invoices corresponding to subscriptions on this plan. Note that each subscription may configure its own memo.
Prices for this plan. If the plan has phases, this includes prices across all phases of the plan.
The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in the form of an invoice line item. Prices take a quantity and determine an amount to bill.
Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a given Price object. The model_type field determines the key for the configuration object that is present.
For more on the types of prices, see the core concepts documentation
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
.
usage_price
, fixed_price
unit
one_time
, monthly
, quarterly
, semi_annual
, annual
, custom
percentage
List of price_ids that this discount applies to. For plan/plan phase discounts, this can be a subset of prices.
["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"]
Only available if discount_type is percentage
. This is a number between 0 and 1.
0 <= x <= 1
0.15
Rate per unit of usage
Adjustments for this plan. If the plan has phases, this includes adjustments across all phases of the plan.
True for adjustments that apply to an entire invocice, false for adjustments that apply to only one price.
The price IDs that this adjustment applies to.
The reason for the adjustment.
usage_discount
The number of usage units by which to discount the price this adjustment applies to in a given billing period.
The plan phase in which this adjustment is active.
The date Orb starts billing for this subscription.
The date Orb stops billing for this subscription.
The start date of the current billing period. This is an inclusive timestamp; the instant returned is exactly the beginning of the billing period. Set to null if the subscription is not currently active.
The end of the current billing period. This is an exclusive timestamp, such that the instant returned is not part of the billing period. Set to null for subscriptions that are not currently active.
active
, ended
, upcoming
The current plan phase that is active, only if the subscription's plan has phases.
Determines the default memo on this subscriptions' invoices. Note that if this is not provided, it is determined by the plan configuration.
Determines whether issued invoices for this subscription will automatically be charged with the saved payment method on the due date. This property defaults to the plan's behavior. If null, defaults to the customer's setting.
Determines the difference between the invoice issue date for subscription invoices as the date that they are due. A value of 0
here represents that the invoice is due on issue, whereas a value of 30
represents that the customer has a month to pay the invoice.
The day of the month on which the billing cycle is anchored. If the maximum number of days in a month is greater than this value, the last day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing period begins on the 30th.
1 <= x <= 31
The day of the month on which the billing cycle is anchored. If the maximum number of days in a month is greater than this value, the last day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing period begins on the 30th.
1 <= x <= 31
The month on which the billing cycle is anchored (e.g. a quarterly price anchored in February would have cycles starting February, May, August, and November).
1 <= x <= 12
The year on which the billing cycle is anchored (e.g. a 2 year billing cycle anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.).
The price intervals for this subscription.
The Price Interval resource represents a period of time for which a price will bill on a subscription. A subscription’s price intervals define its billing behavior.
The start date of the price interval. This is the date that Orb starts billing for this price.
The end date of the price interval. This is the date that Orb stops billing for this price.
The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in the form of an invoice line item. Prices take a quantity and determine an amount to bill.
Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a given Price object. The model_type field determines the key for the configuration object that is present.
For more on the types of prices, see the core concepts documentation
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
.
usage_price
, fixed_price
unit
one_time
, monthly
, quarterly
, semi_annual
, annual
, custom
percentage
List of price_ids that this discount applies to. For plan/plan phase discounts, this can be a subset of prices.
["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"]
Only available if discount_type is percentage
. This is a number between 0 and 1.
0 <= x <= 1
0.15
Rate per unit of usage
The day of the month that Orb bills for this price
The fixed fee quantity transitions for this price interval. This is only relevant for fixed fees.
The start date of the current billing period. This is an inclusive timestamp; the instant returned is exactly the beginning of the billing period. Set to null if this price interval is not currently active.
The end of the current billing period. This is an exclusive timestamp, such that the instant returned is exactly the end of the billing period. Set to null if this price interval is not currently active.
An additional filter to apply to usage queries.
A list of customer IDs whose usage events will be aggregated and billed under this price interval.
The adjustment intervals for this subscription sorted by the start_date of the adjustment interval.
True for adjustments that apply to an entire invocice, false for adjustments that apply to only one price.
The price IDs that this adjustment applies to.
The reason for the adjustment.
usage_discount
The number of usage units by which to discount the price this adjustment applies to in a given billing period.
The plan phase in which this adjustment is active.
The start date of the adjustment interval.
The end date of the adjustment interval.
The price interval IDs that this adjustment applies to.
The discount intervals for this subscription sorted by the start_date.
amount
Only available if discount_type is amount
.
The start date of the discount interval.
The end date of the discount interval.
The price ids that this discount interval applies to.
The price interval ids that this discount interval applies to.
The minimum intervals for this subscription sorted by the start_date.
The start date of the minimum interval.
The end date of the minimum interval.
The price ids that this minimum interval applies to.
The price interval ids that this minimum interval applies to.
The minimum amount to charge in a given billing period for the price intervals this minimum applies to.
The maximum intervals for this subscription sorted by the start_date.
The start date of the maximum interval.
The end date of the maximum interval.
The price ids that this maximum interval applies to.
The price interval ids that this maximum interval applies to.
The maximum amount to charge in a given billing period for the price intervals this transform applies to.
A pending subscription change if one exists on this subscription.
The resources that were changed as part of this operation. Only present when fetched through the subscription changes API or if the include_changed_resources
parameter was passed in the request.
The credit notes that were created as part of this operation.
The Credit Note resource represents a credit that has been applied to a particular invoice.
The Orb id of this credit note.
The creation time of the resource in Orb.
The time at which the credit note was voided in Orb, if applicable.
The unique identifier for credit notes.
The id of the invoice resource that this credit note is applied to.
An optional memo supplied on the credit note.
Duplicate
, Fraudulent
, Order change
, Product unsatisfactory
refund
, adjustment
The total prior to any creditable invoice-level discounts or minimums.
The total including creditable invoice-level discounts or minimums, and tax.
A URL to a PDF of the credit note.
Any credited amount from the applied minimum on the invoice.
The maximum amount applied on the original invoice
percentage
All of the line items associated with this credit note.
The Orb id of this resource.
The name of the corresponding invoice line item.
The amount of the line item, excluding any line item minimums and discounts.
The amount of the line item, including any line item minimums and discounts.
An optional quantity credited.
Any tax amounts applied onto the line item.
The human-readable description of the applied tax rate.
The tax rate percentage, out of 100.
The amount of additional tax incurred by this tax rate.
The id of the item associated with this line item.
Any line item discounts from the invoice's line item.
percentage
, amount
Any discounts applied on the original invoice.
percentage
The credit notes that were voided as part of this operation.
The Credit Note resource represents a credit that has been applied to a particular invoice.
The Orb id of this credit note.
The creation time of the resource in Orb.
The time at which the credit note was voided in Orb, if applicable.
The unique identifier for credit notes.
The id of the invoice resource that this credit note is applied to.
An optional memo supplied on the credit note.
Duplicate
, Fraudulent
, Order change
, Product unsatisfactory
refund
, adjustment
The total prior to any creditable invoice-level discounts or minimums.
The total including creditable invoice-level discounts or minimums, and tax.
A URL to a PDF of the credit note.
Any credited amount from the applied minimum on the invoice.
The maximum amount applied on the original invoice
percentage
All of the line items associated with this credit note.
The Orb id of this resource.
The name of the corresponding invoice line item.
The amount of the line item, excluding any line item minimums and discounts.
The amount of the line item, including any line item minimums and discounts.
An optional quantity credited.
Any tax amounts applied onto the line item.
The human-readable description of the applied tax rate.
The tax rate percentage, out of 100.
The amount of additional tax incurred by this tax rate.
The id of the item associated with this line item.
Any line item discounts from the invoice's line item.
percentage
, amount
Any discounts applied on the original invoice.
percentage
The invoices that were created as part of this operation.
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.
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
.
If the invoice has a status of void
, this gives a timestamp when the invoice was voided.
If the invoice has a status of paid
, this gives a timestamp when the invoice was paid.
If the invoice has been issued, this will be the time it transitioned to issued
(even if it is now in a different state.)
If the invoice is in draft, this timestamp will reflect when the invoice is scheduled to be issued.
If the invoice is scheduled for auto-collection, this field will reflect when the next attempt will occur. If dunning has been exhausted, or auto-collection is not enabled for this invoice, this field will be null
.
If Orb has ever attempted payment auto-collection for this invoice, this field will reflect when that attempt occurred. In conjunction with next_attempt_at
, this can be used to tell whether the invoice is currently in dunning (that is, previously_attempted_at
is non-null, and next_attempt_time
is non-null), or if dunning has been exhausted (previously_attempted_at
is non-null, but next_attempt_time
is null).
True only if auto-collection is enabled for this invoice.
Number of auto-collection payment attempts.
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.)
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.
If payment was attempted on this invoice but failed, this will be the time of the most recent attempt.
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.
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.
"8.00"
The creation time of the resource in Orb.
"2022-05-01T07:01:31+00:00"
An ISO 4217 currency string or credits
"USD"
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.
percentage
List of price_ids that this discount applies to. For plan/plan phase discounts, this can be a subset of prices.
["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"]
Only available if discount_type is percentage
. This is a number between 0 and 1.
0 <= x <= 1
0.15
When the invoice payment is due. The due date is null if the invoice is not yet finalized.
"2022-05-30T07:00:00+00:00"
The link to download the PDF representation of the Invoice
.
"https://assets.withorb.com/invoice/rUHdhmg45vY45DX/qEAeuYePaphGMdFb"
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.
"JYEFHK-00001"
The breakdown of prices in this invoice.
The final amount for a line item after all adjustments and pre paid credits have been applied.
"7.00"
percentage
List of price_ids that this discount applies to. For plan/plan phase discounts, this can be a subset of prices.
["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"]
Only available if discount_type is percentage
. This is a number between 0 and 1.
0 <= x <= 1
0.15
The end date of the range of time applied for this line item's price.
"2022-02-01T08:00:00+00:00"
[DEPRECATED] For configured prices that are split by a grouping key, this will be populated with the key and a value. The amount
and subtotal
will be the values for this particular grouping.
This field is deprecated in favor of adjustments
.
Minimum amount applied
List of price_ids that this minimum amount applies to. For plan/plan phase minimums, this can be a subset of prices.
This field is deprecated in favor of adjustments
.
This field is deprecated in favor of adjustments
.
Maximum amount applied
List of price_ids that this maximum amount applies to. For plan/plan phase maximums, this can be a subset of prices.
This field is deprecated in favor of adjustments
.
All adjustments applied to the line item in the order they were applied based on invoice calculations (ie. usage discounts -> amount discounts -> percentage discounts -> minimums -> maximums).
True for adjustments that apply to an entire invocice, false for adjustments that apply to only one price.
The price IDs that this adjustment applies to.
The reason for the adjustment.
usage_discount
The number of usage units by which to discount the price this adjustment applies to in a given billing period.
The value applied by an adjustment.
The name of the price associated with this line item.
"Fixed Fee"
Either the fixed fee quantity or the usage during the service period.
1
The start date of the range of time applied for this line item's price.
"2022-02-01T08:00:00+00:00"
The line amount before before any adjustments.
"9.00"
The line amount after any adjustments and before overage conversion, credits and partial invoicing.
"5.00"
The number of prepaid credits applied.
"6.00"
Any amount applied from a partial invoice
"4.00"
For complex pricing structures, the line item can be broken down further in sub_line_items
.
The total amount for this sub line item.
"9.00"
"Tier One"
5
matrix
An array of tax rates and their incurred tax amounts. Empty if no tax integration is configured.
The human-readable description of the applied tax rate.
The tax rate percentage, out of 100.
The amount of additional tax incurred by this tax rate.
A unique ID for this line item.
The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in the form of an invoice line item. Prices take a quantity and determine an amount to bill.
Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a given Price object. The model_type field determines the key for the configuration object that is present.
For more on the types of prices, see the core concepts documentation
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
.
usage_price
, fixed_price
unit
one_time
, monthly
, quarterly
, semi_annual
, annual
, custom
A list of customer ids that were used to calculate the usage for this line item.
An additional filter that was used to calculate the usage for this line item.
"VDGsT23osdLb84KD"
The total before any discounts and minimums are applied.
"8.00"
The total after any minimums and discounts have been applied.
"8.00"
A unique id for this transaction.
"cgZa3SXcsPTVyC4Y"
The creation time of this transaction.
"2022-05-01T07:01:31+00:00"
The original value of the customer's balance prior to the transaction, in the customer's currency.
"33.00"
The new value of the customer's balance prior to the transaction, in the customer's currency.
"22.00"
The value of the amount changed in the transaction.
"11.00"
applied_to_invoice
, manual_adjustment
, prorated_refund
, revert_prorated_refund
, return_from_voiding
, credit_note_applied
, credit_note_voided
, overpayment_refund
, external_payment
An optional description provided for manual customer balance adjustments.
"An optional description"
The Invoice id
"gXcsPTVyC4YZa3Sc"
increment
, decrement
issued
, paid
, synced
, void
, draft
subscription
, partial
, one_off
A URL for the customer-facing invoice portal. This URL expires 30 days after the invoice's due date, or 60 days after being re-generated through the UI.
This is true if the invoice will be automatically issued in the future, and false otherwise.
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.
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
Country | Type | Description |
---|---|---|
Andorra | ad_nrt | Andorran NRT Number |
Argentina | ar_cuit | Argentinian Tax ID Number |
Australia | au_abn | Australian Business Number (AU ABN) |
Australia | au_arn | Australian Taxation Office Reference Number |
Austria | eu_vat | European VAT Number |
Bahrain | bh_vat | Bahraini VAT Number |
Belgium | eu_vat | European VAT Number |
Bolivia | bo_tin | Bolivian Tax ID |
Brazil | br_cnpj | Brazilian CNPJ Number |
Brazil | br_cpf | Brazilian CPF Number |
Bulgaria | bg_uic | Bulgaria Unified Identification Code |
Bulgaria | eu_vat | European VAT Number |
Canada | ca_bn | Canadian BN |
Canada | ca_gst_hst | Canadian GST/HST Number |
Canada | ca_pst_bc | Canadian PST Number (British Columbia) |
Canada | ca_pst_mb | Canadian PST Number (Manitoba) |
Canada | ca_pst_sk | Canadian PST Number (Saskatchewan) |
Canada | ca_qst | Canadian QST Number (Québec) |
Chile | cl_tin | Chilean TIN |
China | cn_tin | Chinese Tax ID |
Colombia | co_nit | Colombian NIT Number |
Costa Rica | cr_tin | Costa Rican Tax ID |
Croatia | eu_vat | European VAT Number |
Cyprus | eu_vat | European VAT Number |
Czech Republic | eu_vat | European VAT Number |
Denmark | eu_vat | European VAT Number |
Dominican Republic | do_rcn | Dominican RCN Number |
Ecuador | ec_ruc | Ecuadorian RUC Number |
Egypt | eg_tin | Egyptian Tax Identification Number |
El Salvador | sv_nit | El Salvadorian NIT Number |
Estonia | eu_vat | European VAT Number |
EU | eu_oss_vat | European One Stop Shop VAT Number for non-Union scheme |
Finland | eu_vat | European VAT Number |
France | eu_vat | European VAT Number |
Georgia | ge_vat | Georgian VAT |
Germany | eu_vat | European VAT Number |
Greece | eu_vat | European VAT Number |
Hong Kong | hk_br | Hong Kong BR Number |
Hungary | eu_vat | European VAT Number |
Hungary | hu_tin | Hungary Tax Number (adószám) |
Iceland | is_vat | Icelandic VAT |
India | in_gst | Indian GST Number |
Indonesia | id_npwp | Indonesian NPWP Number |
Ireland | eu_vat | European VAT Number |
Israel | il_vat | Israel VAT |
Italy | eu_vat | European VAT Number |
Japan | jp_cn | Japanese Corporate Number (Hōjin Bangō) |
Japan | jp_rn | Japanese Registered Foreign Businesses' Registration Number (Tōroku Kokugai Jigyōsha no Tōroku Bangō) |
Japan | jp_trn | Japanese Tax Registration Number (Tōroku Bangō) |
Kazakhstan | kz_bin | Kazakhstani Business Identification Number |
Kenya | ke_pin | Kenya Revenue Authority Personal Identification Number |
Latvia | eu_vat | European VAT Number |
Liechtenstein | li_uid | Liechtensteinian UID Number |
Lithuania | eu_vat | European VAT Number |
Luxembourg | eu_vat | European VAT Number |
Malaysia | my_frp | Malaysian FRP Number |
Malaysia | my_itn | Malaysian ITN |
Malaysia | my_sst | Malaysian SST Number |
Malta | eu_vat | European VAT Number |
Mexico | mx_rfc | Mexican RFC Number |
Netherlands | eu_vat | European VAT Number |
New Zealand | nz_gst | New Zealand GST Number |
Nigeria | ng_tin | Nigerian Tax Identification Number |
Norway | no_vat | Norwegian VAT Number |
Norway | no_voec | Norwegian VAT on e-commerce Number |
Oman | om_vat | Omani VAT Number |
Peru | pe_ruc | Peruvian RUC Number |
Philippines | ph_tin | Philippines Tax Identification Number |
Poland | eu_vat | European VAT Number |
Portugal | eu_vat | European VAT Number |
Romania | eu_vat | European VAT Number |
Romania | ro_tin | Romanian Tax ID Number |
Russia | ru_inn | Russian INN |
Russia | ru_kpp | Russian KPP |
Saudi Arabia | sa_vat | Saudi Arabia VAT |
Serbia | rs_pib | Serbian PIB Number |
Singapore | sg_gst | Singaporean GST |
Singapore | sg_uen | Singaporean UEN |
Slovakia | eu_vat | European VAT Number |
Slovenia | eu_vat | European VAT Number |
Slovenia | si_tin | Slovenia Tax Number (davčna številka) |
South Africa | za_vat | South African VAT Number |
South Korea | kr_brn | Korean BRN |
Spain | es_cif | Spanish NIF Number (previously Spanish CIF Number) |
Spain | eu_vat | European VAT Number |
Sweden | eu_vat | European VAT Number |
Switzerland | ch_vat | Switzerland VAT Number |
Taiwan | tw_vat | Taiwanese VAT |
Thailand | th_vat | Thai VAT |
Turkey | tr_tin | Turkish Tax Identification Number |
Ukraine | ua_vat | Ukrainian VAT |
United Arab Emirates | ae_trn | United Arab Emirates TRN |
United Kingdom | eu_vat | Northern Ireland VAT Number |
United Kingdom | gb_vat | United Kingdom VAT Number |
United States | us_ein | United States EIN |
Uruguay | uy_ruc | Uruguayan RUC Number |
Venezuela | ve_rif | Venezuelan RIF Number |
Vietnam | vn_tin | Vietnamese Tax ID Number |
AD
, AE
, AR
, AT
, AU
, BE
, BG
, BH
, BO
, BR
, CA
, CH
, CL
, CN
, CO
, CR
, CY
, CZ
, DE
, DK
, EE
, DO
, EC
, EG
, ES
, EU
, FI
, FR
, GB
, GE
, GR
, HK
, HR
, HU
, ID
, IE
, IL
, IN
, IS
, IT
, JP
, KE
, KR
, KZ
, LI
, LT
, LU
, LV
, MT
, MX
, MY
, NG
, NL
, NO
, NZ
, OM
, PE
, PH
, PL
, PT
, RO
, RS
, RU
, SA
, SE
, SG
, SI
, SK
, SV
, TH
, TR
, TW
, UA
, US
, UY
, VE
, VN
, ZA
ad_nrt
, ae_trn
, ar_cuit
, eu_vat
, au_abn
, au_arn
, bg_uic
, bh_vat
, bo_tin
, br_cnpj
, br_cpf
, ca_bn
, ca_gst_hst
, ca_pst_bc
, ca_pst_mb
, ca_pst_sk
, ca_qst
, ch_vat
, cl_tin
, cn_tin
, co_nit
, cr_tin
, do_rcn
, ec_ruc
, eg_tin
, es_cif
, eu_oss_vat
, gb_vat
, ge_vat
, hk_br
, hu_tin
, id_npwp
, il_vat
, in_gst
, is_vat
, jp_cn
, jp_rn
, jp_trn
, ke_pin
, kr_brn
, kz_bin
, li_uid
, mx_rfc
, my_frp
, my_itn
, my_sst
, ng_tin
, no_vat
, no_voec
, nz_gst
, om_vat
, pe_ruc
, ph_tin
, ro_tin
, rs_pib
, ru_inn
, ru_kpp
, sa_vat
, sg_gst
, sg_uen
, si_tin
, sv_nit
, th_vat
, tr_tin
, tw_vat
, ua_vat
, us_ein
, uy_ruc
, ve_rif
, vn_tin
, za_vat
Free-form text which is available on the invoice PDF and the Orb invoice portal.
A list of credit notes associated with the invoice
If the credit note has a status of void
, this gives a timestamp when the credit note was voided.
"2022-05-01T07:01:31+00:00"
An optional memo supplied on the credit note.
A list of payment attempts associated with the invoice
The ID of the payment attempt.
The payment provider that attempted to collect the payment.
stripe
The ID of the payment attempt in the payment provider.
The amount of the payment attempt.
Whether the payment attempt succeeded.
The time at which the payment attempt was created.
The scheduled date of the invoice
"2022-05-01T07:00:00+00:00"
The invoices that were voided as part of this operation.
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.
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
.
If the invoice has a status of void
, this gives a timestamp when the invoice was voided.
If the invoice has a status of paid
, this gives a timestamp when the invoice was paid.
If the invoice has been issued, this will be the time it transitioned to issued
(even if it is now in a different state.)
If the invoice is in draft, this timestamp will reflect when the invoice is scheduled to be issued.
If the invoice is scheduled for auto-collection, this field will reflect when the next attempt will occur. If dunning has been exhausted, or auto-collection is not enabled for this invoice, this field will be null
.
If Orb has ever attempted payment auto-collection for this invoice, this field will reflect when that attempt occurred. In conjunction with next_attempt_at
, this can be used to tell whether the invoice is currently in dunning (that is, previously_attempted_at
is non-null, and next_attempt_time
is non-null), or if dunning has been exhausted (previously_attempted_at
is non-null, but next_attempt_time
is null).
True only if auto-collection is enabled for this invoice.
Number of auto-collection payment attempts.
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.)
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.
If payment was attempted on this invoice but failed, this will be the time of the most recent attempt.
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.
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.
"8.00"
The creation time of the resource in Orb.
"2022-05-01T07:01:31+00:00"
An ISO 4217 currency string or credits
"USD"
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.
percentage
List of price_ids that this discount applies to. For plan/plan phase discounts, this can be a subset of prices.
["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"]
Only available if discount_type is percentage
. This is a number between 0 and 1.
0 <= x <= 1
0.15
When the invoice payment is due. The due date is null if the invoice is not yet finalized.
"2022-05-30T07:00:00+00:00"
The link to download the PDF representation of the Invoice
.
"https://assets.withorb.com/invoice/rUHdhmg45vY45DX/qEAeuYePaphGMdFb"
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.
"JYEFHK-00001"
The breakdown of prices in this invoice.
The final amount for a line item after all adjustments and pre paid credits have been applied.
"7.00"
percentage
List of price_ids that this discount applies to. For plan/plan phase discounts, this can be a subset of prices.
["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"]
Only available if discount_type is percentage
. This is a number between 0 and 1.
0 <= x <= 1
0.15
The end date of the range of time applied for this line item's price.
"2022-02-01T08:00:00+00:00"
[DEPRECATED] For configured prices that are split by a grouping key, this will be populated with the key and a value. The amount
and subtotal
will be the values for this particular grouping.
This field is deprecated in favor of adjustments
.
Minimum amount applied
List of price_ids that this minimum amount applies to. For plan/plan phase minimums, this can be a subset of prices.
This field is deprecated in favor of adjustments
.
This field is deprecated in favor of adjustments
.
Maximum amount applied
List of price_ids that this maximum amount applies to. For plan/plan phase maximums, this can be a subset of prices.
This field is deprecated in favor of adjustments
.
All adjustments applied to the line item in the order they were applied based on invoice calculations (ie. usage discounts -> amount discounts -> percentage discounts -> minimums -> maximums).
True for adjustments that apply to an entire invocice, false for adjustments that apply to only one price.
The price IDs that this adjustment applies to.
The reason for the adjustment.
usage_discount
The number of usage units by which to discount the price this adjustment applies to in a given billing period.
The value applied by an adjustment.
The name of the price associated with this line item.
"Fixed Fee"
Either the fixed fee quantity or the usage during the service period.
1
The start date of the range of time applied for this line item's price.
"2022-02-01T08:00:00+00:00"
The line amount before before any adjustments.
"9.00"
The line amount after any adjustments and before overage conversion, credits and partial invoicing.
"5.00"
The number of prepaid credits applied.
"6.00"
Any amount applied from a partial invoice
"4.00"
For complex pricing structures, the line item can be broken down further in sub_line_items
.
The total amount for this sub line item.
"9.00"
"Tier One"
5
matrix
An array of tax rates and their incurred tax amounts. Empty if no tax integration is configured.
The human-readable description of the applied tax rate.
The tax rate percentage, out of 100.
The amount of additional tax incurred by this tax rate.
A unique ID for this line item.
The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in the form of an invoice line item. Prices take a quantity and determine an amount to bill.
Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a given Price object. The model_type field determines the key for the configuration object that is present.
For more on the types of prices, see the core concepts documentation
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
.
usage_price
, fixed_price
unit
one_time
, monthly
, quarterly
, semi_annual
, annual
, custom
A list of customer ids that were used to calculate the usage for this line item.
An additional filter that was used to calculate the usage for this line item.
"VDGsT23osdLb84KD"
The total before any discounts and minimums are applied.
"8.00"
The total after any minimums and discounts have been applied.
"8.00"
A unique id for this transaction.
"cgZa3SXcsPTVyC4Y"
The creation time of this transaction.
"2022-05-01T07:01:31+00:00"
The original value of the customer's balance prior to the transaction, in the customer's currency.
"33.00"
The new value of the customer's balance prior to the transaction, in the customer's currency.
"22.00"
The value of the amount changed in the transaction.
"11.00"
applied_to_invoice
, manual_adjustment
, prorated_refund
, revert_prorated_refund
, return_from_voiding
, credit_note_applied
, credit_note_voided
, overpayment_refund
, external_payment
An optional description provided for manual customer balance adjustments.
"An optional description"
The Invoice id
"gXcsPTVyC4YZa3Sc"
increment
, decrement
issued
, paid
, synced
, void
, draft
subscription
, partial
, one_off
A URL for the customer-facing invoice portal. This URL expires 30 days after the invoice's due date, or 60 days after being re-generated through the UI.
This is true if the invoice will be automatically issued in the future, and false otherwise.
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.
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
Country | Type | Description |
---|---|---|
Andorra | ad_nrt | Andorran NRT Number |
Argentina | ar_cuit | Argentinian Tax ID Number |
Australia | au_abn | Australian Business Number (AU ABN) |
Australia | au_arn | Australian Taxation Office Reference Number |
Austria | eu_vat | European VAT Number |
Bahrain | bh_vat | Bahraini VAT Number |
Belgium | eu_vat | European VAT Number |
Bolivia | bo_tin | Bolivian Tax ID |
Brazil | br_cnpj | Brazilian CNPJ Number |
Brazil | br_cpf | Brazilian CPF Number |
Bulgaria | bg_uic | Bulgaria Unified Identification Code |
Bulgaria | eu_vat | European VAT Number |
Canada | ca_bn | Canadian BN |
Canada | ca_gst_hst | Canadian GST/HST Number |
Canada | ca_pst_bc | Canadian PST Number (British Columbia) |
Canada | ca_pst_mb | Canadian PST Number (Manitoba) |
Canada | ca_pst_sk | Canadian PST Number (Saskatchewan) |
Canada | ca_qst | Canadian QST Number (Québec) |
Chile | cl_tin | Chilean TIN |
China | cn_tin | Chinese Tax ID |
Colombia | co_nit | Colombian NIT Number |
Costa Rica | cr_tin | Costa Rican Tax ID |
Croatia | eu_vat | European VAT Number |
Cyprus | eu_vat | European VAT Number |
Czech Republic | eu_vat | European VAT Number |
Denmark | eu_vat | European VAT Number |
Dominican Republic | do_rcn | Dominican RCN Number |
Ecuador | ec_ruc | Ecuadorian RUC Number |
Egypt | eg_tin | Egyptian Tax Identification Number |
El Salvador | sv_nit | El Salvadorian NIT Number |
Estonia | eu_vat | European VAT Number |
EU | eu_oss_vat | European One Stop Shop VAT Number for non-Union scheme |
Finland | eu_vat | European VAT Number |
France | eu_vat | European VAT Number |
Georgia | ge_vat | Georgian VAT |
Germany | eu_vat | European VAT Number |
Greece | eu_vat | European VAT Number |
Hong Kong | hk_br | Hong Kong BR Number |
Hungary | eu_vat | European VAT Number |
Hungary | hu_tin | Hungary Tax Number (adószám) |
Iceland | is_vat | Icelandic VAT |
India | in_gst | Indian GST Number |
Indonesia | id_npwp | Indonesian NPWP Number |
Ireland | eu_vat | European VAT Number |
Israel | il_vat | Israel VAT |
Italy | eu_vat | European VAT Number |
Japan | jp_cn | Japanese Corporate Number (Hōjin Bangō) |
Japan | jp_rn | Japanese Registered Foreign Businesses' Registration Number (Tōroku Kokugai Jigyōsha no Tōroku Bangō) |
Japan | jp_trn | Japanese Tax Registration Number (Tōroku Bangō) |
Kazakhstan | kz_bin | Kazakhstani Business Identification Number |
Kenya | ke_pin | Kenya Revenue Authority Personal Identification Number |
Latvia | eu_vat | European VAT Number |
Liechtenstein | li_uid | Liechtensteinian UID Number |
Lithuania | eu_vat | European VAT Number |
Luxembourg | eu_vat | European VAT Number |
Malaysia | my_frp | Malaysian FRP Number |
Malaysia | my_itn | Malaysian ITN |
Malaysia | my_sst | Malaysian SST Number |
Malta | eu_vat | European VAT Number |
Mexico | mx_rfc | Mexican RFC Number |
Netherlands | eu_vat | European VAT Number |
New Zealand | nz_gst | New Zealand GST Number |
Nigeria | ng_tin | Nigerian Tax Identification Number |
Norway | no_vat | Norwegian VAT Number |
Norway | no_voec | Norwegian VAT on e-commerce Number |
Oman | om_vat | Omani VAT Number |
Peru | pe_ruc | Peruvian RUC Number |
Philippines | ph_tin | Philippines Tax Identification Number |
Poland | eu_vat | European VAT Number |
Portugal | eu_vat | European VAT Number |
Romania | eu_vat | European VAT Number |
Romania | ro_tin | Romanian Tax ID Number |
Russia | ru_inn | Russian INN |
Russia | ru_kpp | Russian KPP |
Saudi Arabia | sa_vat | Saudi Arabia VAT |
Serbia | rs_pib | Serbian PIB Number |
Singapore | sg_gst | Singaporean GST |
Singapore | sg_uen | Singaporean UEN |
Slovakia | eu_vat | European VAT Number |
Slovenia | eu_vat | European VAT Number |
Slovenia | si_tin | Slovenia Tax Number (davčna številka) |
South Africa | za_vat | South African VAT Number |
South Korea | kr_brn | Korean BRN |
Spain | es_cif | Spanish NIF Number (previously Spanish CIF Number) |
Spain | eu_vat | European VAT Number |
Sweden | eu_vat | European VAT Number |
Switzerland | ch_vat | Switzerland VAT Number |
Taiwan | tw_vat | Taiwanese VAT |
Thailand | th_vat | Thai VAT |
Turkey | tr_tin | Turkish Tax Identification Number |
Ukraine | ua_vat | Ukrainian VAT |
United Arab Emirates | ae_trn | United Arab Emirates TRN |
United Kingdom | eu_vat | Northern Ireland VAT Number |
United Kingdom | gb_vat | United Kingdom VAT Number |
United States | us_ein | United States EIN |
Uruguay | uy_ruc | Uruguayan RUC Number |
Venezuela | ve_rif | Venezuelan RIF Number |
Vietnam | vn_tin | Vietnamese Tax ID Number |
AD
, AE
, AR
, AT
, AU
, BE
, BG
, BH
, BO
, BR
, CA
, CH
, CL
, CN
, CO
, CR
, CY
, CZ
, DE
, DK
, EE
, DO
, EC
, EG
, ES
, EU
, FI
, FR
, GB
, GE
, GR
, HK
, HR
, HU
, ID
, IE
, IL
, IN
, IS
, IT
, JP
, KE
, KR
, KZ
, LI
, LT
, LU
, LV
, MT
, MX
, MY
, NG
, NL
, NO
, NZ
, OM
, PE
, PH
, PL
, PT
, RO
, RS
, RU
, SA
, SE
, SG
, SI
, SK
, SV
, TH
, TR
, TW
, UA
, US
, UY
, VE
, VN
, ZA
ad_nrt
, ae_trn
, ar_cuit
, eu_vat
, au_abn
, au_arn
, bg_uic
, bh_vat
, bo_tin
, br_cnpj
, br_cpf
, ca_bn
, ca_gst_hst
, ca_pst_bc
, ca_pst_mb
, ca_pst_sk
, ca_qst
, ch_vat
, cl_tin
, cn_tin
, co_nit
, cr_tin
, do_rcn
, ec_ruc
, eg_tin
, es_cif
, eu_oss_vat
, gb_vat
, ge_vat
, hk_br
, hu_tin
, id_npwp
, il_vat
, in_gst
, is_vat
, jp_cn
, jp_rn
, jp_trn
, ke_pin
, kr_brn
, kz_bin
, li_uid
, mx_rfc
, my_frp
, my_itn
, my_sst
, ng_tin
, no_vat
, no_voec
, nz_gst
, om_vat
, pe_ruc
, ph_tin
, ro_tin
, rs_pib
, ru_inn
, ru_kpp
, sa_vat
, sg_gst
, sg_uen
, si_tin
, sv_nit
, th_vat
, tr_tin
, tw_vat
, ua_vat
, us_ein
, uy_ruc
, ve_rif
, vn_tin
, za_vat
Free-form text which is available on the invoice PDF and the Orb invoice portal.
A list of credit notes associated with the invoice
If the credit note has a status of void
, this gives a timestamp when the credit note was voided.
"2022-05-01T07:01:31+00:00"
An optional memo supplied on the credit note.
A list of payment attempts associated with the invoice
The ID of the payment attempt.
The payment provider that attempted to collect the payment.
stripe
The ID of the payment attempt in the payment provider.
The amount of the payment attempt.
Whether the payment attempt succeeded.
The time at which the payment attempt was created.
The scheduled date of the invoice
"2022-05-01T07:00:00+00:00"
Was this page helpful?
curl --request POST \
--url https://api.withorb.com/v1/subscriptions/{subscription_id}/price_intervals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"add": [
{
"usage_customer_ids": [
"<string>"
],
"filter": "my_property > 100 AND my_other_property = '\''bar'\''",
"price_id": "h74gfhdjvn7ujokd",
"external_price_id": "external_price_id",
"price": {
"metadata": {},
"external_price_id": "<string>",
"name": "Annual fee",
"billable_metric_id": "<string>",
"item_id": "<string>",
"billed_in_advance": true,
"fixed_price_quantity": 123,
"invoice_grouping_key": "<string>",
"cadence": "annual",
"billing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"invoicing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"conversion_rate": 123,
"model_type": "unit",
"unit_config": {
"unit_amount": "<string>"
},
"currency": "<string>"
},
"allocation_price": {
"currency": "USD",
"amount": "10.00",
"cadence": "monthly",
"expires_at_end_of_cadence": true
},
"start_date": "2023-05-01",
"end_date": "2023-07-10",
"fixed_fee_quantity_transitions": [
{
"quantity": 5,
"effective_date": "2023-05-01"
}
],
"discounts": [
{
"discount_type": "amount",
"amount_discount": "10.00"
}
],
"minimum_amount": "1.23",
"maximum_amount": "1.23"
}
],
"edit": [
{
"usage_customer_ids": [
"<string>"
],
"filter": "my_property > 100 AND my_other_property = '\''bar'\''",
"price_interval_id": "sdfs6wdjvn7ujokd",
"start_date": "2023-05-01",
"end_date": "2023-07-10",
"fixed_fee_quantity_transitions": [
{
"quantity": 5,
"effective_date": "2023-05-01"
}
],
"billing_cycle_day": 123
}
],
"add_adjustments": [
{
"adjustment": {
"applies_to_price_ids": [
"price_1",
"price_2"
],
"is_invoice_level": true,
"adjustment_type": "percentage_discount",
"percentage_discount": 123
},
"start_date": "2023-05-01",
"end_date": "2023-07-10"
}
],
"edit_adjustments": [
{
"adjustment_interval_id": "sdfs6wdjvn7ujokd",
"start_date": "2023-05-01",
"end_date": "2023-07-10"
}
],
"allow_invoice_credit_or_void": true
}'
{
"metadata": {},
"id": "<string>",
"customer": {
"metadata": {},
"id": "<string>",
"external_customer_id": "<string>",
"name": "<string>",
"email": "<string>",
"timezone": "<string>",
"payment_provider_id": "<string>",
"payment_provider": "quickbooks",
"created_at": "2023-11-07T05:31:56Z",
"shipping_address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"billing_address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"balance": "<string>",
"currency": "<string>",
"tax_id": {
"country": "AD",
"type": "ad_nrt",
"value": "<string>"
},
"auto_collection": true,
"exempt_from_automated_tax": true,
"email_delivery": true,
"additional_emails": [
"<string>"
],
"portal_url": "<string>",
"accounting_sync_configuration": {
"excluded": true,
"accounting_providers": [
{
"provider_type": "quickbooks",
"external_provider_id": "<string>"
}
]
},
"reporting_configuration": {
"exempt": true
},
"hierarchy": {
"parent": {
"id": "<string>",
"external_customer_id": "<string>"
},
"children": [
{
"id": "<string>",
"external_customer_id": "<string>"
}
]
}
},
"plan": {
"metadata": {},
"id": "<string>",
"name": "<string>",
"description": "<string>",
"maximum_amount": "<string>",
"minimum_amount": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"status": "active",
"maximum": {
"maximum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"minimum": {
"minimum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"discount": {
"discount_type": "percentage",
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"reason": "<string>",
"percentage_discount": 0.15
},
"product": {
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"name": "<string>"
},
"version": 123,
"trial_config": {
"trial_period": 123,
"trial_period_unit": "days"
},
"plan_phases": [
{
"id": "<string>",
"description": "<string>",
"duration": 123,
"duration_unit": "daily",
"name": "<string>",
"order": 123,
"minimum": {
"minimum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"maximum": {
"maximum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"minimum_amount": "<string>",
"discount": {
"discount_type": "percentage",
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"reason": "<string>",
"percentage_discount": 0.15
}
}
],
"base_plan": {
"id": "m2t5akQeh2obwxeU",
"external_plan_id": "m2t5akQeh2obwxeU",
"name": "Example plan"
},
"base_plan_id": "<string>",
"external_plan_id": "<string>",
"currency": "<string>",
"invoicing_currency": "<string>",
"net_terms": 123,
"default_invoice_memo": "<string>",
"prices": [
{
"metadata": {},
"id": "<string>",
"name": "<string>",
"external_price_id": "<string>",
"price_type": "usage_price",
"model_type": "unit",
"created_at": "2023-11-07T05:31:56Z",
"cadence": "one_time",
"billing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"invoicing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"billable_metric": {
"id": "<string>"
},
"dimensional_price_configuration": {
"dimensional_price_group_id": "<string>",
"dimension_values": [
"<string>"
]
},
"fixed_price_quantity": 123,
"plan_phase_order": 123,
"currency": "<string>",
"conversion_rate": 123,
"item": {
"id": "<string>",
"name": "<string>"
},
"credit_allocation": {
"currency": "<string>",
"allows_rollover": true
},
"discount": {
"discount_type": "percentage",
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"reason": "<string>",
"percentage_discount": 0.15
},
"minimum": {
"minimum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"unit_config": {
"unit_amount": "<string>"
}
}
],
"adjustments": [
{
"id": "<string>",
"is_invoice_level": true,
"applies_to_price_ids": [
"<string>"
],
"reason": "<string>",
"adjustment_type": "usage_discount",
"usage_discount": 123,
"plan_phase_order": 123
}
]
},
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"current_billing_period_start_date": "2023-11-07T05:31:56Z",
"current_billing_period_end_date": "2023-11-07T05:31:56Z",
"status": "active",
"trial_info": {
"end_date": "2023-11-07T05:31:56Z"
},
"active_plan_phase_order": 123,
"fixed_fee_quantity_schedule": [
{
"price_id": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"quantity": 123
}
],
"default_invoice_memo": "<string>",
"auto_collection": true,
"net_terms": 123,
"redeemed_coupon": {
"coupon_id": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z"
},
"billing_cycle_day": 16,
"billing_cycle_anchor_configuration": {
"day": 16,
"month": 6,
"year": 123
},
"invoicing_threshold": "<string>",
"price_intervals": [
{
"id": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"price": {
"metadata": {},
"id": "<string>",
"name": "<string>",
"external_price_id": "<string>",
"price_type": "usage_price",
"model_type": "unit",
"created_at": "2023-11-07T05:31:56Z",
"cadence": "one_time",
"billing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"invoicing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"billable_metric": {
"id": "<string>"
},
"dimensional_price_configuration": {
"dimensional_price_group_id": "<string>",
"dimension_values": [
"<string>"
]
},
"fixed_price_quantity": 123,
"plan_phase_order": 123,
"currency": "<string>",
"conversion_rate": 123,
"item": {
"id": "<string>",
"name": "<string>"
},
"credit_allocation": {
"currency": "<string>",
"allows_rollover": true
},
"discount": {
"discount_type": "percentage",
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"reason": "<string>",
"percentage_discount": 0.15
},
"minimum": {
"minimum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"unit_config": {
"unit_amount": "<string>"
}
},
"billing_cycle_day": 123,
"fixed_fee_quantity_transitions": [
{
"price_id": "<string>",
"effective_date": "2023-11-07T05:31:56Z",
"quantity": 123
}
],
"current_billing_period_start_date": "2023-11-07T05:31:56Z",
"current_billing_period_end_date": "2023-11-07T05:31:56Z",
"filter": "<string>",
"usage_customer_ids": [
"<string>"
]
}
],
"adjustment_intervals": [
{
"id": "<string>",
"adjustment": {
"id": "<string>",
"is_invoice_level": true,
"applies_to_price_ids": [
"<string>"
],
"reason": "<string>",
"adjustment_type": "usage_discount",
"usage_discount": 123,
"plan_phase_order": 123
},
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"applies_to_price_interval_ids": [
"<string>"
]
}
],
"discount_intervals": [
{
"discount_type": "amount",
"amount_discount": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"applies_to_price_ids": [
"<string>"
],
"applies_to_price_interval_ids": [
"<string>"
]
}
],
"minimum_intervals": [
{
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"applies_to_price_ids": [
"<string>"
],
"applies_to_price_interval_ids": [
"<string>"
],
"minimum_amount": "<string>"
}
],
"maximum_intervals": [
{
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"applies_to_price_ids": [
"<string>"
],
"applies_to_price_interval_ids": [
"<string>"
],
"maximum_amount": "<string>"
}
],
"pending_subscription_change": {
"id": "<string>"
},
"changed_resources": {
"created_credit_notes": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"voided_at": "2023-11-07T05:31:56Z",
"credit_note_number": "<string>",
"invoice_id": "<string>",
"memo": "<string>",
"reason": "Duplicate",
"type": "refund",
"subtotal": "<string>",
"total": "<string>",
"customer": {
"id": "<string>",
"external_customer_id": "<string>"
},
"credit_note_pdf": "<string>",
"minimum_amount_refunded": "<string>",
"discounts": [
{
"discount_type": "percentage",
"percentage_discount": 123,
"amount_applied": "<string>",
"reason": "<string>",
"applies_to_prices": [
{
"id": "<string>",
"name": "<string>"
}
]
}
],
"maximum_amount_adjustment": {
"discount_type": "percentage",
"percentage_discount": 123,
"amount_applied": "<string>",
"reason": "<string>",
"applies_to_prices": [
{
"id": "<string>",
"name": "<string>"
}
]
},
"line_items": [
{
"id": "<string>",
"name": "<string>",
"subtotal": "<string>",
"amount": "<string>",
"quantity": 123,
"discounts": [
{
"id": "<string>",
"discount_type": "percentage",
"percentage_discount": 123,
"amount_discount": "<string>",
"amount_applied": "<string>",
"reason": "<string>",
"applies_to_price_ids": [
"<string>"
]
}
],
"tax_amounts": [
{
"tax_rate_description": "<string>",
"tax_rate_percentage": "<string>",
"amount": "<string>"
}
],
"item_id": "<string>"
}
]
}
],
"voided_credit_notes": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"voided_at": "2023-11-07T05:31:56Z",
"credit_note_number": "<string>",
"invoice_id": "<string>",
"memo": "<string>",
"reason": "Duplicate",
"type": "refund",
"subtotal": "<string>",
"total": "<string>",
"customer": {
"id": "<string>",
"external_customer_id": "<string>"
},
"credit_note_pdf": "<string>",
"minimum_amount_refunded": "<string>",
"discounts": [
{
"discount_type": "percentage",
"percentage_discount": 123,
"amount_applied": "<string>",
"reason": "<string>",
"applies_to_prices": [
{
"id": "<string>",
"name": "<string>"
}
]
}
],
"maximum_amount_adjustment": {
"discount_type": "percentage",
"percentage_discount": 123,
"amount_applied": "<string>",
"reason": "<string>",
"applies_to_prices": [
{
"id": "<string>",
"name": "<string>"
}
]
},
"line_items": [
{
"id": "<string>",
"name": "<string>",
"subtotal": "<string>",
"amount": "<string>",
"quantity": 123,
"discounts": [
{
"id": "<string>",
"discount_type": "percentage",
"percentage_discount": 123,
"amount_discount": "<string>",
"amount_applied": "<string>",
"reason": "<string>",
"applies_to_price_ids": [
"<string>"
]
}
],
"tax_amounts": [
{
"tax_rate_description": "<string>",
"tax_rate_percentage": "<string>",
"amount": "<string>"
}
],
"item_id": "<string>"
}
]
}
],
"created_invoices": [
{
"metadata": {},
"voided_at": "2023-11-07T05:31:56Z",
"paid_at": "2023-11-07T05:31:56Z",
"issued_at": "2023-11-07T05:31:56Z",
"scheduled_issue_at": "2023-11-07T05:31:56Z",
"auto_collection": {
"next_attempt_at": "2023-11-07T05:31:56Z",
"previously_attempted_at": "2023-11-07T05:31:56Z",
"enabled": true,
"num_attempts": 123
},
"issue_failed_at": "2023-11-07T05:31:56Z",
"sync_failed_at": "2023-11-07T05:31:56Z",
"payment_failed_at": "2023-11-07T05:31:56Z",
"payment_started_at": "2023-11-07T05:31:56Z",
"amount_due": "8.00",
"created_at": "2022-05-01T07:01:31+00:00",
"currency": "USD",
"customer": {
"id": "<string>",
"external_customer_id": "<string>"
},
"discount": "<any>",
"discounts": [
{
"discount_type": "percentage",
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"reason": "<string>",
"percentage_discount": 0.15
}
],
"due_date": "2022-05-30T07:00:00+00:00",
"id": "<string>",
"invoice_pdf": "https://assets.withorb.com/invoice/rUHdhmg45vY45DX/qEAeuYePaphGMdFb",
"invoice_number": "JYEFHK-00001",
"minimum": {
"minimum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"line_items": [
{
"amount": "7.00",
"discount": {
"discount_type": "percentage",
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"reason": "<string>",
"percentage_discount": 0.15
},
"end_date": "2022-02-01T08:00:00+00:00",
"grouping": "<string>",
"minimum": {
"minimum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"adjustments": [
{
"id": "<string>",
"is_invoice_level": true,
"applies_to_price_ids": [
"<string>"
],
"reason": "<string>",
"adjustment_type": "usage_discount",
"usage_discount": 123,
"amount": "<string>"
}
],
"name": "Fixed Fee",
"quantity": 1,
"start_date": "2022-02-01T08:00:00+00:00",
"subtotal": "9.00",
"adjusted_subtotal": "5.00",
"credits_applied": "6.00",
"partially_invoiced_amount": "4.00",
"sub_line_items": [
{
"amount": "9.00",
"name": "Tier One",
"quantity": 5,
"grouping": {
"key": "region",
"value": "west"
},
"type": "matrix",
"matrix_config": {
"dimension_values": [
"<string>"
]
}
}
],
"tax_amounts": [
{
"tax_rate_description": "<string>",
"tax_rate_percentage": "<string>",
"amount": "<string>"
}
],
"id": "<string>",
"price": {
"metadata": {},
"id": "<string>",
"name": "<string>",
"external_price_id": "<string>",
"price_type": "usage_price",
"model_type": "unit",
"created_at": "2023-11-07T05:31:56Z",
"cadence": "one_time",
"billing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"invoicing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"billable_metric": {
"id": "<string>"
},
"dimensional_price_configuration": {
"dimensional_price_group_id": "<string>",
"dimension_values": [
"<string>"
]
},
"fixed_price_quantity": 123,
"plan_phase_order": 123,
"currency": "<string>",
"conversion_rate": 123,
"item": {
"id": "<string>",
"name": "<string>"
},
"credit_allocation": {
"currency": "<string>",
"allows_rollover": true
},
"discount": {
"discount_type": "percentage",
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"reason": "<string>",
"percentage_discount": 0.15
},
"minimum": {
"minimum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"unit_config": {
"unit_amount": "<string>"
}
},
"usage_customer_ids": [
"<string>"
],
"filter": "<string>"
}
],
"subscription": {
"id": "VDGsT23osdLb84KD"
},
"subtotal": "8.00",
"total": "8.00",
"customer_balance_transactions": [
{
"id": "cgZa3SXcsPTVyC4Y",
"created_at": "2022-05-01T07:01:31+00:00",
"starting_balance": "33.00",
"ending_balance": "22.00",
"amount": "11.00",
"action": "applied_to_invoice",
"description": "An optional description",
"invoice": {
"id": "gXcsPTVyC4YZa3Sc"
},
"type": "increment",
"credit_note": {
"id": "<string>"
}
}
],
"status": "issued",
"invoice_source": "subscription",
"shipping_address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"billing_address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"hosted_invoice_url": "<string>",
"will_auto_issue": true,
"eligible_to_issue_at": "2023-11-07T05:31:56Z",
"customer_tax_id": {
"country": "AD",
"type": "ad_nrt",
"value": "<string>"
},
"memo": "<string>",
"credit_notes": [
{
"id": "<string>",
"credit_note_number": "<string>",
"reason": "<string>",
"total": "<string>",
"voided_at": "2022-05-01T07:01:31+00:00",
"type": "<string>",
"memo": "<string>"
}
],
"payment_attempts": [
{
"id": "<string>",
"payment_provider": "stripe",
"payment_provider_id": "<string>",
"amount": "<string>",
"succeeded": true,
"created_at": "2023-11-07T05:31:56Z"
}
],
"invoice_date": "2022-05-01T07:00:00+00:00"
}
],
"voided_invoices": [
{
"metadata": {},
"voided_at": "2023-11-07T05:31:56Z",
"paid_at": "2023-11-07T05:31:56Z",
"issued_at": "2023-11-07T05:31:56Z",
"scheduled_issue_at": "2023-11-07T05:31:56Z",
"auto_collection": {
"next_attempt_at": "2023-11-07T05:31:56Z",
"previously_attempted_at": "2023-11-07T05:31:56Z",
"enabled": true,
"num_attempts": 123
},
"issue_failed_at": "2023-11-07T05:31:56Z",
"sync_failed_at": "2023-11-07T05:31:56Z",
"payment_failed_at": "2023-11-07T05:31:56Z",
"payment_started_at": "2023-11-07T05:31:56Z",
"amount_due": "8.00",
"created_at": "2022-05-01T07:01:31+00:00",
"currency": "USD",
"customer": {
"id": "<string>",
"external_customer_id": "<string>"
},
"discount": "<any>",
"discounts": [
{
"discount_type": "percentage",
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"reason": "<string>",
"percentage_discount": 0.15
}
],
"due_date": "2022-05-30T07:00:00+00:00",
"id": "<string>",
"invoice_pdf": "https://assets.withorb.com/invoice/rUHdhmg45vY45DX/qEAeuYePaphGMdFb",
"invoice_number": "JYEFHK-00001",
"minimum": {
"minimum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"line_items": [
{
"amount": "7.00",
"discount": {
"discount_type": "percentage",
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"reason": "<string>",
"percentage_discount": 0.15
},
"end_date": "2022-02-01T08:00:00+00:00",
"grouping": "<string>",
"minimum": {
"minimum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"adjustments": [
{
"id": "<string>",
"is_invoice_level": true,
"applies_to_price_ids": [
"<string>"
],
"reason": "<string>",
"adjustment_type": "usage_discount",
"usage_discount": 123,
"amount": "<string>"
}
],
"name": "Fixed Fee",
"quantity": 1,
"start_date": "2022-02-01T08:00:00+00:00",
"subtotal": "9.00",
"adjusted_subtotal": "5.00",
"credits_applied": "6.00",
"partially_invoiced_amount": "4.00",
"sub_line_items": [
{
"amount": "9.00",
"name": "Tier One",
"quantity": 5,
"grouping": {
"key": "region",
"value": "west"
},
"type": "matrix",
"matrix_config": {
"dimension_values": [
"<string>"
]
}
}
],
"tax_amounts": [
{
"tax_rate_description": "<string>",
"tax_rate_percentage": "<string>",
"amount": "<string>"
}
],
"id": "<string>",
"price": {
"metadata": {},
"id": "<string>",
"name": "<string>",
"external_price_id": "<string>",
"price_type": "usage_price",
"model_type": "unit",
"created_at": "2023-11-07T05:31:56Z",
"cadence": "one_time",
"billing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"invoicing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"billable_metric": {
"id": "<string>"
},
"dimensional_price_configuration": {
"dimensional_price_group_id": "<string>",
"dimension_values": [
"<string>"
]
},
"fixed_price_quantity": 123,
"plan_phase_order": 123,
"currency": "<string>",
"conversion_rate": 123,
"item": {
"id": "<string>",
"name": "<string>"
},
"credit_allocation": {
"currency": "<string>",
"allows_rollover": true
},
"discount": {
"discount_type": "percentage",
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"reason": "<string>",
"percentage_discount": 0.15
},
"minimum": {
"minimum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"unit_config": {
"unit_amount": "<string>"
}
},
"usage_customer_ids": [
"<string>"
],
"filter": "<string>"
}
],
"subscription": {
"id": "VDGsT23osdLb84KD"
},
"subtotal": "8.00",
"total": "8.00",
"customer_balance_transactions": [
{
"id": "cgZa3SXcsPTVyC4Y",
"created_at": "2022-05-01T07:01:31+00:00",
"starting_balance": "33.00",
"ending_balance": "22.00",
"amount": "11.00",
"action": "applied_to_invoice",
"description": "An optional description",
"invoice": {
"id": "gXcsPTVyC4YZa3Sc"
},
"type": "increment",
"credit_note": {
"id": "<string>"
}
}
],
"status": "issued",
"invoice_source": "subscription",
"shipping_address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"billing_address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"hosted_invoice_url": "<string>",
"will_auto_issue": true,
"eligible_to_issue_at": "2023-11-07T05:31:56Z",
"customer_tax_id": {
"country": "AD",
"type": "ad_nrt",
"value": "<string>"
},
"memo": "<string>",
"credit_notes": [
{
"id": "<string>",
"credit_note_number": "<string>",
"reason": "<string>",
"total": "<string>",
"voided_at": "2022-05-01T07:01:31+00:00",
"type": "<string>",
"memo": "<string>"
}
],
"payment_attempts": [
{
"id": "<string>",
"payment_provider": "stripe",
"payment_provider_id": "<string>",
"amount": "<string>",
"succeeded": true,
"created_at": "2023-11-07T05:31:56Z"
}
],
"invoice_date": "2022-05-01T07:00:00+00:00"
}
]
}
}