SDK Models
Interfaces
AdaptyPaywallProduct
An information about a product.
| Name | Type | Description |
|---|---|---|
| vendorProductId | string | Unique identifier of a product from App Store Connect or Google Play Console |
| introductoryOfferEligibility | enum | User's eligibility for your introductory offer. Check this property before displaying info about introductory offers (i.e. free trials) |
| promotionalOfferEligibility (iOS only) | boolean | User's eligibility for the promotional offers. Check this property before displaying info about promotional offers |
| promotionalOfferId (iOS only) | string (Optional) | For iOS: An identifier of a promotional offer, provided by Adapty for this specific user. No value for Android devices |
| paywallABTestName | string | Parent A/B test name |
| paywallName | string | Parent paywall name |
| skProduct (iOS only) | SKProduct (iOS) | Underlying system representation of the product |
| skuDetails (Android only) | SkuDetails assigned to this product | Underlying system representation of the product |
| currencyCode | string (optional) | The currency code of the locale used to format the price of the product. |
| currencySymbol | string (optional) | The currency symbol of the locale used to format the price of the product. |
| discounts (iOS only) | [AdaptyProductDiscount] | An array of subscription offers available for the auto-renewable subscription. (Will be empty for iOS version below 12.2 and macOS version below 10.14.4). |
| introductoryDiscount | AdaptyProductDiscount (optional) | The object containing introductory price information for the product. (Will be nil for iOS version below 11.2 and macOS version below 10.14.4). |
| isFamilyShareable (iOS only) | bool | A Boolean value that indicates whether the product is available for family sharing in App Store Connect. (Will be false for iOS version below 14.0 and macOS version below 11.0). |
| localizedDescription | string | A description of the product. |
| localizedPrice | string (optional for ios) | The price’s language is determined by the preferred language set on the device. |
| localizedSubscriptionPeriod | string (optional) | The period’s language is determined by the preferred language set on the device. |
| localizedTitle | string | The name of the product. |
| price | number | The cost of the product in the local currency. |
| regionCode (iOS only) | string (optional) | The region code of the locale used to format the price of the product. |
| subscriptionGroupIdentifier (iOS only) | string (optional) | The identifier of the subscription group to which the subscription belongs. (Will be nil for iOS version below 12.0 and macOS version below 10.14). |
| subscriptionPeriod | AdaptyProductSubscriptionPeriod (optional) | The period details for products that are subscriptions. (Will be nil for iOS version below 11.2 and macOS version below 10.14.4). |
AdaptyProductSubscriptionPeriod
| Name | Type | Description |
|---|---|---|
| unit | AdaptyPeriodUnit | A unit of time that a subscription period is specified in. The possible values are: day, week, month, year and unknown |
| numberOfUnits | number | A number of period units |
AdaptyProductDiscount
An information about a product discount.
| Name | Type | Description |
|---|---|---|
| identifier (iOS only) | string (Optional) | Unique identifier of a discount offer for a product |
| price | number | Discount price of a product in a local currency |
| numberOfPeriods | number | A number of periods this product discount is available |
| paymentMode (iOS only) | string | For iOS: A payment mode for this product discount. Possible values are No value for Android devices |
| localizedPrice | string (Optional) | A formatted price of a discount for a user's locale |
| localizedSubscriptionPeriod | string (Optional for iOS) | A formatted subscription period of a discount for a user's locale. |
| localizedNumberOfPeriods (iOS only) | string (Optional) | For iOS: A formatted number of periods of a discount for a user's locale |
| subscriptionPeriod | AdaptyProductSubscriptionPeriod | An information about period for a product discount |
AdaptyPaywall
An information about a paywall.
| Name | Type | Description |
|---|---|---|
| id | string | An identifier of a paywall, configured in Adapty Dashboard |
| variationId | string | An identifier of a variation, used to attribute purchases to this paywall |
| revision | number | Current revision (version) of a paywall. Every change within a paywall creates a new revision |
| remoteConfigString | string (optional) | A custom JSON string configured in Adapty Dashboard for this paywall |
| remoteConfig | dictionary (optional) | A custom dictionary configured in Adapty Dashboard for this paywall (same as remoteConfigString) |
| vendorProductIds | array of strings | Array of related products ids |
| abTestName | string | Parent A/B test name |
| name | string | Paywall name |
| locale | string | An identifier of a paywall locale This parameter is expected to be a language code composed of one or more subtags separated by the "-" character. The first subtag is for the language, the second one is for the region (The support for regions will be added later). Example: If the parameter is omitted, the paywall will be returned in the default locale. |
AdaptyProfile
An information about a user's subscription status and purchase history.
| Name | Type | Description |
|---|---|---|
| profileId | string | An identifier of a user in Adapty |
| customerUserId | string (Optional) | An identifier of a user in your system |
| customAttributes | dictionary | Previously set user custom attributes with .updateProfile() method |
| accessLevels | dictionary<string, AccessLevel> | The keys are access level identifiers configured by you in Adapty Dashboard. The values are Can be null if the customer has no access levels |
| subscriptions | dictionary<string, Subscription > | The keys are product ids from a store. The values are information about subscriptions. Can be null if the customer has no subscriptions |
| nonSubscriptions | dictionary<string, [NonSubscription ]> | The keys are product ids from the store. The values are arrays of information about consumables. Can be null if the customer has no purchases. |
AdaptyProfile.AccessLevel
Information about the user's access level.
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier of the access level configured by you in Adapty Dashboard |
| isActive | boolean | True if this access level is active. Generally, you can check this property to determine wether a user has an access to premium features |
| vendorProductId | string | An identifier of a product in a store that unlocked this access level |
| store | string | A store of the purchase that unlocked this access level. Possible values are `'app_store' |
| activatedAt | iOS: Date Android: string (ISO 8601 datetime) | Time when this access level was activated. |
| startsAt | iOS: Date Android: string (ISO 8601 datetime) (optional) | Time when this access level has started (could be in the future). |
| renewedAt | iOS: Date Android: string (ISO 8601 datetime) (optional) | Time when the access level was renewed. |
| expiresAt | iOS: Date Android: string (ISO 8601 datetime) (optional) | Time when the access level will expire (could be in the past and could be null for lifetime access). |
| isLifetime | boolean | True if this access level is active for a lifetime (no expiration date) |
| willRenew | boolean | True if this auto-renewable subscription is set to renew |
| isInGracePeriod | boolean | True if this auto-renewable subscription is in the grace period |
| unsubscribedAt | iOS: Date Android: string (ISO 8601 datetime) (optional) | Time when the auto-renewable subscription was cancelled. Subscription can still be active, it just means that auto-renewal turned off. Will be set to null if the user reactivates the subscription. |
| billingIssueDetectedAt | iOS: Date Android: string (ISO 8601 datetime) (optional) | Time when billing issue was detected. Subscription can still be active. Would be set to null if a charge is made. |
| cancellationReason | string (Optional) | A reason why a subscription was cancelled. Possible values are `'voluntarily_cancelled' |
| isRefund | boolean | True if this purchase was refunded |
| activeIntroductoryOfferType | string (Optional) | A type of an active introductory offer. If the value is not null, it means that the offer was applied during the current subscription period. Possible values: `'free_trial' |
| activePromotionalOfferType | string (Optional) | A type of an active promotional offer. If the value is not null, it means that the offer was applied during the current subscription period. Possible values `'free_trial' |
| activePromotionalOfferId | string (Optional) | An id of active promotional offer. |
AdaptyProfile.Subscription
Information about the user's subscription.
| Name | Type | Description |
|---|---|---|
| store | string | A store of the purchase that unlocked this subscription. Possible values: `'app_store' |
| vendorProductId | string | An identifier of a product in a store that unlocked this subscription |
| vendorTransactionId | string | A transaction id of a purchase in a store that unlocked this subscription |
| vendorOriginalTransactionId | string | An original transaction id of the purchase in a store that unlocked this subscription. For auto-renewable subscription, this will be an id of the first transaction in this subscription |
| isActive | boolean | True if the subscription is active |
| isLifetime | boolean | True if the subscription is active for a lifetime (no expiration date) |
| activatedAt | iOS: Date Android: string (ISO 8601 datetime) | Time when the subscription was activated. |
| renewedAt | iOS: Date Android: string (ISO 8601 datetime) (optional) | Time when the subscription was renewed. |
| expiresAt | iOS: Date Android: string (ISO 8601 datetime) (optional) | Time when the subscription will expire (could be in the past and could be null for a lifetime access). |
| startsAt | iOS: Date Android: string (ISO 8601 datetime) (optional) | Time when the subscription has started (could be in the future). |
| unsubscribedAt | iOS: Date Android: string (ISO 8601 datetime) (optional) | Time when the auto-renewable subscription was cancelled. Subscription can still be active, it means that auto-renewal is turned off. Would be null if a user reactivates the subscription |
| billingIssueDetectedAt | iOS: Date Android: string (ISO 8601 datetime) (optional) | Time when a billing issue was detected. Subscription can still be active |
| willRenew | boolean | True if the auto-renewable subscription is set to renew |
| isInGracePeriod | boolean | Whether the auto-renewable subscription is in a grace period |
| cancellationReason | string (Optional) | A reason why the subscription was cancelled. Possible values: `'voluntarily_cancelled' |
| isRefund | bool | True if the purchase was refunded |
| activeIntroductoryOfferType | string (Optional) | A type of an active introductory offer. If the value is not null, it means that the offer was applied during the current subscription period. Possible values: `'free_trial' |
| activePromotionalOfferType | string (Optional) | A type of an active promotional offer. If the value is not null, it means that the offer was applied during the current subscription period. Possible values: `'free_trial' |
| activePromotionalOfferId | string (Optional) | An id of an active promotional offer |
| isSandbox | bool | True if the product was purchased in a sandbox environment |
AdaptyProfile.NonSubscription
Information about the user's non-subscription purchases.
| Name | Type | Description |
|---|---|---|
| purchaseId | string | An identifier of the purchase in Adapty. You can use it to ensure that you've already processed this purchase (for example tracking one time products) |
| vendorProductId | string | An identifier of the product in a store |
| vendorTransactionId | string (optional) | Transaction ID in a store |
| store | string | A store of the purchase. Possible values: `'app_store' |
| purchasedAt | iOS: Date Android: string (ISO 8601 datetime) | Date when the product was purchased |
| isRefund | boolean | True if the purchase was refunded |
| isConsumable | boolean | True if the product is consumable |
| isSandbox | boolean | True if the product was purchased in a sandbox environment |
AdaptySubscriptionUpdateParameters
(Android only)
Parameters to change one subscription to another.
| Name | Type | Description |
|---|---|---|
| oldSubVendorProductId | string | The identifier of the current subscription in Play Market that needs to be replaced. |
| ReplacementMode | enum | Enum that corresponds to BillingFlowParams.ProrationMode values. |