1. Home
  2. How-To
  3. How To Add Google API Credentials

How To Add Google API Credentials

Intuitive Shipping uses Google Directions and Geocoding APIs when calculating distance-based shipping rates. If you want to add a distance-based condition to a Scenario, or if you are using a distance-based rate table in your Custom Shipping Method, you will need to create a Google API key for Google Directions and Geocoding and add it to Intuitive Shipping.

Using Distance to restrict or calculate rates without adding your Google API Key to Intuitive Shipping will result in an error.

When you set up a distance-based Scenario condition or add a distance-based rate table to a shipping method without a Google API key, a red banner will be displayed on the Activity Dashboard.

Create A Billing Account

Google requires you to have a Billing Account set up and linked to your API Key project in order to use your Google Maps API Key, even if you don’t anticipate being billed for usage.

Read the How It Works section below for more information on billing.

If you already have a Google Maps Billing Account, skip ahead to Get A Project API Key. If you haven’t yet set up a Billing Account, continue to Step 1.

1) Sign in to the Google Maps Platform with your Google credentials – i.e. the same credentials you use to sign in to Gmail or Google My Business.

2) Click the Get started button.

3) Check the boxes beside Routes and Places, then click the Continue button.

4) Click the drop-down arrow beside Select or create project, then select + Create a new project from the list.

5) Enter the project name – e.g. ‘Intuitive Shipping’ – to name the project that will hold your API credentials, then click Next.

6) Click Create Billing Account and follow the steps provided to complete the Billing set-up process.

Google generally provides a one-time credit – e.g. USD $300.00 – for new billing accounts.

In addition, Google provides the equivalent of up to USD $200.00 of API requests – roughly 35,000 distance-based calculations on Intuitive Shipping – per month for FREE.

Learn more in How It Works below.

Get A Project API Key

1) Visit the Google Cloud Platform Console.

2) Click the Select a project drop-down.

3) Select or create the project – e.g. ‘Intuitive Shipping’.

4) Click the Menu button, then select APIs & Services > Credentials from the drop-down list.

5) On the Credentials page, click Create credentials, then select API key.

6) Your API key is displayed in the pop-up window. Click Close.

The new API key is listed on the Credentials page under API Key.

7) Ensure that Application restrictions is set to ‘None’ and API restrictions is set to ‘Don’t restrict key’.

Please do not apply any Key restrictions – either Application restrictions or API restrictions.

For security reasons, Google advises you to add restrictions to your API Key. However, restrictions will limit our ability to connect to your account and will cause errors with distance-based rate calculations. If your API Key is only being added to Intuitive Shipping, there is minimal risk to having an unrestricted key.

Enable Directions and Geocoding APIs

Intuitive Shipping requires both Directions and Geocoding APIs to be enabled. Our system first attempts to calculate distance using Directions – i.e. your store’s address to the customer’s address. If that fails, our system will fall back to the Geocoding API to complete the calculation.

1) Click Dashboards on the sidebar menu, then click Enable APIs and Services.

2) Under Maps, find the Directions API box and click it.

3) Click the Enable button.

4) Click APIs in the sidebar menu.

5) From the list under Additional APIs, click Geocoding API.

6) Click the Enable button.

How It Works

All costs below are in US dollars (USD).

Each time Intuitive Shipping is used to check a distance Condition or calculate a distance-based shipping rate, it sends an API request to Google with your Directions API. If the required information is not returned, it sends another API request to Google with your Geocoding API.

That means, each distance-based shipping calculation will result in at least one (1) and sometimes two (2) Google API requests.

Distance API will be sufficient typically about 75% of the time.

Both Directions API and Geocoding API cost $5.00 per 1000 API requests per month. Google provides a free credit of $200.00 of total API requests per month on an ongoing basis. That means you can use Intuitive Shipping to calculate roughly 35,000 distance-based shipping quotes before you use up your monthly credit.

  • 30,000 Directions API requests = $150.00
  • 5000 Distance API requests + 5000 Geocoding API requests = $50.00
  • Total 40,000 API requests (based on $5.00 per 1000 requests) = $200.00

Once you reach your free limit, Google stops allowing API calls, and Intuitive Shipping can no longer return distance-based shipping rates until the next free billing period starts or until you select a paid plan.

If you anticipate exceeding 30,000 – 40,000 distance-based shipping calculations per month, we recommend that you select a paid Google Maps plan.

Copy Your API Key to Intuitive Shipping

Once your API Key has been generated and you have enabled both Directions and Geocoding API, you must copy your Key into Intuitive Shipping.

1) Click the Menu button, then select APIs & Services > Credentials from the drop-down list.

2) Beside your Google API Key, click the Clipboard icon.

3) Sign into Shopify, then click Apps on the Shopify sidebar menu.

4) Click on Intuitive Shipping from the list of installed apps.

5) Click the Settings menu button.

6) Scroll down to Google API Credentials, then right-click and paste the Password below API Key.

7) Click the Save button at the top of the screen.

Fantastic!
You just added Google API Credentials!

Updated on June 7, 2021

Was this article helpful?

Related Articles

Need Support?
If you can't find the answer you're looking for, don't worry. We're here to help.
Contact Support