Premium feature ✨:

This feature is only available to users with a premium license. Please contact us to get access this feature.

Lago’s basic interface and API allow you to configure prices using default price models, such as standard, graduated, or percentage-based models. However, for more sophisticated products, you may need more complex pricing capabilities than those offered by Lago’s default settings.

To meet this need, Lago can parse your custom code (using JSON), enabling you to implement advanced pricing rules for your charges. This feature provides the flexibility to create tailored pricing models that precisely fit your product’s requirements. By leveraging custom code, you can ensure your pricing strategy is as dynamic and nuanced as your product demands.

This custom pricing can be set using the custom_properties attribute for a specific charge. You can edit this custom price code and even overwrite it for a particular subscription.

Here is an example of a custom price model defining tiers across multiple properties:

"properties": {
    "custom_properties": {
        "ranges": [
            { "from": 0, "to": 10, "storage_eu": "0", "storage_us": "0", "storage_asia": "0" },
            { "from": 10, "to": 20, "storage_eu": "0.10", "storage_us": "0.20", "storage_asia": "0.30" },
            { "from": 20, "to": null," storage_eu": "0.20", "storage_us": "0.30", "storage_asia": "0.40" }