Skip to main content

Unity SDK Models

Interfaces

AdaptyPaywallProduct

An information about a product.

NameTypeDescription
VendorProductIdstringUnique identifier of the product
AdaptyProductIdstringUnique identifier of the product in Adapty
PaywallVariationIdstringThe identifier of the variation, used to attribute purchases to the paywall
PaywallABTestNamestringParent A/B test name
PaywallNamestringParent paywall name
LocalizedDescriptionstringA description of the product
LocalizedTitlestringThe name of the product
IsFamilyShareableboolIndicates whether the product is available for family sharing in App Store Connect
RegionCodestring (optional)Product locale region code
PriceAdaptyPriceThe object which represents the main price for the product
SubscriptionAdaptySubscription (optional)Detailed information about subscription (intro, offers, etc.)

AdaptyPrice

NameTypeDescription
AmountdoubleDiscount price of a product in a local currency
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
LocalizedStringstring (optional)A formatted price of a discount for a user's locale

AdaptySubscription

NameTypeDescription
GroupIdentifierstring (optional)The identifier of the subscription group to which the subscription belongs
PeriodAdaptySubscriptionPeriodA ProductSubscriptionPeriodModel object. The period details for products that are subscriptions
LocalizedPeriodstring (optional)Localized subscription period of the product
OfferAdaptySubscriptionOfferSubscription offer information
RenewalTypeAdaptySubscriptionRenewalTypeThe type of the subscription renewal
BasePlanIdstring (optional)The identifier of the base plan

AdaptySubscriptionPeriod

NameTypeDescription
UnitAdaptySubscriptionPeriodUnitA unit of time that a subscription period is specified in
NumberOfUnitslongA number of period units

AdaptySubscriptionOffer

NameTypeDescription
IdentifierstringUnique identifier of a discount offer for a product
TypeAdaptySubscriptionOfferTypeType of the subscription offer
Phasesarray of AdaptySubscriptionPhaseA list of discount phases available for this offer
OfferTagsarray of stringsTags defined in Google Play console for current offer

AdaptySubscriptionPhase

NameTypeDescription
PriceAdaptyPricePrice of the discount phase in a local currency
NumberOfPeriodsintAn integer that indicates the number of periods the product discount is available
PaymentModeAdaptyPaymentModeThe payment mode for this product discount
SubscriptionPeriodAdaptySubscriptionPeriodA Period object that defines the period for the product discount
LocalizedSubscriptionPeriodstring (optional)The formatted subscription period of the discount for the user's localization
LocalizedNumberOfPeriodsstring (optional)The formatted number of periods of the discount for the user's localization

AdaptyPaywall

An information about a paywall.

NameTypeDescription
PlacementIdstringThe identifier of the paywall, configured in Adapty Dashboard
NamestringPaywall name
AudienceNamestringPaywall audience name
ABTestNamestringPaywall A/B test name
VariationIdstringThe identifier of the variation, used to attribute purchases to the paywall
RevisionintThe current revision (version) of the paywall. Every change within the paywall creates a new revision
HasViewConfigurationboolIf true, it is possible to use Adapty Paywall Builder
LocalestringAn identifier of a paywall locale
RemoteConfigStringstring (optional)The custom JSON formatted data configured in Adapty Dashboard (String representation)
RemoteConfigobject (optional)A custom dictionary configured in Adapty Dashboard for this paywall (same as remoteConfigString)
VendorProductIdsarray of stringsArray of related products ids

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
IsActiveboolWhether 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
ActivatedAtDateTimeThe time when the access level was activated
RenewedAtDateTime (optional)The time when the access level was renewed
ExpiresAtDateTime (optional)The time when the access level will expire (could be in the past and could be null for lifetime access)
IsLifetimeboolWhether 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
WillRenewboolWhether the auto-renewable subscription is set to renew
IsInGracePeriodboolWhether the auto-renewable subscription is in the grace period
UnsubscribedAtDateTime (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
BillingIssueDetectedAtDateTime (optional)The time when billing issue was detected. Subscription can still be active. Will be set to null if the charge will be made
StartsAtDateTime (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
IsRefundboolWhether 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
IsActiveboolWhether the subscription is active
IsLifetimeboolWhether 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
ActivatedAtDateTimeThe time when the subscription was activated
RenewedAtDateTime (optional)The time when the subscription was renewed
ExpiresAtDateTime (optional)The time when the subscription will expire (could be in the past and could be null for lifetime access)
StartsAtDateTime (optional)The time when the subscription has started (could be in the future)
UnsubscribedAtDateTime (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
BillingIssueDetectedAtDateTime (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
IsInGracePeriodboolWhether the auto-renewable subscription is in the grace period
IsSandboxboolWhether the product was purchased in the sandbox environment
IsRefundboolWhether the purchase was refunded
WillRenewboolWhether 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
PurchasedAtDateTimeThe time when the product was purchased
IsSandboxboolWhether the product was purchased in the sandbox environment
IsRefundboolWhether the purchase was refunded
IsConsumableboolWhether the product should only be processed once. If true, the purchase will be returned by Adapty API one time only

AdaptySubscriptionUpdateParameters

Parameters to change one subscription to another.

NameTypeDescription
OldSubVendorProductIdstringThe product id for current subscription to change
ReplacementModeAdaptySubscriptionUpdateReplacementModeThe proration mode for subscription update

Enums

AdaptySubscriptionPeriodUnit

  • Day - Day period
  • Week - Week period
  • Month - Month period
  • Year - Year period

AdaptySubscriptionRenewalType

  • Autorenewable - Auto-renewable subscription
  • Prepaid - Prepaid subscription

AdaptySubscriptionOfferType

  • Introductory - Introductory offer
  • Promotional - Promotional offer
  • WinBack - Win-back offer

AdaptyPaymentMode

  • FreeTrial - Free trial
  • PayAsYouGo - Pay as you go
  • PayUpFront - Pay up front

AdaptySubscriptionUpdateReplacementMode

  • ImmediateWithTimeProration - Immediate with time proration
  • ImmediateAndChargeProratedPrice - Immediate and charge prorated price
  • ImmediateWithoutProration - Immediate without proration
  • Deferred - Deferred
  • ImmediateAndChargeFullPrice - Immediate and charge full price