You can capture custom user data in one of the following ways.
Let us explain each one with an example.
Prerequisite: Before using custom fields, you need to create the list of fields you may need in your ChargeBee account. Lets assume you need custom fields "shipping-date", t-shirt "size" and "phone number". Send us a request here with your list of custom fields. In our example, we have requested for shipping-date, size and phone number. We will mail you back after creating those fields for you in backend. (Creating fields in admin console will be provided soon. Until then, bear with us.)
So once we create those fields for you, it will be available to you.
1) Collecting custom field data on the hosted page
For collecting custom data on the hosted pages, configure the custom fields in the field configurations section in your ChargeBee admin console.
2) How to manually enter custom field data in your admin console
Below is a sample video that will help you understand how to manually enter custom field data in your admin console.
3) How to pass custom field data to ChargeBee's hosted page from your pre-filled page.
We already have a sample code on how to pass parameters to chargebee's hosted page. You need to add extra name (i.e your custom field name) along with it. Below are the sample code and demo video.
<form action="https://<your-site>.chargebee.com/hosted_pages/plans/<your-plan-id>" method="GET">
First Name: <input type="text" name="customer[first_name]" id="first_name" placeholder="First Name">
Last Name: <input type="text" name="customer[last_name]" id="last_name" placeholder="Last Name">
Email Address: <input type="text" name="customer[email]" id="email" placeholder="Email ID">
Phone Number: <input type="text" name="customer[cf_phone_number]" id="cf_phone_number" placeholder="Phone Number">
<button type="submit" id="monthly">Continue To Enter Card</button>
4) How to pass custom field data via API
You can see an example on subscription creation via API @ https://apidocs.chargebee.com/docs/api/subscriptions#create_a_subscription
Once you log in to your account, you can see your list of custom fields listed in the left side starting with the name "customer[cf_your_custom_field]".
Great. I'm waiting for custom fields in admin consoles and allowing them to visible on custom page - custom fields could be dropdowns, or checkbox. and have min and max QTY option for numbers.
@innovaction Thank you for your interest. Custom field support on hosted pages is a high priority item for us and we do hope it will be a very useful feature for everyone. In the meantime, if you need a custom field created and accessible via the API or through the admin console, please submit a custom field request here.
Custom fields in hosted pages are now available. And they can also be configured to have custom labels.
The ability to create custom fields is still managed by our team through the backend, as we have not built an admin user interface for that yet. However, we can help create custom fields, setup the sequence in which it should be displayed in hosted pages based on your request.