Method: purchases.products.acknowledge
ยอมรับการซื้อไอเทมที่ซื้อในแอป
คำขอ HTTP
POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/purchases/products/{productId}/tokens/{token}:acknowledge
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
packageName |
string
ชื่อแพ็กเกจของแอปพลิเคชันที่จำหน่ายไอเทมที่ซื้อในแอป (เช่น "com.some.thing")
|
productId |
string
SKU ของไอเทมที่ซื้อในแอป (เช่น "com.some.thing.inapp1")
|
token |
string
โทเค็นที่ส่งไปยังอุปกรณ์ของผู้ใช้เมื่อซื้อไอเทมที่ซื้อในแอป
|
เนื้อหาของคำขอ
เนื้อความของคำขอมีข้อมูลซึ่งมีโครงสร้างดังต่อไปนี้
การแสดง JSON |
{
"developerPayload": string
} |
ช่อง |
developerPayload |
string
เพย์โหลดที่จะแนบไปกับการซื้อ
|
เนื้อหาการตอบกลับ
หากดำเนินการสำเร็จ เนื้อหาการตอบกลับจะว่างเปล่า
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/androidpublisher
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-12-17 UTC
[null,null,["อัปเดตล่าสุด 2024-12-17 UTC"],[[["Acknowledges a purchase of an in-app product using the provided product and package information."],["Requires `packageName`, `productId`, and purchase `token` as path parameters for identification."],["Optionally accepts a `developerPayload` in the request body for attaching additional data."],["Utilizes the `https://www.googleapis.com/auth/androidpublisher` authorization scope."],["A successful acknowledgement results in an empty response body, confirming the action."]]],["This document details the process of acknowledging an in-app purchase. It uses a `POST` request to the specified URL, including the `packageName`, `productId`, and `token` as path parameters. The request body requires a JSON structure with a `developerPayload` string. Successful acknowledgement results in an empty response body. This process requires `https://www.googleapis.com/auth/androidpublisher` OAuth scope for authorization. The process includes a try it out functionality.\n"]]