API documentation
Alert
Customer
- GETList customers
- POSTCreate customer
- GETFetch customer by external ID
- PUTUpdate customer by external ID
- GETFetch customer costs by external ID
- POSTUpdate payment methods from payment provider
- GETFetch customer
- PUTUpdate customer
- DELDelete customer
- GETList balance transactions
- POSTCreate customer balance transaction
- GETFetch customer costs
- POSTUpdate payment methods from payment provider
Credit
- GETFetch customer credit balance by external customer id
- GETFetch customer credits ledger by external ID
- POSTCreate ledger entry by external ID
- GETList top-ups by external ID
- POSTCreate top-up by external ID
- DELDeactivate top-up by external ID
- GETFetch customer credit balance
- GETFetch customer credits ledger
- POSTCreate ledger entry
- GETList top-ups
- POSTCreate top-up
- DELDeactivate top-up
Dimensional Price Group
Event
Invoice
Availability
Plan
Price
Subscription Change
Subscription
- GETList subscriptions
- POSTCreate subscription
- GETFetch subscription
- PUTUpdate subscription
- POSTCancel subscription
- GETFetch subscription costs
- GETFetch subscription schedule
- POSTSchedule plan change
- POSTTrigger phase
- POSTUnschedule subscription cancellation
- POSTUnschedule fixed fee quantity updates
- POSTUnschedule plan change
- POSTUpdate price quantity
- POSTUpdate trial for subscription
- GETFetch subscription usage
Price interval
Fetch plan
This endpoint is used to fetch plan details given a plan identifier. It returns information about the prices included in the plan and their configuration, as well as the product that the plan is attached to.
Serialized prices
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. A detailed explanation of
price types can be found in the Price schema.
Phases
Orb supports plan phases, also known as contract ramps. For plans with phases, the serialized prices refer to all prices across all phases.
curl --request GET \
--url https://api.withorb.com/v1/plans/{plan_id} \
--header 'Authorization: Bearer <token>'
{
"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>"
]
}
]
},
"minimum": {
"minimum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
]
},
"discount": {
"discount_type": "percentage",
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"reason": "<string>",
"percentage_discount": 0.15
},
"product": {
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"name": "<string>"
},
"version": 123,
"trial_config": {
"trial_period": 123,
"trial_period_unit": "days"
},
"plan_phases": [
{
"id": "<string>",
"description": "<string>",
"duration": 123,
"duration_unit": "daily",
"name": "<string>",
"order": 123,
"minimum": {
"minimum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
]
},
"maximum": {
"maximum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
]
},
"maximum_amount": "<string>",
"minimum_amount": "<string>",
"discount": {
"discount_type": "percentage",
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"reason": "<string>",
"percentage_discount": 0.15
}
}
],
"base_plan": {
"id": "m2t5akQeh2obwxeU",
"external_plan_id": "m2t5akQeh2obwxeU",
"name": "Example plan"
},
"base_plan_id": "<string>",
"external_plan_id": "<string>",
"currency": "<string>",
"invoicing_currency": "<string>",
"net_terms": 123,
"default_invoice_memo": "<string>",
"prices": [
{
"metadata": {},
"id": "<string>",
"name": "<string>",
"external_price_id": "<string>",
"price_type": "usage_price",
"model_type": "unit",
"created_at": "2023-11-07T05:31:56Z",
"cadence": "one_time",
"billing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"invoicing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"billable_metric": {
"id": "<string>"
},
"dimensional_price_configuration": {
"dimensional_price_group_id": "<string>",
"dimension_values": [
"<string>"
]
},
"fixed_price_quantity": 123,
"plan_phase_order": 123,
"currency": "<string>",
"conversion_rate": 123,
"item": {
"id": "<string>",
"name": "<string>"
},
"credit_allocation": {
"currency": "<string>",
"allows_rollover": true
},
"discount": {
"discount_type": "percentage",
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"reason": "<string>",
"percentage_discount": 0.15
},
"minimum": {
"minimum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
]
},
"maximum_amount": "<string>",
"unit_config": {
"unit_amount": "<string>"
}
}
],
"adjustments": [
{
"id": "<string>",
"is_invoice_level": true,
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"reason": "<string>",
"adjustment_type": "usage_discount",
"usage_discount": 123,
"plan_phase_order": 123
}
]
}
Authorizations
API Keys can be issued in the Orb's web application.
Path Parameters
Response
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.
Was this page helpful?
curl --request GET \
--url https://api.withorb.com/v1/plans/{plan_id} \
--header 'Authorization: Bearer <token>'
{
"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>"
]
}
]
},
"minimum": {
"minimum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
]
},
"discount": {
"discount_type": "percentage",
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"reason": "<string>",
"percentage_discount": 0.15
},
"product": {
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"name": "<string>"
},
"version": 123,
"trial_config": {
"trial_period": 123,
"trial_period_unit": "days"
},
"plan_phases": [
{
"id": "<string>",
"description": "<string>",
"duration": 123,
"duration_unit": "daily",
"name": "<string>",
"order": 123,
"minimum": {
"minimum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
]
},
"maximum": {
"maximum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
]
},
"maximum_amount": "<string>",
"minimum_amount": "<string>",
"discount": {
"discount_type": "percentage",
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"reason": "<string>",
"percentage_discount": 0.15
}
}
],
"base_plan": {
"id": "m2t5akQeh2obwxeU",
"external_plan_id": "m2t5akQeh2obwxeU",
"name": "Example plan"
},
"base_plan_id": "<string>",
"external_plan_id": "<string>",
"currency": "<string>",
"invoicing_currency": "<string>",
"net_terms": 123,
"default_invoice_memo": "<string>",
"prices": [
{
"metadata": {},
"id": "<string>",
"name": "<string>",
"external_price_id": "<string>",
"price_type": "usage_price",
"model_type": "unit",
"created_at": "2023-11-07T05:31:56Z",
"cadence": "one_time",
"billing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"invoicing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"billable_metric": {
"id": "<string>"
},
"dimensional_price_configuration": {
"dimensional_price_group_id": "<string>",
"dimension_values": [
"<string>"
]
},
"fixed_price_quantity": 123,
"plan_phase_order": 123,
"currency": "<string>",
"conversion_rate": 123,
"item": {
"id": "<string>",
"name": "<string>"
},
"credit_allocation": {
"currency": "<string>",
"allows_rollover": true
},
"discount": {
"discount_type": "percentage",
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"reason": "<string>",
"percentage_discount": 0.15
},
"minimum": {
"minimum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
]
},
"maximum_amount": "<string>",
"unit_config": {
"unit_amount": "<string>"
}
}
],
"adjustments": [
{
"id": "<string>",
"is_invoice_level": true,
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"reason": "<string>",
"adjustment_type": "usage_discount",
"usage_discount": 123,
"plan_phase_order": 123
}
]
}