# Method: purchases.subscriptionsv2.get

- [HTTP request](https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptionsv2/get#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptionsv2/get#body.PATH_PARAMETERS)
- [Request body](https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptionsv2/get#body.request_body)
- [Response body](https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptionsv2/get#body.response_body)
- [Authorization scopes](https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptionsv2/get#body.aspect)
- [Try it!](https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptionsv2/get#try-it)

subscriptionsv2.get metadata about a subscription

### HTTP request

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

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `packageName` | `string` The package of the application for which this subscription was purchased (for example, 'com.some.thing'). |
| `token` | `string` Required. The token provided to the user's device when the subscription was purchased. |

### Request body

The request body must be empty.

### Response body

If successful, the response body contains an instance of `https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptionsv2#SubscriptionPurchaseV2`.

### Sample

The following is a sample request:

```json
curl -X GET \
  'https://androidpublisher.googleapis.com/androidpublisher/v3/applications/com.example.app/purchases/subscriptionsv2/tokens/sample-token-123' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer <YOUR_ACCESS_TOKEN>'
```

The following is a sample response:

```json
{
  "kind": "androidpublisher#subscriptionPurchaseV2",
  "regionCode": "US",
  "startTime": "2024-01-15T10:00:00Z",
  "subscriptionState": "SUBSCRIPTION_STATE_ACTIVE",
  "latestOrderId": "GPA.3345-1234-5678-90123",
  "linkedPurchaseToken": null,
  "pausedStateContext": null,
  "canceledStateContext": null,
  "testPurchase": null,
  "acknowledgementState": "ACKNOWLEDGEMENT_STATE_ACKNOWLEDGED",
  "externalAccountIdentifiers": {
    "externalAccountId": "user-ext-acc-88765",
    "obfuscatedExternalAccountId": " obfuscated-acc-id-aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789",
    "obfuscatedExternalProfileId": "obfuscated-prof-id-9876543210zYxWvUtSrQpOnMlKjIhGfEdCbA"
  },
  "subscribeWithGoogleInfo": {
    "profileId": "109876543210987654321",
    "profileName": "Alex Smith",
    "emailAddress": "alex.smith.swg@example.com",
    "givenName": "Alex",
    "familyName": "Smith"
  },
  "lineItems": [
    {
      "productId": "premium_monthly_v2",
      "expiryTime": "2025-01-15T10:00:00Z",
      "latestSuccessfulOrderId": "GPA.3345-1234-5678-90123",
      "autoRenewingPlan": {
        "autoRenewEnabled": true,
        "recurringPrice": {
          "units": "12",
          "nanos": 990000000,
          "currencyCode": "USD"
        },
        "priceChangeDetails": null,
        "priceStepUpConsentDetails": null,
        "installmentDetails": null
      },
      "prepaidPlan": null,
      "offerDetails": {
        "basePlanId": "premium-monthly",
        "offerId": "intro-offer-7day",
        "offerTags": [
          "initial_discount",
          "seasonal_promo"
        ]
      },
      "offerPhase": {
        "basePrice":{}
      }
      "deferredItemReplacement": null,
      "signupPromotion": null
      "itemReplacement": null,
    }
  ],
  "etag":"74798db94d8dc4c76ad1df9f77fd9693",
  "outofAppPurchaseContext": null,
}
```

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/androidpublisher`