- Request Authentication.
- Connection with the Google Publisher API.
- Configure the Apple Webhook.
- Attach the application username when making purchases.
/v2/customers/:applicationUsername/purchases request returns a JSON object containing information about the last purchase for each product made by a customer.
|applicationUsername||string||User identifier from your application as specified in the store.order() call. See the applicationUsername documentation.|
|purchases||object||The Purchases Collection object. See below.|
An object whose keys are product identifiers and values are Purchase objects. See below.
A purchase object.
|productId||string||The unique identifier of the product.|
|purchaseId||string||The unique identifier of the purchase.|
|platform||string||Platform vendor that generated the purchase (apple, google, …)|
|sandbox||boolean||Whether the purchase was made in a sandbox or a production environment.|
|purchaseDate||date-time||Time at which the product was granted, in the ISO 8601 date-time format.|
|expirationDate||date-time||Time at which the current (or last active) subscription is set to expire, in the ISO 8601 date-time format.|
|isExpired||boolean||Whether a subscription has expired. Check the cancelationReason field to know the reason why the subscription has expired.|
|renewalIntent||string||Whether the customer intents to let a subscription be renewed when it reaches its current expiry time. Possible values:
|renewalIntentChangeDate||date-string||Last time the customer or system changed 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.|
|discountId||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: