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

FieldSDK PropertyHTML AttributeQuery Parameter
EmailbillingData.emaildata-fungies-billing-emailfngs-customer-email
First NamebillingData.firstNamedata-fungies-billing-first-namefngs-customer-first-name
Last NamebillingData.lastNamedata-fungies-billing-last-namefngs-customer-last-name
CountrybillingData.countrydata-fungies-billing-countryfngs-customer-country
StatebillingData.statedata-fungies-billing-statefngs-customer-state
CitybillingData.citydata-fungies-billing-cityfngs-customer-city
ZIP CodebillingData.zipCodedata-fungies-billing-zip-codefngs-customer-zip-code
The legacy customerEmail property and data-fungies-customer-email attribute are still supported but deprecated. Use billingData.email instead.

Usage Examples

JavaScript SDK

Fungies.Checkout.open({
  checkoutUrl: "https://yourstore.fungies.io/checkout-element/abc123",
  settings: { mode: "overlay" },
  billingData: {
    email: "[email protected]",
    firstName: "John",
    lastName: "Doe",
    country: "US",
    state: "CA",
    city: "Los Angeles",
    zipCode: "90001"
  }
});

HTML Data Attributes

<button
  data-fungies-checkout-url="https://yourstore.fungies.io/checkout-element/abc123"
  data-fungies-mode="overlay"
  data-fungies-billing-email="[email protected]"
  data-fungies-billing-first-name="John"
  data-fungies-billing-last-name="Doe"
  data-fungies-billing-country="US"
  data-fungies-billing-state="CA"
  data-fungies-billing-city="Los Angeles"
  data-fungies-billing-zip-code="90001">
  Buy Now
</button>

Query Parameters (Hosted Checkout)

https://yourstore.fungies.io/checkout/offer-id
  [email protected]
  &fngs-customer-first-name=John
  &fngs-customer-last-name=Doe
  &fngs-customer-country=US
  &fngs-customer-state=CA
  &fngs-customer-city=Los%20Angeles
  &fngs-customer-zip-code=90001
Remember to URL-encode values that contain special characters (spaces, @, etc.).

Country Codes

The country field accepts ISO 3166-1 alpha-2 country codes:
CodeCountry
USUnited States
GBUnited Kingdom
CACanada
AUAustralia
DEGermany
FRFrance
PLPoland
JPJapan
Full list

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:
ParameterDescription
fngs-quantityProduct quantity
fngs-discount-codeDiscount code to apply

Example with Discount

https://yourstore.fungies.io/checkout/offer-id
  [email protected]
  &fngs-customer-country=US
  &fngs-discount-code=SAVE20
  &fngs-quantity=2