Requirements
- Request Authentication.
- Connection with the Google Publisher API.
- Attach the application username when making purchases.
Response body
The /v2/customers/:applicationUsername/subscription
request returns a JSON object containing the customer with the definition of its current subscription.
Property name | Type | Description |
---|---|---|
applicationUsername | string | User identifier from your application as specified in the store.order() call. See the applicationUsername documentation. |
subscription | object | The subscription object. See below. |
Subscription
A subscription object.
Property name | Type | Description |
---|---|---|
transactionId | string | The transaction id of the latest recurring order associated with the purchase of the subscription. |
productId | string | The unique identifier of the subscription product. |
isExpired | boolean | Whether the subscription has expired. Value is true when no subscription products are currently owned. Check the cancelationReason field to know the reason why the subscription has expired. |
expirationDate | date-time | Time at which the current (or last active) subscription is set to expire, in the ISO 8601 date-time format. |
purchaseDate | date-time | Time at which the subscription was granted, in the ISO 8601 date-time format. |
platform | string | Platform vendor that generated the receipt (apple, google, …) |
sandbox | boolean | Whether the purchase was made in a sandbox or a production environment. |
lastRenewalDate | date-time | The time the platform charged the user’s account for a purchased or restored product, in the ISO 8601 date-time format. (iOS only). |
renewalIntent | string | Whether the customer intents to let a subscription be renewed when it reaches its current expiry time. Possible values:
|
renewalIntentChangeDate | date-string | The time the customer or system change the renewalIntent status. |
cancelationReason | string | The reason why a transaction was canceled, a subscription is not auto-renewing or expired. Possible values are:
You can use this value to display an alternative subscription product in your app, to win back the customer, such as a lower-level subscription plan to which the user can downgrade from their current plan. Consider presenting an attractive upgrade or downgrade offer. |
isBillingRetryPeriod | boolean | Whether an auto-renewable subscription is in the billing retry period.
This field indicates whether the platform is attempting to renew an expired subscription automatically. If the customer’s subscription failed to renew because the platform was unable to complete the transaction, this value reflects whether the platform is still trying to renew the subscription. You can use this field to:
|
isTrialPeriod | boolean | Whether a subscription is in the free trial period. Possible values are:
|
isIntroPeriod | boolean | Whether an auto-renewable subscription is in the introductory price period. |
promotionalOfferId | string | Identifier of the subscription offer redeemed by the user. (iOS only) You provide this value in the Promotional Offer Product Code field when you create the subscription offer in App Store Connect. You can use this value to:
|
priceConsentStatus | string | Price consent status for a subscription price increase. Possible values:
|
receiptId | string | Which receipt those subscription information are based upon. Check the Receipt API to learn more. |
priceUSD | number | Price paid by the customer for the latest renewal, converted to U.S. Dollars. |
priceMicros | number | Price paid by the customer for the latest renewal in the transaction currency, in micro unit. Divide by 1000000 for unit value. |
currency | string | Currency in which the customer paid for the latest renewal. |