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 Billing Library เพื่อให้นักพัฒนาแอปใช้เมื่อผู้ใช้ทำธุรกรรมภายนอก
เสร็จสมบูรณ์ โทเค็นนี้ใช้เพื่อ
แจ้งให้ Google Play ทราบว่าการซื้อสำเร็จแล้ว
- รหัสธุรกรรมภายนอก: ตัวระบุที่ไม่ซ้ำกันซึ่งนักพัฒนาแอปสร้างขึ้น
เพื่อระบุธุรกรรมภายนอก
รองรับข้อเสนอภายนอก
ส่วนนี้จะอธิบายวิธีรองรับข้อเสนอภายนอก
ก่อนใช้ API เหล่านี้ โปรดตรวจสอบสิ่งต่อไปนี้
กำหนดค่าใน Play Console
หากต้องการกำหนดค่าข้อเสนอภายนอกใน Play Console ให้ทำตามขั้นตอนที่ระบุไว้ในข้อกำหนดของโปรแกรม
หน้าจอข้อมูลช่วยให้ผู้ใช้ทราบว่ากำลังจะเข้าชมเว็บไซต์ภายนอก
ระบบจะแสดงหน้าจอข้อมูลต่อผู้ใช้ทุกครั้งก่อนที่จะนำผู้ใช้ไปนอกแอปโดยใช้ API ของข้อเสนอภายนอก
หน้าจอข้อมูล
|
ตัวอย่างมีไว้เพื่อการอธิบายเท่านั้น
ขั้นตอนถัดไป
หากต้องการเริ่มผสานรวม API ของข้อเสนอภายนอก ให้ทำตามคำแนะนำแบบละเอียด
สำหรับทั้งการผสานรวมในแอปและการผสานรวมแบ็กเอนด์
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-27 UTC
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2025-07-27 UTC"],[],[],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)."]]