Google Maps, Address Verification & Distance Pricing
Use the Distance Calculator for booking, delivery, chauffeur, and service-area forms. It calculates a route on the server with your workspace's Maps credential, can show a fare, and can pass that verified fare to a linked Stripe Payment field.
Before you start
- Open the form editor and add a Distance Calculator or Address field.
- In that field's settings, save a Maps credential for the active workspace. Credentials are never shared with another workspace.
- For Google, enable Routes API and Places API (New) in the same Google Cloud project. Enable Address Validation API when you require verified Address-field selections.
- Restrict the Google key to those APIs. If your Google Cloud network setup has stable server egress IPs, also apply an IP restriction. Never put a Maps key into a form's custom code or embed snippet.
Google billing must be active. WittyForm keeps the key encrypted and calls Google from the server; respondents never receive it. OpenRouteService remains available for Distance fields, but Google is required for address verification and Google place-type rules.
Add address autocomplete and verification
Select an Address field, open Google Maps address, and turn on Address autocomplete. When someone chooses a suggestion, WittyForm fills the enabled street, city, state/province, postal-code, and country sub-fields where Google supplies them.
Turn on Require verified address only when the booking or delivery workflow must reject an unverified address. That setting requires the Google Address Validation API. If it is off, people can still enter an address manually when suggestions are unavailable.
Set up a minimum fare, then charge per mile
In a Distance Calculator's Fare formula, choose Flat fare through included miles/km, then price only extra miles/km. For the common rule “$30 up to 10 miles, then $2.50 per mile after that”, enter:
- Unit: Miles
- Pricing rule: Flat fare through included miles
- Flat fare: 30
- Included miles: 10
- Per extra mile: 2.50
A 7-mile trip is $30. A 12.4-mile trip is $36. Existing forms keep the original Base + per-unit + minimum formula unless you deliberately switch pricing rules.
Charge the calculated fare with Stripe
- Add a Payment field after the Distance Calculator.
- Choose Computed amount and select the Distance Calculator as its source.
- Use the same real currency in Stripe as the fare symbol shown to respondents.
- Publish and make a test-mode submission before accepting live payments.
WittyForm signs the route result and independently recomputes the fare before creating the Stripe PaymentIntent. A visitor cannot lower the charge by editing browser data.
Save & Resume and Offline mode
Save & Resume keeps the addresses a respondent typed, but never stores signed route, fare, verification, or place-type proof. A resumed form returns to the earliest affected Maps field so the respondent can select or calculate a fresh result before continuing.
Distance fields, required Address Validation, and Google location-type rules require a live connection and cannot be queued for later offline sync. WittyForm blocks publishing those workflows together with Offline mode. Optional autocomplete can still fall back to manual address entry offline when neither verification nor type logic is required.
Show fields for airports or other location types
After a respondent chooses a Google suggestion, WittyForm retrieves its Google place types for the current response. In Conditional Logic, select the Distance or Maps-enabled Address field, then choose Pickup location type, Drop-off location type, or Location type from the new sub-value picker. Use contains and enter airport to show an airport surcharge, flight-number field, or terminal options.
A type rule requires the respondent to choose a Google suggestion. WittyForm verifies the transient type data with an expiring server signature and removes it before the response, exports, webhooks, CRM, and integrations are stored or sent.
Test checklist
- Test an ordinary address, an airport, and a manually typed address.
- Confirm the airport-only fields show only for a selected airport suggestion.
- Test a trip below, at, and above your included-distance threshold.
- Use Stripe test mode and confirm the charged amount exactly matches the shown fare.
- Test the form on the published/custom-domain URL, not only in editor preview.
Limits and privacy
Route calculation needs an internet connection. WittyForm rate-limits public Maps requests to protect your quota. The official Google Maps logo is shown in the same container as Google suggestions. Do not remove, obscure, or restyle that attribution. Review the Google Places policies, WittyForm's Terms, and Privacy Policy before collecting addresses. Do not use a location-type rule as the sole source of safety, accessibility, legal, or pricing eligibility decisions; allow your team to review edge cases.