Method: purchases.products.consume

消費應用程式內商品的購買交易。

HTTP 要求

POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/purchases/products/{productId}/tokens/{token}:consume

這個網址使用 gRPC 轉碼語法。

路徑參數

參數
packageName

string

售出應用程式內產品的應用程式套件名稱 (例如「com.some.thing」)。

productId

string

應用程式內產品 SKU (例如「com.some.thing.inapp1」)。

token

string

購買應用程式內產品時,提供給使用者裝置的權杖。

要求主體

要求主體必須為空白。

回應主體

如果成功,回應主體會留白。

範例

以下是要求範例:

curl \
  -X POST \
  'https://androidpublisher.googleapis.com/androidpublisher/v3/applications/com.example.app/purchases/products/exampleSKU/tokens/exampleToken:consume' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer [YOUR_ACCESS_TOKEN]'

授權範圍

需要下列 OAuth 範圍:

  • https://www.googleapis.com/auth/androidpublisher