Custom Fields Vs. Metadata
| Custom Fields | Metadata |
|---|---|
You can create up to 50 fields for each supported object. | Since the metadata is in JSON format, only one metadata object can be stored for each entity (customer, subscription, plan, etc.). However, you can store quite a lot of data with each metadata object. |
A maximum of 250 characters can be stored for string fields. | A maximum of 65K characters can be stored for metadata. |
You can filter for data using custom fields, and also export custom fields. This is available via API only right now. | You can't filter with metadata as a criterion, or export them. However, you can retrieve metadata via API. |
Data for custom fields can be added via the web interface, and can also be collected via Chargebee Checkout and the Customer Portal. | Metadata can only be added via the web interface or API. |
You can add custom fields to invoices and emails received by end customers. | You can't display metadata to end customers. |
Only a few field types are supported (string, number, date, email, etc.). | You can store any data, but in valid JSON format. |
Validation will be carried out based on field configuration. | Merchant needs to take care of all the validations. |
Once updated, earlier values will not be retained. | You can retain old values as part of your metadata. |
Custom fields can be created for supported objects such as customers, subscriptions, invoices, credit notes, features, product families, plans, addons, price points, and coupons. Availability can vary by catalog configuration and enabled features. | You can have metadata for Customers, Subscriptions, Plans, Addons, Coupons. |
Can be used with both API and Hosted Page integrations. | Best when used via API. |
Data sent in webhooks. | Data sent in webhooks. |
Read More
Was this article helpful?