Skip to main content

React Native SDK Models

Interfaces

AdaptyOnboarding

Information about an onboarding.

NameTypeDescription
idstringAn identifier of an onboarding, configured in Adapty Dashboard
placementAdaptyPlacementA placement, configured in Adapty Dashboard
hasViewConfigurationbooleanIf true, it is possible to fetch the view object and use it with AdaptyUI library
namestringName of the onboarding flow
remoteConfigAdaptyRemoteConfig (optional)A remote config configured in Adapty Dashboard for this onboarding
variationIdstringAn identifier of a variation, used to attribute purchases to this onboarding
versionnumber (optional)Version of the onboarding configuration
payloadDatastring (optional)Additional payload data
onboardingBuilderAdaptyOnboardingBuilder (optional)Builder configuration for the onboarding

AdaptyOnboardingBuilder

NameTypeDescription
urlstringURL for the onboarding builder
langstringLanguage for the onboarding builder

AdaptyPaywallProduct

An information about a product.

NameTypeDescription
vendorProductIdstringUnique identifier of a product from App Store Connect or Google Play Console
adaptyProductIdstringUnique identifier of the product in Adapty
paywallVariationIdstringSame as variationId property of the parent AdaptyPaywall
paywallABTestNamestringSame as abTestName property of the parent AdaptyPaywall
paywallNamestringSame as name property of the parent AdaptyPaywall
paywallProductIndexnumberThe index of the product in the paywall
localizedDescriptionstringA description of the product
localizedTitlestringThe name of the product
regionCodestring (optional)The region code of the locale used to format the price of the product. ISO 3166 ALPHA-2 (US, DE)
priceAdaptyPrice (optional)The cost of the product in the local currency
subscriptionAdaptySubscriptionDetails (optional)Detailed information about subscription (intro, offers, etc.)
webPurchaseUrlstring (optional)URL for web purchase functionality
payloadDatastring (optional)Additional payload data
iosobject (optional)iOS-specific properties
ios.isFamilyShareablebooleanBoolean 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. iOS Only.

AdaptyPrice

NameTypeDescription
amountnumberPrice as number
currencyCodestring (optional)The currency code of the locale used to format the price of the product. The ISO 4217 (USD, EUR)
currencySymbolstring (optional)The currency symbol of the locale used to format the price of the product. ($, €)
localizedStringstring (optional)A price's language is determined by the preferred language set on the device. On Android, the formatted price from Google Play as is

AdaptySubscriptionDetails

NameTypeDescription
subscriptionPeriodAdaptySubscriptionPeriodThe period details for products that are subscriptions. Will be null for iOS version below 11.2 and macOS version below 10.14.4.
localizedSubscriptionPeriodstring (optional)The period's language is determined by the preferred language set on the device
offerAdaptySubscriptionOfferId (optional)A subscription offer if available for the auto-renewable subscription
iosobject (optional)iOS-specific properties
ios.subscriptionGroupIdentifierstring (optional)An identifier of the subscription group to which the subscription belongs. Will be null for iOS version below 12.0 and macOS version below 10.14. iOS Only.
androidobject (optional)Android-specific properties
android.basePlanIdstringThe identifier of the base plan. Android Only.
android.renewalTypestring (optional)The renewal type. Possible values: 'prepaid', 'autorenewable'. Android Only.

AdaptySubscriptionPeriod

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

AdaptySubscriptionOfferId

NameTypeDescription
idstring (optional)Identifier for promotional or win_back offers
typestringType of offer. Possible values: introductory, promotional, win_back

AdaptyDiscountPhase

NameTypeDescription
localizedNumberOfPeriodsstring (optional)A formatted number of periods of a discount for a user's locale
localizedSubscriptionPeriodstring (optional)A formatted subscription period of a discount for a user's locale
numberOfPeriodsnumberA number of periods this product discount is available
priceAdaptyPriceDiscount price of a product in a local currency
subscriptionPeriodAdaptySubscriptionPeriodAn information about period for a product discount
paymentModeOfferTypeA payment mode for this product discount. Possible values: free_trial, pay_as_you_go, pay_up_front

AdaptyPaywall

An information about a paywall.

NameTypeDescription
placementAdaptyPlacementA placement, configured in Adapty Dashboard
hasViewConfigurationbooleanIf true, it is possible to fetch the view object and use it with AdaptyUI library
namestringA paywall name
remoteConfigAdaptyRemoteConfig (optional)A remote config configured in Adapty Dashboard for this paywall
variationIdstringAn identifier of a variation, used to attribute purchases to this paywall
productsarray of ProductReferenceArray of initial products info
idstringAn identifier of a paywall, configured in Adapty Dashboard
versionnumber (optional)Version of the paywall configuration
webPurchaseUrlstring (optional)URL for web purchase functionality
payloadDatastring (optional)Additional payload data
paywallBuilderAdaptyPaywallBuilder (optional)Builder configuration for the paywall

AdaptyPaywallBuilder

NameTypeDescription
idstringID for the paywall builder
langstringLanguage for the paywall builder

AdaptyPlacement

NameTypeDescription
abTestNamestringParent A/B test name
audienceNamestringA name of an audience to which the paywall belongs
idstringID of a placement configured in Adapty Dashboard
revisionnumberCurrent revision (version) of a paywall. Every change within a paywall creates a new revision
isTrackingPurchasesboolean (optional)Whether the placement is tracking purchases
audienceVersionIdstringVersion ID of the audience

AdaptyRemoteConfig

NameTypeDescription
langstringIdentifier of a paywall locale
dataobjectA custom dictionary configured in Adapty Dashboard for this paywall
dataStringstringA custom JSON string configured in Adapty Dashboard for this paywall

AdaptyProfile

An information about a user's subscription status and purchase history.

NameTypeDescription
profileIdstringAn identifier of the user in Adapty
customerUserIdstring (optional)An identifier of the user in your system
customAttributesobjectPreviously set user custom attributes with the updateProfile method
accessLevelsobject<string, AdaptyProfile.AccessLevel>The keys are access level identifiers configured by you in Adapty Dashboard. The values are AccessLevel objects. Can be null if the customer has no access levels
subscriptionsobject<string, AdaptyProfile.Subscription>The keys are product ids from App Store Connect. The values are Subscription objects. Can be null if the customer has no subscriptions
nonSubscriptionsobject<string, array of AdaptyProfile.NonSubscription>The keys are product ids from App Store Connect. The values are arrays of NonSubscription objects. 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
isActivebooleanWhether the access level is active. Generally, you have to check just this property to determine if the user has access to premium features
vendorProductIdstringThe identifier of the product in the App Store Connect that unlocked this access level
storestringThe store of the purchase that unlocked this access level. The possible values are: app_store, play_store, adapty
activatedAtDateThe time when the access level was activated
renewedAtDate (optional)The time when the access level was renewed
expiresAtDate (optional)The time when the access level will expire (could be in the past and could be null for lifetime access)
isLifetimebooleanWhether the access level is active for a lifetime (no expiration date). If set to true you shouldn't check expires_at, or you could just check isActive
activeIntroductoryOfferTypestring (optional)The type of active introductory offer. Possible values are: free_trial, pay_as_you_go, pay_up_front. If the value is not null, it means that the offer was applied during the current subscription period
activePromotionalOfferTypestring (optional)The type of active promotional offer. Possible values are: free_trial, pay_as_you_go, pay_up_front. If the value is not null, it means that the offer was applied during the current subscription period
activePromotionalOfferIdstring (optional)An identifier of active promotional offer
offerIdstring (optional)Offer identifier
willRenewbooleanWhether the auto-renewable subscription is set to renew
isInGracePeriodbooleanWhether the auto-renewable subscription is in the grace period
unsubscribedAtDate (optional)The 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
billingIssueDetectedAtDate (optional)The time when billing issue was detected. Subscription can still be active. Will be set to null if the charge will be made
startsAtDate (optional)The time when this access level has started (could be in the future)
cancellationReasonstring (optional)The reason why the subscription was cancelled. Possible values are: voluntarily_cancelled, billing_error, refund, price_increase, product_was_not_available, unknown
isRefundbooleanWhether the purchase was refunded

AdaptyProfile.Subscription

Information about the user's subscription.

NameTypeDescription
storestringThe store of the purchase. The possible values are: app_store, play_store, adapty
vendorProductIdstringThe identifier of the product in the App Store Connect
vendorTransactionIdstringTransaction id from the App Store
vendorOriginalTransactionIdstringOriginal transaction id from the App Store. For auto-renewable subscription, this will be the id of the first transaction in the subscription
isActivebooleanWhether the subscription is active
isLifetimebooleanWhether the subscription is active for a lifetime (no expiration date). If set to true you shouldn't check expires_at, or you could just check isActive
activatedAtDateThe time when the subscription was activated
renewedAtDate (optional)The time when the subscription was renewed
expiresAtDate (optional)The time when the subscription will expire (could be in the past and could be null for lifetime access)
startsAtDate (optional)The time when the subscription has started (could be in the future)
unsubscribedAtDate (optional)The 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 a user reactivates the subscription
billingIssueDetectedAtDate (optional)The time when billing issue was detected (Apple was not able to charge the card). Subscription can still be active. Will be set to null if the charge will be made
isInGracePeriodbooleanWhether the auto-renewable subscription is in the grace period
isSandboxbooleanWhether the product was purchased in the sandbox environment
isRefundbooleanWhether the purchase was refunded
willRenewbooleanWhether the auto-renewable subscription is set to renew
activeIntroductoryOfferTypestring (optional)The type of active introductory offer. Possible values are: free_trial, pay_as_you_go, pay_up_front. If the value is not null, it means that the offer was applied during the current subscription period
activePromotionalOfferTypestring (optional)The type of active promotional offer. Possible values are: free_trial, pay_as_you_go, pay_up_front. If the value is not null, it means that the offer was applied during the current subscription period
activePromotionalOfferIdstring (optional)An identifier of active promotional offer
offerIdstring (optional)Offer identifier
cancellationReasonstring (optional)The reason why the subscription was cancelled. Possible values are: voluntarily_cancelled, billing_error, refund, price_increase, product_was_not_available, unknown

AdaptyProfile.NonSubscription

Information about the user's non-subscription purchases.

NameTypeDescription
purchaseIdstringThe 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)
storestringThe store of the purchase. The possible values are: app_store, play_store, adapty
vendorProductIdstringThe identifier of the product in the App Store Connect
vendorTransactionIdstring (optional)Transaction id from the App Store
purchasedAtDateThe time when the product was purchased
isSandboxbooleanWhether the product was purchased in the sandbox environment
isRefundbooleanWhether the purchase was refunded
isConsumablebooleanWhether the product should only be processed once. If true, the purchase will be returned by Adapty API one time only

ProductReference

NameTypeDescription
vendorIdstringVendor ID of the product
adaptyIdstringAdapty ID of the product
iosobject (optional)iOS-specific properties
ios.promotionalOfferIdstring (optional)Promotional offer ID. iOS Only.
ios.winBackOfferIdstring (optional)Win back offer ID. iOS Only.
androidobject (optional)Android-specific properties
android.basePlanIdstring (optional)Base plan ID. Android Only.
android.offerIdstring (optional)Offer ID. Android Only.

Enums

VendorStore

  • app_store - Apple App Store
  • play_store - Google Play Store
  • adapty - Adapty

OfferType

  • free_trial - Free trial offer
  • pay_as_you_go - Pay as you go offer
  • pay_up_front - Pay up front offer

CancellationReason

  • voluntarily_cancelled - User voluntarily cancelled
  • billing_error - Billing error occurred
  • refund - Purchase was refunded
  • price_increase - Price was increased
  • product_was_not_available - Product was not available
  • unknown - Unknown reason

ProductPeriod

  • day - Day period
  • week - Week period
  • month - Month period
  • year - Year period