Shopify updating of shipping/delivery free programmatically during checkout - google-maps

Can shopify delivery/shipping fee be updated programatically during checkout? What I want to do for longer distance deliveries is use the Google API to calculate the distance difference between the my store and customer and increase the delivery fee if it is more than x miles (probably 10 miles).

You can use Shopify's carrier service API for this. When a customer checks out, Shopify will provide your app with the line items and shipping address and your app can send back the shipping options and prices.

You can use the Carrier Service API for that but you have to be on the Shopify Advanced plan.
A possible hack would be to add a surcharge to the cart as a product. You'd have to get the customer to register/login in the cart and keep them from going to the checkout until you have a shipping address and then add the surcharge product via script.
You may need an app for that but the $220/month difference between Shopify and Advanced Shopify offers some incentive to look for alternatives.

Related

How to fix "You must enable Billing on the Google Cloud Project" on a Project will Billing enabled? [duplicate]

This question already has answers here:
Enable Billing on the Google Cloud Project
(9 answers)
Closed 1 year ago.
I'm trying to replace the API key for a website I made that takes a given address and renders it in Google maps. When I try and use it I get this
and this
You must enable Billing on the Google Cloud Project at https://console.cloud.google.com/project/_/billing/enable Learn more at https://developers.google.com/maps/gmp-get-started
When I click the link to add billing, nothing changes. When I check on my billing account to see if it's attached to the project housing the key, it is connected. When I check the project itself to see if it has billing, it says it does.
The other person who asked a very similar question had people saying to create a brand new project and a brand new billing account. I tried this and I'm still having the problem. I also tried to create a new billing account as a "Google Maps Platform" as another user suggested
(His screenshot) but that option does not exist for me.
(My Screenshot on the same page)
I'm at a complete loss here. Are there any other solutions people have found for this issue?
This error often means there is a problem with the Google Payments account associated with the billing account. Double-check that your payment information is correct. Some credit/debit cards do not work with Google payments.
You can test that your card works by making a small prepayment on your account. However, success does not mean that the credit/debit card can be used for recurring payments (that is an issue with some countries) but the prepayment will allow you to use the account (in most cases).
Google Payments Account
Another item to double-check is the type of billing account. There are two: Google Cloud Platform and Google Maps Platform. In the Google Billing Accounts page, look for Enabled Google service., It should show Google Maps Platform.
Google Maps Platform Billing
From your screenshot, I see that you are in India. Most credit/debit cards from India refuse Google payments. If this is the case, you will need to use a different credit/debit card or you will need to prepay your account. Other options are to switch to invoiced billing or set up an account with a Google partner.
(Customers in India) Automatic payments declined due to Reserve Bank of India (RBI) regulations
The following links provide options:
Make a manual payment or pay early
Apply for monthly invoiced billing
Find the right Google Cloud partner

it is necessary to add card number details for free Trial for google map api for free account, how to get google map api key for free account

How to create google map api key for free account.
i have created google map api key and without added billing info. because in billing info we need to add card details .
i have created word-press website and i don't want add card details any where. so please give me solution for create google map api without any payment for free account.
i have attached screenshot getting console java-script error.
error message is
You must enable Billing on the Google Cloud Project at https://console.cloud.google.com/project/_/billing/enable Learn more at https://developers.google.com/maps/gmp-get-started
enter image description here
Unfortunately, Google API services requires you to add your card details. There is no way to access Google Cloud services without filling in your card details.
You can try creating a virtual card using services like https://privacy.com/ if you are concerned about your card safety. You can use that virtual card to enable billing on Google Cloud Project.
You can't use Google Map API without adding billing info. It costs real money as soon as you go over your allotted $200 per month. In order to ensure you are charged in case you happen to go over $200, you must input credit card details. You can use something https://www.stripe.com/ if you have a business or services like https://www.adyen.com/issuing, and https://privacy.com/

Monitor Google API usage programmatically?

https://console.cloud.google.com/apis/dashboard
If we open google console we see how many requests per every service has been done. Is there any way to export these counters? I was not able to find any API which is responsible for these counters.
Get google maps api usage info
Detect Google Maps Javascript API limit for map loads
Many years passed, still no way to setup alerting for API usage? If there is no programmatic access may be there is some way to setup alerts when API usage is above threshold?
As mentioned by the first answer, there's no such API to monitor these usages but there are couple of ways to monitor your usage which are:
Setup Budget Alerts, this will trigger notification if you've reached a certain amount of your specified budget for a month, but please note that this will only notify you and will not actually stop the usage after the specified amount.
If you would like to monitor or get an overview of your daily usage, you may implement what we call channels with the help of BigQuery Export. This will give you a breakdown report of daily usage. The standard SQL code you can use to retrieve such report using the BigQuery export is:
SELECT Date(usage_start_time, "America/Los_Angeles") AS billing_day,
invoice.month AS invoice_month,
service.description AS service,
sku.description AS sku,
(
SELECT l.value
FROM Unnest(labels) AS l
WHERE l.KEY = 'goog-maps-channel' ) AS goog_maps_channel,
Round(Sum(usage.amount), 2) AS usage_amount,
usage.unit AS usage_unit,
Round(Sum(cost), 2) AS cost,
cost_type,
currency
FROM `PROJECT_ID.DATASET_NAME.gcp_billing_export_v1_BILLING_ACCOUNT_ID`
WHERE invoice.month = '201906' -- Change the invoice month with the same format as the example.
GROUP BY billing_day,
invoice_month,
service,
sku,
goog_maps_channel,
usage_unit,
cost_type,
currency
ORDER BY billing_day,
service,
sku
You may learn more on how to setup the BigQuery export here.
If you want to restrict your usage up to a certain amount per day, you may also implement the Capping of API usage wherein it will only allow an API to call a specific amount of requests per day.
If you would ever need help in the correct calculation of requests per day for each API to be on a certain budget, you may reach to the support team of the Google Maps Platform APIs here.

Understanding Requests from Google Places API for Web w Place Autocomplete

We are considering using Google Places API for a new web application project and I believe we are vastly underestimating the number of requests we would use.
We would be using place search, Maps JavaScript API map load to grab Place IDs from Google as well as Place Autocomplete to help users find the defined location. So my questions are:
Would the Autocomplete be considered a request on every keystroke?
Would if also be a request when we select the suggestion (Places API)
and update to Map?
I have seen that with the premium Plan autocompletes use 0.1 Maps API Credit, while JavaScript API map load is 1 and Places API is 2 credits. Trying to understand how to count before the 150k limit and after
As mentioned in the comment of your question, Google is making some drastic changes to their collective maps API usage rates. Starting June 11th, the new pricing will go into effect.
Would the Autocomplete be considered a request on every keystroke?
As of now, places autocomplete is counted on every keystroke. Starting June 11th, you have the option to switch to session-based billing. They have different pricing rates which can be see in the pricing sheet link. Depending on your application, you'll want to use the option that minimizes API calls. I think if your use case is one time selecting of location by your users then you're better off with billing by keystroke.
Would if also be a request when we select the suggestion (Places API)
and update to Map?
Selecting a suggestion from Places API would not incur an API request (requesting the suggestions does), but updating a google map using the Map API would use an API request.
The 150k daily limit is going away in favor of the new billing rates, so I would suggest you look into that now. There are some free unlimited services still offered, like the Google Maps Embed API. Loading a map using the Embed API is not counted towards any billing (as of now).

google map usage

Does any have nay information on usage of google map in busines/commerceial use?
Is there a limit on how many times an individual can use the google map to view daily info, when used commercially.
or the restriction is set on the business or the ip?
I am planning to display information on google map , where other userd can view such information using google maps.
Thanks in advance
From the Terms of Service:
10.1.2 Restrictions against Commercial Use.
(a) No Fees. You must not charge users or any other third party any
fee for the use of the Maps API Implementation, the Service, or the
Content, except as permitted under Section 9.1.2 (Exceptions).
(b) No Direct Marketing. You must not print more than 5,000 copies of
sales collateral materials containing a screenshot of the Content for
purposes of commercial sales lead generation ("Direct Marketing") or
incorporate the Content as a core part of printed matter (such as
printed maps or guide books) that you redistribute for a fee. You must
contact the Google Maps API Premier sales team to obtain a direct
license if you desire to do either of the above.