Getting Started

Building Blocks

Subscription Features

Localization

Invoices

Credits

Billing Features

Taxes

Payment Methods

Direct Debit Payments

Configuring Gateways

Fraud Management

Hosted Pages

Attach Additional Data

Migration

Open Source Resources

Other Features

API Integration

Third Party Integrations

Custom Fields 

Chargebee provides the option of creating custom fields for the Customer and Subscription objects. You can use this option to track additional information about a customer or their subscription. Once the custom fields are created, they can be added to the hosted checkout pages and invoices. They can be accessed through the web interface, and via the API.

Custom Fields for Customers 

Use the option to create custom fields for the Customer object if you need to collect customer-specific information, such as date of birth, age, or gender.

Custom Fields for Subscriptions 

Use the option to create custom fields for the Subscription object when the information you need is subscription-specific, and your customers have multiple subscriptions. E.g. Domain URLs, phone numbers, Tracking ID, Shipping Date, t-shirt size, etc.

Types of Custom Fields 

The supported custom field types are:

  • Single line text: This field will appear as a textbox, and the maximum character limit is 99.

  • Multiline text: This field will appear as a text area, and the maximum character limit is 250.

  • Dropdown: This field type will appear as a dropdown menu. You can add as many options as you'd want, but ensure that the total number of characters used for all the options put together, does not exceed 5000.

  • Checkbox: As is evident from the name, the field type can be used for creating checkbox options. The default value of this field type will be false.

  • URL: This field type will appear as a text area. The URL provided here will be validated for "http://" and "https://".

  • Email: This field type will appear as a textbox. The email address will be validated.

  • Date picker: Use this field type if you want to collect date-related information.

  • Timestamp: If you need to collect information related to date as well as time as a timestamp, use this field type.

  • Numbers: You could use this field type for collecting information such as phone number. This field does not accept input other than numbers.

You can add up to a total of 50 custom fields to your site. The breakdown is as follows:

  • 30 String fields (includes single line text, multiline text, dropdown, checkbox, URL and email)
  • 5 Date fields
  • 5 fields of the type Timestamp
  • 10 fields of the type Numbers

Creating Custom Fields 

To create custom fields to your Chargebee site, go to SettingsSite SettingsCustom Fields in your test site. You'll be provided with a 'toolbox' for creating the fields you require:

1. Create Custom Field in Test Site
Pick the field type you want to create, and fill in the details in the field creation screen that appears:

The custom fields are considered 'active', and will now be available only on the test site. You need to publish the fields to your live site to include custom field information in the invoices that you send to your customers, or in the hosted pages viewed by them. Ensure that you check how the fields work for all your use cases before pushing it to your live site.

2. Publish Custom Field to Live Site
In the Custom Fields main page, click Publish to Live and confirm changes.

The custom fields will now be available on your live site. To display the same on your hosted checkout page, go to SettingsHosted Pages SettingsField Configurations and configure the custom field display settings as explained here.

Archiving and Unarchiving Custom Fields 

You can archive 'active' custom fields. Open the required custom field, and click the Archive button available on the top right corner. The field will be listed under the Archived section in the main Custom Fields page.

To unarchive, open the archived field and click the Unarchive option available on the top right corner.

Discarding Custom Fields 

Archived custom fields that have not been pushed to the live site can be discarded. Open the archived field, and click the Discard Field option available on the top right corner.

Discarding Changes Made to Custom Fields 

You can discard changes you've made to existing custom fields that have also been pushed to the live site. Open the modified field, and click the Discard Changes option available on the top right corner.

Rolling Back Changes Made to Custom Fields 

Clicking Rollback changes will discard all changes that have not been published to your Live site. If you have created new fields but haven't pushed them to your live site, they will be discarded as well.

Adding data to the custom fields 

Once the custom fields have been added to your site, you can add data to the custom fields by editing an existing subscription or when creating a new subscription.

To add data to a custom field for an existing customer, open the subscription and use the Change Customer Details option. This will display all the custom fields that are available in your site and you can add the data here.

You can capture custom field data during sign up through the hosted pages, using the API  or through the web interface.

Capturing custom field data via hosted pages

You can collect the custom field data via the hosted checkout page. The custom fields that you create will be automatically enabled for customer portal.

To display the same on your hosted checkout page, go to SettingsHosted Pages SettingsField Configurations and configure the custom field display settings as explained here.

Note

You can also collect custom field data during sign up through hosted pages by capturing the data on a page prior to directing users to the hosted checkout page. Learn how to capture custom field data for hosted checkout pages during sign up here.

Updating custom field data through the customer portal

As mentioned earlier, the custom fields that you create will be available and Editable in the customer portal, by default. Your customers can also login to their customer portal and update the data for your custom fields. If you'd like to hide these fields on the customer portal or make them non-editable, change your preferences as explained here.

Using the API to collect custom field data

For API users, if you have custom fields created in your Chargebee site, they will be listed in your API documentation as part of your input parameters. You need to be logged in to your Chargebee site to view the custom fields in the API documentation.

Adding custom field data through the web interface

When creating a new subscription or a customer using the web interface, the list of custom fields will be displayed in the creation page.

Viewing custom field data 

Once the data for the custom fields are captured and stored, they will appear on the customer details section within the subscription.

Search and filter with custom fields 

The custom fields created for your site will be available in the advanced filters section when you search or filter subscriptions.

Custom fields will also be available as mail merge fields and can be used in your email notification templates.

Loading…