curl --request POST \
--url https://api.withorb.com/v1/prices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model_type": "unit",
"unit_config": {
"unit_amount": "<string>",
"prorated": false
},
"name": "<string>",
"item_id": "<string>",
"cadence": "annual",
"currency": "<string>",
"metadata": {},
"external_price_id": "<string>",
"dimensional_price_configuration": {
"dimension_values": [
"<string>"
],
"dimensional_price_group_id": "<string>",
"external_dimensional_price_group_id": "<string>"
},
"license_type_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>"
}
}
}
'{
"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>"
]
}
],
"license_type_id": "<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>"
]
},
"license_type": {
"id": "<string>",
"name": "<string>",
"grouping_key": "<string>"
}
}This endpoint is used to create a price. A price created using this endpoint is always an add-on, meaning that it’s not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans.
An external_price_id can be optionally specified as an alias to allow ergonomic interaction with prices in the Orb API.
See the Price resource for the specification of different price model configurations possible in this endpoint.
curl --request POST \
--url https://api.withorb.com/v1/prices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model_type": "unit",
"unit_config": {
"unit_amount": "<string>",
"prorated": false
},
"name": "<string>",
"item_id": "<string>",
"cadence": "annual",
"currency": "<string>",
"metadata": {},
"external_price_id": "<string>",
"dimensional_price_configuration": {
"dimension_values": [
"<string>"
],
"dimensional_price_group_id": "<string>",
"external_dimensional_price_group_id": "<string>"
},
"license_type_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>"
}
}
}
'{
"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>"
]
}
],
"license_type_id": "<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>"
]
},
"license_type": {
"id": "<string>",
"name": "<string>",
"grouping_key": "<string>"
}
}API Keys can be issued in the Orb's web application.
New floating price request body params.
The pricing model type
unit Configuration for unit pricing
Show child attributes
The name of the price.
"Annual fee"
The id of the item the price will be associated with.
The cadence to bill for this price on.
annual, semi_annual, monthly, quarterly, one_time, custom An ISO 4217 currency string for which this price is billed in.
User-specified key/value pairs for the resource. Individual keys can be removed by setting the value to null, and the entire metadata mapping can be cleared by setting metadata to null.
Show child attributes
An alias for the price.
For dimensional price: specifies a price group and dimension values
Show child attributes
The ID of the license type to associate with this price.
The id of the billable metric for the price. Only needed if the price is usage-based.
If the Price represents a fixed cost, the price will be billed in-advance if this is true, and in-arrears if this is false.
If the Price represents a fixed cost, this represents the quantity of units applied.
The property used to group this price on an invoice
1For custom cadence: specifies the duration of the billing period in days or months.
Show child attributes
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
Show child attributes
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
Created
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
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
Show child attributes
Show child attributes
Show child attributes
A minimal representation of an Item containing only the essential identifying information.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The LicenseType resource represents a type of license that can be assigned to users. License types are used during billing by grouping metrics on the configured grouping key.
Show child attributes
Was this page helpful?