Method: purchases.subscriptionsv2.cancel
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
subscriptionsv2.cancel でユーザーの定期購入をキャンセルします。
HTTP リクエスト
POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/purchases/subscriptionsv2/tokens/{token}:cancel
この URL では gRPC Transcoding 構文を使用しています。
パスパラメータ
パラメータ |
packageName |
string
必須。定期購入したアプリのパッケージ(例: 「com.some.thing」)。
|
token |
string
必須。定期購入の購入時にユーザーのデバイスに提供されたトークン。
|
リクエストの本文
リクエストの本文には、次の構造のデータが含まれます。
フィールド |
cancellationContext |
object (CancellationContext )
必須。定期購入取り消しに関する追加詳細。
|
レスポンスの本文
成功すると、レスポンスの本文は空になります。
認可スコープ
次の OAuth スコープが必要です。
https://www.googleapis.com/auth/androidpublisher
CancellationContext
purchases.subscriptionsv2.cancel API の解約コンテキスト。
フィールド |
cancellationType |
enum (CancellationType )
必須。購入された定期購入のキャンセルの種類。
|
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-09-12 UTC。
[[["わかりやすい","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"]],["最終更新日 2025-09-12 UTC。"],[],[],null,["- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [CancellationContext](#CancellationContext)\n - [JSON representation](#CancellationContext.SCHEMA_REPRESENTATION)\n- [CancellationType](#CancellationType)\n- [Try it!](#try-it)\n\nsubscriptionsv2.cancel a subscription purchase for the user.\n\nHTTP request\n\n`POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/purchases/subscriptionsv2/tokens/{token}:cancel`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\nPath parameters\n\n| Parameters ||\n|---------------|------------------------------------------------------------------------------------------------------------------------------|\n| `packageName` | `string` Required. The package of the application for which this subscription was purchased (for example, 'com.some.thing'). |\n| `token` | `string` Required. The token provided to the user's device when the subscription was purchased. |\n\nRequest body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"cancellationContext\": { object (/android-publisher/api-ref/rest/v3/purchases.subscriptionsv2/cancel#CancellationContext) } } ``` |\n\n| Fields ||\n|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `cancellationContext` | `object (`[CancellationContext](/android-publisher/api-ref/rest/v3/purchases.subscriptionsv2/cancel#CancellationContext)`)` Required. Additional details around the subscription revocation. |\n\nResponse body\n\nIf successful, the response body is empty.\n\nAuthorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/androidpublisher`\n\nCancellationContext Cancellation context of the purchases.subscriptionsv2.cancel API.\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"cancellationType\": enum (/android-publisher/api-ref/rest/v3/purchases.subscriptionsv2/cancel#CancellationType) } ``` |\n\n| Fields ||\n|--------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `cancellationType` | `enum (`[CancellationType](/android-publisher/api-ref/rest/v3/purchases.subscriptionsv2/cancel#CancellationType)`)` Required. The type of cancellation for the purchased subscription. |\n\nCancellationType The type of cancellation requested by the developer.\n\n| Enums ||\n|-------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `CANCELLATION_TYPE_UNSPECIFIED` | Cancellation type unspecified. |\n| `USER_REQUESTED_STOP_RENEWALS` | Cancellation requested by the user, and the subscription can be restored. It only stops the subscription's next renewal. For an installment subscription, users still need to finish the commitment period. For more details on renewals and payments, see \u003chttps://developer.android.com/google/play/billing/subscriptions#installments\u003e |\n| `DEVELOPER_REQUESTED_STOP_PAYMENTS` | Cancellation requested by the developer, and the subscription cannot be restored. It stops the subscription's next payment. For an installment subscription, users will not need to pay the next payment and finish the commitment period. For more details on renewals and payments, see \u003chttps://developer.android.com/google/play/billing/subscriptions#installments\u003e |"]]