Skip to main content

SDK Models

Interfaces

AdaptyPaywallProduct

An information about a product.

NameTypeDescription
vendorProductIdstringUnique identifier of a product from App Store Connect or Google Play Console
introductoryOfferEligibilityenumUser's eligibility for your introductory offer. Check this property before displaying info about introductory offers (i.e. free trials)
promotionalOfferEligibility (iOS only)booleanUser'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
paywallABTestNamestringParent A/B test name
paywallNamestringParent paywall name
skProduct (iOS only)SKProduct (iOS)Underlying system representation of the product
skuDetails (Android only)SkuDetails assigned to this productUnderlying system representation of the product
currencyCodestring (optional)The currency code of the locale used to format the price of the product.
currencySymbolstring (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).
introductoryDiscountAdaptyProductDiscount (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)boolA 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).
localizedDescriptionstringA description of the product.
localizedPricestring (optional for ios)The price’s language is determined by the preferred language set on the device.
localizedSubscriptionPeriodstring (optional)The period’s language is determined by the preferred language set on the device.
localizedTitlestringThe name of the product.
pricenumberThe 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).
subscriptionPeriodAdaptyProductSubscriptionPeriod (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

NameTypeDescription
unitAdaptyPeriodUnitA unit of time that a subscription period is specified in. The possible values are: day, week, month, year and unknown
numberOfUnitsnumberA number of period units

AdaptyProductDiscount

An information about a product discount.

NameTypeDescription
identifier (iOS only)string (Optional)Unique identifier of a discount offer for a product
pricenumberDiscount price of a product in a local currency
numberOfPeriodsnumberA number of periods this product discount is available
paymentMode (iOS only)string

For iOS: A payment mode for this product discount. Possible values are freeTrial, payUpFront, payAsYouGo

No value for Android devices

localizedPricestring (Optional)A formatted price of a discount for a user's locale
localizedSubscriptionPeriodstring (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
subscriptionPeriodAdaptyProductSubscriptionPeriodAn information about period for a product discount

AdaptyPaywall

An information about a paywall.

NameTypeDescription
idstringAn identifier of a paywall, configured in Adapty Dashboard
variationIdstringAn identifier of a variation, used to attribute purchases to this paywall
revisionnumberCurrent revision (version) of a paywall. Every change within a paywall creates a new revision
remoteConfigStringstring (optional)A custom JSON string configured in Adapty Dashboard for this paywall
remoteConfigdictionary (optional)A custom dictionary configured in Adapty Dashboard for this paywall (same as remoteConfigString)
vendorProductIdsarray of stringsArray of related products ids
abTestNamestringParent A/B test name
namestringPaywall name
localestring

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: en means English, en-US represents US English.

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.

NameTypeDescription
profileIdstringAn identifier of a user in Adapty
customerUserIdstring (Optional)An identifier of a user in your system
customAttributesdictionaryPreviously set user custom attributes with .updateProfile() method
accessLevelsdictionary<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
subscriptionsdictionary<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
nonSubscriptionsdictionary<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.

NameTypeDescription
idstringUnique identifier of the access level configured by you in Adapty Dashboard
isActivebooleanTrue if this access level is active. Generally, you can check this property to determine wether a user has an access to premium features
vendorProductIdstringAn identifier of a product in a store that unlocked this access level
storestringA 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).
isLifetimebooleanTrue if this access level is active for a lifetime (no expiration date)
willRenewbooleanTrue if this auto-renewable subscription is set to renew
isInGracePeriodbooleanTrue 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.
cancellationReasonstring (Optional)A reason why a subscription was cancelled. Possible values are `'voluntarily_cancelled'
isRefundbooleanTrue if this purchase was refunded
activeIntroductoryOfferTypestring (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'
activePromotionalOfferTypestring (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'
activePromotionalOfferIdstring (Optional)An id of active promotional offer.

AdaptyProfile.Subscription

Information about the user's subscription.

NameTypeDescription
storestringA store of the purchase that unlocked this subscription. Possible values: `'app_store'
vendorProductIdstringAn identifier of a product in a store that unlocked this subscription
vendorTransactionIdstringA transaction id of a purchase in a store that unlocked this subscription
vendorOriginalTransactionIdstringAn 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
isActivebooleanTrue if the subscription is active
isLifetimebooleanTrue 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
willRenewbooleanTrue if the auto-renewable subscription is set to renew
isInGracePeriodbooleanWhether the auto-renewable subscription is in a grace period
cancellationReasonstring (Optional)A reason why the subscription was cancelled. Possible values: `'voluntarily_cancelled'
isRefundboolTrue if the purchase was refunded
activeIntroductoryOfferTypestring (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'
activePromotionalOfferTypestring (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'
activePromotionalOfferIdstring (Optional)An id of an active promotional offer
isSandboxboolTrue if the product was purchased in a sandbox environment

AdaptyProfile.NonSubscription

Information about the user's non-subscription purchases.

NameTypeDescription
purchaseIdstringAn 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)
vendorProductIdstringAn identifier of the product in a store
vendorTransactionIdstring (optional)Transaction ID in a store
storestringA store of the purchase. Possible values: `'app_store'
purchasedAt

iOS: Date

Android: string (ISO 8601 datetime)

Date when the product was purchased
isRefundbooleanTrue if the purchase was refunded
isConsumablebooleanTrue if the product is consumable
isSandboxbooleanTrue if the product was purchased in a sandbox environment

AdaptySubscriptionUpdateParameters

(Android only)
Parameters to change one subscription to another.

NameTypeDescription
oldSubVendorProductIdstringThe identifier of the current subscription in Play Market that needs to be replaced.
ReplacementModeenumEnum that corresponds to BillingFlowParams.ProrationMode values.