Reminder: By Aug 31, 2025, all new apps and updates to existing apps must use Billing Library version 7 or newer. If you need more time to update your app, you can request an extension until Nov 1, 2025. Learn about
Play Billing Library version deprecation.
外部提供 API
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
在特定國家/地區,符合資格的開發人員可以引導使用者前往應用程式外部,包括宣傳應用程式內數位功能和服務。本指南將介紹如何啟用外部優惠的 API。使用這些 API 前,請先詳閱計畫規定並註冊外部優惠計畫。
詞彙解釋
以下說明本指南使用的詞彙:
- 外部提供的 API:這些 API 可用於引導使用者在應用程式外部執行,包括顯示必要資訊畫面和回報適用交易。
- 外部交易:根據計畫規定定義,在應用程式外發生的合格交易。
- 外部交易憑證:當使用者完成外部交易時,透過 Play 帳款服務程式庫提供給開發人員使用的憑證。這類憑證可用於向 Google Play 傳送交易成功通知。
- 外部交易 ID:開發人員為了識別外部交易而產生的不重複 ID。
支援外部優惠
本節說明如何支援外部優惠。使用這類 API 前,請確認以下事項:
在 Play 管理中心設定
如要在 Play 管理中心設定外部優惠,請按照計畫規定中的步驟操作。
資訊畫面可協助使用者瞭解自己正要造訪外部網站,每當使用者透過外部優惠 API 將他們導向應用程式外部時,系統就會向使用者顯示資訊畫面。
資訊畫面
|
示意圖僅供參考。
後續步驟
如要開始整合外部提供 API,請按照應用程式內整合和後端整合的深度指南操作。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[null,null,["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],null,["# External offers APIs\n\nIn certain countries, eligible developers are able to lead users outside the\napp, including to promote offers for in-app digital features and services. This\nguide addresses the APIs to enable external offers. You should review the\n[program requirements](https://support.google.com/googleplay/android-developer/answer/14372887) and enroll in the external offers program before\nusing these APIs.\n\nGlossary of terms\n-----------------\n\nTerm conventions followed by this guide:\n\n- **External offers APIs**: APIs used to direct the user outside of the app, including surfacing required information screen and reporting applicable transactions.\n- **External transaction** : A qualifying transaction that occurs outside of the app as defined by the [program requirements](https://support.google.com/googleplay/android-developer/answer/14372887).\n- **External transaction token**: A token provided to the developer through the Play Billing Library for the developer to use when the user completes an external transaction. This token is used to notify Google Play of a successful purchase.\n- **External transaction ID**: A unique identifier generated by the developer to identify an external transaction.\n\nSupport external offers\n-----------------------\n\nThis section describes how to support external offers.\nBefore using these APIs, ensure the following:\n\n- Review the eligibility requirements for the relevant program and complete the onboarding steps outlined in the [program requirements](https://support.google.com/googleplay/android-developer/answer/14372887).\n- Integrate [Play Billing Library 6.2.1](/google/play/billing/release-notes) or higher.\n\n### Configure in Play Console\n\nTo configure external offers in Play Console, follow the steps outlined in\nthe [program requirements](https://support.google.com/googleplay/android-developer/answer/14372887).\n\n### Information screen for users\n\nThe information screen helps users understand that they are about to visit an\nexternal website. The information screen will be shown to users each time before\nthey are directed outside of the app using the external offers APIs. \n\n|--------------------|\n| Information screen |\n\nExample for illustrative purposes only.\n\n### Next steps\n\nTo begin integrating the external offers APIs, follow the in-depth guides\nfor both [in-app integration](/google/play/billing/external/integration) and [backend integration](/google/play/billing/outside-gpb-backend)."]]