curl --request POST \
--url https://api.withorb.com/v1/subscriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"usage_customer_ids": [
"<string>"
],
"filter": "my_property > 100 AND my_other_property = 'bar'",
"metadata": {},
"plan_id": "ZMwNQefe7J3ecf7W",
"external_plan_id": "ZMwNQefe7J3ecf7W",
"price_overrides": [
"<unknown>"
],
"per_credit_overage_amount": 123,
"credits_overage_rate": 123,
"trial_duration_days": 500000,
"net_terms": 123,
"auto_collection": true,
"default_invoice_memo": "<string>",
"coupon_redemption_code": "<string>",
"invoicing_threshold": "10.00",
"initial_phase_order": 2,
"add_prices": [
{
"price_id": "h74gfhdjvn7ujokd",
"external_price_id": "external_price_id",
"price": {
"model_type": "unit",
"unit_config": {
"unit_amount": "<string>",
"prorated": false
},
"name": "<string>",
"item_id": "<string>",
"cadence": "annual",
"metadata": {},
"external_price_id": "<string>",
"dimensional_price_configuration": {
"dimension_values": [
"<string>"
],
"dimensional_price_group_id": "<string>",
"external_dimensional_price_group_id": "<string>"
},
"billable_metric_id": "<string>",
"billed_in_advance": true,
"fixed_price_quantity": 123,
"invoice_grouping_key": "<string>",
"billing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"invoicing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"conversion_rate": 123,
"conversion_rate_config": {
"conversion_rate_type": "unit",
"unit_config": {
"unit_amount": "<string>"
}
},
"currency": "<string>",
"reference_id": "<string>"
},
"allocation_price": {
"currency": "<string>",
"amount": "<string>",
"cadence": "one_time",
"expires_at_end_of_cadence": true,
"custom_expiration": {
"duration": 123,
"duration_unit": "day"
},
"filters": [
{
"field": "item_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"per_unit_cost_basis": "0.00",
"item_id": "<string>"
},
"start_date": "2023-05-01",
"end_date": "2023-07-10",
"plan_phase_order": 123,
"minimum_amount": "1.23",
"maximum_amount": "1.23",
"discounts": [
{
"discount_type": "percentage",
"percentage_discount": 0.15,
"usage_discount": 123,
"amount_discount": "<string>"
}
]
}
],
"remove_prices": [
{
"price_id": "h74gfhdjvn7ujokd",
"external_price_id": "external_price_id"
}
],
"replace_prices": [
{
"replaces_price_id": "<string>",
"price_id": "h74gfhdjvn7ujokd",
"external_price_id": "external_price_id",
"price": {
"model_type": "unit",
"unit_config": {
"unit_amount": "<string>",
"prorated": false
},
"name": "<string>",
"item_id": "<string>",
"cadence": "annual",
"metadata": {},
"external_price_id": "<string>",
"dimensional_price_configuration": {
"dimension_values": [
"<string>"
],
"dimensional_price_group_id": "<string>",
"external_dimensional_price_group_id": "<string>"
},
"billable_metric_id": "<string>",
"billed_in_advance": true,
"fixed_price_quantity": 123,
"invoice_grouping_key": "<string>",
"billing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"invoicing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"conversion_rate": 123,
"conversion_rate_config": {
"conversion_rate_type": "unit",
"unit_config": {
"unit_amount": "<string>"
}
},
"currency": "<string>",
"reference_id": "<string>"
},
"allocation_price": {
"currency": "<string>",
"amount": "<string>",
"cadence": "one_time",
"expires_at_end_of_cadence": true,
"custom_expiration": {
"duration": 123,
"duration_unit": "day"
},
"filters": [
{
"field": "item_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"per_unit_cost_basis": "0.00",
"item_id": "<string>"
},
"fixed_price_quantity": 2,
"minimum_amount": "1.23",
"maximum_amount": "1.23",
"discounts": [
{
"discount_type": "percentage",
"percentage_discount": 0.15,
"usage_discount": 123,
"amount_discount": "<string>"
}
]
}
],
"add_adjustments": [
{
"adjustment": {
"adjustment_type": "percentage_discount",
"percentage_discount": 123,
"applies_to_price_ids": [
"price_1",
"price_2"
],
"applies_to_item_ids": [
"item_1",
"item_2"
],
"applies_to_all": true,
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"currency": [
"USD",
"JPY",
"credits"
],
"price_type": "usage",
"is_invoice_level": true
},
"start_date": "2023-05-01",
"end_date": "2023-07-10",
"plan_phase_order": 123
}
],
"remove_adjustments": [
{
"adjustment_id": "<string>"
}
],
"replace_adjustments": [
{
"adjustment": {
"adjustment_type": "percentage_discount",
"percentage_discount": 123,
"applies_to_price_ids": [
"price_1",
"price_2"
],
"applies_to_item_ids": [
"item_1",
"item_2"
],
"applies_to_all": true,
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"currency": [
"USD",
"JPY",
"credits"
],
"price_type": "usage",
"is_invoice_level": true
},
"replaces_adjustment_id": "<string>"
}
],
"customer_id": "<string>",
"external_customer_id": "<string>",
"currency": "<string>",
"name": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"plan_version_number": 123,
"external_marketplace": "google",
"external_marketplace_reporting_id": "<string>",
"aws_region": "<string>",
"align_billing_with_subscription_start_date": false,
"billing_cycle_anchor_configuration": {
"day": 16,
"month": 6,
"year": 123
}
}
EOF{
"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,
"auto_issuance": true,
"additional_emails": [
"<string>"
],
"portal_url": "<string>",
"hierarchy": {
"parent": {
"id": "<string>",
"external_customer_id": "<string>"
},
"children": [
{
"id": "<string>",
"external_customer_id": "<string>"
}
]
},
"accounting_sync_configuration": {
"excluded": true,
"accounting_providers": [
{
"provider_type": "quickbooks",
"external_provider_id": "<string>"
}
]
},
"reporting_configuration": {
"exempt": true
},
"payment_configuration": {
"payment_providers": []
},
"automatic_tax_enabled": true
},
"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>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"minimum": {
"minimum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"discount": {
"discount_type": "percentage",
"percentage_discount": 0.5,
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"reason": "<string>"
},
"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>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"maximum": {
"maximum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"minimum_amount": "<string>",
"discount": {
"discount_type": "percentage",
"percentage_discount": 0.5,
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"reason": "<string>"
}
}
],
"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": [
{
"model_type": "unit",
"unit_config": {
"unit_amount": "<string>",
"prorated": false
},
"metadata": {},
"id": "<string>",
"name": "<string>",
"external_price_id": "<string>",
"replaces_price_id": "<string>",
"price_type": "usage_price",
"created_at": "2023-11-07T05:31:56Z",
"cadence": "one_time",
"billing_mode": "in_advance",
"billing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"invoicing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"billable_metric": {
"id": "<string>"
},
"fixed_price_quantity": 123,
"plan_phase_order": 123,
"currency": "<string>",
"conversion_rate": 123,
"conversion_rate_config": {
"conversion_rate_type": "unit",
"unit_config": {
"unit_amount": "<string>"
}
},
"item": {
"id": "<string>",
"name": "<string>"
},
"credit_allocation": {
"currency": "<string>",
"allows_rollover": true,
"custom_expiration": {
"duration": 123,
"duration_unit": "day"
},
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
]
},
"composite_price_filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"discount": {
"discount_type": "percentage",
"percentage_discount": 0.5,
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"reason": "<string>"
},
"minimum": {
"minimum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"dimensional_price_configuration": {
"dimensional_price_group_id": "<string>",
"dimension_values": [
"<string>"
]
}
}
],
"adjustments": [
{
"id": "<string>",
"is_invoice_level": true,
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
],
"reason": "<string>",
"replaces_adjustment_id": "<string>",
"adjustment_type": "usage_discount",
"usage_discount": 123,
"plan_phase_order": 123
}
]
},
"name": "<string>",
"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": {
"model_type": "unit",
"unit_config": {
"unit_amount": "<string>",
"prorated": false
},
"metadata": {},
"id": "<string>",
"name": "<string>",
"external_price_id": "<string>",
"replaces_price_id": "<string>",
"price_type": "usage_price",
"created_at": "2023-11-07T05:31:56Z",
"cadence": "one_time",
"billing_mode": "in_advance",
"billing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"invoicing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"billable_metric": {
"id": "<string>"
},
"fixed_price_quantity": 123,
"plan_phase_order": 123,
"currency": "<string>",
"conversion_rate": 123,
"conversion_rate_config": {
"conversion_rate_type": "unit",
"unit_config": {
"unit_amount": "<string>"
}
},
"item": {
"id": "<string>",
"name": "<string>"
},
"credit_allocation": {
"currency": "<string>",
"allows_rollover": true,
"custom_expiration": {
"duration": 123,
"duration_unit": "day"
},
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
]
},
"composite_price_filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"discount": {
"discount_type": "percentage",
"percentage_discount": 0.5,
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"reason": "<string>"
},
"minimum": {
"minimum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"dimensional_price_configuration": {
"dimensional_price_group_id": "<string>",
"dimension_values": [
"<string>"
]
}
},
"billing_cycle_day": 123,
"can_defer_billing": true,
"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,
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
],
"reason": "<string>",
"replaces_adjustment_id": "<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",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_interval_ids": [
"<string>"
]
}
],
"minimum_intervals": [
{
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<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",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<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>",
"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,
"tax_amounts": [
{
"tax_rate_description": "<string>",
"tax_rate_percentage": "<string>",
"amount": "<string>"
}
],
"item_id": "<string>",
"discounts": [],
"start_time_inclusive": "2023-11-07T05:31:56Z",
"end_time_exclusive": "2023-11-07T05:31:56Z"
}
],
"discounts": []
}
],
"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>",
"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,
"tax_amounts": [
{
"tax_rate_description": "<string>",
"tax_rate_percentage": "<string>",
"amount": "<string>"
}
],
"item_id": "<string>",
"discounts": [],
"start_time_inclusive": "2023-11-07T05:31:56Z",
"end_time_exclusive": "2023-11-07T05:31:56Z"
}
],
"discounts": []
}
],
"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": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"currency": "<string>",
"customer": {
"id": "<string>",
"external_customer_id": "<string>"
},
"due_date": "2022-05-30T07:00:00+00:00",
"id": "<string>",
"invoice_pdf": "https://assets.withorb.com/invoice/rUHdhmg45vY45DX/qEAeuYePaphGMdFb",
"invoice_number": "<string>",
"subscription": {
"id": "<string>"
},
"total": "<string>",
"customer_balance_transactions": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"starting_balance": "<string>",
"ending_balance": "<string>",
"amount": "<string>",
"action": "applied_to_invoice",
"description": "An optional description",
"invoice": {
"id": "<string>"
},
"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",
"receipt_pdf": "https://assets.withorb.com/receipt/rUHdhmg45vY45DX/qEAeuYePaphGMdFb"
}
],
"discount": "<unknown>",
"discounts": [
{
"discount_type": "percentage",
"percentage_discount": 0.5,
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"reason": "<string>"
}
],
"minimum": {
"minimum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"line_items": [
{
"amount": "<string>",
"end_date": "2023-11-07T05:31:56Z",
"grouping": "<string>",
"adjustments": [
{
"id": "<string>",
"is_invoice_level": true,
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
],
"reason": "<string>",
"replaces_adjustment_id": "<string>",
"adjustment_type": "usage_discount",
"usage_discount": 123,
"amount": "<string>"
}
],
"name": "<string>",
"quantity": 123,
"start_date": "2023-11-07T05:31:56Z",
"subtotal": "<string>",
"adjusted_subtotal": "<string>",
"credits_applied": "<string>",
"partially_invoiced_amount": "<string>",
"sub_line_items": [
{
"amount": "<string>",
"name": "<string>",
"quantity": 123,
"grouping": {
"key": "<string>",
"value": "west"
},
"type": "matrix",
"matrix_config": {
"dimension_values": [
"<string>"
]
},
"scaled_quantity": 123
}
],
"tax_amounts": [
{
"tax_rate_description": "<string>",
"tax_rate_percentage": "<string>",
"amount": "<string>"
}
],
"id": "<string>",
"price": {
"model_type": "unit",
"unit_config": {
"unit_amount": "<string>",
"prorated": false
},
"metadata": {},
"id": "<string>",
"name": "<string>",
"external_price_id": "<string>",
"replaces_price_id": "<string>",
"price_type": "usage_price",
"created_at": "2023-11-07T05:31:56Z",
"cadence": "one_time",
"billing_mode": "in_advance",
"billing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"invoicing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"billable_metric": {
"id": "<string>"
},
"fixed_price_quantity": 123,
"plan_phase_order": 123,
"currency": "<string>",
"conversion_rate": 123,
"conversion_rate_config": {
"conversion_rate_type": "unit",
"unit_config": {
"unit_amount": "<string>"
}
},
"item": {
"id": "<string>",
"name": "<string>"
},
"credit_allocation": {
"currency": "<string>",
"allows_rollover": true,
"custom_expiration": {
"duration": 123,
"duration_unit": "day"
},
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
]
},
"composite_price_filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"discount": {
"discount_type": "percentage",
"percentage_discount": 0.5,
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"reason": "<string>"
},
"minimum": {
"minimum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"dimensional_price_configuration": {
"dimensional_price_group_id": "<string>",
"dimension_values": [
"<string>"
]
}
},
"usage_customer_ids": [
"<string>"
],
"filter": "<string>"
}
],
"subtotal": "<string>",
"invoice_date": "2023-11-07T05:31:56Z",
"is_payable_now": true
}
],
"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": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"currency": "<string>",
"customer": {
"id": "<string>",
"external_customer_id": "<string>"
},
"due_date": "2022-05-30T07:00:00+00:00",
"id": "<string>",
"invoice_pdf": "https://assets.withorb.com/invoice/rUHdhmg45vY45DX/qEAeuYePaphGMdFb",
"invoice_number": "<string>",
"subscription": {
"id": "<string>"
},
"total": "<string>",
"customer_balance_transactions": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"starting_balance": "<string>",
"ending_balance": "<string>",
"amount": "<string>",
"action": "applied_to_invoice",
"description": "An optional description",
"invoice": {
"id": "<string>"
},
"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",
"receipt_pdf": "https://assets.withorb.com/receipt/rUHdhmg45vY45DX/qEAeuYePaphGMdFb"
}
],
"discount": "<unknown>",
"discounts": [
{
"discount_type": "percentage",
"percentage_discount": 0.5,
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"reason": "<string>"
}
],
"minimum": {
"minimum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"line_items": [
{
"amount": "<string>",
"end_date": "2023-11-07T05:31:56Z",
"grouping": "<string>",
"adjustments": [
{
"id": "<string>",
"is_invoice_level": true,
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
],
"reason": "<string>",
"replaces_adjustment_id": "<string>",
"adjustment_type": "usage_discount",
"usage_discount": 123,
"amount": "<string>"
}
],
"name": "<string>",
"quantity": 123,
"start_date": "2023-11-07T05:31:56Z",
"subtotal": "<string>",
"adjusted_subtotal": "<string>",
"credits_applied": "<string>",
"partially_invoiced_amount": "<string>",
"sub_line_items": [
{
"amount": "<string>",
"name": "<string>",
"quantity": 123,
"grouping": {
"key": "<string>",
"value": "west"
},
"type": "matrix",
"matrix_config": {
"dimension_values": [
"<string>"
]
},
"scaled_quantity": 123
}
],
"tax_amounts": [
{
"tax_rate_description": "<string>",
"tax_rate_percentage": "<string>",
"amount": "<string>"
}
],
"id": "<string>",
"price": {
"model_type": "unit",
"unit_config": {
"unit_amount": "<string>",
"prorated": false
},
"metadata": {},
"id": "<string>",
"name": "<string>",
"external_price_id": "<string>",
"replaces_price_id": "<string>",
"price_type": "usage_price",
"created_at": "2023-11-07T05:31:56Z",
"cadence": "one_time",
"billing_mode": "in_advance",
"billing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"invoicing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"billable_metric": {
"id": "<string>"
},
"fixed_price_quantity": 123,
"plan_phase_order": 123,
"currency": "<string>",
"conversion_rate": 123,
"conversion_rate_config": {
"conversion_rate_type": "unit",
"unit_config": {
"unit_amount": "<string>"
}
},
"item": {
"id": "<string>",
"name": "<string>"
},
"credit_allocation": {
"currency": "<string>",
"allows_rollover": true,
"custom_expiration": {
"duration": 123,
"duration_unit": "day"
},
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
]
},
"composite_price_filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"discount": {
"discount_type": "percentage",
"percentage_discount": 0.5,
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"reason": "<string>"
},
"minimum": {
"minimum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"dimensional_price_configuration": {
"dimensional_price_group_id": "<string>",
"dimension_values": [
"<string>"
]
}
},
"usage_customer_ids": [
"<string>"
],
"filter": "<string>"
}
],
"subtotal": "<string>",
"invoice_date": "2023-11-07T05:31:56Z"
}
]
}
}A subscription represents the purchase of a plan by a customer. The customer is identified by either the customer_id
or the external_customer_id, and exactly one of these fields must be provided.
By default, subscriptions begin on the day that they’re created and renew automatically for each billing cycle at the cadence that’s configured in the plan definition.
The default configuration for subscriptions in Orb is In-advance billing and Beginning of month alignment (see Subscription for more details).
In order to change the alignment behavior, Orb also supports billing subscriptions on the day of the month they are
created. If align_billing_with_subscription_start_date = true is specified, subscriptions have billing cycles that are
aligned with their start_date. For example, a subscription that begins on January 15th will have a billing cycle from
January 15th to February 15th. Every subsequent billing cycle will continue to start and invoice on the 15th.
If the “day” value is greater than the number of days in the month, the next billing cycle will start at the end of the month. For example, if the start_date is January 31st, the next billing cycle will start on February 28th.
If a customer was created with a currency, Orb only allows subscribing the customer to a plan with a matching
invoicing_currency. If the customer does not have a currency set, on subscription creation, we set the customer’s
currency to be the invoicing_currency of the plan.
Prices and adjustments in a plan can be added, removed, or replaced for the subscription being created. This is useful when a customer has prices that differ from the default prices for a specific plan.
This feature is only available for accounts that have migrated to Subscription Overrides Version 2. You can find your Subscription Overrides Version at the bottom of your Plans page
To add prices, provide a list of objects with the key add_prices. An object in the list must specify an existing add-on price
with a price_id or external_price_id field, or create a new add-on price by including an object with the key price,
identical to what would be used in the request body for the create price endpoint. See the
Price resource for the specification
of different price model configurations possible in this object.
If the plan has phases, each object in the list must include a number with plan_phase_order key to indicate which phase the
price should be added to.
An object in the list can specify an optional start_date and optional end_date. This is equivalent to creating a price
interval with the add/edit price intervals endpoint.
If unspecified, the start or end date of the phase or subscription will be used.
An object in the list can specify an optional minimum_amount, maximum_amount, or discounts. This will create adjustments
which apply only to this price.
Additionally, an object in the list can specify an optional reference_id. This ID can be used to reference this price when
adding an adjustment in the same API call. However the ID is transient and cannot be used to refer to
the price in future API calls.
To remove prices, provide a list of objects with the key remove_prices. An object in the list must specify a plan price with
either a price_id or external_price_id field.
To replace prices, provide a list of objects with the key replace_prices. An object in the list must specify a plan price to
replace with the replaces_price_id key, and it must specify a price to replace it with by either referencing an existing
add-on price with a price_id or external_price_id field, or by creating a new add-on price by including an object with the
key price, identical to what would be used in the request body for
the create price endpoint.
See the Price resource
for the specification of different price model configurations possible in this
object.
For fixed fees, an object in the list can supply a fixed_price_quantity instead of a price, price_id, or
external_price_id field. This will update only the quantity for the price, similar to the
Update price quantity endpoint.
The replacement price will have the same phase, if applicable, and the same start and end dates as the price it replaces.
An object in the list can specify an optional minimum_amount, maximum_amount, or discounts. This will create adjustments
which apply only to this price.
Additionally, an object in the list can specify an optional reference_id. This ID can be used to reference the replacement
price when adding an adjustment in the same API call. However the ID is transient and cannot be used to
refer to the price in future API calls.
To add adjustments, provide a list of objects with the key add_adjustments. An object in the list must include an object with
the key adjustment, identical to the adjustment object in the
add/edit price intervals endpoint.
If the plan has phases, each object in the list must include a number with plan_phase_order key to indicate which phase the
adjustment should be added to.
An object in the list can specify an optional start_date and optional end_date. If unspecified, the start or end date of the
phase or subscription will be used.
To remove adjustments, provide a list of objects with the key remove_adjustments. An object in the list must include a key,
adjustment_id, with the ID of the adjustment to be removed.
To replace adjustments, provide a list of objects with the key replace_adjustments. An object in the list must specify a plan
adjustment to replace with the replaces_adjustment_id key, and it must specify an adjustment to replace it with by including
an object with the key adjustment, identical to the adjustment object in the
add/edit price intervals endpoint.
The replacement adjustment will have the same phase, if applicable, and the same start and end dates as the adjustment it replaces.
Price overrides are being phased out in favor adding/removing/replacing prices. (See Customize your customer’s subscriptions)
Price overrides are used to update some or all prices in a plan for the specific subscription being created. This is useful when a new customer has negotiated a rate that is unique to the customer.
To override prices, provide a list of objects with the key price_overrides. The price object in the list of overrides
is expected to contain the existing price id, the model_type and configuration.
(See the Price resource
for the specification of different price model configurations.) The numerical values can be updated, but the billable metric,
cadence, type, and name of a price can not be overridden.
Minimums and maximums, much like price overrides, can be useful when a new customer has negotiated a new or different minimum or maximum spend cap than the default for a given price. If one exists for a price and null is provided for the minimum/maximum override on creation, then there will be no minimum/maximum on the new subscription. If no value is provided, then the default price maximum or minimum is used.
To add a minimum for a specific price, add minimum_amount to the specific price in the price_overrides object.
To add a maximum for a specific price, add maximum_amount to the specific price in the price_overrides object.
Price minimum override example:
{
...
"id": "price_id",
"model_type": "unit",
"unit_config": {
"unit_amount": "0.50"
},
"minimum_amount": "100.00"
...
}
Removing an existing minimum example
{
...
"id": "price_id",
"model_type": "unit",
"unit_config": {
"unit_amount": "0.50"
},
"minimum_amount": null
...
}
Discounts, like price overrides, can be useful when a new customer has negotiated a new or different discount than the default for a price. If a discount exists for a price and a null discount is provided on creation, then there will be no discount on the new subscription.
To add a discount for a specific price, add discount to the price in the price_overrides object. Discount should be a
dictionary of the format:
{
"discount_type": "amount" | "percentage" | "usage",
"amount_discount": string,
"percentage_discount": string,
"usage_discount": string
}
where either amount_discount, percentage_discount, or usage_discount is provided.
Price discount example
{
...
"id": "price_id",
"model_type": "unit",
"unit_config": {
"unit_amount": "0.50"
},
"discount": {"discount_type": "amount", "amount_discount": "175"},
}
Removing an existing discount example
{
"customer_id": "customer_id",
"plan_id": "plan_id",
"discount": null,
"price_overrides": [ ... ]
...
}
Orb supports invoicing for a subscription when a preconfigured usage threshold is hit. To enable threshold billing, pass
in an invoicing_threshold, which is specified in the subscription’s invoicing currency, when creating a subscription.
E.g. pass in 10.00 to issue an invoice when usage amounts hit $10.00 for a subscription that invoices in USD.
By default, Orb limits the number of subscriptions per customer to 100.
curl --request POST \
--url https://api.withorb.com/v1/subscriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"usage_customer_ids": [
"<string>"
],
"filter": "my_property > 100 AND my_other_property = 'bar'",
"metadata": {},
"plan_id": "ZMwNQefe7J3ecf7W",
"external_plan_id": "ZMwNQefe7J3ecf7W",
"price_overrides": [
"<unknown>"
],
"per_credit_overage_amount": 123,
"credits_overage_rate": 123,
"trial_duration_days": 500000,
"net_terms": 123,
"auto_collection": true,
"default_invoice_memo": "<string>",
"coupon_redemption_code": "<string>",
"invoicing_threshold": "10.00",
"initial_phase_order": 2,
"add_prices": [
{
"price_id": "h74gfhdjvn7ujokd",
"external_price_id": "external_price_id",
"price": {
"model_type": "unit",
"unit_config": {
"unit_amount": "<string>",
"prorated": false
},
"name": "<string>",
"item_id": "<string>",
"cadence": "annual",
"metadata": {},
"external_price_id": "<string>",
"dimensional_price_configuration": {
"dimension_values": [
"<string>"
],
"dimensional_price_group_id": "<string>",
"external_dimensional_price_group_id": "<string>"
},
"billable_metric_id": "<string>",
"billed_in_advance": true,
"fixed_price_quantity": 123,
"invoice_grouping_key": "<string>",
"billing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"invoicing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"conversion_rate": 123,
"conversion_rate_config": {
"conversion_rate_type": "unit",
"unit_config": {
"unit_amount": "<string>"
}
},
"currency": "<string>",
"reference_id": "<string>"
},
"allocation_price": {
"currency": "<string>",
"amount": "<string>",
"cadence": "one_time",
"expires_at_end_of_cadence": true,
"custom_expiration": {
"duration": 123,
"duration_unit": "day"
},
"filters": [
{
"field": "item_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"per_unit_cost_basis": "0.00",
"item_id": "<string>"
},
"start_date": "2023-05-01",
"end_date": "2023-07-10",
"plan_phase_order": 123,
"minimum_amount": "1.23",
"maximum_amount": "1.23",
"discounts": [
{
"discount_type": "percentage",
"percentage_discount": 0.15,
"usage_discount": 123,
"amount_discount": "<string>"
}
]
}
],
"remove_prices": [
{
"price_id": "h74gfhdjvn7ujokd",
"external_price_id": "external_price_id"
}
],
"replace_prices": [
{
"replaces_price_id": "<string>",
"price_id": "h74gfhdjvn7ujokd",
"external_price_id": "external_price_id",
"price": {
"model_type": "unit",
"unit_config": {
"unit_amount": "<string>",
"prorated": false
},
"name": "<string>",
"item_id": "<string>",
"cadence": "annual",
"metadata": {},
"external_price_id": "<string>",
"dimensional_price_configuration": {
"dimension_values": [
"<string>"
],
"dimensional_price_group_id": "<string>",
"external_dimensional_price_group_id": "<string>"
},
"billable_metric_id": "<string>",
"billed_in_advance": true,
"fixed_price_quantity": 123,
"invoice_grouping_key": "<string>",
"billing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"invoicing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"conversion_rate": 123,
"conversion_rate_config": {
"conversion_rate_type": "unit",
"unit_config": {
"unit_amount": "<string>"
}
},
"currency": "<string>",
"reference_id": "<string>"
},
"allocation_price": {
"currency": "<string>",
"amount": "<string>",
"cadence": "one_time",
"expires_at_end_of_cadence": true,
"custom_expiration": {
"duration": 123,
"duration_unit": "day"
},
"filters": [
{
"field": "item_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"per_unit_cost_basis": "0.00",
"item_id": "<string>"
},
"fixed_price_quantity": 2,
"minimum_amount": "1.23",
"maximum_amount": "1.23",
"discounts": [
{
"discount_type": "percentage",
"percentage_discount": 0.15,
"usage_discount": 123,
"amount_discount": "<string>"
}
]
}
],
"add_adjustments": [
{
"adjustment": {
"adjustment_type": "percentage_discount",
"percentage_discount": 123,
"applies_to_price_ids": [
"price_1",
"price_2"
],
"applies_to_item_ids": [
"item_1",
"item_2"
],
"applies_to_all": true,
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"currency": [
"USD",
"JPY",
"credits"
],
"price_type": "usage",
"is_invoice_level": true
},
"start_date": "2023-05-01",
"end_date": "2023-07-10",
"plan_phase_order": 123
}
],
"remove_adjustments": [
{
"adjustment_id": "<string>"
}
],
"replace_adjustments": [
{
"adjustment": {
"adjustment_type": "percentage_discount",
"percentage_discount": 123,
"applies_to_price_ids": [
"price_1",
"price_2"
],
"applies_to_item_ids": [
"item_1",
"item_2"
],
"applies_to_all": true,
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"currency": [
"USD",
"JPY",
"credits"
],
"price_type": "usage",
"is_invoice_level": true
},
"replaces_adjustment_id": "<string>"
}
],
"customer_id": "<string>",
"external_customer_id": "<string>",
"currency": "<string>",
"name": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"plan_version_number": 123,
"external_marketplace": "google",
"external_marketplace_reporting_id": "<string>",
"aws_region": "<string>",
"align_billing_with_subscription_start_date": false,
"billing_cycle_anchor_configuration": {
"day": 16,
"month": 6,
"year": 123
}
}
EOF{
"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,
"auto_issuance": true,
"additional_emails": [
"<string>"
],
"portal_url": "<string>",
"hierarchy": {
"parent": {
"id": "<string>",
"external_customer_id": "<string>"
},
"children": [
{
"id": "<string>",
"external_customer_id": "<string>"
}
]
},
"accounting_sync_configuration": {
"excluded": true,
"accounting_providers": [
{
"provider_type": "quickbooks",
"external_provider_id": "<string>"
}
]
},
"reporting_configuration": {
"exempt": true
},
"payment_configuration": {
"payment_providers": []
},
"automatic_tax_enabled": true
},
"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>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"minimum": {
"minimum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"discount": {
"discount_type": "percentage",
"percentage_discount": 0.5,
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"reason": "<string>"
},
"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>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"maximum": {
"maximum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"minimum_amount": "<string>",
"discount": {
"discount_type": "percentage",
"percentage_discount": 0.5,
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"reason": "<string>"
}
}
],
"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": [
{
"model_type": "unit",
"unit_config": {
"unit_amount": "<string>",
"prorated": false
},
"metadata": {},
"id": "<string>",
"name": "<string>",
"external_price_id": "<string>",
"replaces_price_id": "<string>",
"price_type": "usage_price",
"created_at": "2023-11-07T05:31:56Z",
"cadence": "one_time",
"billing_mode": "in_advance",
"billing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"invoicing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"billable_metric": {
"id": "<string>"
},
"fixed_price_quantity": 123,
"plan_phase_order": 123,
"currency": "<string>",
"conversion_rate": 123,
"conversion_rate_config": {
"conversion_rate_type": "unit",
"unit_config": {
"unit_amount": "<string>"
}
},
"item": {
"id": "<string>",
"name": "<string>"
},
"credit_allocation": {
"currency": "<string>",
"allows_rollover": true,
"custom_expiration": {
"duration": 123,
"duration_unit": "day"
},
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
]
},
"composite_price_filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"discount": {
"discount_type": "percentage",
"percentage_discount": 0.5,
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"reason": "<string>"
},
"minimum": {
"minimum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"dimensional_price_configuration": {
"dimensional_price_group_id": "<string>",
"dimension_values": [
"<string>"
]
}
}
],
"adjustments": [
{
"id": "<string>",
"is_invoice_level": true,
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
],
"reason": "<string>",
"replaces_adjustment_id": "<string>",
"adjustment_type": "usage_discount",
"usage_discount": 123,
"plan_phase_order": 123
}
]
},
"name": "<string>",
"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": {
"model_type": "unit",
"unit_config": {
"unit_amount": "<string>",
"prorated": false
},
"metadata": {},
"id": "<string>",
"name": "<string>",
"external_price_id": "<string>",
"replaces_price_id": "<string>",
"price_type": "usage_price",
"created_at": "2023-11-07T05:31:56Z",
"cadence": "one_time",
"billing_mode": "in_advance",
"billing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"invoicing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"billable_metric": {
"id": "<string>"
},
"fixed_price_quantity": 123,
"plan_phase_order": 123,
"currency": "<string>",
"conversion_rate": 123,
"conversion_rate_config": {
"conversion_rate_type": "unit",
"unit_config": {
"unit_amount": "<string>"
}
},
"item": {
"id": "<string>",
"name": "<string>"
},
"credit_allocation": {
"currency": "<string>",
"allows_rollover": true,
"custom_expiration": {
"duration": 123,
"duration_unit": "day"
},
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
]
},
"composite_price_filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"discount": {
"discount_type": "percentage",
"percentage_discount": 0.5,
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"reason": "<string>"
},
"minimum": {
"minimum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"dimensional_price_configuration": {
"dimensional_price_group_id": "<string>",
"dimension_values": [
"<string>"
]
}
},
"billing_cycle_day": 123,
"can_defer_billing": true,
"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,
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
],
"reason": "<string>",
"replaces_adjustment_id": "<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",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_interval_ids": [
"<string>"
]
}
],
"minimum_intervals": [
{
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<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",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<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>",
"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,
"tax_amounts": [
{
"tax_rate_description": "<string>",
"tax_rate_percentage": "<string>",
"amount": "<string>"
}
],
"item_id": "<string>",
"discounts": [],
"start_time_inclusive": "2023-11-07T05:31:56Z",
"end_time_exclusive": "2023-11-07T05:31:56Z"
}
],
"discounts": []
}
],
"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>",
"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,
"tax_amounts": [
{
"tax_rate_description": "<string>",
"tax_rate_percentage": "<string>",
"amount": "<string>"
}
],
"item_id": "<string>",
"discounts": [],
"start_time_inclusive": "2023-11-07T05:31:56Z",
"end_time_exclusive": "2023-11-07T05:31:56Z"
}
],
"discounts": []
}
],
"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": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"currency": "<string>",
"customer": {
"id": "<string>",
"external_customer_id": "<string>"
},
"due_date": "2022-05-30T07:00:00+00:00",
"id": "<string>",
"invoice_pdf": "https://assets.withorb.com/invoice/rUHdhmg45vY45DX/qEAeuYePaphGMdFb",
"invoice_number": "<string>",
"subscription": {
"id": "<string>"
},
"total": "<string>",
"customer_balance_transactions": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"starting_balance": "<string>",
"ending_balance": "<string>",
"amount": "<string>",
"action": "applied_to_invoice",
"description": "An optional description",
"invoice": {
"id": "<string>"
},
"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",
"receipt_pdf": "https://assets.withorb.com/receipt/rUHdhmg45vY45DX/qEAeuYePaphGMdFb"
}
],
"discount": "<unknown>",
"discounts": [
{
"discount_type": "percentage",
"percentage_discount": 0.5,
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"reason": "<string>"
}
],
"minimum": {
"minimum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"line_items": [
{
"amount": "<string>",
"end_date": "2023-11-07T05:31:56Z",
"grouping": "<string>",
"adjustments": [
{
"id": "<string>",
"is_invoice_level": true,
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
],
"reason": "<string>",
"replaces_adjustment_id": "<string>",
"adjustment_type": "usage_discount",
"usage_discount": 123,
"amount": "<string>"
}
],
"name": "<string>",
"quantity": 123,
"start_date": "2023-11-07T05:31:56Z",
"subtotal": "<string>",
"adjusted_subtotal": "<string>",
"credits_applied": "<string>",
"partially_invoiced_amount": "<string>",
"sub_line_items": [
{
"amount": "<string>",
"name": "<string>",
"quantity": 123,
"grouping": {
"key": "<string>",
"value": "west"
},
"type": "matrix",
"matrix_config": {
"dimension_values": [
"<string>"
]
},
"scaled_quantity": 123
}
],
"tax_amounts": [
{
"tax_rate_description": "<string>",
"tax_rate_percentage": "<string>",
"amount": "<string>"
}
],
"id": "<string>",
"price": {
"model_type": "unit",
"unit_config": {
"unit_amount": "<string>",
"prorated": false
},
"metadata": {},
"id": "<string>",
"name": "<string>",
"external_price_id": "<string>",
"replaces_price_id": "<string>",
"price_type": "usage_price",
"created_at": "2023-11-07T05:31:56Z",
"cadence": "one_time",
"billing_mode": "in_advance",
"billing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"invoicing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"billable_metric": {
"id": "<string>"
},
"fixed_price_quantity": 123,
"plan_phase_order": 123,
"currency": "<string>",
"conversion_rate": 123,
"conversion_rate_config": {
"conversion_rate_type": "unit",
"unit_config": {
"unit_amount": "<string>"
}
},
"item": {
"id": "<string>",
"name": "<string>"
},
"credit_allocation": {
"currency": "<string>",
"allows_rollover": true,
"custom_expiration": {
"duration": 123,
"duration_unit": "day"
},
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
]
},
"composite_price_filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"discount": {
"discount_type": "percentage",
"percentage_discount": 0.5,
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"reason": "<string>"
},
"minimum": {
"minimum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"dimensional_price_configuration": {
"dimensional_price_group_id": "<string>",
"dimension_values": [
"<string>"
]
}
},
"usage_customer_ids": [
"<string>"
],
"filter": "<string>"
}
],
"subtotal": "<string>",
"invoice_date": "2023-11-07T05:31:56Z",
"is_payable_now": true
}
],
"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": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"currency": "<string>",
"customer": {
"id": "<string>",
"external_customer_id": "<string>"
},
"due_date": "2022-05-30T07:00:00+00:00",
"id": "<string>",
"invoice_pdf": "https://assets.withorb.com/invoice/rUHdhmg45vY45DX/qEAeuYePaphGMdFb",
"invoice_number": "<string>",
"subscription": {
"id": "<string>"
},
"total": "<string>",
"customer_balance_transactions": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"starting_balance": "<string>",
"ending_balance": "<string>",
"amount": "<string>",
"action": "applied_to_invoice",
"description": "An optional description",
"invoice": {
"id": "<string>"
},
"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",
"receipt_pdf": "https://assets.withorb.com/receipt/rUHdhmg45vY45DX/qEAeuYePaphGMdFb"
}
],
"discount": "<unknown>",
"discounts": [
{
"discount_type": "percentage",
"percentage_discount": 0.5,
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"reason": "<string>"
}
],
"minimum": {
"minimum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"line_items": [
{
"amount": "<string>",
"end_date": "2023-11-07T05:31:56Z",
"grouping": "<string>",
"adjustments": [
{
"id": "<string>",
"is_invoice_level": true,
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
],
"reason": "<string>",
"replaces_adjustment_id": "<string>",
"adjustment_type": "usage_discount",
"usage_discount": 123,
"amount": "<string>"
}
],
"name": "<string>",
"quantity": 123,
"start_date": "2023-11-07T05:31:56Z",
"subtotal": "<string>",
"adjusted_subtotal": "<string>",
"credits_applied": "<string>",
"partially_invoiced_amount": "<string>",
"sub_line_items": [
{
"amount": "<string>",
"name": "<string>",
"quantity": 123,
"grouping": {
"key": "<string>",
"value": "west"
},
"type": "matrix",
"matrix_config": {
"dimension_values": [
"<string>"
]
},
"scaled_quantity": 123
}
],
"tax_amounts": [
{
"tax_rate_description": "<string>",
"tax_rate_percentage": "<string>",
"amount": "<string>"
}
],
"id": "<string>",
"price": {
"model_type": "unit",
"unit_config": {
"unit_amount": "<string>",
"prorated": false
},
"metadata": {},
"id": "<string>",
"name": "<string>",
"external_price_id": "<string>",
"replaces_price_id": "<string>",
"price_type": "usage_price",
"created_at": "2023-11-07T05:31:56Z",
"cadence": "one_time",
"billing_mode": "in_advance",
"billing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"invoicing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"billable_metric": {
"id": "<string>"
},
"fixed_price_quantity": 123,
"plan_phase_order": 123,
"currency": "<string>",
"conversion_rate": 123,
"conversion_rate_config": {
"conversion_rate_type": "unit",
"unit_config": {
"unit_amount": "<string>"
}
},
"item": {
"id": "<string>",
"name": "<string>"
},
"credit_allocation": {
"currency": "<string>",
"allows_rollover": true,
"custom_expiration": {
"duration": 123,
"duration_unit": "day"
},
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
]
},
"composite_price_filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"discount": {
"discount_type": "percentage",
"percentage_discount": 0.5,
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"reason": "<string>"
},
"minimum": {
"minimum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"dimensional_price_configuration": {
"dimensional_price_group_id": "<string>",
"dimension_values": [
"<string>"
]
}
},
"usage_customer_ids": [
"<string>"
],
"filter": "<string>"
}
],
"subtotal": "<string>",
"invoice_date": "2023-11-07T05:31:56Z"
}
]
}
}API Keys can be issued in the Orb's web application.
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 plan that the given subscription should be switched to. Note that either this property or external_plan_id must be specified.
"ZMwNQefe7J3ecf7W"
The external_plan_id of the plan that the given subscription should be switched to. Note that either this property or plan_id must be specified.
"ZMwNQefe7J3ecf7W"
Optionally provide a list of overrides for prices on the plan
The duration of the trial period in days. If not provided, this defaults to the value specified in the plan. If 0 is provided, the trial on the plan will be skipped.
0 <= x < 1000000The net terms determines the difference between the invoice date and the issue date for the invoice. If you intend the invoice to be due on issue, set this to 0. If not provided, this defaults to the value specified in the plan.
Determines whether issued invoices for this subscription will automatically be charged with the saved payment method on the due date. If not specified, this defaults to the behavior configured for this customer.
Determines the default memo on this subscription's invoices. Note that if this is not provided, it is determined by the plan configuration.
Redemption code to be used for this subscription. If the coupon cannot be found by its redemption code, or cannot be redeemed, an error response will be returned and the subscription creation or plan change will not be scheduled.
When this subscription's accrued usage reaches this threshold, an invoice will be issued for the subscription. If not specified, invoices will only be issued at the end of the billing period.
"10.00"
The phase of the plan to start with
2
Additional prices to be added to the subscription. (Only available for accounts that have migrated off of legacy subscription overrides)
Show child attributes
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.
Show child attributes
The pricing model type
unit The name of the price.
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 An alias for the price.
For dimensional price: specifies a price group and dimension values
Show child attributes
The list of dimension values matching (in order) the dimensions of the price group
The id of the dimensional price group to include this price in
The external id of the dimensional price group to include this price in
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
1For 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 configuration for the rate of the price currency to the invoicing currency.
Show child attributes
unit An ISO 4217 currency string, or custom pricing unit identifier, in which this price is billed.
A transient ID that can be used to reference this price when adding adjustments in the same API call.
The definition of a new allocation price to create and add to the subscription.
Show child attributes
An ISO 4217 currency string or a custom pricing unit identifier in which to bill this price.
An amount of the currency to allocate to the customer at the specified cadence.
The cadence at which to allocate the amount to the customer.
one_time, monthly, quarterly, semi_annual, annual Whether the allocated amount should expire at the end of the cadence or roll over to the next period. Set to null if using custom_expiration.
The filters that determine which items the allocation applies to.
Show child attributes
The property of the price the block applies to. Only item_id is supported.
item_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
The (per-unit) cost basis of each created block. If non-zero, a customer will be invoiced according to the quantity and per unit cost basis specified for the allocation each cadence.
The item ID that line items representing charges for this allocation will be associated with. If not provided, the default allocation item for the currency will be used (e.g. 'Included Allocation (USD)').
The start date of the price interval. This is the date that the price will start billing on the subscription. If null, billing will start when the phase or subscription starts.
"2023-05-01"
The end date of the price interval. This is the date that the price will stop billing on the subscription. If null, billing will end when the phase or subscription ends.
"2023-07-10"
The phase to add this price to.
[DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for this price.
"1.23"
[DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for this price.
"1.23"
[DEPRECATED] Use add_adjustments instead. The subscription's discounts for this price.
Show child attributes
percentage, usage, amount Only available if discount_type is percentage. This is a number between 0 and 1.
0.15
Only available if discount_type is usage. Number of usage units that this discount is for
Only available if discount_type is amount.
Plan prices to be removed from the subscription. (Only available for accounts that have migrated off of legacy subscription overrides)
Plan prices to be replaced with additional prices on the subscription. (Only available for accounts that have migrated off of legacy subscription overrides)
Show child attributes
The id of the price on the plan to replace in the subscription.
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.
Show child attributes
The pricing model type
unit The name of the price.
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 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.
Show child attributes
An alias for the price.
For dimensional price: specifies a price group and dimension values
Show child attributes
The list of dimension values matching (in order) the dimensions of the price group
The id of the dimensional price group to include this price in
The external id of the dimensional price group to include this price in
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
1For 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 configuration for the rate of the price currency to the invoicing currency.
Show child attributes
unit An ISO 4217 currency string, or custom pricing unit identifier, in which this price is billed.
A transient ID that can be used to reference this price when adding adjustments in the same API call.
The definition of a new allocation price to create and add to the subscription.
Show child attributes
An ISO 4217 currency string or a custom pricing unit identifier in which to bill this price.
An amount of the currency to allocate to the customer at the specified cadence.
The cadence at which to allocate the amount to the customer.
one_time, monthly, quarterly, semi_annual, annual Whether the allocated amount should expire at the end of the cadence or roll over to the next period. Set to null if using custom_expiration.
The filters that determine which items the allocation applies to.
Show child attributes
The property of the price the block applies to. Only item_id is supported.
item_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
The (per-unit) cost basis of each created block. If non-zero, a customer will be invoiced according to the quantity and per unit cost basis specified for the allocation each cadence.
The item ID that line items representing charges for this allocation will be associated with. If not provided, the default allocation item for the currency will be used (e.g. 'Included Allocation (USD)').
The new quantity of the price, if the price is a fixed price.
2
[DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for the replacement price.
"1.23"
[DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for the replacement price.
"1.23"
[DEPRECATED] Use add_adjustments instead. The subscription's discounts for the replacement price.
Show child attributes
percentage, usage, amount Only available if discount_type is percentage. This is a number between 0 and 1.
0.15
Only available if discount_type is usage. Number of usage units that this discount is for
Only available if discount_type is amount.
Additional adjustments to be added to the subscription. (Only available for accounts that have migrated off of legacy subscription overrides)
Show child attributes
The definition of a new adjustment to create and add to the subscription.
Show child attributes
percentage_discount The set of price IDs to which this adjustment applies.
["price_1", "price_2"]The set of item IDs to which this adjustment applies.
["item_1", "item_2"]If set, the adjustment will apply to every price on the subscription.
true, false A list of filters that determine which prices this adjustment will apply to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
If set, only prices in the specified currency will have the adjustment applied.
["USD", "JPY", "credits"]If set, only prices of the specified type will have the adjustment applied.
usage, fixed_in_advance, fixed_in_arrears, fixed, in_arrears 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. If null, the adjustment will start when the phase or subscription starts.
"2023-05-01"
The end date of the adjustment interval. This is the date that the adjustment will stop affecting prices on the subscription.
"2023-07-10"
The phase to add this adjustment to.
Plan adjustments to be removed from the subscription. (Only available for accounts that have migrated off of legacy subscription overrides)
Show child attributes
The id of the adjustment to remove on the subscription.
Plan adjustments to be replaced with additional adjustments on the subscription. (Only available for accounts that have migrated off of legacy subscription overrides)
Show child attributes
The definition of a new adjustment to create and add to the subscription.
Show child attributes
percentage_discount The set of price IDs to which this adjustment applies.
["price_1", "price_2"]The set of item IDs to which this adjustment applies.
["item_1", "item_2"]If set, the adjustment will apply to every price on the subscription.
true, false A list of filters that determine which prices this adjustment will apply to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
If set, only prices in the specified currency will have the adjustment applied.
["USD", "JPY", "credits"]If set, only prices of the specified type will have the adjustment applied.
usage, fixed_in_advance, fixed_in_arrears, fixed, in_arrears 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 id of the adjustment on the plan to replace in the subscription.
The currency to use for the subscription. If not specified, the invoicing currency for the plan will be used.
The name to use for the subscription. If not specified, the plan name will be used.
Specifies which version of the plan to subscribe to. If null, the default version will be used.
google, aws, azure Show child attributes
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 <= 31The 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 <= 12The 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.).
Created
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.
Show child attributes
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.
Show child attributes
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.
Show child attributes
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 Show child attributes
Show child attributes
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.
| Country | Type | Description |
|---|---|---|
| Albania | al_tin | Albania Tax Identification Number |
| Andorra | ad_nrt | Andorran NRT Number |
| Angola | ao_tin | Angola Tax Identification Number |
| Argentina | ar_cuit | Argentinian Tax ID Number |
| Armenia | am_tin | Armenia Tax Identification Number |
| Aruba | aw_tin | Aruba Tax Identification Number |
| Australia | au_abn | Australian Business Number (AU ABN) |
| Australia | au_arn | Australian Taxation Office Reference Number |
| Austria | eu_vat | European VAT Number |
| Azerbaijan | az_tin | Azerbaijan Tax Identification Number |
| Bahamas | bs_tin | Bahamas Tax Identification Number |
| Bahrain | bh_vat | Bahraini VAT Number |
| Bangladesh | bd_bin | Bangladesh Business Identification Number |
| Barbados | bb_tin | Barbados Tax Identification Number |
| Belarus | by_tin | Belarus TIN Number |
| Belgium | eu_vat | European VAT Number |
| Benin | bj_ifu | Benin Tax Identification Number (Identifiant Fiscal Unique) |
| Bolivia | bo_tin | Bolivian Tax ID |
| Bosnia and Herzegovina | ba_tin | Bosnia and Herzegovina Tax Identification Number |
| 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 |
| Burkina Faso | bf_ifu | Burkina Faso Tax Identification Number (Numéro d'Identifiant Fiscal Unique) |
| Cambodia | kh_tin | Cambodia Tax Identification Number |
| Cameroon | cm_niu | Cameroon Tax Identification Number (Numéro d'Identifiant fiscal Unique) |
| 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) |
| Cape Verde | cv_nif | Cape Verde Tax Identification Number (Número de Identificação Fiscal) |
| Chile | cl_tin | Chilean TIN |
| China | cn_tin | Chinese Tax ID |
| Colombia | co_nit | Colombian NIT Number |
| Congo-Kinshasa | cd_nif | Congo (DR) Tax Identification Number (Número de Identificação Fiscal) |
| Costa Rica | cr_tin | Costa Rican Tax ID |
| Croatia | eu_vat | European VAT Number |
| Croatia | hr_oib | Croatian Personal Identification Number (OIB) |
| 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 |
| Ethiopia | et_tin | Ethiopia Tax Identification Number |
| European Union | 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 | de_stn | German Tax Number (Steuernummer) |
| Germany | eu_vat | European VAT Number |
| Greece | eu_vat | European VAT Number |
| Guinea | gn_nif | Guinea Tax Identification Number (Número de Identificação Fiscal) |
| 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 |
| Kyrgyzstan | kg_tin | Kyrgyzstan Tax Identification Number |
| Laos | la_tin | Laos Tax Identification Number |
| Latvia | eu_vat | European VAT Number |
| Liechtenstein | li_uid | Liechtensteinian UID Number |
| Liechtenstein | li_vat | Liechtenstein VAT 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 |
| Mauritania | mr_nif | Mauritania Tax Identification Number (Número de Identificação Fiscal) |
| Mexico | mx_rfc | Mexican RFC Number |
| Moldova | md_vat | Moldova VAT Number |
| Montenegro | me_pib | Montenegro PIB Number |
| Morocco | ma_vat | Morocco VAT Number |
| Nepal | np_pan | Nepal PAN Number |
| Netherlands | eu_vat | European VAT Number |
| New Zealand | nz_gst | New Zealand GST Number |
| Nigeria | ng_tin | Nigerian Tax Identification Number |
| North Macedonia | mk_vat | North Macedonia VAT Number |
| Northern Ireland | eu_vat | Northern Ireland VAT 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 |
| Senegal | sn_ninea | Senegal NINEA Number |
| 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 |
| Suriname | sr_fin | Suriname FIN Number |
| Sweden | eu_vat | European VAT Number |
| Switzerland | ch_uid | Switzerland UID Number |
| Switzerland | ch_vat | Switzerland VAT Number |
| Taiwan | tw_vat | Taiwanese VAT |
| Tajikistan | tj_tin | Tajikistan Tax Identification Number |
| Tanzania | tz_vat | Tanzania VAT Number |
| Thailand | th_vat | Thai VAT |
| Turkey | tr_tin | Turkish Tax Identification Number |
| Uganda | ug_tin | Uganda Tax Identification Number |
| Ukraine | ua_vat | Ukrainian VAT |
| United Arab Emirates | ae_trn | United Arab Emirates TRN |
| United Kingdom | gb_vat | United Kingdom VAT Number |
| United States | us_ein | United States EIN |
| Uruguay | uy_ruc | Uruguayan RUC Number |
| Uzbekistan | uz_tin | Uzbekistan TIN Number |
| Uzbekistan | uz_vat | Uzbekistan VAT Number |
| Venezuela | ve_rif | Venezuelan RIF Number |
| Vietnam | vn_tin | Vietnamese Tax ID Number |
| Zambia | zm_tin | Zambia Tax Identification Number |
| Zimbabwe | zw_tin | Zimbabwe Tax Identification Number |
Show child attributes
AD, AE, AL, AM, AO, AR, AT, AU, AW, AZ, BA, BB, BD, BE, BF, BG, BH, BJ, BO, BR, BS, BY, CA, CD, CH, CL, CM, CN, CO, CR, CV, DE, CY, CZ, DK, DO, EC, EE, EG, ES, ET, EU, FI, FR, GB, GE, GN, GR, HK, HR, HU, ID, IE, IL, IN, IS, IT, JP, KE, KG, KH, KR, KZ, LA, LI, LT, LU, LV, MA, MD, ME, MK, MR, MT, MX, MY, NG, NL, NO, NP, NZ, OM, PE, PH, PL, PT, RO, RS, RU, SA, SE, SG, SI, SK, SN, SR, SV, TH, TJ, TR, TW, TZ, UA, UG, US, UY, UZ, VE, VN, ZA, ZM, ZW ad_nrt, ae_trn, al_tin, am_tin, ao_tin, ar_cuit, eu_vat, au_abn, au_arn, aw_tin, az_tin, ba_tin, bb_tin, bd_bin, bf_ifu, bg_uic, bh_vat, bj_ifu, bo_tin, br_cnpj, br_cpf, bs_tin, by_tin, ca_bn, ca_gst_hst, ca_pst_bc, ca_pst_mb, ca_pst_sk, ca_qst, cd_nif, ch_uid, ch_vat, cl_tin, cm_niu, cn_tin, co_nit, cr_tin, cv_nif, de_stn, do_rcn, ec_ruc, eg_tin, es_cif, et_tin, eu_oss_vat, gb_vat, ge_vat, gn_nif, hk_br, hr_oib, hu_tin, id_npwp, il_vat, in_gst, is_vat, jp_cn, jp_rn, jp_trn, ke_pin, kg_tin, kh_tin, kr_brn, kz_bin, la_tin, li_uid, li_vat, ma_vat, md_vat, me_pib, mk_vat, mr_nif, mx_rfc, my_frp, my_itn, my_sst, ng_tin, no_vat, no_voec, np_pan, nz_gst, om_vat, pe_ruc, ph_tin, ro_tin, rs_pib, ru_inn, ru_kpp, sa_vat, sg_gst, sg_uen, si_tin, sn_ninea, sr_fin, sv_nit, th_vat, tj_tin, tr_tin, tw_vat, tz_vat, ua_vat, ug_tin, us_ein, uy_ruc, uz_tin, uz_vat, ve_rif, vn_tin, za_vat, zm_tin, zw_tin Whether invoices for this customer should be automatically issued. If true, invoices will be automatically issued. If false, invoices will require manual approval. If null, inherits the account-level setting.
The hierarchical relationships for this customer.
Show child attributes
Show child attributes
Payment configuration for the customer, applicable when using Orb Invoicing with a supported payment provider such as Stripe.
Show child attributes
Provider-specific payment configuration.
Show child attributes
The payment provider to configure.
stripe List of Stripe payment method types to exclude for this customer. Excluded payment methods will not be available for the customer to select during payment, and will not be used for auto-collection. If a customer's default payment method becomes excluded, Orb will attempt to use the next available compatible payment method for auto-collection.
Whether automatic tax calculation is enabled for this customer. This field is nullable for backwards compatibility but will always return a boolean value.
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.
Show child attributes
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.
Show child attributes
active, archived, draft Show child attributes
Maximum amount applied
The filters that determine which prices to apply this maximum to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
List of price_ids that this maximum amount applies to. For plan/plan phase maximums, this can be a subset of prices.
Show child attributes
Minimum amount applied
The filters that determine which prices to apply this minimum to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
List of price_ids that this minimum amount applies to. For plan/plan phase minimums, this can be a subset of prices.
Show child attributes
percentage Only available if discount_type is percentage. This is a number between 0 and 1.
0 <= x <= 1List of price_ids that this discount applies to. For plan/plan phase discounts, this can be a subset of prices.
["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"]The filters that determine which prices to apply this discount to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
Show child attributes
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.
Show child attributes
Minimum amount applied
The filters that determine which prices to apply this minimum to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
List of price_ids that this minimum amount applies to. For plan/plan phase minimums, this can be a subset of prices.
Show child attributes
Maximum amount applied
The filters that determine which prices to apply this maximum to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
List of price_ids that this maximum amount applies to. For plan/plan phase maximums, this can be a subset of prices.
Show child attributes
percentage Only available if discount_type is percentage. This is a number between 0 and 1.
0 <= x <= 1List of price_ids that this discount applies to. For plan/plan phase discounts, this can be a subset of prices.
["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"]The filters that determine which prices to apply this discount to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
Legacy field representing the parent plan if the current plan is a 'child plan', overriding prices from the parent.
Show child attributes
"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"
Legacy field representing the parent plan ID if the current plan is a 'child plan', overriding prices from the parent.
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
Show child attributes
The pricing model type
unit 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.
Show child attributes
The price id this price replaces. This price will take the place of the replaced price in plan version migrations.
usage_price, fixed_price, composite_price one_time, monthly, quarterly, semi_annual, annual, custom in_advance, in_arrear Show child attributes
unit Show child attributes
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
Show child attributes
percentage Only available if discount_type is percentage. This is a number between 0 and 1.
0 <= x <= 1List of price_ids that this discount applies to. For plan/plan phase discounts, this can be a subset of prices.
["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"]The filters that determine which prices to apply this discount to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
Show child attributes
Minimum amount applied
The filters that determine which prices to apply this minimum to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
List of price_ids that this minimum amount applies to. For plan/plan phase minimums, this can be a subset of prices.
Show child attributes
Maximum amount applied
The filters that determine which prices to apply this maximum to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
List of price_ids that this maximum amount applies to. For plan/plan phase maximums, this can be a subset of prices.
Adjustments for this plan. If the plan has phases, this includes adjustments across all phases of the plan.
Show child attributes
True for adjustments that apply to an entire invoice, false for adjustments that apply to only one price.
The filters that determine which prices to apply this adjustment to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
The price IDs that this adjustment applies to.
The reason for the adjustment.
The adjustment id this adjustment replaces. This adjustment will take the place of the replaced adjustment in plan version migrations.
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 name of the subscription.
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 <= 31Show child attributes
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 <= 31The 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 <= 12The 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.
Show child attributes
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
Show child attributes
The pricing model type
unit 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.
Show child attributes
The price id this price replaces. This price will take the place of the replaced price in plan version migrations.
usage_price, fixed_price, composite_price one_time, monthly, quarterly, semi_annual, annual, custom in_advance, in_arrear Show child attributes
unit Show child attributes
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
Show child attributes
percentage Only available if discount_type is percentage. This is a number between 0 and 1.
0 <= x <= 1List of price_ids that this discount applies to. For plan/plan phase discounts, this can be a subset of prices.
["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"]The filters that determine which prices to apply this discount to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
Show child attributes
Minimum amount applied
The filters that determine which prices to apply this minimum to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
List of price_ids that this minimum amount applies to. For plan/plan phase minimums, this can be a subset of prices.
Show child attributes
Maximum amount applied
The filters that determine which prices to apply this maximum to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
List of price_ids that this maximum amount applies to. For plan/plan phase maximums, this can be a subset of prices.
The day of the month that Orb bills for this price
For in-arrears prices. If true, and the price interval ends mid-cycle, the final line item will be deferred to the next scheduled invoice instead of being billed mid-cycle.
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.
Show child attributes
Show child attributes
True for adjustments that apply to an entire invoice, false for adjustments that apply to only one price.
The filters that determine which prices to apply this adjustment to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
The price IDs that this adjustment applies to.
The reason for the adjustment.
The adjustment id this adjustment replaces. This adjustment will take the place of the replaced adjustment in plan version migrations.
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. This field is deprecated in favor of adjustment_intervals.
Show child attributes
amount Only available if discount_type is amount.
The start date of the discount interval.
The end date of the discount interval.
The filters that determine which prices this discount interval applies to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
The price interval ids that this discount interval applies to.
The minimum intervals for this subscription sorted by the start_date. This field is deprecated in favor of adjustment_intervals.
Show child attributes
The start date of the minimum interval.
The end date of the minimum interval.
The filters that determine which prices this minimum interval applies to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
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. This field is deprecated in favor of adjustment_intervals.
Show child attributes
The start date of the maximum interval.
The end date of the maximum interval.
The filters that determine which prices this maximum interval applies to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
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.
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.
Show child attributes
The credit notes that were created as part of this operation.
Show child attributes
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
Show child attributes
percentage All of the line items associated with this credit note.
Show child attributes
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.
Show child attributes
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.
Show child attributes
percentage, amount The start time of the service period for this credit note line item.
The end time of the service period for this credit note line item.
Any discounts applied on the original invoice.
Show child attributes
percentage The credit notes that were voided as part of this operation.
Show child attributes
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
Show child attributes
percentage All of the line items associated with this credit note.
Show child attributes
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.
Show child attributes
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.
Show child attributes
percentage, amount The start time of the service period for this credit note line item.
The end time of the service period for this credit note line item.
Any discounts applied on the original invoice.
Show child attributes
percentage The invoices that were created as part of this operation.
Show child attributes
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.
Show child attributes
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.
Show child attributes
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.
The creation time of the resource in Orb.
An ISO 4217 currency string or credits
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.
The total after any minimums and discounts have been applied.
Show child attributes
A unique id for this transaction.
The creation time of this transaction.
The original value of the customer's balance prior to the transaction, in the customer's currency.
The new value of the customer's balance prior to the transaction, in the customer's currency.
The value of the amount changed in the transaction.
applied_to_invoice, manual_adjustment, prorated_refund, revert_prorated_refund, return_from_voiding, credit_note_applied, credit_note_voided, overpayment_refund, external_payment, small_invoice_carryover An optional description provided for manual customer balance adjustments.
"An optional description"
increment, decrement issued, paid, synced, void, draft subscription, partial, one_off Show child attributes
Show child attributes
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.
| Country | Type | Description |
|---|---|---|
| Albania | al_tin | Albania Tax Identification Number |
| Andorra | ad_nrt | Andorran NRT Number |
| Angola | ao_tin | Angola Tax Identification Number |
| Argentina | ar_cuit | Argentinian Tax ID Number |
| Armenia | am_tin | Armenia Tax Identification Number |
| Aruba | aw_tin | Aruba Tax Identification Number |
| Australia | au_abn | Australian Business Number (AU ABN) |
| Australia | au_arn | Australian Taxation Office Reference Number |
| Austria | eu_vat | European VAT Number |
| Azerbaijan | az_tin | Azerbaijan Tax Identification Number |
| Bahamas | bs_tin | Bahamas Tax Identification Number |
| Bahrain | bh_vat | Bahraini VAT Number |
| Bangladesh | bd_bin | Bangladesh Business Identification Number |
| Barbados | bb_tin | Barbados Tax Identification Number |
| Belarus | by_tin | Belarus TIN Number |
| Belgium | eu_vat | European VAT Number |
| Benin | bj_ifu | Benin Tax Identification Number (Identifiant Fiscal Unique) |
| Bolivia | bo_tin | Bolivian Tax ID |
| Bosnia and Herzegovina | ba_tin | Bosnia and Herzegovina Tax Identification Number |
| 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 |
| Burkina Faso | bf_ifu | Burkina Faso Tax Identification Number (Numéro d'Identifiant Fiscal Unique) |
| Cambodia | kh_tin | Cambodia Tax Identification Number |
| Cameroon | cm_niu | Cameroon Tax Identification Number (Numéro d'Identifiant fiscal Unique) |
| 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) |
| Cape Verde | cv_nif | Cape Verde Tax Identification Number (Número de Identificação Fiscal) |
| Chile | cl_tin | Chilean TIN |
| China | cn_tin | Chinese Tax ID |
| Colombia | co_nit | Colombian NIT Number |
| Congo-Kinshasa | cd_nif | Congo (DR) Tax Identification Number (Número de Identificação Fiscal) |
| Costa Rica | cr_tin | Costa Rican Tax ID |
| Croatia | eu_vat | European VAT Number |
| Croatia | hr_oib | Croatian Personal Identification Number (OIB) |
| 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 |
| Ethiopia | et_tin | Ethiopia Tax Identification Number |
| European Union | 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 | de_stn | German Tax Number (Steuernummer) |
| Germany | eu_vat | European VAT Number |
| Greece | eu_vat | European VAT Number |
| Guinea | gn_nif | Guinea Tax Identification Number (Número de Identificação Fiscal) |
| 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 |
| Kyrgyzstan | kg_tin | Kyrgyzstan Tax Identification Number |
| Laos | la_tin | Laos Tax Identification Number |
| Latvia | eu_vat | European VAT Number |
| Liechtenstein | li_uid | Liechtensteinian UID Number |
| Liechtenstein | li_vat | Liechtenstein VAT 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 |
| Mauritania | mr_nif | Mauritania Tax Identification Number (Número de Identificação Fiscal) |
| Mexico | mx_rfc | Mexican RFC Number |
| Moldova | md_vat | Moldova VAT Number |
| Montenegro | me_pib | Montenegro PIB Number |
| Morocco | ma_vat | Morocco VAT Number |
| Nepal | np_pan | Nepal PAN Number |
| Netherlands | eu_vat | European VAT Number |
| New Zealand | nz_gst | New Zealand GST Number |
| Nigeria | ng_tin | Nigerian Tax Identification Number |
| North Macedonia | mk_vat | North Macedonia VAT Number |
| Northern Ireland | eu_vat | Northern Ireland VAT 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 |
| Senegal | sn_ninea | Senegal NINEA Number |
| 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 |
| Suriname | sr_fin | Suriname FIN Number |
| Sweden | eu_vat | European VAT Number |
| Switzerland | ch_uid | Switzerland UID Number |
| Switzerland | ch_vat | Switzerland VAT Number |
| Taiwan | tw_vat | Taiwanese VAT |
| Tajikistan | tj_tin | Tajikistan Tax Identification Number |
| Tanzania | tz_vat | Tanzania VAT Number |
| Thailand | th_vat | Thai VAT |
| Turkey | tr_tin | Turkish Tax Identification Number |
| Uganda | ug_tin | Uganda Tax Identification Number |
| Ukraine | ua_vat | Ukrainian VAT |
| United Arab Emirates | ae_trn | United Arab Emirates TRN |
| United Kingdom | gb_vat | United Kingdom VAT Number |
| United States | us_ein | United States EIN |
| Uruguay | uy_ruc | Uruguayan RUC Number |
| Uzbekistan | uz_tin | Uzbekistan TIN Number |
| Uzbekistan | uz_vat | Uzbekistan VAT Number |
| Venezuela | ve_rif | Venezuelan RIF Number |
| Vietnam | vn_tin | Vietnamese Tax ID Number |
| Zambia | zm_tin | Zambia Tax Identification Number |
| Zimbabwe | zw_tin | Zimbabwe Tax Identification Number |
Show child attributes
AD, AE, AL, AM, AO, AR, AT, AU, AW, AZ, BA, BB, BD, BE, BF, BG, BH, BJ, BO, BR, BS, BY, CA, CD, CH, CL, CM, CN, CO, CR, CV, DE, CY, CZ, DK, DO, EC, EE, EG, ES, ET, EU, FI, FR, GB, GE, GN, GR, HK, HR, HU, ID, IE, IL, IN, IS, IT, JP, KE, KG, KH, KR, KZ, LA, LI, LT, LU, LV, MA, MD, ME, MK, MR, MT, MX, MY, NG, NL, NO, NP, NZ, OM, PE, PH, PL, PT, RO, RS, RU, SA, SE, SG, SI, SK, SN, SR, SV, TH, TJ, TR, TW, TZ, UA, UG, US, UY, UZ, VE, VN, ZA, ZM, ZW ad_nrt, ae_trn, al_tin, am_tin, ao_tin, ar_cuit, eu_vat, au_abn, au_arn, aw_tin, az_tin, ba_tin, bb_tin, bd_bin, bf_ifu, bg_uic, bh_vat, bj_ifu, bo_tin, br_cnpj, br_cpf, bs_tin, by_tin, ca_bn, ca_gst_hst, ca_pst_bc, ca_pst_mb, ca_pst_sk, ca_qst, cd_nif, ch_uid, ch_vat, cl_tin, cm_niu, cn_tin, co_nit, cr_tin, cv_nif, de_stn, do_rcn, ec_ruc, eg_tin, es_cif, et_tin, eu_oss_vat, gb_vat, ge_vat, gn_nif, hk_br, hr_oib, hu_tin, id_npwp, il_vat, in_gst, is_vat, jp_cn, jp_rn, jp_trn, ke_pin, kg_tin, kh_tin, kr_brn, kz_bin, la_tin, li_uid, li_vat, ma_vat, md_vat, me_pib, mk_vat, mr_nif, mx_rfc, my_frp, my_itn, my_sst, ng_tin, no_vat, no_voec, np_pan, nz_gst, om_vat, pe_ruc, ph_tin, ro_tin, rs_pib, ru_inn, ru_kpp, sa_vat, sg_gst, sg_uen, si_tin, sn_ninea, sr_fin, sv_nit, th_vat, tj_tin, tr_tin, tw_vat, tz_vat, ua_vat, ug_tin, us_ein, uy_ruc, uz_tin, uz_vat, ve_rif, vn_tin, za_vat, zm_tin, zw_tin Free-form text which is available on the invoice PDF and the Orb invoice portal.
A list of credit notes associated with the invoice
Show child attributes
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
Show child attributes
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.
URL to the downloadable PDF version of the receipt. This field will be null for payment attempts that did not succeed.
"https://assets.withorb.com/receipt/rUHdhmg45vY45DX/qEAeuYePaphGMdFb"
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.
Show child attributes
percentage Only available if discount_type is percentage. This is a number between 0 and 1.
0 <= x <= 1List of price_ids that this discount applies to. For plan/plan phase discounts, this can be a subset of prices.
["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"]The filters that determine which prices to apply this discount to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
Show child attributes
Minimum amount applied
The filters that determine which prices to apply this minimum to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
List of price_ids that this minimum amount applies to. For plan/plan phase minimums, this can be a subset of prices.
Show child attributes
Maximum amount applied
The filters that determine which prices to apply this maximum to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
List of price_ids that this maximum amount applies to. For plan/plan phase maximums, this can be a subset of prices.
The breakdown of prices in this invoice.
Show child attributes
The final amount for a line item after all adjustments and pre paid credits have been applied.
The end date of the range of time applied for this line item's price.
[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.
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).
Show child attributes
True for adjustments that apply to an entire invoice, false for adjustments that apply to only one price.
The filters that determine which prices to apply this adjustment to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
The price IDs that this adjustment applies to.
The reason for the adjustment.
The adjustment id this adjustment replaces. This adjustment will take the place of the replaced adjustment in plan version migrations.
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.
Either the fixed fee quantity or the usage during the service period.
The start date of the range of time applied for this line item's price.
The line amount before any adjustments.
The line amount after any adjustments and before overage conversion, credits and partial invoicing.
The number of prepaid credits applied.
Any amount applied from a partial invoice
For complex pricing structures, the line item can be broken down further in sub_line_items.
Show child attributes
The total amount for this sub line item.
matrix Show child attributes
The ordered dimension values for this line item.
The scaled quantity for this line item for specific pricing structures
An array of tax rates and their incurred tax amounts. Empty if no tax integration is configured.
Show child attributes
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
Show child attributes
The pricing model type
unit Configuration for unit pricing
Show child attributes
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.
Show child attributes
The price id this price replaces. This price will take the place of the replaced price in plan version migrations.
usage_price, fixed_price, composite_price one_time, monthly, quarterly, semi_annual, annual, custom in_advance, in_arrear Show child attributes
unit A minimal representation of an Item containing only the essential identifying information.
Show child attributes
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
Show child attributes
percentage Only available if discount_type is percentage. This is a number between 0 and 1.
0 <= x <= 1List of price_ids that this discount applies to. For plan/plan phase discounts, this can be a subset of prices.
["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"]The filters that determine which prices to apply this discount to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
Show child attributes
Minimum amount applied
The filters that determine which prices to apply this minimum to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
List of price_ids that this minimum amount applies to. For plan/plan phase minimums, this can be a subset of prices.
Show child attributes
Maximum amount applied
The filters that determine which prices to apply this maximum to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
List of price_ids that this maximum amount applies to. For plan/plan phase maximums, this can be a subset of prices.
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.
The total before any discounts and minimums are applied.
The scheduled date of the invoice
True if the invoice has only in-advance fixed fees and is payable now
The invoices that were voided as part of this operation.
Show child attributes
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.
Show child attributes
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.
Show child attributes
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.
The creation time of the resource in Orb.
An ISO 4217 currency string or credits
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.
The total after any minimums and discounts have been applied.
Show child attributes
A unique id for this transaction.
The creation time of this transaction.
The original value of the customer's balance prior to the transaction, in the customer's currency.
The new value of the customer's balance prior to the transaction, in the customer's currency.
The value of the amount changed in the transaction.
applied_to_invoice, manual_adjustment, prorated_refund, revert_prorated_refund, return_from_voiding, credit_note_applied, credit_note_voided, overpayment_refund, external_payment, small_invoice_carryover An optional description provided for manual customer balance adjustments.
"An optional description"
increment, decrement issued, paid, synced, void, draft subscription, partial, one_off Show child attributes
Show child attributes
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.
| Country | Type | Description |
|---|---|---|
| Albania | al_tin | Albania Tax Identification Number |
| Andorra | ad_nrt | Andorran NRT Number |
| Angola | ao_tin | Angola Tax Identification Number |
| Argentina | ar_cuit | Argentinian Tax ID Number |
| Armenia | am_tin | Armenia Tax Identification Number |
| Aruba | aw_tin | Aruba Tax Identification Number |
| Australia | au_abn | Australian Business Number (AU ABN) |
| Australia | au_arn | Australian Taxation Office Reference Number |
| Austria | eu_vat | European VAT Number |
| Azerbaijan | az_tin | Azerbaijan Tax Identification Number |
| Bahamas | bs_tin | Bahamas Tax Identification Number |
| Bahrain | bh_vat | Bahraini VAT Number |
| Bangladesh | bd_bin | Bangladesh Business Identification Number |
| Barbados | bb_tin | Barbados Tax Identification Number |
| Belarus | by_tin | Belarus TIN Number |
| Belgium | eu_vat | European VAT Number |
| Benin | bj_ifu | Benin Tax Identification Number (Identifiant Fiscal Unique) |
| Bolivia | bo_tin | Bolivian Tax ID |
| Bosnia and Herzegovina | ba_tin | Bosnia and Herzegovina Tax Identification Number |
| 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 |
| Burkina Faso | bf_ifu | Burkina Faso Tax Identification Number (Numéro d'Identifiant Fiscal Unique) |
| Cambodia | kh_tin | Cambodia Tax Identification Number |
| Cameroon | cm_niu | Cameroon Tax Identification Number (Numéro d'Identifiant fiscal Unique) |
| 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) |
| Cape Verde | cv_nif | Cape Verde Tax Identification Number (Número de Identificação Fiscal) |
| Chile | cl_tin | Chilean TIN |
| China | cn_tin | Chinese Tax ID |
| Colombia | co_nit | Colombian NIT Number |
| Congo-Kinshasa | cd_nif | Congo (DR) Tax Identification Number (Número de Identificação Fiscal) |
| Costa Rica | cr_tin | Costa Rican Tax ID |
| Croatia | eu_vat | European VAT Number |
| Croatia | hr_oib | Croatian Personal Identification Number (OIB) |
| 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 |
| Ethiopia | et_tin | Ethiopia Tax Identification Number |
| European Union | 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 | de_stn | German Tax Number (Steuernummer) |
| Germany | eu_vat | European VAT Number |
| Greece | eu_vat | European VAT Number |
| Guinea | gn_nif | Guinea Tax Identification Number (Número de Identificação Fiscal) |
| 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 |
| Kyrgyzstan | kg_tin | Kyrgyzstan Tax Identification Number |
| Laos | la_tin | Laos Tax Identification Number |
| Latvia | eu_vat | European VAT Number |
| Liechtenstein | li_uid | Liechtensteinian UID Number |
| Liechtenstein | li_vat | Liechtenstein VAT 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 |
| Mauritania | mr_nif | Mauritania Tax Identification Number (Número de Identificação Fiscal) |
| Mexico | mx_rfc | Mexican RFC Number |
| Moldova | md_vat | Moldova VAT Number |
| Montenegro | me_pib | Montenegro PIB Number |
| Morocco | ma_vat | Morocco VAT Number |
| Nepal | np_pan | Nepal PAN Number |
| Netherlands | eu_vat | European VAT Number |
| New Zealand | nz_gst | New Zealand GST Number |
| Nigeria | ng_tin | Nigerian Tax Identification Number |
| North Macedonia | mk_vat | North Macedonia VAT Number |
| Northern Ireland | eu_vat | Northern Ireland VAT 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 |
| Senegal | sn_ninea | Senegal NINEA Number |
| 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 |
| Suriname | sr_fin | Suriname FIN Number |
| Sweden | eu_vat | European VAT Number |
| Switzerland | ch_uid | Switzerland UID Number |
| Switzerland | ch_vat | Switzerland VAT Number |
| Taiwan | tw_vat | Taiwanese VAT |
| Tajikistan | tj_tin | Tajikistan Tax Identification Number |
| Tanzania | tz_vat | Tanzania VAT Number |
| Thailand | th_vat | Thai VAT |
| Turkey | tr_tin | Turkish Tax Identification Number |
| Uganda | ug_tin | Uganda Tax Identification Number |
| Ukraine | ua_vat | Ukrainian VAT |
| United Arab Emirates | ae_trn | United Arab Emirates TRN |
| United Kingdom | gb_vat | United Kingdom VAT Number |
| United States | us_ein | United States EIN |
| Uruguay | uy_ruc | Uruguayan RUC Number |
| Uzbekistan | uz_tin | Uzbekistan TIN Number |
| Uzbekistan | uz_vat | Uzbekistan VAT Number |
| Venezuela | ve_rif | Venezuelan RIF Number |
| Vietnam | vn_tin | Vietnamese Tax ID Number |
| Zambia | zm_tin | Zambia Tax Identification Number |
| Zimbabwe | zw_tin | Zimbabwe Tax Identification Number |
Show child attributes
AD, AE, AL, AM, AO, AR, AT, AU, AW, AZ, BA, BB, BD, BE, BF, BG, BH, BJ, BO, BR, BS, BY, CA, CD, CH, CL, CM, CN, CO, CR, CV, DE, CY, CZ, DK, DO, EC, EE, EG, ES, ET, EU, FI, FR, GB, GE, GN, GR, HK, HR, HU, ID, IE, IL, IN, IS, IT, JP, KE, KG, KH, KR, KZ, LA, LI, LT, LU, LV, MA, MD, ME, MK, MR, MT, MX, MY, NG, NL, NO, NP, NZ, OM, PE, PH, PL, PT, RO, RS, RU, SA, SE, SG, SI, SK, SN, SR, SV, TH, TJ, TR, TW, TZ, UA, UG, US, UY, UZ, VE, VN, ZA, ZM, ZW ad_nrt, ae_trn, al_tin, am_tin, ao_tin, ar_cuit, eu_vat, au_abn, au_arn, aw_tin, az_tin, ba_tin, bb_tin, bd_bin, bf_ifu, bg_uic, bh_vat, bj_ifu, bo_tin, br_cnpj, br_cpf, bs_tin, by_tin, ca_bn, ca_gst_hst, ca_pst_bc, ca_pst_mb, ca_pst_sk, ca_qst, cd_nif, ch_uid, ch_vat, cl_tin, cm_niu, cn_tin, co_nit, cr_tin, cv_nif, de_stn, do_rcn, ec_ruc, eg_tin, es_cif, et_tin, eu_oss_vat, gb_vat, ge_vat, gn_nif, hk_br, hr_oib, hu_tin, id_npwp, il_vat, in_gst, is_vat, jp_cn, jp_rn, jp_trn, ke_pin, kg_tin, kh_tin, kr_brn, kz_bin, la_tin, li_uid, li_vat, ma_vat, md_vat, me_pib, mk_vat, mr_nif, mx_rfc, my_frp, my_itn, my_sst, ng_tin, no_vat, no_voec, np_pan, nz_gst, om_vat, pe_ruc, ph_tin, ro_tin, rs_pib, ru_inn, ru_kpp, sa_vat, sg_gst, sg_uen, si_tin, sn_ninea, sr_fin, sv_nit, th_vat, tj_tin, tr_tin, tw_vat, tz_vat, ua_vat, ug_tin, us_ein, uy_ruc, uz_tin, uz_vat, ve_rif, vn_tin, za_vat, zm_tin, zw_tin Free-form text which is available on the invoice PDF and the Orb invoice portal.
A list of credit notes associated with the invoice
Show child attributes
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
Show child attributes
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.
URL to the downloadable PDF version of the receipt. This field will be null for payment attempts that did not succeed.
"https://assets.withorb.com/receipt/rUHdhmg45vY45DX/qEAeuYePaphGMdFb"
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.
Show child attributes
percentage Only available if discount_type is percentage. This is a number between 0 and 1.
0 <= x <= 1List of price_ids that this discount applies to. For plan/plan phase discounts, this can be a subset of prices.
["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"]The filters that determine which prices to apply this discount to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
Show child attributes
Minimum amount applied
The filters that determine which prices to apply this minimum to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
List of price_ids that this minimum amount applies to. For plan/plan phase minimums, this can be a subset of prices.
Show child attributes
Maximum amount applied
The filters that determine which prices to apply this maximum to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
List of price_ids that this maximum amount applies to. For plan/plan phase maximums, this can be a subset of prices.
The breakdown of prices in this invoice.
Show child attributes
The final amount for a line item after all adjustments and pre paid credits have been applied.
The end date of the range of time applied for this line item's price.
[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.
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).
Show child attributes
True for adjustments that apply to an entire invoice, false for adjustments that apply to only one price.
The filters that determine which prices to apply this adjustment to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
The price IDs that this adjustment applies to.
The reason for the adjustment.
The adjustment id this adjustment replaces. This adjustment will take the place of the replaced adjustment in plan version migrations.
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.
Either the fixed fee quantity or the usage during the service period.
The start date of the range of time applied for this line item's price.
The line amount before any adjustments.
The line amount after any adjustments and before overage conversion, credits and partial invoicing.
The number of prepaid credits applied.
Any amount applied from a partial invoice
For complex pricing structures, the line item can be broken down further in sub_line_items.
Show child attributes
The total amount for this sub line item.
matrix The scaled quantity for this line item for specific pricing structures
An array of tax rates and their incurred tax amounts. Empty if no tax integration is configured.
Show child attributes
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
Show child attributes
The pricing model type
unit Configuration for unit pricing
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.
Show child attributes
The price id this price replaces. This price will take the place of the replaced price in plan version migrations.
usage_price, fixed_price, composite_price one_time, monthly, quarterly, semi_annual, annual, custom in_advance, in_arrear Show child attributes
unit A minimal representation of an Item containing only the essential identifying information.
Show child attributes
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
Show child attributes
percentage Only available if discount_type is percentage. This is a number between 0 and 1.
0 <= x <= 1List of price_ids that this discount applies to. For plan/plan phase discounts, this can be a subset of prices.
["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"]The filters that determine which prices to apply this discount to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
Show child attributes
Minimum amount applied
The filters that determine which prices to apply this minimum to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
List of price_ids that this minimum amount applies to. For plan/plan phase minimums, this can be a subset of prices.
Show child attributes
Maximum amount applied
The filters that determine which prices to apply this maximum to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
List of price_ids that this maximum amount applies to. For plan/plan phase maximums, this can be a subset of prices.
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.
The total before any discounts and minimums are applied.
The scheduled date of the invoice
Was this page helpful?