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
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-13。
[null,null,["最后更新时间 (UTC):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"]]