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.
ค้นหาประวัติการซื้อ
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
queryPurchaseHistory()
ถูกเลิกใช้งานใน Play Billing Library 7 หน้านี้อธิบายทางเลือกที่แนะนําสําหรับ Use Case ที่แอปของคุณอาจใช้queryPurchaseHistory()
ประมวลผลการซื้อ
หากต้องการเรียกข้อมูลการซื้อมาประมวลผล ให้ใช้ queryPurchasesAsync(QueryPurchaseParams, PurchasesResponseListener)
ดูรายละเอียดเพิ่มเติมได้ที่ส่วนการประมวลผลการซื้อในคู่มือการผสานรวมของเรา
จัดการการซื้อที่ยกเลิก
หากต้องการดึงข้อมูลการซื้อที่ยกเลิกหรือเป็นโมฆะ ให้ใช้ 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,["# Query Purchase History\n\n`queryPurchaseHistory()` was deprecated in Play Billing Library 7. This page\ndescribes the recommended alternatives for use cases your app may have relied on\n`queryPurchaseHistory()` for.\n\nProcess Purchases\n-----------------\n\nTo retrieve purchases for processing, use\n[`queryPurchasesAsync(QueryPurchaseParams, PurchasesResponseListener)`](/reference/com/android/billingclient/api/BillingClient#queryPurchasesAsync(com.android.billingclient.api.QueryPurchasesParams,com.android.billingclient.api.PurchasesResponseListener)).\n\nSee the [Processing Purchases](/google/play/billing/integrate#process) section of our integration\nguide\nfor more details.\n\nHandle Voided Purchases\n-----------------------\n\nTo fetch voided or cancelled purchases, use the\n[voided purchases](https://developers.google.com/android-publisher/voided-purchases) server developer API.\n\nTrack Historical Purchases\n--------------------------\n\nIf your app would like to track a user's purchase history your app should\nkeep track of the history on your apps backend."]]