Pre-populating Data

When linking to the Public Page, it is possible to have certain values pre-populated by passing parameters as GET requests.

The available parameters are:

  • first_name: Fills the value for the customer’s “First Name” (Fills value for both Shipping/Contact info and Billing info, unless billing_first_name is provided)
  • last_name: Fills the value for the customer’s “Last Name” (Fills value for both Shipping/Contact info and Billing info, unless billing_first_name is provided)
  • billing_first_name: Fills the value for the Billing Address’s “First Name” field (Overrides value provided by first_name, if any)
  • billing_last_name: Fills the value for the Billing Address’s “Last Name” field (Overrides value provided by last_name, if any)

  • email: Fills the value for the customer’s “Email Address”
  • reference: Sets a hidden field to supply a value for the customer’s “Reference” value (the unique identifier you use for the customer within your own application)
  • organization: Fills the value for the customer’s “Organization”
  • phone: Fills the value for the customer’s “Phone”

  • address: Fills the value for the customer’s “Shipping Address 1”
  • address_2: Fills the value for the customer’s “Shipping Address 2”
  • city: Fills the value for the customer’s “Shipping City”
  • state: Fills the value for the customer’s “Shipping State”
  • country: Fills the value for the customer’s “Shipping Country”
  • zip: Fills the value for customer’s “Shipping ZIP Code”

Note that the “Shipping Country” will be auto-filled based on the customer’s location. If you attempt to pre-populate a state that does not exist in that country, it will not work. We recommend that you always supply a country in addition to the state.

  • billing_address: Fills the value for the cardholder’s “Billing Address 1”
  • billing_address_2: Fills the value for the cardholder’s “Billing Address 2”
  • billing_city: Fills the value for the Billing “City”
  • billing_state: Fills the value for the cardholder’s “Billing State” (if state is supplied, matching country is required)
  • billing_country: Fills the value for the cardholder’s “Billing Country”
  • billing_zip: Fills the value for the cardholder’s “Billing ZIP Code”
  • coupon_code: Fills the value for the coupon code to use with the subscription.

Note: If you are using any of the allowed special characters in the coupon_code field (“%”, “@”, “+”, “-“, “_”, and “.”), you must encode them for use in the URL.

Special character Encoding
% %25
@ %40
+ %2B
- %2D
_ %5F
. %2E

Thus, a coupon code of “20%OFF” would be sent in as “20%25OFF”.

Note: ref can be included in the parameters to specify a referral code. See Referrals Reference for more details.

For a description of how these attributes apply to the created customer and payment profile, please refer to the “Subscription Input Attributes” section of the Subscriptions API documentation.

For example, accessing a Public Signup Page URL with the following query string would generate the form pre-populated as shown below:

?first_name=John&last_name=Doe&email=john.doe@example.com&reference=1234

Pre-Populating Components

Components can be pre-populated by passing in the numeric component id (visible in your components list) and desired quantity.

Please note that the order of the parameters matters to properly set the quantity for each component.

Quantity-based components:

?components[][component_id]=16899&components[][allocated_quantity]=9

On/Off components:

?components[][component_id]=16899&components[][allocated_quantity]=1

Note: Use 1 for “on” and 0 for “off”

Metered components:

?components[][component_id]=12345&components[][unit_balance]=16