# Google Merchant Center Setup – Ordio

**Last Updated:** 2026-02-17

Setup guide for Google Merchant Center with Ordio's SaaS subscription products (Starter, Plus, Pro). Covers GCP configuration, product feed, landing pages, and validation.

## Overview

- **Merchant Center Account:** 5727125070 (Ordio)
- **Product Feed URL:** https://www.ordio.com/feeds/merchant-center-products.xml
- **GCP Project:** ordio-472310 (recommended for Merchant API)
- **Service Account:** ordio-seo-analytics@ordio-472310.iam.gserviceaccount.com

## Manual Steps (Complete in Order)

### 1. Fix Service Account in Merchant Center

**Problem:** If `ordio-sec-analytics` was added by mistake (typo), replace with the correct account.

**Action:** In [Merchant Center](https://merchants.google.com/) → Settings → Access and services → People and access:

- Remove `ordio-sec-analytics@ordio-472310.iam.gserviceaccount.com` if present
- Add `ordio-seo-analytics@ordio-472310.iam.gserviceaccount.com` with roles: Admin, Standard, Performance and insights

### 2. Enable Merchant API in ordio-472310

**Action:** In [Google Cloud Console](https://console.cloud.google.com/apis/library/merchantapi.googleapis.com?project=ordio-472310):

- Select project **ordio-472310**
- Click **Enable** for Merchant API

### 3. Register GCP for Merchant API v1

**Requirement:** One-time developer registration per GCP project before v1 API works (v1beta sunsets Feb 28, 2026).

**Option A – Run script (recommended):**

```bash
php v2/scripts/dev-helpers/merchant-center-register-gcp.php
```

**Option B – Manual via API Explorer:** Use [Try it!](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts.developerRegistration/registerGcp#try-it) with OAuth, account `5727125070`, developerEmail `hady@ordio.com`.

### 4. Add Product Data Source in Merchant Center

**Option A – Via API (recommended):**

```bash
php v2/scripts/dev-helpers/merchant-center-add-datasource.php
```

Creates a primary product data source with daily scheduled fetch at 06:00 Europe/Berlin.

**Option B – Manual in Merchant Center UI:** Products → Feeds → Add product data source → Scheduled fetch → URL: `https://www.ordio.com/feeds/merchant-center-products.xml` → Target: Germany, Language: German

### 5. Validate Feed

After the first fetch:

1. Check **Diagnostics** for product data issues
2. Fix any attribute errors (title, price, link, etc.)
3. Ensure products show as **Approved** or address any **Disapproved** reasons

## Product Feed Structure

The feed at `/feeds/merchant-center-products.xml` contains three software subscription products:

| Plan   | Title                               | Annual Price | Link                                      |
|--------|-------------------------------------|--------------|-------------------------------------------|
| Starter| Ordio Starter (1-year subscription) | €1,068.00   | /preise?plan=starter&p=yearly             |
| Plus   | Ordio Plus (1-year subscription)   | €1,548.00   | /preise?plan=plus&p=yearly                |
| Pro    | Ordio Pro (1-year subscription)    | €1,788.00   | /preise?plan=pro&p=yearly                 |

Per [Google's software subscription best practices](https://support.google.com/merchants/answer/7169130).

## Landing Page Requirements (Implemented)

- **Plan-specific URLs:** `/preise?plan=starter`, `?plan=plus`, `?plan=pro` – each scrolls to the plan and pre-selects yearly
- **Terms of renewal/cancellation:** Linked via "Vertragslaufzeit und Kündigungsmodalitäten findest du in unseren AGB" on pricing page
- **Yearly pre-select:** When `plan` param is set, period defaults to yearly

## Files Reference

| File | Purpose |
|------|---------|
| `v2/feeds/merchant-center-products.php` | Generates product feed XML |
| `v2/sections/pricing-data.php` | Plan data (monthly prices); yearly prices 89/129/149 synced manually in feed, `static_pricing_new.php` Product schema, ordio_comparison_data.php |
| `v2/pages/static_pricing_new.php` | Live `/preise` pricing page (`?p=monthly` / `?p=yearly`) |
| `v2/sections/pricing-card.php` | Plan cards with `id="plan-{key}"` for scroll-to |
| `v2/scripts/dev-helpers/merchant-center-register-gcp.php` | One-time GCP registration for Merchant API v1 |
| `v2/scripts/dev-helpers/merchant-center-add-datasource.php` | Create data source via API (scheduled fetch) |
| `v2/scripts/dev-helpers/merchant-center-fetch-datasource.php` | Trigger immediate fetch on a data source |
| `v2/scripts/dev-helpers/merchant-center-validate-feed.php` | Validate feed structure locally |
| `v2/scripts/dev-helpers/merchant-center-list-datasources.php` | List data sources via API |
| `v2/scripts/dev-helpers/merchant-center-list-products.php` | List products and approval status via API |

## API Review Commands

After deployment, run these to verify setup:

```bash
# Validate feed structure
php v2/scripts/dev-helpers/merchant-center-validate-feed.php --url=https://www.ordio.com/feeds/merchant-center-products.xml

# List data sources
php v2/scripts/dev-helpers/merchant-center-list-datasources.php

# Trigger immediate fetch (replace DATASOURCE_ID with actual ID from list)
php v2/scripts/dev-helpers/merchant-center-fetch-datasource.php --name=accounts/5727125070/dataSources/DATASOURCE_ID

# List products and check approval status
php v2/scripts/dev-helpers/merchant-center-list-products.php
```

## Troubleshooting

### Feed returns 404

- Verify `.htaccess` has: `RewriteRule ^feeds\/merchant-center-products\.xml$ v2/feeds/merchant-center-products.php [L]`
- Ensure changes are deployed to production
- Test locally: `php v2/scripts/dev-helpers/merchant-center-validate-feed.php --url=http://localhost:8003/feeds/merchant-center-products.xml`

### Products pending or disapproved

- **Pending initial review:** New products show `pending_initial_policy_review_free_listings` for 24–72 hours. Normal; no action needed.
- **Disapproved:** Ensure `link` URLs resolve and show the correct plan with yearly price pre-selected
- Verify AGB link is visible on pricing page
- Check [product data specification](https://support.google.com/merchants/answer/7052112)
- Run `php v2/scripts/dev-helpers/merchant-center-list-products.php` to see status and item-level issues

### API calls fail

- Confirm Merchant API is enabled in ordio-472310
- Confirm `registerGcp` was called
- Confirm service account has Admin access in Merchant Center

### Data source only shows FREE_LISTINGS

- Destinations (FREE_LISTINGS, SHOPPING_ADS, etc.) depend on account program participation
- To enable Shopping ads: Merchant Center → Growth → Manage programs → enable Shopping ads
- After enabling at account level, destinations can be configured per data source

## References

- [Software subscription best practices](https://support.google.com/merchants/answer/7169130)
- [Product data specification](https://support.google.com/merchants/answer/7052112)
- [Merchant API v1 migration](https://developers.google.com/merchant/api/guides/compatibility/migrate-v1beta-v1) – Ordio scripts use Merchant API v1 (v1beta sunsets Feb 28, 2026; Content API sunsets Aug 2026)
- [Access your account (service account)](https://developers.google.com/merchant/api/guides/authorization/access-your-account)
