Method: purchases.subscriptionsv2.revoke

subscriptionv2.rev 要求使用者購買訂閱項目。

HTTP 要求

POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/purchases/subscriptionsv2/tokens/{token}:revoke

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

路徑參數

參數
packageName

string

必要欄位。購買這個訂閱項目的應用程式套件 (例如「com.some.thing」)。

token

string

必要欄位。購買訂閱項目時提供給使用者裝置的權杖。

要求主體

要求主體的資料會採用以下結構:

JSON 表示法
{
  "revocationContext": {
    object (RevocationContext)
  }
}
欄位
revocationContext

object (RevocationContext)

必要欄位。訂閱撤銷的其他詳細資料。

回應主體

如果成功,回應主體會是空白的。

授權範圍

需要下列 OAuth 範圍:

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

RevocationContext

撤銷 Purchase.subscriptionsv2.revoke API 的撤銷結構定義。

JSON 表示法
{

  // Union field RefundType can be only one of the following:
  "proratedRefund": {
    object (ProratedRefund)
  }
  // End of list of possible types for union field RefundType.
}
欄位
聯集欄位 RefundType。決定應核發的退款類型。必須在有效要求中指定退款類型。RefundType 只能是下列其中一項:
proratedRefund

object (ProratedRefund)

選用設定。用途是依據訂閱項目的剩餘時間,向使用者按比例退還訂閱項目的金額。

ProratedRefund

這個類型沒有任何欄位。

用來判斷 RevocationContext 中的退款類型是否為按比例計費的退款。