Method: purchases.products.acknowledge
Xác nhận giao dịch mua một mặt hàng trong ứng dụng.
Yêu cầu HTTP
POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/purchases/products/{productId}/tokens/{token}:acknowledge
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Tham số |
packageName |
string
Tên gói của ứng dụng nơi bán sản phẩm trong ứng dụng (ví dụ: "com.some.thing").
|
productId |
string
SKU sản phẩm trong ứng dụng (ví dụ: "com.some.thing.inapp1").
|
token |
string
Mã thông báo được cung cấp cho thiết bị của người dùng khi họ mua sản phẩm trong ứng dụng.
|
Nội dung yêu cầu
Nội dung yêu cầu chứa dữ liệu có cấu trúc sau:
Biểu diễn dưới dạng JSON |
{
"developerPayload": string
} |
Trường |
developerPayload |
string
Trọng tải để đính kèm vào giao dịch mua.
|
Nội dung phản hồi
Nếu thành công, nội dung phản hồi sẽ trống.
Phạm vi uỷ quyền
Yêu cầu phạm vi OAuth sau:
https://www.googleapis.com/auth/androidpublisher
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2024-12-17 UTC.
[null,null,["Cập nhật lần gần đây nhất: 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"]]