Skip to content

Google Maps API Key for Address Autocomplete at Checkout

The latest enhancement to Sunshine's platform, featuring an auto-complete address function at checkout, significantly benefits photographers managing an online client photo gallery. This feature, powered by Google Maps, streamlines the checkout process by allowing your users to quickly fill in their address details. It not only saves time but also minimizes errors in address input, leading to a smoother, more efficient checkout experience. To activate this functionality, simply obtain a Google Maps API key, ensure the relevant APIs are enabled, and input this key into the settings of your Sunshine account.

This upgrade is particularly valuable for photographers who rely on quick and accurate transactions in their online client photo galleries. By reducing the time and effort required to complete address fields, clients can focus more on selecting and purchasing their favorite photographs. A swift and error-free checkout process not only enhances customer satisfaction but also streamlines your workflow, allowing you to handle orders more effectively and focus on the creative aspects of your photography business.

Generate an API Key From Google Developer Console

Go to the Google Developer Console and select the project from the Select a Project menu at the top. If you don’t have any previously created projects, click New Project to create a new one.

Once you’ve successfully created a new project, click Enable APIs and Services. This will open a Google API Library.

From here, you’ll need to enable three 3 APIs:

  1. Geocoding API
  2. Maps JavaScript API
  3. Places API

This API library provides an easy search option; type the name of the API in the search box, go to your API and click the ENABLE button.

Once you’ve enabled all your APIs, go back to your Google Console dashboard and navigate the Credentials tab. Click on the Create Credentials button at the top and select the API key option.

A pop-up with an API key will open. Click on the RESTRICT KEY option at the bottom right corner of the pop-up. A new page will open, where you’ve to configure the following settings:

  • Application Restrictions: From here, you can select which websites, IP addresses, or applications you can use the API key. Here you’ll need to choose the HTTP Referrers option to allow your Key to be used within your websites.
  • Website Restrictions: Once you select the HTTP Referrers, a new option will be displayed, website restrictions. Here you need to add your website domain name to restrict the API Key to be used only by the specified websites.

Clicking the save button will redirect back you to the Credentials page. Copy your Key from the page and head back over to your WordPress Admin > Sunshine > Settings > Checkout tab. Enter your API key in the Google Maps API Key option.

You're set! Just by having the key entered enables address autocomplete for both shipping/billing on the Checkout page.

Configure your Google Console billing account

Google Maps does require a billing account on file but provides a $200 credit on your account each month which makes it free for almost everyone. Address autocomplete will not work until you have billing information on file. Click here to see more information on how to set up your billing in Google Console.

Still need help?

If you have not yet found your answer in the documentation articles, please contact support