Metadata 

If you want to store additional/custom data at a resource's level, you can make use of Chargebee's Metadata.

For example, if you're a data service provider and want to store certain features of a particular plan, say "Usage Limit", "Speed within limit", etc., you can store it in the Metadata of the Plan.

Migrate to Product Catalog 2.0, and you can define your product features and do a lot more with Entitlements.

Metadata can be passed during the Add/Update operations, for the following entities:

  • Subscriptions
  • Customers
  • Plans
  • Addons
  • Coupons

Metadata can be stored only in the JSON format. You can use nested JSON objects as well.

Considering the same example as above, if you want to store the additional features of a particular data plan here's what the JSON will look like:

{  
    "features":{  
        "usage-limit":"5GB",
        "speed-within-quota":"2MBbps",
        "post-usage-quota":"512kbps"
    }
}
Note
  • Metadata is completely for your reference and will not be visible to customers. If you'd like to include fields in the hosted pages, invoices and customer portal, other than the default fields, use Custom Fields.
  • Metadata will not be a filter criteria, or a part of the exports. For this purpose, use Custom Fields if necessary.
  • Copy Configurations option in your Chargebee TEST site does not copy the Metadata saved in your TEST site to your LIVE site
Was this article helpful?
Loading…