Prefill checkout fields
In this help article, you will learn how to prefill fields on a checkout.
With Checkout Page, you can easily create a one page checkout and prefill your checkout fields.
Prefilling fields on a checkout lets your customers save time, speeds up the checkout process and boosts conversion.
You can prefill fields with information you've already collected from a customer.
For example, if you've already collected your customer's name, email address, shipping address, or any other information, you can prefill this information to speed up your customer’s checkout experience and boost your sales.
How to prefill fields on the checkout
Prefilling fields is as easy as adding the data to the checkout link or to the URL of your site that contains an embedded checkout or checkout popup.
You will add this data to the query string (URL Parameters) of your one page checkout link.
For example, if you want to prefill the email field with
email@example.com, you can add
?firstname.lastname@example.org to the URL.
You can also prefill multiple fields at once. For example, if you want to prefill the email field with
email@example.com and the name field with
Miranda, you can add
?firstname.lastname@example.org&customer_name=Miranda to the URL.
Prefilling fields works based on the field reference. You can find a field's reference by toggling 'Additional field settings' in the field's settings.
Checkout Page automatically creates references for your fields based on your field data type or the label.
These are the standard references for each field data type:
- Customer name:
- Customer email address:
- Customer phone:
- Shipping address:
- Shipping address line two:
- Shipping address city:
- Shipping address country:
- Shipping address postal code:
- Shipping address state:
Steps to prefill fields on the checkout
Set up your one page checkout with the fields you want to collect data for, such as the customer's name, email address, shipping address, etc
Add the checkout to your site by embedding it or by using a popup, or share the one page checkout link directly
For each field you want to prefill, do the following:
Copy the field reference from the field's settings
Add the field reference to the query string of the URL
To start the query string, add
?to the URL:
Add the field reference, for example
=and the data you want to prefill the field with, for example
For every field after the first, add
&to the URL instead of
Test the checkout to make sure the fields are prefilling correctly
Prefill fields on embedded & popup checkouts
There are two ways to prefill fields on embedded and popup checkouts.
- Add the query string to the checkout link in the embed or popup code
- Add the query string to the URL of your site that contains the embed or popup checkout
Hide prefilled fields from the checkout
If you already have a customer's information and prefill the field with the above steps, you can hide the field entirely to make the checkout process even faster.
For example, you already have your customer's name and email address, but you still want to store them with the order. You can prefill the fields and hide them from your checkout so that your customer doesn't have to enter this information again.
This way, you make sure a customer's data is consistent across their payments.
Hiding a field is easy:
- Open the checkout in your dashboard
- Go to Fields and click on the pencil icon to edit it
3. Open Additional settings 4. Check the Hide field checkbox
In some cases, even when the Hide field option is checked, the field can still be visible on the checkout.
This is how Checkout Page determines if a field should be hidden:
- If a field is hidden and required but not prefilled, the field will be displayed to your customers.
- If a field is hidden but not required and not prefilled, the field will not be displayed to your customers.
- For email fields, if the prefilled value is not a valid email address, the field will be displayed with the current value