rocket
隆重推出
Merchant API
- Content API for Shopping 的官方後繼產品。
update
掌握最新資訊
瞭解 Merchant API 的新功能、錯誤修正和更新。
add_alert
注意:Content API for Shopping 將於 2026 年 8 月 18 日停用。
將結帳連結加入免費產品資訊
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
你可以使用免費產品資訊的
checkoutSettings
屬性,提供連結讓消費者直接前往結帳頁面。詳情請參閱「將結帳連結加入免費產品資訊」。
你必須提供商家和產品的特定資訊,才能加入結帳計畫。如要使用 checkoutSettings
,必須符合下列條件:
請檢查 Google Merchant Center 使用者介面,確認你是否已加入免費產品資訊計畫。如未註冊,請完成免費產品資訊新手上路步驟。結帳網址格式如下所示:
https://mystore.com/path-to-product/{id}
消費者點按免費產品資訊中的結帳網址時,系統會自動將 {id}
替換為產品的 offerId
。
新增結帳網址
你可以使用
freelistingsprogram.checkoutsettings.insert
新增或更新結帳網址範本。這項呼叫會在帳戶層級更新結帳網址範本,並為所有有效商品啟用結帳功能。
POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/freelistingsprogram/checkoutsettings
範例如下:
{
uri_settings: {
checkout_uri_template: "https://domain_name.com/custom_path/{id}"
}
}
查看目前的結帳網址
你可以使用
freelistingsprogram.checkoutsettings.get
查看現有的結帳網址。get
為唯讀,且需要您的merchantId
。get
方法會傳回對應的 checkout
資源。
GET https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/freelistingsprogram/checkoutsettings
移除結帳網址
你可以使用 freelistingsprogram.checkoutsettings.delete
移除結帳網址。這會讓所有商品停用結帳功能。
DELETE https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/freelistingsprogram/checkoutsettings
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-13 (世界標準時間)。
[null,null,["上次更新時間:2025-08-13 (世界標準時間)。"],[[["\u003cp\u003eGoogle is introducing the Merchant API beta, the new version of the Content API for Shopping.\u003c/p\u003e\n"],["\u003cp\u003eUse the \u003ccode\u003echeckoutSettings\u003c/code\u003e attribute to add a checkout link directly to your free listings, enhancing the customer shopping experience.\u003c/p\u003e\n"],["\u003cp\u003eTo utilize \u003ccode\u003echeckoutSettings\u003c/code\u003e, you need an active product feed in Google Merchant Center and be enrolled in the free listings program.\u003c/p\u003e\n"],["\u003cp\u003eImplement the checkout feature by adding or updating your checkout URL template using the provided API calls, allowing customers to purchase directly from your free listings.\u003c/p\u003e\n"],["\u003cp\u003eManage your checkout URL by viewing, updating, or removing it via the respective API calls, giving you control over the checkout process for your free listings.\u003c/p\u003e\n"]]],["The Merchant API beta, a new version of the Content API for Shopping, is introduced. To use `checkoutSettings` for free listings, users need an active product feed and enrollment in the free listings program. Merchants can add or update their checkout URL templates using `freelistingsprogram.checkoutsettings.insert`, view existing URLs with `get`, and remove them with `delete`. The checkout URL directs customers to a product's checkout page, automatically replacing `{id}` with the product's `offerId`.\n"],null,["# Add a checkout link to your free listings\n\nYou can use the\n[`checkoutSettings`](/shopping-content/reference/rest/v2.1/CheckoutSettings)\nattribute of free listings to provide a link for customers to go directly to the\ncheckout page. For more information, see [add a checkout link for your free\nlistings](//support.google.com/merchants/answer/13580732).\n\nYou must provide specific information about your business and products before\nyou can opt in to the checkout program. You must meet the following criteria to\nuse `checkoutSettings`:\n\n- Have an active [product\n feed](//support.google.com/merchants/answer/7439882?) in the [Google\n Merchant Center](//merchants.google.com/).\n- Your merchant account must be enrolled in the free listings program.\n\nCheck the Google Merchant Center UI to see if you're already enrolled in the\nfree listings program. If you're not enrolled, complete the [free listings\nonboarding](//support.google.com/merchants/answer/9455788) steps. Use the\nfollowing format for your checkout URLs: \n\n https://mystore.com/path-to-product/{id}\n\nWhen a customer clicks on the checkout URL in your free listing, `{id}` is\nautomatically replaced with the [`offerId`](/shopping-content/guides/products/product-id) of the product.\n\nAdd your checkout URL\n---------------------\n\nYou can use\n[`freelistingsprogram.checkoutsettings.insert`](/shopping-content/reference/rest/v2.1/freelistingsprogram.checkoutsettings/insert)to\nadd or update your checkout URL template. This call updates your checkout URL\ntemplate at the account level, and opts all valid offers into the checkout\nfeature. \n\n POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/freelistingsprogram/checkoutsettings\n\nHere's an example: \n\n {\n uri_settings: {\n checkout_uri_template: \"https://domain_name.com/custom_path/{id}\"\n }\n }\n\nView your current checkout URL\n------------------------------\n\nYou can use\n[`freelistingsprogram.checkoutsettings.get`](/shopping-content/reference/rest/v2.1/freelistingsprogram.checkoutsettings/get)\nto view your existing checkout URL. `get` is read-only, and requires your\n`merchantId`. The `get` method returns the corresponding `checkout` resource. \n\n GET https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/freelistingsprogram/checkoutsettings\n\nRemove your checkout URL\n------------------------\n\nYou can remove your checkout URL by using\n[`freelistingsprogram.checkoutsettings.delete`](/shopping-content/reference/rest/v2.1/freelistingsprogram.checkoutsettings/delete).\nThis opts all your offers out of the checkout feature. \n\n DELETE https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/freelistingsprogram/checkoutsettings"]]