Google Merchant Center
This page is for the developer who connects the store to Google's Merchant API. Of the three ways a feed reaches Merchant Center, the store can set up the plain File channel alone: the manual covers it. The channel on this page, Google Merchant Center (API), talks to Google's API and needs a Google Cloud service account connected first. SFTP has a page of its own.
Google Merchant Center (API) sends products one by one through the Merchant API as they change, without a file: price and stock changes reach Merchant Center within minutes. Saving the feed creates its own data source in Merchant Center, so there is nothing to set up there by hand.
Each product is a request of its own, and a delivery sends the requests of 25 products at once. That wins on the few products that change between runs, and still loses on a large catalogue sent whole: for tens of thousands of products, publish a file with the File or SFTP channel and add it in Merchant Center once, where Google fetches it on the schedule you choose.
Connect an account
The store owner makes the key and connects the account, with a screenshot a step, in the manual's Make the key and Connect the account. What it comes to:
- A Google Cloud project with the Merchant API enabled. Without it Google refuses every call, and the admin says Google refused the call (403 PERMISSION_DENIED): Merchant API has not been used in project … before or it is disabled.
- A service account in that project, which needs no IAM roles, and its JSON key. The module reads the private key and
client_emailfrom it. - The key's
client_emailadded to the Merchant Center account as a person with Admin access. The key alone opens nothing, and a user with less than Admin access cannot manage the account.
Saving an account that is not connected connects it: the module registers the key's Cloud project with Merchant Center, if that has not been done, then asks Google whether the key opens the account. Google applies a registration, and a client_email just added to the account, some seconds after accepting it and answers 401 or 403 until then, so the module asks again every few seconds for up to 15 seconds. When that is not enough, Connect tries again later.
Once Google opens the account, the module makes sure that the account's Developer email holds the API_DEVELOPER access right, through the Merchant API's accounts.users: it adds the right to that user's others, or creates the user with it, which Google sends an invitation for. Google requires a user with the right once the project is registered, and blocks the Merchant API 30 days after the last one is gone; see Google's registration FAQ (opens in a new tab). A test account is left alone, as Google grants the right only where a project is registered. Every save that connects, Connect and Test Connection check it again, and the module never takes a right away.
When Google does not accept the account, the usual cause is a client_email not added to the account, or the Merchant API not enabled in the key's project. A key file whose private key is damaged is refused too. When Google does not give the developer the right, as for an address that is no Google account, the account is Failed with Merchant Center did not give … the API developer role: and Google's reason.
A Cloud project is registered with one Merchant Center account. A project registered with another account is refused with This Cloud project is already registered with …, unless its key opens this account all the same. That is the case for a Merchant Center test account made with the Merchant API's accounts.createTestAccount under the registered account: Google registers no test account itself, so the test account connects with the registered account's key. Products sent to a test account are never shown on Google, and the account form's Test Connection says so.
The account form
The form has these fields:
| Field | What to enter |
|---|---|
| Merchant Center account id | The number under the account name at the top right of Merchant Center, listed as Merchant Center ID when you press the name, for example 1234567; see What you need in the manual. Not the account name. |
| Name | Your own name for the account, shown in the grid and in a feed's Google account list. Left empty, it is Merchant followed by the account id. |
| Developer email | Required. A person's Google account, given the API developer role when the account connects. A service account's address is refused. Another address connects the account again. |
| Service account key | The JSON key file downloaded from the Cloud console, chosen with Choose a key file. A file that is not a service account key is refused on the spot. Once a key is stored, leave the field empty to keep it, or choose a file to replace it. A save that fails, with its reason at the top of the form, does not keep the file: choose it again. An account Google did not accept keeps its key. |
The API channel
Set up the feed
The store sets up the feed in the admin: the manual's Point a feed at it has every field of the Channel section, what the save does with the data source, and how to change it later.
Saving a switched-on feed registers its data source, from an observer on arlanix_feed_form_saved: it creates the source, or updates its countries and name when they differ from what was registered, and otherwise asks Google only whether the source is still there. A run registers a feed that has none, such as one switched on from the grid, and brings one up to date when Google did not answer its save. No run makes again a source deleted in Merchant Center: after the first call Google turns down, the run asks once whether the source is there, and when it is not, the run fails with SaveRequiredException and the feed waits until a save switched on makes a new one. The Google product category comes from the feed's Google categories section, as on every channel: see Google categories. For a data source in another language, set that section's Taxonomy locale, such as de-DE, so the category search reads Google's list in that language.
How the products then go to Google, and how the feed waits after a failure or a refused product, is in the manual's Merchant API feeds.
When Google refuses the account, or does not answer
Google takes one product per call. A delivery makes the calls of 25 products at once, and starts no more once its minute is up; the rest go the next minute.
What happens next depends on the problem:
| Problem | What happens |
|---|---|
| Google refuses what one product holds, such as an invalid GTIN | That product is refused and offered again later. The others go on. |
The module cannot put a value in Google's field: a date it cannot read, or a yes/no field such as adult or identifier_exists holding anything but yes or no, true or false, 1 or 0 |
The same, found before anything is sent: that product is refused. The products list says, for example, The channel refused it: The adult value "maybe" cannot be sent: it is not yes or no, true or false, 1 or 0. |
| The data source was deleted in Merchant Center | The run stops, and the feed waits for a save: see the manual's When the data source is deleted in Merchant Center. |
Every product would meet it: the key revoked or its client_email removed from the account, the quota spent, Google unavailable, or no answer at all |
The calls that met it are tried again a few times, waiting as long as Google asks, but never past the run's minute. Then the run stops, and those products wait for the next one. |
A date may be written 2026-10-01T00:00+0200, as Sale window gives it, 2026-10-01, 2026-10-01 13:00:00 or in RFC 3339. A date without an offset is read as UTC.
When the run stops, what it sent counts as sent. The products it did not reach are not counted as refused, and go on the next run. The run fails in Google's words, for example:
Stopped part way: Google refused the call (403 PERMISSION_DENIED): The caller does not have permission. The products not reached yet are sent on the next run.
The feed then waits before it is tried again, as after any failure: see the manual's When a run fails. Once you have fixed the cause, save the feed, and the next minute's delivery sends it.
Each call to Google has a limited time: by default 5 seconds to reach Google and 20 seconds for its answer. To change them, go to Stores → Configuration → Arlanix → Developer → Google Merchant Center API; see Settings.