Method: purchases.subscriptionsv2.revoke
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
对用户购买的订阅执行 subscriptionsv2.revoke 操作。
HTTP 请求
POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/purchases/subscriptionsv2/tokens/{token}:revoke
网址采用 gRPC 转码语法。
路径参数
参数 |
packageName |
string
必需。购买的相应订阅所对应的应用的软件包(例如:“com.some.thing”)。
|
token |
string
必需。在用户购买订阅时向用户设备提供的令牌。
|
请求正文
请求正文中包含结构如下的数据:
字段 |
revocationContext |
object (RevocationContext )
必需。有关撤消订阅的其他详细信息。
|
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/androidpublisher
RevocationContext
purchases.subscriptionsv2.revoke API 的撤消上下文。
JSON 表示法 |
{
// Union field RefundType can be only one of the following:
"fullRefund": {
object (FullRefund )
},
"proratedRefund": {
object (ProratedRefund )
}
// End of list of possible types for union field RefundType .
} |
字段 |
联合字段 RefundType 。确定应批准的退款类型。必须在有效请求中指定退款类型。RefundType 只能是下列其中一项: |
fullRefund |
object (FullRefund )
可选。应当将订阅的最新订单全额退还给用户时,使用此字段。
|
proratedRefund |
object (ProratedRefund )
可选。应当根据订阅的剩余时间按比例退还用户支付的订阅费时,使用此字段。
|
FullRefund
此类型没有字段。
用于确定 RevocationContext 中的退款类型是不是全额退款。
ProratedRefund
此类型没有字段。
用于确定 RevocationContext 中的退款类型是不是按比例退款。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-12-17。
[[["易于理解","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"]],["最后更新时间 (UTC):2024-12-17。"],[[["Revoke a user's subscription purchase using the `subscriptionsv2.revoke` API."],["The API requires the package name and purchase token in the request path."],["You can optionally specify a full or prorated refund in the request body."],["Successful revocation results in an empty response body."],["Requires the `https://www.googleapis.com/auth/androidpublisher` OAuth scope for authorization."]]],["This document outlines the process for revoking a user's subscription purchase via the `subscriptionsv2.revoke` API. The `POST` request, sent to `https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/purchases/subscriptionsv2/tokens/{token}:revoke`, requires the application's package name and the user's subscription token. The request body must include a `revocationContext`, specifying either a `fullRefund` or `proratedRefund`. Successful requests yield an empty response. This API action also needs the `androidpublisher` authorization scope.\n"]]