Skip to main content
Prefilling billing data reduces friction in the checkout process by automatically populating form fields with customer information you already have.

Available Fields

The legacy customerEmail property and data-fungies-customer-email attribute are still supported but deprecated. Use billingData.email instead.

Usage Examples

JavaScript SDK

HTML Data Attributes

Query Parameters (Hosted Checkout)

Remember to URL-encode values that contain special characters (spaces, @, etc.).

Country Codes

The country field accepts ISO 3166-1 alpha-2 country codes:

State/Province Codes

For countries that require state/province selection (US, Canada, Australia, etc.), use the appropriate subdivision codes: United States:
  • CA - California
  • NY - New York
  • TX - Texas
  • etc.
Canada:
  • ON - Ontario
  • BC - British Columbia
  • QC - Quebec
  • etc.

Field Visibility

Billing fields are only visible in checkout when:
  • Billing information is enabled in your checkout settings, or
  • Your Stripe account is based in India (required by regulations)
If billing fields are hidden, the prefilled data will still be stored with the order.

Priority Order

When multiple sources provide billing data, this priority is used:
  1. Query parameters / SDK billingData - Highest priority
  2. Persisted customer data - From previous sessions (local storage)
  3. IP-based detection - Automatic country detection
  4. Default values - Fallback (e.g., United States)
This ensures that explicitly passed billing data always takes precedence over previously saved data.

Additional Query Parameters

Beyond billing data, hosted checkout supports these query parameters:

Example with Discount