Menu
Create Plan Add On
Create an add-on
/plans/{plan_id}/add_onsUse it in a workflow
- Add a step and choose the Recurly connector.
- Pick the Create Plan Add On action (under add-on).
- Fill in the fields below, then reference the result from later steps as
{{createPlanAddOn.response.data}}.
Request
Path parameters
plan_idstringrequiredPlan ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-gold`.
Request body
Enter the body as JSON in the step's Body field.
item_codestringUnique code to identify an item. Available when the `Credit Invoices` feature is enabled. If `item_id` and `item_code` are both present, `item_id` will be used.
item_idstringSystem-generated unique identifier for an item. Available when the `Credit Invoices` feature is enabled. If `item_id` and `item_code` are both present, `item_id` will be used.
codestringrequiredThe unique identifier for the add-on within its plan. If `item_code`/`item_id` is part of the request then `code` must be absent. If `item_code`/`item_id` is not present `code` is required.
namestringrequiredDescribes your add-on and will appear in subscribers' invoices. If `item_code`/`item_id` is part of the request then `name` must be absent. If `item_code`/`item_id` is not present `name` is required.
add_on_typestringWhether the add-on type is fixed, or usage-based.
One offixedusageDefault "fixed"
usage_typestringType of usage, required if `add_on_type` is `usage`. See our [Guide](https://recurly.com/developers/guides/usage-based-billing-guide.html) for an overview of how to configure usage add-ons.
One ofpricepercentage
usage_calculation_typestringThe type of calculation to be employed for an add-on. Cumulative billing will sum all usage records created in the current billing cycle. Last-in-period billing will apply only the most recent usage record in the billing period. If no value is specified, cumulative billing will be used.
One ofcumulativelast_in_period
usage_percentagenumber (float)The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if `add_on_type` is usage, `tier_type` is `flat` and `usage_type` is percentage. Must be omitted otherwise.
measured_unit_idstringSystem-generated unique identifier for a measured unit to be associated with the add-on. Either `measured_unit_id` or `measured_unit_name` are required when `add_on_type` is `usage`. If `measured_unit_id` and `measured_unit_name` are both present, `measured_unit_id` will be used.
measured_unit_namestringName of a measured unit to be associated with the add-on. Either `measured_unit_id` or `measured_unit_name` are required when `add_on_type` is `usage`. If `measured_unit_id` and `measured_unit_name` are both present, `measured_unit_id` will be used.
plan_idstringliability_gl_account_idstringThe ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.
revenue_gl_account_idstringThe ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.
performance_obligation_idstringThe ID of a performance obligation. Performance obligations are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.
accounting_codestringAccounting code for invoice line items for this add-on. If no value is provided, it defaults to add-on's code. If `item_code`/`item_id` is part of the request then `accounting_code` must be absent.
revenue_schedule_typestringWhen this add-on is invoiced, the line item will use this revenue schedule. If `item_code`/`item_id` is part of the request then `revenue_schedule_type` must be absent in the request as the value will be set from the item.
One ofat_range_endat_range_startevenlynever
display_quantitybooleanDetermines if the quantity field is displayed on the hosted pages for the add-on.
Default false
default_quantityintegerDefault quantity for the hosted pages.
Default 1
optionalbooleanWhether the add-on is optional for the customer to include in their purchase on the hosted payment page. If false, the add-on will be included when a subscription is created through the Recurly UI. However, the add-on will not be included when a subscription is created through the API.
avalara_transaction_typeintegerUsed by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `AddOn`, then the `avalara_transaction_type` must be absent.
avalara_service_typeintegerUsed by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `AddOn`, then the `avalara_service_type` must be absent.
tax_codestringOptional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes. If `item_code`/`item_id` is part of the request then `tax_code` must be absent.
harmonized_system_codestringThe Harmonized System (HS) code is an internationally standardized system of names and numbers to classify traded products. The HS code, sometimes called Commodity Code, is used by customs authorities around the world to identify products when assessing duties and taxes. The HS code may also be referred to as the tariff code or customs code. Values should contain only digits and decimals.
currenciesarray<object>* If `item_code`/`item_id` is part of the request and the item has a default currency, then `currencies` is optional. If the item does not have a default currency, then `currencies` is required. If `item_code`/`item_id` is not present `currencies` is required. * If the add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then `currencies` must be absent. * Must be absent if `add_on_type` is `usage` and `usage_type` is `percentage`.
currencystringrequired3-letter ISO 4217 currency code.
unit_amountnumber (float)Allows up to 2 decimal places. Required unless `unit_amount_decimal` is provided.
unit_amount_decimalstringAllows up to 9 decimal places. If `unit_amount_decimal` is provided, `unit_amount` cannot be provided.
tax_inclusivebooleanThis field is deprecated. Please do not use it.
Default false
tier_typestringThe pricing model for the add-on. For more information, [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based). See our [Guide](https://recurly.com/developers/guides/item-addon-guide.html) for an overview of how to configure quantity-based pricing models.
One offlattieredstairstepvolumeDefault "flat"
usage_timeframestringThe time at which usage totals are reset for billing purposes. Allows for `tiered` add-ons to accumulate usage over the course of multiple billing periods.
One ofbilling_periodsubscription_termDefault "billing_period"
tiersarray<object>If the tier_type is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount` for the desired `currencies`. There must be one tier without an `ending_quantity` value which represents the final tier.
ending_quantityintegerEnding quantity for the tier. This represents a unit amount for unit-priced add ons. Must be left empty if it is the final tier.
usage_percentagestring(deprecated) -- Use the percentage_tiers object instead.
currenciesarray<object>3 fieldspercentage_tiersarray<object>Array of objects which must have at least one set of tiers per currency and the currency code. The tier_type must be `volume` or `tiered`, if not, it must be absent. There must be one tier without an `ending_amount` value which represents the final tier. This feature is currently in development and requires approval and enablement, please contact support.
currencystring3-letter ISO 4217 currency code.
tiersarray<object>2 fields{
"code": "string",
"name": "string",
"item_code": "string",
"item_id": "string",
"add_on_type": "fixed",
"usage_type": "price",
"usage_calculation_type": "cumulative",
"usage_percentage": 0,
"measured_unit_id": "string",
"measured_unit_name": "string",
"plan_id": "string",
"liability_gl_account_id": "string"
}
Response
Returns 201 with an object. Read it in later steps with {{createPlanAddOn.response.data.<field>}}.
idstringobjectstringplan_idstringcodestringThe unique identifier for the add-on within its plan.
statestringAdd-ons can be either active or inactive.
One ofactiveinactive
namestringDescribes your add-on and will appear in subscribers' invoices.
add_on_typestringWhether the add-on type is fixed, or usage-based.
One offixedusage
usage_typestringType of usage, returns usage type if `add_on_type` is `usage`.
One ofpricepercentage
usage_calculation_typestringThe type of calculation to be employed for an add-on. Cumulative billing will sum all usage records created in the current billing cycle. Last-in-period billing will apply only the most recent usage record in the billing period. If no value is specified, cumulative billing will be used.
One ofcumulativelast_in_period
usage_percentagenumber (float)The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0.
measured_unit_idstringSystem-generated unique identifier for an measured unit associated with the add-on.
liability_gl_account_idstringThe ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.
revenue_gl_account_idstringThe ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.
performance_obligation_idstringThe ID of a performance obligation. Performance obligations are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.
accounting_codestringAccounting code for invoice line items for this add-on. If no value is provided, it defaults to add-on's code.
revenue_schedule_typestringWhen this add-on is invoiced, the line item will use this revenue schedule. If `item_code`/`item_id` is part of the request then `revenue_schedule_type` must be absent in the request as the value will be set from the item.
One ofat_range_endat_range_startevenlynever
avalara_transaction_typeintegerUsed by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
avalara_service_typeintegerUsed by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
tax_codestringOptional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes. If `item_code`/`item_id` is part of the request then `tax_code` must be absent.
harmonized_system_codestringThe Harmonized System (HS) code is an internationally standardized system of names and numbers to classify traded products. The HS code, sometimes called Commodity Code, is used by customs authorities around the world to identify products when assessing duties and taxes. The HS code may also be referred to as the tariff code or customs code. Values should contain only digits and decimals.
display_quantitybooleanDetermines if the quantity field is displayed on the hosted pages for the add-on.
Default false
default_quantityintegerDefault quantity for the hosted pages.
Default 1
optionalbooleanWhether the add-on is optional for the customer to include in their purchase on the hosted payment page. If false, the add-on will be included when a subscription is created through the Recurly UI. However, the add-on will not be included when a subscription is created through the API.
currenciesarray<object>currencystringrequired3-letter ISO 4217 currency code.
unit_amountnumber (float)Allows up to 2 decimal places. Required unless `unit_amount_decimal` is provided.
unit_amount_decimalstringAllows up to 9 decimal places. If `unit_amount_decimal` is provided, `unit_amount` cannot be provided.
tax_inclusivebooleanThis field is deprecated. Please do not use it.
Default false
itemobjectJust the important parts.
idstringobjectstringcodestringUnique code to identify the item.
statestringThe current state of the item.
One ofactiveinactive
namestringThis name describes your item and will appear on the invoice when it's purchased on a one time basis.
descriptionstringOptional, description.
tier_typestringThe pricing model for the add-on. For more information, [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based). See our [Guide](https://recurly.com/developers/guides/item-addon-guide.html) for an overview of how to configure quantity-based pricing models.
One offlattieredstairstepvolumeDefault "flat"
usage_timeframestringThe time at which usage totals are reset for billing purposes.
One ofbilling_periodsubscription_termDefault "billing_period"
tiersarray<object>ending_quantityintegerEnding quantity for the tier. This represents a unit amount for unit-priced add ons. Must be left empty if it is the final tier.
usage_percentagestring(deprecated) -- Use the percentage_tiers object instead.
currenciesarray<object>3 fieldspercentage_tiersarray<object>This feature is currently in development and requires approval and enablement, please contact support.
currencystring3-letter ISO 4217 currency code.
tiersarray<object>2 fieldsexternal_skustringOptional, stock keeping unit to link the item to other inventory systems.
created_atstring (date-time)updated_atstring (date-time)deleted_atstring (date-time){
"code": "string",
"name": "string",
"id": "string",
"object": "string",
"plan_id": "string",
"state": "active",
"add_on_type": "fixed",
"usage_type": "price",
"usage_calculation_type": "cumulative",
"usage_percentage": 0,
"measured_unit_id": "string",
"liability_gl_account_id": "string"
}
Need more? See the Recurly guide for connection setup and behaviour shared by every action.