{
  "opencollection": "1.0.0",
  "info": {
    "name": "Google Play Developer Orders Subscriptions API",
    "version": "3.0"
  },
  "request": {
    "auth": {
      "type": "oauth2",
      "flow": "authorization_code",
      "authorizationUrl": "https://accounts.google.com/o/oauth2/auth",
      "accessTokenUrl": "https://oauth2.googleapis.com/token",
      "credentials": {
        "clientId": "{{clientId}}",
        "clientSecret": "{{clientSecret}}"
      }
    }
  },
  "items": [
    {
      "info": {
        "name": "Subscriptions",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get Subscription Purchase Status",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://androidpublisher.googleapis.com/androidpublisher/v3/applications/:packageName/purchases/subscriptions/:subscriptionId/tokens/:token",
            "params": [
              {
                "name": "packageName",
                "value": "",
                "type": "path",
                "description": "The package name of the application (e.g., com.example.myapp). This is the unique identifier for the app on Google Play."
              },
              {
                "name": "subscriptionId",
                "value": "",
                "type": "path",
                "description": "The subscription ID (e.g., monthly_sub)."
              },
              {
                "name": "token",
                "value": "",
                "type": "path",
                "description": "The token provided to the user's device when the purchase was made. Used to uniquely identify a purchase."
              }
            ]
          },
          "docs": "Checks whether a user's subscription purchase is valid and returns its expiry time. Includes information about auto-renewal status, payment state, cancellation reason, and linked purchase token."
        },
        {
          "info": {
            "name": "Acknowledge a Subscription Purchase",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://androidpublisher.googleapis.com/androidpublisher/v3/applications/:packageName/purchases/subscriptions/:subscriptionId/tokens/:token:acknowledge",
            "params": [
              {
                "name": "packageName",
                "value": "",
                "type": "path",
                "description": "The package name of the application (e.g., com.example.myapp). This is the unique identifier for the app on Google Play."
              },
              {
                "name": "subscriptionId",
                "value": "",
                "type": "path",
                "description": "The subscription ID (e.g., monthly_sub)."
              },
              {
                "name": "token",
                "value": "",
                "type": "path",
                "description": "The token provided to the user's device when the purchase was made. Used to uniquely identify a purchase."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Acknowledges a subscription purchase. Subscriptions that are not acknowledged within three days are automatically refunded."
        },
        {
          "info": {
            "name": "Cancel a Subscription Purchase",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://androidpublisher.googleapis.com/androidpublisher/v3/applications/:packageName/purchases/subscriptions/:subscriptionId/tokens/:token:cancel",
            "params": [
              {
                "name": "packageName",
                "value": "",
                "type": "path",
                "description": "The package name of the application (e.g., com.example.myapp). This is the unique identifier for the app on Google Play."
              },
              {
                "name": "subscriptionId",
                "value": "",
                "type": "path",
                "description": "The subscription ID (e.g., monthly_sub)."
              },
              {
                "name": "token",
                "value": "",
                "type": "path",
                "description": "The token provided to the user's device when the purchase was made. Used to uniquely identify a purchase."
              }
            ]
          },
          "docs": "Cancels a user's subscription purchase. The subscription remains valid until its expiration time and will not be auto-renewed."
        },
        {
          "info": {
            "name": "Defer a Subscription Purchase",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://androidpublisher.googleapis.com/androidpublisher/v3/applications/:packageName/purchases/subscriptions/:subscriptionId/tokens/:token:defer",
            "params": [
              {
                "name": "packageName",
                "value": "",
                "type": "path",
                "description": "The package name of the application (e.g., com.example.myapp). This is the unique identifier for the app on Google Play."
              },
              {
                "name": "subscriptionId",
                "value": "",
                "type": "path",
                "description": "The subscription ID (e.g., monthly_sub)."
              },
              {
                "name": "token",
                "value": "",
                "type": "path",
                "description": "The token provided to the user's device when the purchase was made. Used to uniquely identify a purchase."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Defers a user's subscription purchase until a specified future expiration time. The user retains access to the subscription content during the deferral period."
        },
        {
          "info": {
            "name": "Revoke a Subscription Purchase",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://androidpublisher.googleapis.com/androidpublisher/v3/applications/:packageName/purchases/subscriptions/:subscriptionId/tokens/:token:revoke",
            "params": [
              {
                "name": "packageName",
                "value": "",
                "type": "path",
                "description": "The package name of the application (e.g., com.example.myapp). This is the unique identifier for the app on Google Play."
              },
              {
                "name": "subscriptionId",
                "value": "",
                "type": "path",
                "description": "The subscription ID (e.g., monthly_sub)."
              },
              {
                "name": "token",
                "value": "",
                "type": "path",
                "description": "The token provided to the user's device when the purchase was made. Used to uniquely identify a purchase."
              }
            ]
          },
          "docs": "Refunds and immediately revokes a user's subscription purchase. Access to the subscription is terminated immediately and a refund is issued. This cannot be undone."
        },
        {
          "info": {
            "name": "Get Subscription Purchase V2",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://androidpublisher.googleapis.com/androidpublisher/v3/applications/:packageName/purchases/subscriptionsv2/tokens/:token",
            "params": [
              {
                "name": "packageName",
                "value": "",
                "type": "path",
                "description": "The package name of the application (e.g., com.example.myapp). This is the unique identifier for the app on Google Play."
              },
              {
                "name": "token",
                "value": "",
                "type": "path",
                "description": "The token provided to the user's device when the purchase was made. Used to uniquely identify a purchase."
              }
            ]
          },
          "docs": "Gets the latest subscription purchase state using the Purchases Subscriptions v2 API. Returns detailed information about the subscription including line items, external account identifiers, and subscription state."
        },
        {
          "info": {
            "name": "List Subscription Products",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://androidpublisher.googleapis.com/androidpublisher/v3/applications/:packageName/monetization/subscriptions",
            "params": [
              {
                "name": "packageName",
                "value": "",
                "type": "path",
                "description": "The package name of the application (e.g., com.example.myapp). This is the unique identifier for the app on Google Play."
              },
              {
                "name": "pageSize",
                "value": "10",
                "type": "query",
                "description": "Maximum number of subscriptions to return."
              },
              {
                "name": "pageToken",
                "value": "example_value",
                "type": "query",
                "description": "Page token for pagination."
              },
              {
                "name": "showArchived",
                "value": "true",
                "type": "query",
                "description": "Whether to include archived subscriptions in the response."
              }
            ]
          },
          "docs": "Lists all subscriptions defined for the specified application. Returns subscription metadata including product IDs, listings, and base plans."
        },
        {
          "info": {
            "name": "Create a Subscription Product",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://androidpublisher.googleapis.com/androidpublisher/v3/applications/:packageName/monetization/subscriptions",
            "params": [
              {
                "name": "packageName",
                "value": "",
                "type": "path",
                "description": "The package name of the application (e.g., com.example.myapp). This is the unique identifier for the app on Google Play."
              },
              {
                "name": "productId",
                "value": "500123",
                "type": "query",
                "description": "The ID to use for the subscription. Must be unique within the app."
              },
              {
                "name": "regionsVersion.version",
                "value": "example_value",
                "type": "query",
                "description": "The version of the available regions being used."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Creates a new subscription for an application. The subscription must include at least one base plan and listing."
        },
        {
          "info": {
            "name": "Get a Subscription Product",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://androidpublisher.googleapis.com/androidpublisher/v3/applications/:packageName/monetization/subscriptions/:productId",
            "params": [
              {
                "name": "packageName",
                "value": "",
                "type": "path",
                "description": "The package name of the application (e.g., com.example.myapp). This is the unique identifier for the app on Google Play."
              },
              {
                "name": "productId",
                "value": "",
                "type": "path",
                "description": "The product ID of the in-app product or subscription (e.g., premium_upgrade, monthly_sub)."
              }
            ]
          },
          "docs": "Reads a single subscription product configuration, including its base plans, offers, and regional pricing."
        },
        {
          "info": {
            "name": "Update a Subscription Product",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://androidpublisher.googleapis.com/androidpublisher/v3/applications/:packageName/monetization/subscriptions/:productId",
            "params": [
              {
                "name": "packageName",
                "value": "",
                "type": "path",
                "description": "The package name of the application (e.g., com.example.myapp). This is the unique identifier for the app on Google Play."
              },
              {
                "name": "productId",
                "value": "",
                "type": "path",
                "description": "The product ID of the in-app product or subscription (e.g., premium_upgrade, monthly_sub)."
              },
              {
                "name": "updateMask",
                "value": "example_value",
                "type": "query",
                "description": "The list of fields to update in this subscription. Uses FieldMask format."
              },
              {
                "name": "regionsVersion.version",
                "value": "example_value",
                "type": "query",
                "description": "The version of the available regions being used."
              },
              {
                "name": "latencyTolerance",
                "value": "PRODUCT_UPDATE_LATENCY_TOLERANCE_LATENCY_SENSITIVE",
                "type": "query",
                "description": "Tolerance for propagation latency. PRODUCT_UPDATE_LATENCY_TOLERANCE_LATENCY_SENSITIVE or PRODUCT_UPDATE_LATENCY_TOLERANCE_LATENCY_TOLERANT."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Updates an existing subscription product configuration. Supports partial updates via the updateMask field."
        },
        {
          "info": {
            "name": "Delete a Subscription Product",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://androidpublisher.googleapis.com/androidpublisher/v3/applications/:packageName/monetization/subscriptions/:productId",
            "params": [
              {
                "name": "packageName",
                "value": "",
                "type": "path",
                "description": "The package name of the application (e.g., com.example.myapp). This is the unique identifier for the app on Google Play."
              },
              {
                "name": "productId",
                "value": "",
                "type": "path",
                "description": "The product ID of the in-app product or subscription (e.g., premium_upgrade, monthly_sub)."
              }
            ]
          },
          "docs": "Deletes a subscription. A subscription can only be deleted if it has never had a base plan published."
        },
        {
          "info": {
            "name": "List Subscription Offers",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://androidpublisher.googleapis.com/androidpublisher/v3/applications/:packageName/monetization/subscriptions/:productId/basePlans/:basePlanId/offers",
            "params": [
              {
                "name": "packageName",
                "value": "",
                "type": "path",
                "description": "The package name of the application (e.g., com.example.myapp). This is the unique identifier for the app on Google Play."
              },
              {
                "name": "productId",
                "value": "",
                "type": "path",
                "description": "The product ID of the in-app product or subscription (e.g., premium_upgrade, monthly_sub)."
              },
              {
                "name": "basePlanId",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the base plan. Base plans define the billing period and renewal type for a subscription."
              },
              {
                "name": "pageSize",
                "value": "10",
                "type": "query",
                "description": "Maximum number of offers to return."
              },
              {
                "name": "pageToken",
                "value": "example_value",
                "type": "query",
                "description": "Page token for pagination."
              }
            ]
          },
          "docs": "Lists all offers for a given subscription's base plan. Returns offer details including eligibility criteria and pricing phases."
        },
        {
          "info": {
            "name": "Create a Subscription Offer",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://androidpublisher.googleapis.com/androidpublisher/v3/applications/:packageName/monetization/subscriptions/:productId/basePlans/:basePlanId/offers",
            "params": [
              {
                "name": "packageName",
                "value": "",
                "type": "path",
                "description": "The package name of the application (e.g., com.example.myapp). This is the unique identifier for the app on Google Play."
              },
              {
                "name": "productId",
                "value": "",
                "type": "path",
                "description": "The product ID of the in-app product or subscription (e.g., premium_upgrade, monthly_sub)."
              },
              {
                "name": "basePlanId",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the base plan. Base plans define the billing period and renewal type for a subscription."
              },
              {
                "name": "offerId",
                "value": "500123",
                "type": "query",
                "description": "The ID to use for the offer. Must be unique within the base plan."
              },
              {
                "name": "regionsVersion.version",
                "value": "example_value",
                "type": "query",
                "description": "The version of the available regions being used."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Creates a new subscription offer. An offer represents special pricing or a free trial for a base plan."
        }
      ]
    }
  ],
  "bundled": true
}