This is a BETA

Google Shopping - Merchant API for Magento 2


The Google Shopping - Merchant API extension for Magento 2 pushes product changes straight to Google Merchant Center through the official Google Merchant API. An indexer flags changed products, price and stock updates are queued every 2 minutes and other changes every 5 minutes, and only data that really changed is sent. It is an add-on for the Google Shopping Feed extension and uses the same attribute mapping and filters, with a status grid, batch overview and logging in the Magento admin.
Browse Changelog
Links

This module requires:

15 day Money Back Guarantee One Time Payment
Magento Cloud Support Private Composer Repo
Documentation
We’re still tweaking things – so you get to use it for free! Until we reach version 1.0, you can test this plugin at no cost. Need a license? Request one now!
loader
Sending...

Google Merchant API Sync for Magento 2

Product Changes Pushed to Google Merchant Center Within Minutes

The Google Shopping - Merchant API extension connects Magento 2 directly to Google Merchant Center through the official Google Merchant API. When a price, stock level or attribute changes in Magento, the extension sends that one product to Google instead of waiting for the next feed fetch.

Price and stock changes are put on the queue every 2 minutes, other product changes every 5 minutes. That keeps the product data behind your Google Shopping campaigns in line with your store, also during a sale or when stock runs low.

It is an add-on for the Google Shopping Feed extension and uses the same attribute mapping and product filters. The feed stays your complete baseline, the API takes care of what changes in between.

A Google Shopping ad for the Oslo Lounge Chair of Nordic Living with the sale price of €299.00, next to the Merchant API request that sent that price.

Direct Merchant API Connection

REST calls to the official Google Merchant API with a Google Service Account, without external Google libraries.

Price and Stock Every 2 Minutes

A separate inventory sync queues changes in price, sale price and availability every 2 minutes.

Only What Changed

An indexer flags changed products and a hash check skips the API call when the data is the same as the last sync.

Works with the Feed Extension

Attribute mapping, filters and Offer ID come from Google Shopping Feed, so feed and API update the same product.

Set Up per Store View

Every store view has its own API data source, target country and content language.

Status, Batches and Logs

A status per product, an overview of every sync batch, debug logging and CLI commands show what was sent and what failed.

From Product Change to Google Merchant Center Within Minutes

The extension adds its own indexer, "Google Shopping API Product", that flags a product when its data changes. It watches the product tables themselves: product data and attributes, stock, website and category assignment, tier prices and the media gallery.

  1. The indexer flags the changed product.
  2. Cron puts flagged products on the queue: price and stock changes every 2 minutes, full product updates every 5 minutes, up to the "Batch Size" (10 to 1000, default 100) per store view per run.
  3. Two queue consumers send the updates to the Merchant API.
  4. Before a call goes out, a hash of the fresh data is compared with the last synced version. If nothing changed, no API call is made.

"Auto Sync Enabled" is off by default, so nothing leaves the store until you turn it on. A nightly check at 02:00 picks up products that are new in your feed selection. Products that dropped out of the feed are only removed from Merchant Center when "Delete Products Not in Feed" is set to "Yes"; the default is "No".

Full Sync and Inventory Sync

A full sync sends all the product data from your feed mapping. An inventory sync sends only price, sale price, sale price effective date and availability: a small payload for the changes that happen most often.

The Sync Settings group with Auto Sync Enabled, Batch Size and Delete Products Not in Feed, and the cron schedule that queues inventory every 2 and products every 5 minutes.
Two routes to Google Merchant Center: the Google Shopping Feed as a scheduled XML file and the Merchant API as a push per changed product, both matched on Offer ID NL-CH-1042.

Merchant API or Google Shopping Feed: What Is the Difference?

The Google Shopping Feed extension writes your catalog to an XML file that Google fetches on a schedule, for example daily or hourly. That is a solid baseline, but a price you change at 10:00 only reaches Google at the next fetch.

This extension adds a direct connection. It does not wait for a fetch: it pushes the single product that changed to Merchant Center.

  • Google Shopping Feed: the full catalog in one file, picked up on a schedule, in a file data source in Merchant Center.
  • Merchant API: one call per changed product, queued every 2 or 5 minutes, in an API data source in Merchant Center.

It is a near real-time connection, not an instant one. Updates pass through Magento cron and the message queue, so a large import is processed in batches instead of in one go.

Both routes use the same Offer ID, taken from the id mapping in the feed settings, so Google sees one product. Keep the feed running as the safety net for the full catalog and let the API handle what changes in between. The extension requires Google Shopping Feed 2.12.0 or higher.

Connect with a Google Service Account

Enter the "Merchant ID" of your Merchant Center account and paste the key file of a Google Cloud service account into "Service Account JSON". The key is stored encrypted in the Magento configuration. A test button below the fields checks the connection before you turn anything on.

The extension talks to merchantapi.googleapis.com with Magento's own HTTP client, so there are no external Google libraries to install or keep up to date.

"Enable Module" is off by default. Set it to "Yes" once the connection test passes.

The General Settings and Authentication groups with Enable Module, Merchant ID and Service Account JSON, and the service account key that is stored encrypted.
A price change on its way to a Shopping ad: the special price of €299.00 saved in Magento, sent by the inventory sync and shown in the Google Shopping ad of Nordic Living.

Current Prices and Stock in Your Google Shopping Campaigns

Shopping campaigns show the price and availability that Google has in Merchant Center. When a sale starts or a product sells out, every hour that Google still holds the old value is an hour in which your ad and your product page disagree.

That is what the inventory sync is for. A change in price, sale price, sale price dates or availability is queued within 2 minutes and sent as a small update with only those fields. With the indexer on "Update on Save", the extension recognises a save that only touched price fields and picks this lighter route by itself.

The extension does not create or manage campaigns or bids. It keeps the product data they run on up to date.

One API Data Source per Store View

Each store view gets its own data source in Merchant Center, so you can serve several countries and languages from one Magento installation. The "API Data Sources" table in the "Data Source" group lists every store view with its data source, its status and a "Test" and "Configure" button.

"Configure" takes you to the store view, where you set:

  • "Status": turn the sync on or off for this store view.
  • "API Data Source ID": the numeric ID of the API data source. Create it in Merchant Center under Products > Feeds > Add data source > API.
  • "Feed Label (Target Country)": the country the products are meant for.
  • "Content Language": the language of the product content.
The API Data Sources table with three Nordic Living store views and their data source, status and Test and Configure buttons, with the store view fields for the Dutch store view.
The Products grid of Google Shopping API with six Nordic Living products in the statuses Synced, Queued, Pending, Error, Pending Delete and Disabled.

Sync Status per Product in the Magento Admin

Under "Marketing" > "Google Shopping API" > "Products" you see every product per store view with its SKU, Offer ID, status, error message and the time of the last sync. A product is Pending, Queued, Synced, Error, Pending Delete or Disabled, so one filter shows what still needs attention.

"Initialize Products" loads the products from your feed selection into the grid. From there you work with mass actions:

  • "Sync to Google (Full)" and "Sync Inventory (Price/Stock)": send the selected products yourself.
  • "Flag for Full Update" and "Flag for Inventory Update": mark them for the next cron run.
  • "Disable Sync" and "Enable Sync": keep individual products out of the sync or bring them back.

Sync Batches and Retries

"Sync Batches", in the same menu, records every run: the store view, the type (Product or Inventory), the number of products, how many succeeded and failed, the duration and the start and end time. With "Retry Failed" you send the failed products of a batch again.

Temporary problems are handled automatically. On a rate limit (HTTP 429) or a server error (5xx) the extension tries up to 3 times, with a longer pause after each attempt.

A product that still fails gets the status Error with the message from Google. You fix the data and sync it again from the grid.

The Sync Batches grid with five batches of the type Product and Inventory, their totals, successes and errors, and one batch with two errors highlighted.
The Debug & Logging group with Debug Mode set to Yes and a terminal running googleshopping:api:sync with the inventory and dry-run options for three products.

Debug Logging and CLI Commands

Turn on "Debug Mode" in the "Debug & Logging" group and every API request and response is written to debug.log. Errors always go to error.log, also with debug mode off. Both logs can be opened from the configuration. The sync log entries the extension keeps are cleaned up every night according to "Log Retention (Days)", 30 by default.

There are six CLI commands: googleshopping:api:initialize, googleshopping:api:sync, googleshopping:api:sync-check, googleshopping:api:status, googleshopping:api:test and googleshopping:api:test-connection.

The sync command accepts --store, --limit, --product-id for one product, --inventory for price and stock only, --force to skip the change check and --dry-run to see what would be sent without making an API call.

Google Shopping - Merchant API for Magento 2: Technical Details for Developers and Store Owners

The Advantages for Developers

  • Own indexer googleshopping_api_product with mview subscriptions on the product, EAV, stock, website, category, tier price and media gallery tables.
  • Two queue consumers, googleshopping.product.sync and googleshopping.inventory.sync, on the db connection, so a message broker such as RabbitMQ is not required. The consumers do have to run, for example through Magento cron.
  • A REST client on Magento's own HTTP client against merchantapi.googleapis.com, without external Google libraries.
  • Change detection with separate hashes for full product data and for inventory fields.
  • Up to 3 attempts with an increasing pause on HTTP 429 and 5xx responses.
  • Six CLI commands under googleshopping:api:, including --dry-run and --force on the sync command.
  • Backend only: the module adds nothing to the storefront, so it runs the same with any theme.
  • Requires PHP 8.1 or higher and magmodules/m2-googleshopping 2.12.0 or higher.

Good to Know for Store Owners

  • This is an add-on. You need the Google Shopping Feed extension; your product selection and attribute mapping come from there.
  • You need a Google Merchant Center account, a Google Cloud service account and one API data source per store view.
  • "Enable Module" and "Auto Sync Enabled" are off by default. Nothing is sent until you turn both on.
  • Price and stock changes are queued every 2 minutes, other product changes every 5 minutes.
  • Products are only removed from Merchant Center when "Delete Products Not in Feed" is set to "Yes".
  • Every product shows its sync status in the admin, and a failed product shows the error message from Google.

Keep Google Merchant Center in Step with Your Magento 2 Catalog

Add the Merchant API connection to your Google Shopping Feed and send price, stock and product changes to Google within minutes instead of at the next feed fetch.

The setup takes a Merchant ID, a service account key and one data source per store view.

Get the extension Read the documentation

Knowledgebase

All familiar Help articles

A list of the most frequently asked questions from the Google Shopping - Merchant API extension for Magento 2. We've tried our best to help you with the installation, configuration and troubleshooting. If you do not find the answer you were looking for, you can always send us a message through this form.

Installation articles

arrow-circle-right Installation using Composer (recommended)

Configuration

arrow-circle-right Google Cloud Service Account Setup

Changelog 0.9.0 is released on 3 March 2026

Our plugins are regularly updated to ensure compatibility with the latest Magento release.

Version 0.9.0 3 March 2026
    Features:
  • Real-time product synchronization with Google Merchant Center via the Content API as an alternative to XML feed delivery.
  • Dual sync paths: full product updates or inventory-only updates (price/stock) for higher throughput.
  • Hash-based change detection to skip unnecessary API calls when product data has not changed.
  • Queue-driven batch processing using Magento message queue (db connection) with configurable batch sizes (10–1000).
  • Mview indexer subscribed to relevant catalog and inventory tables to automatically flag changed products.
  • Cron-based publishers: product sync every 5 minutes, inventory sync every 2 minutes, daily sync check at 2 AM, and log cleanup at 3 AM.
  • Google Service Account authentication with JWT-based OAuth2 token exchange without external libraries.
  • Per-product error tracking with automatic retries after configurable hours.
  • Admin product grid with sync status, last synced timestamp, error messages, and bulk actions (sync, flag, enable/disable, delete).
  • Admin batch grid with batch progress, success/error counts, processing time, and retry capability.
  • Real-time log stream viewer in admin.
  • Selftest and version check following Magmodules module standards.
  • CLI Commands:
  • googleshopping:api:initialize — Populate sync table based on base module product filters.
  • googleshopping:api:sync — Manually sync products (all or by ID).
  • googleshopping:api:sync-check — Detect missing or removed products compared to Google.
  • googleshopping:api:test-connection — Validate Google API credentials.
  • googleshopping:api:status — Display sync statistics per store.
  • Configuration:
  • Per-store configuration for data source, feed label, and content language.
  • Encrypted storage of service account JSON credentials.
  • Auto-sync toggle, batch size configuration, retry interval (hours), and log retention (days).
  • Test Connection button in admin configuration.
  • All store-scoped fields support canRestore="1".
  • Module is disabled by default after installation.
  • Architecture:
  • Built as add-on for magmodules/m2-googleshopping (>=2.12.0), reusing product data layer, attribute mapping, and filters.
  • Added 4 custom database tables: mm_google_product, mm_google_product_log, mm_google_batch, mm_google_batch_item.
  • Full ACL coverage for products, sync, batches, and logs.
  • Comprehensive debug and error logging with database audit trail.
  • Minimum requirements:
  • Magento 2.3.x
  • PHP 8.1

Quality

Approved, Compatible and Tested

Magento Cloud Support

This extension is fully compatible with Adobe Commerce Cloud (Magento Cloud). It works with the read-only filesystem, the build and deploy pipeline and cloud-specific caching layers.

No additional configuration or workarounds are needed for cloud environments. The extension handles static content deployment and config management the same way as on-premise installations.

Private Composer Repo

After purchase you get access to a private Composer repository with personal credentials. Install and update the extension with a single composer command, just like any other dependency.

Your Composer credentials are available in your account dashboard. Updates are published to the repository as soon as a new version is released, so you always have access to the latest version.

star star star star star
star star star star star
Gaaf - digital agency
We have tried the integration with SnelStart through several different providers, and this is the only solution that simply works. We needed support on two occasions, and it was provided quickly and professionally. We do recommend this company!
Google 12 May 2026
star star star star star
star star star star star
Andrew Velikiy
Great vendor with handy modules and quick support!
Google 13 Apr 2026
star star star star star
star star star star star
Alexandru-Manuel Carabus
Magmodules sets the bar for Magento module quality and support—we check their catalog first for client feature requests, and they’re our first choice for licenses.
Google 11 Nov 2025
star star star star star
star star star star star
Matt Austin
Possibly the fastest support response times of any Magento Extension vendor. Great extensions too!
Google 09 Sep 2025
star star star star star
star star star star star
Jan Privé
Dankzij de heldere uitleg en snelle reactie van Magmodules kon mijn vraag, en dus mijn Magento-probleem, binnen enkele uren worden beantwoord. Doeltreffend, zonder moeilijke termen, gewoon zo als het zou moeten zijn.... Bedankt!
Google 05 Sep 2025
star star star star star
star star star star star
Denis Metzler
To evaluate a provider, it is not enough to consider only the product offered, but also its after-sales service, such as support and troubleshooting. Magmodules has been extremely satisfactory at all levels on multiple occasions and sets the bar at the top when comparing the competition.
Google 02 Sep 2025
star star star star star
star star star star star
Bleijenberg winkelinrichting en materialen
Goed bereikbaar, reageren snel en denken oplossingsgericht. Een aanrader.
Google 30 Jul 2025
star star star star star
star star star star star
Patrick Verduijn
Magmodules biedt plugins aan die van hoge kwaliteit zijn tegen een goede prijs, waar dit bedrijf in uitblinkt is de bereidheid om de zeldzame feedback & problemen met de plugins te willen onderzoeken, mee te willen denken in het debuggen van problemen en goede oplossingen toe te passen. In mijn decennium ervaring met Magento & 3th parties is Magmodules absoluut een uniqum binnen de markt.
Google 25 Jul 2025
star star star star star
star star star star star
Erik de Groot
Magemodules heeft hele sterke Magento extensies en een proactieve support. Al jaren heel erg tevreden over jullie service en producten!
Google 18 Jul 2025
star star star star star
star star star star star
René Zeuner
We are using the Mollie Magento extension from Magmodules. It works excellently without flaws. Very fast, competent and friendly support. Thanks!
Google 30 Jun 2025