A Google Maps API key is required for the following;

  • Store pickup map

  • Geographic search

  • Auto-address suggestions

  • Driving distance validation

  • Max distance validation

Important Note

Google provides $200 USD of free credit per month which is more than enough for most merchants. Should you exceed their free limit, you will be charged for your usage. You can view their latest pricing & plans at https://cloud.google.com/maps-platform/pricing.



Requirements

  • You need to have an active Google account.


Creating a Google Maps API Key

If you have an existing Google Cloud account with open projects, follow the steps for Existing Google Cloud users.

New Google Cloud users

  1. Visit the Google Maps Platform page and click Get started.

  2. If needed, sign in to your Google Account.

  3. Click Create billing account, and fill in all your details.

  4. Copy the API key and check Enable all Google Maps API's for this project.


  5. Click Go to Google Maps Platform.

  6. Do not add a restriction. Click Maybe later.

You can now add the API key you've copied to the Store Pickup + Delivery settings.


Existing Google Cloud users

  1. Visit the Google Maps Platform page and click Get started.

  2. If needed, sign in to your Google Account.

  3. Click the open project name.

  4. Click New project.

  5. Add a project name, and click Create. You can also add a location if needed.

  6. Click Select project.

  7. Go back to the Google Maps Platform page and click Get started.

  8. Copy the API key and check Enable all Google Maps API's for this project.

  9. Click Go to Google Maps Platform.

  10. Do not set a restriction. Click Maybe later.

You can now add the API key you've copied to the Store Pickup + Delivery settings.


Add the API key to Store Pickup + Delivery

The same API key can be used for Store pickup and Local delivery settings.

Add the API key to local delivery settings

  1. Open Store Pickup + Delivery and click Settings.

  2. Click Local delivery.

  3. Select your delivery validation method.

  4. Click Google Maps API Key.

  5. Paste the API key and click Save.

  6. If the API key shows as invalid, check you have copied the full API key correctly, with no blank spaces or missed characters.

After correctly adding the API key, check if your delivery validation method has been correctly set by following the article below.


Add the API key to store pickup settings

  1. Open Store Pickup + Delivery and click Settings.

  2. Click Store pickup.

  3. Select the location filter setting you need.

  4. Click Google Maps API Key.

  5. Paste the API key and click Save.

  6. If the API key shows as invalid, check you have copied the full API key correctly, with no blank spaces or missed characters.


Troubleshooting

You can check the validity of your Google Maps API key through the link below. Copy the link to your browser and replace the API_KEY with your Google Maps API key.

https://maps.googleapis.com/maps/api/distancematrix/json?origins=-33.8981784,150.9972858&destinations=-33.90022360,150.99509730&mode=driving&sensor=false&units=metric&key=API_KEY

Compare the error messages with the error messages below.


Error message: "This API project is not authorized to use this API."

This could mean that not all of the API's have been enabled, or that the API has been restricted, or both.

To check if the API's have been enabled:

  1. Click API's.

  2. Check the following API's are enabled:

    • Maps JavaScript API

    • Places API

    • Directions API

    • Geocoding API

    • Distance Matrix API


  3. If any are not enabled, go to Additional API's and click the API name.

  4. Click Enable.

Repeat until all 5 API's are enabled, and then test the API key.

If it is still showing an error, check if any restrictions have been placed on the API.

  1. Click Credentials.

  2. Under Actions, click ⋮ and then click Edit API.

  3. Disable any restrictions.

You can now test the API key again.


Error message: "The provided API key is invalid."

The API key may be missing some characters, or a blank space may have been added.

  1. Click Credentials.


  2. Go to API keys and click Show key.


  3. Copy your API key.

Carefully re-enter your API key and test again.


Error message: "You must enable Billing on the Google Cloud Project at https://console.cloud.google.com/project/_/billing/enable ..."

  1. Go to https://console.cloud.google.com/project/_/billing/enable and select the project with your Google Maps API.

  2. You may need to create a billing account.

  3. Or you may need to update your payment information.

Once this has been added or changed, test the API key again.


If you are struggling to resolve the issue, reach out to us at [email protected].

Did this answer your question?