Validating `pricing.json` in Your Editor
That npm guy
Search for a command to run...
That npm guy
No comments yet. Be the first to comment.
Embracing the Power of Metered Pricing In the world of subscription-based businesses, finding the ideal pricing model that maximizes revenue while keeping customers satisfied is paramount. The emergence of metered pricing has opened new doors for bus...
One lesson we've learned talking to companies on their pricing journeys (and from our own in the past) is the importance of separating the concepts of "Billing Engine" and "Pricing Engine". It's one of those things that feels obvious when you see it,...
A new Tier release is ready, and Cloud has already been updated!v0.10.0 is here and it contains many features that have been requested by you. Tier Cloud Tier Cloud is available in Alpha and is now running v0.10.0. We’ve seen many users migrating fr...
We're excited to announce the release Tier 0.9.0, which brings several new features and improvements to our API. New Features Listing Payment Methods The new, experimental, /v1/payment_methods?org=org:acme API returns all payment methods associated w...
We're happy to announce the latest version of Tier. v0.8.0 is now available, and it has several exciting updates! Tier now supports Stripe Checkout using Tier plans, enabling both licensed and metered features in Stripe Checkout. Here is the full run...
This is a quick guide for adding the schema for pricing.json files to vim and VSCode.
The schema for pricing.json files is available at https://www.tier.run/docs/pricing.schema.json. Plug that URL into whatever tool you use to validate JSON, and associate it with pricing.json files.
More info on editing JSON is available in the VSCode docs.
Open the User and Workspace Settings menu.
Click Extensions and then JSON in the left sidebar.
Look for the option "JSON > Schema Download: Enable" and ensure that the box is checked.
Underneath that, look for the option "JSON: Schemas" and click "Edit in settings.json"

Add the following section:
"json.schemas": [
{
"fileMatch": ["pricing.json"],
"url": "https://www.tier.run/docs/pricing.schema.json"
}
],
Here's the result:

If you use vim with COC, you can add support for validating pricing.json files like so:
Ensure that coc-json is enabled. You can do this by running :CocInstall coc-json or by having something like the following in your ~/.vimrc:
let g:coc_global_extensions = ['coc-json']
Run :CocConfig to option the configuration file for coc. (By default this is ~/.config/nvim/coc-settings.json.)
Add the following field to the object there (if it already exists) or add it as a new top level object:
{
"json.schemas": [
{
"fileMatch": ["pricing.json"],
"url": "https://www.tier.run/docs/pricing.schema.json"
}
]
}
Here's what it looks like in action:

That's it!