Version 3.1
We use YAML type abbreviations to describe the supported types of fields.
The YAML snippets demonstrating the Pricing2Yaml specification are intentionally incomplete. Certain fields have been omitted for clarity and explanation purposes.
syntaxVersion
- required
- Supported value:
3.0
Version of the Pricing2Yaml specification.
syntaxVersion: "3.0"
Libraries support
| Pricing4Java | Pricing4TS | |
syntaxVersion | ✓ | ✓ |
saasName
- required
- Field type:
str
Name of the pricing.
saasName: "Petclinic"
| Pricing4Java | Pricing4TS | |
saasName | ✓ | ✓ |
version
- optional
- Field type:
string
Specify the version of the pricing. If the field is not provided with a value, the default is the value of the createdAt field as a string
version: "jan-25"
Libraries support
| Pricing4Java | Pricing4TS | |
version | ✓ | ✓ |
createdAt
- required
- Field type:
timestamporstrin ISO 8601 format
Date in which your pricing was modeled.
Timestamp:
createdAt: 2024-11-14
String in ISO 8601:
createdAt: "2024-11-14"
Libraries support
| Pricing4Java | Pricing4TS | |
createdAt | ✓ | ✓ |
url
- optional
- Field type: a
strthat represents anURLmust be begin withhttporhttps.
Field url holds a URL that points to your pricing page.
url: https://example.org/pricing
Libraries support
| Pricing4Java | Pricing4TS | |
url | ✓ | ✓ |
tags
- optional
- Field type:
seqofstr
You add one or more features into a group. These groups help features to be organized when rendering your pricing.
tags:
- Code Management
- Code Workflow
- Collaboration
features:
publicRepositories:
tag: Code Management
privateRepositories:
tag: Code Management
githubActions:
tag: Code Workflow
issues:
tag: Collaboration
Libraries support
| Pricing4Java | Pricing4TS | |
tags | ✓ | ✓ |
currency
- required
- Field type:
str
Currency in which the pricing plans and addOns are selled. Use preferably currency codes for better pricing standarization.
For example USD stands for USA dollars and EUR stands for Euros.
currency: "USD"
Libraries support
| Pricing4Java | Pricing4TS | |
currency | ✓ | ✓ |
billing
- optional, if a map of billing is not provided
billingwill be set by default with:
billing:
monthly: 1
- Field type:
mapoffloatinside range(0..1]
The prices of plans and add-ons may vary based on the billing option chosen by the user when subscribing.
Longer subscription periods offer greater discounts. billing field holds a map
of monthly price reductions to be applied to price field of plans and add-ons.
You are free to put inside the map the billing name that you wish.
Price reductions must be positive values greater than 0 and less than or equal to 1.
Consider the following example:
billing:
monthly: 1
semester: 0.95
annual: 0.90
plans:
STANDARD:
price: 10.00
addOns:
ULTRA:
price: 15.00
Here STANDARD plan costs 10.00 monthly, 9.5 monhtly if billing
by semester and 9.00 monthly if billing annually.
ULTRA add-on costs 15.00 monthly if billing monthly, 14.25 monthly if billing by semester and
13.5 monthly if billing annually.
Libraries support
| Pricing4Java | Pricing4TS | |
billing | ✓ | ✓ |
variables
- optional
- Field type:
map
The variables field provides a mechanism to introduce dynamism into the price field of plans and add-ons. It allows the definition of reusable values and data structures that can be referenced within price expressions, thereby enabling context-dependent and parametrized price definitions.
Variables are defined as key–value pairs and can represent primitive values (for example, numbers or strings) as well as complex data structures such as objects or lists. These variables are later consumed within price expressions by prefixing their identifiers with the # symbol.
All price expressions are evaluated using JavaScript semantics. As a result, variables can be combined with standard operators and functions to construct flexible pricing logic.
Basic Usage
variables:
x: 3
plans:
PRO:
price: 9.99
ENTERPRISE:
price: "5 * #x" # 5 * 3
In this example, the variables field defines a single variable x with value 3. The ENTERPRISE plan references this variable within its price expression. During evaluation, #x is replaced with 3, producing the expression 5 * 3, which evaluates to 15.00.
Structured Variables
plans:
PRO:
price: 9.99
ENTERPRISE:
price: "5 * #priceByRegion[#region.concat('-price')]" # 5 * 3 if region is eu
variables:
region: eu
priceByRegion:
eu-price: 3
us-price: 4
In this configuration, the variables field defines both a contextual parameter (region) and a mapping (priceByRegion). The price expression dynamically computes the appropriate key using #region.concat('-price'), which evaluates to "eu-price". This key is then used to retrieve the corresponding value (3) from priceByRegion. The final computed price is therefore 15.00.
Libraries support
| Pricing4Java | Pricing4TS | |
variables | ✗ | ✓ |
features
- required
- Field type:
map
A map containing your pricing features. Each key of the map is the feature name and its value is a map containing feature attributes.
features:
awesome_feature:
cool_feature:
nice_feature:
# ...
Libraries support
| Pricing4Java | Pricing4TS | |
features | ✓ | ✓ |
features.<name>.description
- optional
- Field type:
str
Brief summary of what features does and offers to your users. Feature descriptions are usually in a collapsable element or in an icon hiding it, see Github pricing descriptions for example.
features:
publicRepositories:
description: Host open source projects in public GitHub repositories, accessible via web or command line.
Public repositories are accessible to anyone at GitHub.com."
Libraries support
| Pricing4Java | Pricing4TS | |
features.<name>.description | ✓ | ✓ |
features.<name>.tag
- optional
- Field type:
str
Name of the group where that feature belongs. First defined a
tags block in order to put a field here.
tags:
- Code Management
features:
publicRepositories:
tag: Code Management
Libraries support
| Pricing4Java | Pricing4TS | |
features.<name>.tag | ✓ | ✓ |
features.<name>.type
- required
- Field type:
str - Supported values: one of
AUTOMATION,DOMAIN,GUARANTEE,INFORMATION,INTEGRATION,MANAGEMENT,PAYMENTorSUPPORT
Automation: they permit to configure the system in order to perform some actions autonomously or track thresholds and notify the user if anyone is exceeded. It also includes any task performed by a bot or AI, such as predictions, generative AI, etc...
features:
codeOwners:
description:
Automatically request reviews or require approval by selected contributors
when changes are made to sections of code that they own.
type: AUTOMATION
automationType: TRACKING
Domain: provide functionality related to the domain of the system, allowing to perform new operations or using exclusive services.
features:
publicRepositories:
description:
Host open source projects in public GitHub repositories, accessible via
web or command line. Public repositories are accessible to anyone at
GitHub.com.
type: DOMAIN
Guarantee: technical commitments of the company that operates the system towards the users.
features:
dataCypher:
description: Data encryption at rest and in transit.
type: GUARANTEE
Information: allow to see, use, visualize or extract additional data from your features.
features:
auditLogs:
description:
Audit logs: Audit logs provide a record of changes and usage in the
Enterprise Grid plan. You can view audit logs directly in Slack, export
them in CSV format, and use the audit logs API to create custom monitoring
tools.
type: INFORMATION
Integration: permit users to interact with the system through its API, or to use functionalities from external third-party software within the system.
features:
adminAnalyticsAPI:
description: Retrieve analytics data for a specific date in a
compressed JSON file format.
type: INTEGRATION
integrationType: API
Management: are focused on team leaders and system administrators. They ease the supervision, organization and guidance of projects, and allow the configuration of accounts and organization-based restrictions and rules.
features:
customUserGroups:
description:
Custom user groups: Facilitate receiving notifications and communicating
with entire teams, departments, and groups.
type: MANAGEMENT
Support: expose the granularity of customer support offered within the plans.
features:
enterpriseSupport:
description: Custom support for our business partners
type: SUPPORT
Payment: specify payment conditions and possibilities.
features:
paymentMethod:
type: PAYMENT
defaultValue:
- INVOICE
- OTHER
Libraries support
| Pricing4Java | Pricing4TS | |
features.<name>.type | ✓ | ✓ |
features.<name>.valueType
- required
- Field type:
str - Supported values: one of
BOOLEAN,NUMERICorTEXT
Field valueType sets the defaultValue type signature of the feature you are
modeling. For example, if your feature valueType is BOOLEAN you must put
true or false in the defaultValue field, if valueType is NUMERIC you must put
a number and in the case of TEXT then defaultValue has to be a string or a list of string.
features:
boolean-feature:
valueType: BOOLEAN
defaultValue: false
numeric-feature:
valueType: NUMERIC
defaultValue: 0
text-feature:
valueType: TEXT
defaultValue: Pricing2Yaml is awesome!
Libraries support
| Pricing4Java | Pricing4TS | |
features.<name>.valueType | ✓ | ✓ |
features.<name>.defaultValue
- required
- Field type is
boolifvalueTypeis set toBOOLEAN - Field type is
intifvalueTypeset toNUMERIC - Field type is
strorseqof payment methods ifvalueTypeis set toTEXT
This field holds the default value of your feature. All default values are shared in your plan and addons. You can
override your features values in plans.<plan_name>.features or in addOns.<addOn_name>.features
section of your pricing.
Supported payment methods are: CARD, GATEWAY, INVOICE, ACH, WIRE_TRANSFER or OTHER.
To help you understand how overriding features works, imagine you have the following pricing matrix:
| SILVER | GOLD | PLATINUM | |
|---|---|---|---|
| supportPriority | LOW | MEDIUM | HIGH |
If you want your supportPriority to be different in your GOLD and PLATINUM plans you
will do the following using Pricing2Yaml syntax:
features:
supportPriority:
valueType: TEXT
defaultValue: LOW
plans:
SILVER:
features: null
GOLD:
features:
supportPriority:
value: MEDIUM
PLATINUM:
features:
supportPriority:
value: HIGH
Notice that SILVER features are null, meaning that, supportPriority
will have the value LOW as you have previously define it in the features block.
Libraries support
| Pricing4Java | Pricing4TS | |
features.<name>.defaultValue | ✓ | ✓ |
features.<name>.expression
A boolean expression defining the conditions under which the feature is enabled. This expression can reference other features and usage limits using the pricingContext and subscriptionContext objects.
Respectively, the pricingContext will be an object with the following structure:
{
features: {
<feature-name>: boolean | string,
...
},
usageLimits: {
<limit-name>: number | boolean,
...
}
}
while the subscriptionContext will have the following structure:
{
<usage-level-name>: number,
...
}
With this in mind, the expression field can be used to define the conditions under which a feature is enabled.
As the pricingContext utilized within the expression repressents as a map the current configuration of a user, you should be aware of using either features or usageLimits to access the atribute you want to evaluate. The features key will have the value or defaultValue of the feature with the given key, while usageLimits will return the equivalent of a declared usage limit.
For example, if we have a feature feature1 that should only be enabled if the user has not exceeded the usage limit usageLimit1, the expression would be:
feature1:
description: Pets description
valueType: BOOLEAN
defaultValue: true
expression: subscriptionContext['usageLimit1'] < pricingContext['usageLimits']['usageLimit1']
...
Libraries support
| Pricing4Java | Pricing4TS | |
features.<name>.expression | ✓ | ✓ |
features.<name>.serverExpression
- OPTIONAL
It is similar to expression, but this expression is evaluated on the server side, during the pricing evaluation process. It is particularly useful when expressions for client rendering do not coincide with server access ones. If not provided, the value of the expression field is used instead.
Libraries support
| Pricing4Java | Pricing4TS | |
features.<name>.serverExpression | ✓ | ✓ |
features.<name>.automationType
- If feature
typeisAUTOMATIONthis field is required - Field type:
str - Supported values: one of
BOT,FILTERING,TRACKINGorTASK_AUTOMATION
Type of the automation feature.
BOT: every automation feature that depends on machine learning algorithms or LLMs.
features:
postbot:
description: "https://learning.postman.com/docs/getting-started/basics/about-postbot/"
type: AUTOMATION
automationType: BOT
FILTERING: every automation feature that filters information. For example, spam filtering of mail clients.
features:
emailSpamFilter:
description: "Help protect your business against spam and malware with cloud-based email filtering"
type: AUTOMATION
automationType: FILTERING
TRACKING: every automation feature that monitors a metric and notify the user when reaching his threshold. For example, features that triggers some kind of event in the system like reaching the limit of API calls.
features:
dependabotAlerts:
description: "Get notified when there are new vulnerabilities affecting dependencies in your repositories."
type: AUTOMATION
automationType: TRACKING
TASK_AUTOMATION: every automation feature that permit users to automate tasks. For example, automatically moving the issues to "Done" when thery are closed in the Github kanban board.
features:
dependabotVersionUpdates:
description: "Keep projects up-to-date by automatically opening pull requests that update out-of-date dependencies."
type: AUTOMATION
automationType: TASK_AUTOMATION
Libraries support
| Pricing4Java | Pricing4TS | |
features.<name>.automationType | ✓ | ✓ |
features.<name>.docUrl
- If feature
typeisGUARANTEEthis is required - Field type:
str
URL redirecting to the guarantee or compliance documentation.
features:
enterpriseGradeSecurity:
description: "https://www.wrike.com/features/admin-security/"
type: GUARANTEE
docUrl: "https://www.wrike.com/features/admin-security/"
Libraries support
| Pricing4Java | Pricing4TS | |
features.<name>.docUrl | ✓ | ✓ |
features.<name>.integrationType
- If feature
typeisINTEGRATIONthis is required - Field type:
str - Supported values: one of
API,EXTENSION,IDENTITY_PROVIDER,WEB_SAAS,MARKETPLACEorEXTERNAL_DEVICE
Type of the integration feature.
API: every feature that includes an internal API that developers can consume.
adminAnalyticsAPI:
description: "Admin analytics API: Retrieve analytics data for a specific date in a compressed JSON file format."
type: INTEGRATION
integrationType: API
EXTENSION: every integration feature that extends your SaaS using an external system. For example a browser extension or code editor extension like VSCode.
features:
copilotIDEIntegration:
description: "Get IDE integration from Copilot in your IDE and mobile devices."
type: INTEGRATION
integrationType: EXTENSION
IDENTITY_PROVIDER: every integration feature, that involves a process to authenticate users internally or externally. For example Single Sign On (SSO) or LDAP.
features:
ldap:
description: Access GitHub Enterprise Server using your existing accounts and centrally manage repository access.
type: INTEGRATION
integrationType: IDENTITY_PROVIDER
WEB_SAAS: every integration feature that involves an external SaaS. For example,
sync your calendar with Outlook. Usage of features.<name>.pricingUrls is required.
features:
githubIntegration:
description: "Link your Overleaf projects directly to a GitHub repository that
acts as a remote repository for your overleaf project. This allows you to
share with collaborators outside of Overleaf, and integrate Overleaf into more complex workflows."
type: INTEGRATION
integrationType: WEB_SAAS
pricingsUrls:
- https://github.com/pricing
MARKETPLACE: every integration feature that offers many posibilities to integrate with other systems. For example a marketplace that offers widgets.
features:
githubApps:
description: Install apps that integrate directly with GitHub's API to improve
development workflows or build your own for private use or publication in the GitHub Marketplace."
type: INTEGRATION
integrationType: MARKETPLACE
EXTERNAL_DEVICE: every integration feature that involves interactiing with an outer device, like a mobile, a computer desktop. For example a 2FA feature.
features:
apps:
description: "Track time using a mobile app, desktop app, and browser extension."
type: INTEGRATION
integrationType: EXTERNAL_DEVICE
Libraries support
| Pricing4Java | Pricing4TS | |
features.<name>.integrationType | ✓ | ✓ |
features.<name>.pricingUrls
- If feature
typeisINTEGRATIONandintegrationTypeisWEB_SAASthis field is required - Field type:
seqofstr
You can specify a list of URLs linking to the associated pricing page of third party integrations that you offer in your pricing.
features:
googleWorkspaceIntegration:
type: INTEGRATION
integrationType: WEB_SAAS
pricingURLs:
- https://workspace.google.com/pricing
Libraries support
| Pricing4Java | Pricing4TS | |
features.<name>.pricingUrls | ✓ | ✓ |
features.<name>.render
- optional
- Field type: one of
AUTO,DISABLED,ENABLED; if not providedrenderis set toAUTOby default
Choose the behaviour when displaying a feature of the pricing. This field will only take effect on the Pricing2Yaml editor.
features:
googleWorkspaceIntegration:
render: DISABLED
Depending on the selected value, the feature will be rendered differently:
- If
renderis set to AUTO, no action is taken. - If
renderis set to ENABLED for a feature that has associated usage limits, the pricing will include one row showing the feature’s boolean value (i.e., whether it is available and for which plans). In addition, a separate row will be rendered for each associated usage limit, this time displaying the usage limit’s name in the table’s name column, along with its corresponding values. - If
renderis set to DISABLED, the feature will not be displayed in the pricing, nor will its associated usage limits.
If a usage limit is linked to multiple features and at least one of them is not set to DISABLED, then the usage limit will still be rendered—using its own name instead of the name of the feature.
Libraries support
| Pricing4Java | Pricing4TS | |
features.<name>.render | ✗ | ✓ |
usageLimits
- optional
- Field type:
map
A map containing the usage limits of your pricing. Each entry of this map will be the name of the corresponding usage limit.
usageLimits:
maxPets:
collaborators:
githubActionsQuota:
# ...
| Pricing4Java | Pricing4TS | |
usageLimits | ✓ | ✓ |
usageLimits.<name>.description
- optional
- Field type:
str
Brief summary of what the usage limit restricts.
usageLimits:
useMessagesAccess:
description: "The number of days you can access message and file information."
| Pricing4Java | Pricing4TS | |
usageLimits.<name>.description | ✓ | ✓ |
usageLimits.<name>.type
- required
- Field type:
str - Supported values: one of
NON_RENEWABLEorRENEWABLE
Field that indicates the type of usage limit based on our clasification of usage limits.
NON_RENEWABLE: define a static limit towards which the user approaches, and that will remain until the end of the subscription.
usageLimits:
uploadSizeLimit:
type: NON_RENEWABLE
RENEWABLE: their limit is reset after a period of time, could be a day, week, month...
usageLimits:
githubCodepacesCoreHours:
type: RENEWABLE
Libraries support
| Pricing4Java | Pricing4TS | |
usageLimits.<name>.type | ✓ | ✓ |
usageLimits.<name>.period
- required, if usageLimits.<name>.type is
RENEWABLE. This field will be set by default with:
usageLimits:
sampleLimit:
...
type: RENEWABLE
period:
value: 1
unit: MONTH
-
Field type: map containing the period of the usage limit. It contains two fields:
value: integer representing the period value.unit: string representing the period unit. Possible values are:SEC,MIN,HOUR,DAY,MONTH,YEAR.
Each value of the unit field corresponds to the following time periods (in seconds):
SEC= 1 secondMIN= 60 secondsHOUR= 60 * 60 = 3600 secondsDAY= 60 * 60 * 24 = 86400 secondsMONTH= 60 * 60 * 24 * 30 = 2592000 secondsYEAR= 60 * 60 * 24 * 365 = 31536000 seconds
Libraries support
| Pricing4Java | Pricing4TS | |
usageLimits.<name>.period | ✗ | ✓ |
usageLimits.<name>.trackable
- required, if usageLimits.<name>.type is
NON_RENEWABLE. This field will be set by default with:
usageLimits:
sampleLimit:
...
type: NON_RENEWABLE
trackable: false
Flag indicating whether the usage of a feature linked to a "NON_RENEWABLE" usage limit must be tracked within the user’s subscription. If true, the system records usage to ensure the limit is not exceeded during feature evaluations.
EXAMPLE: If you own an online conference service –like zoom– you may have this two NON_RENEWABLE limits:
maxMeetingDuration(e.g. 1 hour)maxRecordingsCloudStorage(e.g. 10 GB)
The former do not need to be tracked within the user subscription, since it's a limit that affects meetings. However, the latter must be tracked, since it affects users theirselves and their storage.
Therefore, you can model this situation as follows:
usageLimits:
maxMeetingDuration:
...
type: NON_RENEWABLE
trackable: false
maxRecordingsCloudStorage:
...
type: NON_RENEWABLE
trackable: true
Libraries support
| Pricing4Java | Pricing4TS | |
usageLimits.<name>.trackable | ✗ | ✓ |
usageLimits.<name>.valueType
- required
- Field type:
str - Supported values: one of
BOOLEAN,NUMERICorTEXT
Field valueType sets the defaultValue type signature of the usage limit you are
modeling. For example, if your usage limit valueType is BOOLEAN you must put
true or false in the defaultValue field, if valueType is NUMERIC you must put
a number and in the case of TEXT then defaultValue has to be a string.
usageLimits:
privateAccessToCodeRepositories:
valueType: BOOLEAN
defaultValue: false
storageQuota:
valueType: NUMERIC
defaultValue: 30
support:
valueType: TEXT
defaultValue: LOW
Libraries support
| Pricing4Java | Pricing4TS | |
usageLimits.<name>.valueType | ✓ | ✓ |
usageLimits.<name>.defaultValue
- required
- Field type is
boolifvalueTypeis set toBOOLEAN - Field type is
intifvalueTypeset toNUMERIC - Field type is
strifvalueTypeis set toTEXT
This field holds the default value of your usage limit. All default values are shared in your plan and addons. You can
override your usage limits values in plans.<plan_name>.usageLimits or in addOns.<addOn_name>.usageLimits
section of your pricing.
To help you understand how overriding usage limits works, imagine you have the following pricing matrix:
| SILVER | GOLD | PLATINUM | |
|---|---|---|---|
| collaborators | 1 | 6 | 10 |
If you want your collaborators usage limit to be different in your GOLD and PLATINUM plans you
will do the following using Pricing2Yaml syntax:
usageLimits:
collaborators:
valueType: NUMERIC
defaultValue: 1
plans:
SILVER:
usageLimits: null
GOLD:
usageLimits:
collaborators:
value: 6
PLATINUM:
usageLimits:
collaborators:
value: 10
Libraries support
| Pricing4Java | Pricing4TS | |
usageLimits.<name>.defaultValue | ✓ | ✓ |
usageLimits.<name>.unit
- required
- Field type:
str
Measure of the usage limit.
Here is an example using unit from Github pricing:
usageLimits:
githubActionsQuota:
unit: minute/month
Libraries support
| Pricing4Java | Pricing4TS | |
usageLimits.<name>.unit | ✓ | ✓ |
usageLimits.<name>.linkedFeatures
- optional
- Field type:
seqof feature names which arestr
Bounds your usage limit to a one or multiple features by adding your feature name to the list.
features:
feature1:
feature2:
feature3:
feature4:
usageLimits:
usageLimit1:
linkedFeatures:
- feature1
- feature2
- feature3
usageLimit2:
linkedFeatures:
- feature4
Libraries support
| Pricing4Java | Pricing4TS | |
usageLimits.<name>.linkedFeatures | ✓ | ✓ |
usageLimits.<name>.render
- optional
- Field type: one of
AUTO,DISABLED,ENABLED; if not providedrenderis set toAUTOby default
Choose the behaviour when displaying the usage limit of the pricing. This field will only take effect on the Pricing2Yaml editor.
usageLimits:
usageLimit1:
render: DISABLED
Depending on the selected value, the usage limit will be rendered differently:
- If
renderis set to AUTO, no action is taken. - If
renderis set to ENABLED, a row will be added to the pricing with the usage limit’s name and values, rather than the name of the feature it is linked to (regardless of whether the linked feature is even set to DISABLED). - If
renderis set to DISABLED, no row will be displayed in the pricing for it. If it was the only usage limit associated with a feature, then the feature itself will appear in the table with its values.
Libraries support
| Pricing4Java | Pricing4TS | |
usageLimits.<name>.render | ✗ | ✓ |
plans
- optional
- Field type:
map
A map containing the plans of your pricing. Each entry of this map will be the name of the corresponding plan.
saasName: Petclinic
plans:
BASIC:
GOLD:
PLATINUM:
# ...
You have to specify at least plans or addOns. A combination
of both also works.
| Pricing4Java | Pricing4TS | |
plans | ✓ | ✓ |
plans.<name>.description
- optional
- Field type:
str
An overview describing the plan's purpose.
plans:
FREE:
description: "All the basics for businesses that are just getting started."
Libraries support
| Pricing4Java | Pricing4TS | |
plans.<name>.description | ✓ | ✓ |
plans.<name>.private
- optional
- Field type:
bool, if not providedprivateisfalseby default
Flag that indicates wheter your plan should be displayed to the public.
Companies can contact the SaaS sales team to negotiate custom features or usage limits.
Enable the private field to store the plan configuration without making it visible to your users:
features:
feature1:
defaultValue: true
usageLimits:
usageLimit1:
defautlValue: 30
linkedFeatures:
- feature1
plans:
ENTERPRISE:
private: false
price: 29.99
JOHN-DOE-CUSTOM-ENTERPRISE-PLAN:
private: true
price: 39.99
usageLimits:
usageLimit1:
value: 100
Libraries support
| Pricing4Java | Pricing4TS | |
plans.<name>.private | ✓ | ✓ |
plans.<name>.price
- required
- Field type:
floatorstrformated as a SpEL
Price of your plan when billing monthly.
plans:
PRO:
price: 14.99
addOns:
BOOSTER:
price: 17.99
Price mathematical expression
Put in the root of the specification a field named variables.
To define custom variables inside this map put a key with the corresponding
value. To use the defined variable inside the SpEL
expression, prefix the name of the key with a #.
plans:
PRO:
price: "#x * #y" # SpEL evaluates to: 30.0
addOns:
EXTRA_REQUESTS:
price: "10 + #z" # SpEL evaluates to: 10.4
variables:
x: 15.00
y: 2.0
z: 0.4
Key names in this map should be alphanumeric, i.e, from a to z or A to Z
or a number from 0 to 9, a key should not start with a number. Allowed variables names
correspond to the following regex expression ^[a-zA-Z][a-zA-Z0-9]*$.
# Good naming
x: 4
foo: 0
f00: 0
b4r: 0
fooBar:
# Bad naming
"#foo": 0
foo_bar: 0
foo/bar: 0
0foo: 0
Supported values for variables are int, float and bool.
# Supported values
myIntegerValue: 5
myFloatValue: 5.0
myBooleanVariable: true
# Unsupported values
myNullValue: null
defaultsToNullValue:
myStringVariable: Hello world!
myDateVariable: 2024-12-03
Libraries support
| Pricing4Java | Pricing4TS | |
plans.<name>.price | ✓ | ✓ |
plans.<name>.unit
- required
- Field type:
str
Measure of the plan subscription.
plans:
TEAM:
unit: user/month
Libraries support
| Pricing4Java | Pricing4TS | |
plans.<name>.unit | ✓ | ✓ |
plans.<name>.features
- optional when leaving the field blank or
null, loads everydefaultValueof your features - Field type:
map
A map containing the keys of your features you want to override.
features:
awesome_feature:
cool_feature:
nice_feature:
plans:
my_plan:
features:
cool_feature:
nice_feature:
# ...
Libraries support
| Pricing4Java | Pricing4TS | |
plans.<name>.features | ✓ | ✓ |
plans.<name>.features.<name>.value
- optional
- Field type:
bool,intorstrdepending on thevalueTypeof the feature
Every plan that you model will have by default all features defaultValue. You
can customize it by putting a value in it.
features:
supportPriority:
defaultValue: LOW
plans:
GOLD:
features:
supportPriority:
value: MEDIUM
Libraries support
| Pricing4Java | Pricing4TS | |
plans.<name>.features.<name>.value | ✓ | ✓ |
plans.<name>.usageLimits
- optional when leaving the field blank or
nullit loads everydefaultValueof your usage limits - Field type:
map
A map containing the keys of your usage limits you want to override.
usageLimits:
usageLimit1:
usageLimit2:
plans:
my_plan:
usageLimits:
usageLimit1:
usageLimit2:
# ...
Libraries support
| Pricing4Java | Pricing4TS | |
plans.<name>.usageLimits | ✓ | ✓ |
plans.<name>.usageLimits.<name>.value
- optional
- Field type:
bool,intorstrdepending on thevalueTypeof the usage limit
Every plan that you model will have by default all usage limits defaultValue. You
can customize it by putting a value in it.
In the following example collaborators usage limit is overridden by STANDARD.
usageLimits:
collaborators:
defaultValue: 1
addOns:
STANDARD:
usageLimits:
collaborators:
value: 6
Libraries support
| Pricing4Java | Pricing4TS | |
plans.<name>.usageLimits.<name>.value | ✓ | ✓ |
addOns
- optional
- Field type:
map
A map containing the addons of your pricing. Each entry of this map will be the name of the corresponding addon.
addOns:
awesome_addOn:
cool_addOn:
# ...
You have to specify at least plans or addOns. A combination
of both also works.
Libraries support
| Pricing4Java | Pricing4TS | |
addOns | ✓ | ✓ |
addOns.<name>.description
- optional
- Field type:
str-
An overview describing the addon purpose.
addOns:
StorageBooster:
description: Boost your file storage. Do not run out of space!.
Libraries support
| Pricing4Java | Pricing4TS | |
addOns.<name>.description | ✓ | ✓ |
addOns.<name>.availableFor
- optional, if the
availableForfield is not present within an add-on, it will be available for all plans by default - Field type:
seqof plan names
This add-on fields indicates that your add-on is available to purchase only if the user is subscribed to any of the plans indicated in this list.
plans:
SILVER:
GOLD:
PLATINUM:
# ...
addOns:
EMERALD:
# if availableFor is missing or null EMERALD is available for
# SILVER, GOLD and PLATINUM by default
# availableFor: null
RUBY:
availableFor:
- GOLD
- SILVER
Libraries support
| Pricing4Java | Pricing4TS | |
addOns.<name>.availableFor | ✓ | ✓ |
addOns.<name>.private
- optional
- Field type:
bool, if not providedprivateisfalseby default
Flag that indicates wheter your add-on should be displayed to the public.
Companies can contact the SaaS sales team to negotiate custom features or usage limits.
Enable the private field to store the add-on configuration without making it visible to your users:
features:
feature1:
defaultValue: false
usageLimits:
usageLimit1:
defautlValue: 10
linkedFeatures:
- feature1
addOns:
ENTERPRISE-ADDON:
private: false
price: 9.99
features:
feature1:
value: true
JOHN-DOE-CUSTOM-ADDON:
private: true
price: 14.99
features:
feature1:
value: true
usageLimits:
usageLimit1:
value: 30
Libraries support
| Pricing4Java | Pricing4TS | |
addOns.<name>.private | ✓ | ✓ |
addOns.<name>.dependsOn
- optional
- Field type:
seqof addon names
A list of addon to be subscribed in order to purchase the current addon.
Imagine that your addon SECURITY depends on ENTERPRISE addon. That
means that in order to include in your subscription the SECURITY addon you also have to include
ENTERPRISE addon.
That way you can subscribe to ENTERPRISE or ENTERPRISE and SECURITY but no exclusively to
SECURITY addon.
addOns:
ENTERPRISE:
SECURITY:
dependsOn:
- ENTERPRISE
Libraries support
| Pricing4Java | Pricing4TS | |
addOns.<name>.dependsOn | ✓ | ✓ |
addOns.<name>.excludes
- optional
- Fied type:
seqof add-ons names
In the current add-on that you are defining specify one or more add-ons that cannot be purchased together.
In this example we have two addOns available for plan BASIC that are addOnA and addOnB.
Since addOnA excludes addOnB purchasing plan BASIC, addOnA and addOnB is not posible.
It is valid to purchase BASIC and addOnA and BASIC and addOnB.
plans:
BASIC:
addOns:
addOnA:
availableFor:
- BASIC
excludes:
- addOnB
addOnB:
availableFor:
- BASIC
| Pricing4Java | Pricing4TS | |
addOns.<name>.excludes | ✓ | ✓ |
addOns.<name>.price
- required
- Field type:
floatorstrformated as a SpEL
Price of your add-on when billing monthly.
plans:
PRO:
price: 14.99
addOns:
BOOSTER:
price: 17.99
Price mathematical expression
Put in the root of the specification a field named variables.
To define custom variables inside this map put a key with the corresponding
value. To use the defined variable inside the SpEL
expression, prefix the name of the key with a #.
plans:
PRO:
price: "#x * #y" # SpEL evaluates to: 30.0
addOns:
EXTRA_REQUESTS:
price: "10 + #z" # SpEL evaluates to: 10.4
variables:
x: 15.00
y: 2.0
z: 0.4
Key names in this map should be alphanumeric, i.e, from a to z or A to Z
or a number from 0 to 9, a key should not start with a number. Allowed variables names
correspond to the following regex expression ^[a-zA-Z][a-zA-Z0-9]*$.
# Good naming
x: 4
foo: 0
f00: 0
b4r: 0
fooBar:
# Bad naming
"#foo": 0
foo_bar: 0
foo/bar: 0
0foo: 0
Supported values for variables are int, float and bool.
# Supported values
myIntegerValue: 5
myFloatValue: 5.0
myBooleanVariable: true
# Unsupported values
myNullValue: null
defaultsToNullValue:
myStringVariable: Hello world!
myDateVariable: 2024-12-03
Libraries support
| Pricing4Java | Pricing4TS | |
addOns.<name>.price | ✓ | ✓ |
addOns.<name>.unit
- required
- Field type:
str
Measure of the addon subscription.
addOns:
gitLFSDataPack:
unit: user/month
Libraries support
| Pricing4Java | Pricing4TS | |
addOns.<name>.unit | ✓ | ✓ |
addOns.<name>.features
- optional when leaving the field blank or
null, loads everydefaultValueof your features - Field type:
map
A map containing the keys of your features you want to override.
features:
awesome_feature:
cool_feature:
nice_feature:
addOns:
my_addOn:
features:
cool_feature:
nice_feature:
# ...
Libraries support
| Pricing4Java | Pricing4TS | |
addOns.<name>.features | ✓ | ✓ |
addOns.<name>.features.<name>.value
- optional
- Field type:
bool,intorstrdepending on thevalueTypeof the feature
Every addon that you model will have by default all features defaultValue. You
can customize it by putting a value in it.
features:
supportPriority:
defaultValue: LOW
addOns:
B:
features:
supportPriority:
value: MEDIUM
Libraries support
| Pricing4Java | Pricing4TS | |
addOns.<name>.features.<name>.value | ✓ | ✓ |
addOns.<name>.usageLimits
- optional when leaving the field blank or
nullit loads everydefaultValueof your usage limits - Field type:
map
A map containing the keys of your usage limits you want to override.
usageLimits:
usageLimit1:
usageLimit2:
addOns:
my_addOn:
usageLimits:
usageLimit1:
usageLimit2:
# ...
| Pricing4Java | Pricing4TS | |
addOns.<name>.usageLimits | ✓ | ✓ |
addOns.<name>.usageLimits.<name>.value
- optional
- Field type:
bool,intorstrdepending on thevalueTypeof the usage limit
Every addon that you model will have by default all usage limits defaultValue. You
can customize it by putting a value in it.
In the following example collaborators usage limit are overridden by B and C:
usageLimits:
collaborators:
defaultValue: 1
addOns:
A:
usageLimits: null
B:
usageLimits:
collaborators:
value: 6
C:
usageLimits:
collaborators:
value: 10
Libraries support
| Pricing4Java | Pricing4TS | |
addOns.<name>.usageLimits.<name>.value | ✓ | ✓ |
addOns.<name>.usageLimitsExtensions
- optional
- Field type:
map
A map containing the keys of your usage limits that you want to extend with this addon.
usageLimits:
my_usage_limit:
defaultValue: 5
addOns:
my_addOn:
usageLimitsExtensions:
my_usage_limit:
Libraries support
| Pricing4Java | Pricing4TS | |
addOns.<name>.usageLimitsExtensions | ✓ | ✓ |
addOns.<name>.usageLimitsExtensions.<name>.value
- optional
- Field type:
bool,intorstrdepending on thevalueTypeof the usage limit
Specify the quantity in which you want to extend your usage limit
In the following example collaborators usage limit is extended by 10 units:
usageLimits:
collaborators:
defaultValue: 1
addOns:
B:
usageLimitsExtensions:
collaborators:
value: 10
Libraries support
| Pricing4Java | Pricing4TS | |
addOns.<name>.usageLimitsExtensions.<name>.value | ✓ | ✓ |
addOns.<name>.subscriptionConstraints
- optional, if a map is not provided, and add-on is scalable,
subscriptionConstraintswill be set by default with:
addOns:
sampleAddon:
...
subscriptionConstraints:
minQuantity: 1
maxQuantity: .inf
quantityStep: 1
- Field type: map containing constraints to contract scalable add-ons, i.e. those that only extend usage limits.
A list of addon to be subscribed in order to purchase the current addon.
A map of conditions to be satisfied in order to purchase the current addon.
The subscriptionConstraints field is only available for scalable add-ons, meaning that not scalable add-ons ignore this field.
EXAMPLE: Imagine that your addon extraSeats imposes the following constraints:
minQuantity= 1maxQuantity= 10quantityStep= 2
That means that you can subscribe to extraSeats only if you choose a quantity between 1 and 10, and the quantity must be a multiple of 2.
addOns:
extraSeats:
price: 10.00
...
subscriptionConstraints:
minQuantity: 1
maxQuantity: 10
quantityStep: 2
Libraries support
| Pricing4Java | Pricing4TS | |
addOns.<name>.subscriptionContraints | ✗ | ✓ |
custom
- custom
- Field type:
any
The custom field is an extensibility mechanism that allows developers to enrich their iPricings with arbitrary, domain-specific information. Its primary purpose is to support use-case–specific annotations that are not covered by the core pricing syntax.
Semantics
The custom field accepts any valid YAML value, including:
- Primitive values (for example, strings, numbers, booleans)
- Composite structures (for example, objects, arrays, nested combinations)
No constraints are imposed on its structure or content at the language level.
Processing Model
The custom field is treated as an opaque payload by Pricing2yaml parsers:
- It is not subject to validation during parsing.
- It is not interpreted by the core pricing model.
- Its content is preserved verbatim and propagated to the resulting iPricing representation.
This design ensures that any information defined within custom remains intact and available for downstream processing.
Intended Usage
The custom field is designed to be consumed by application-specific logic implemented outside the core Pricing2yaml infrastructure. Typical use cases include:
- Attaching metadata required by a particular runtime or deployment environment
- Defining integration-specific configuration (for example, billing providers, feature flags, or access control policies)
- Embedding auxiliary information to support pricing-related computations not natively supported by the language
Responsibility for interpreting and validating the contents of the custom field lies entirely with the target system or application that consumes the generated iPricing artifact.
Example
saasName: "ExampleSaaS"
syntaxVersion: "3.1"
...
custom:
deployment:
region: "us-east-1"
...
features: ...
plans: ...
Libraries support
| Pricing4Java | Pricing4TS | |
variables | ✗ | ✓ |