Skip to main content

Adapty Resources

Custom Actions

Below are Adapty methods delivered to FlutterFlow with Adapty plugin. They can be used as custom actions in FlutterFlow.

Custom ActionDescriptionAction ArgumentsAdapty Data Types - Action Output Variable
activateInitializes the Adapty SDKNone

getPaywall

Retrieves a paywall. It does not return paywall products. Use the getPaywallProducts action to get the actual productsAdaptyGetPaywallResult

getPaywallProducts

Returns a list of actual paywall productsAdaptyPaywallAdaptyGetProductsResult

getProductsIntroductoryOfferEligibility

Checks if the user qualifies for an introductory iOS subscription offerAdaptyPaywallProductAdaptyGetIntroEligibilitiesResult

makePurchase

Completes a purchase and unlocks content. If a paywall has a promotional offer, Adapty automatically applies it at checkout
  • product: an AdaptyPaywallProduct object retrieved from the paywall.
  • subscriptionUpdateParams: an AdaptySubscriptionUpdateParameters object used to upgrade or downgrade a subscription (use for Android).
  • isOfferPersonalized: Specifies whether the offer is personalized to the buyer (use for Android).
AdaptyMakePurchaseResult

getProfile

Retrieves the current app user's profile. This allows you to set access levels and other parameters

If it fails (e.g., due to no internet), cached data will be returned. Adapty regularly updates the profile cache to ensure the information stays as current as possible

NoneAdaptyGetProfileResult
updateProfileChanges optional attributes of the current user profile such as email, phone number, etc. You can later use attributes to create user segments or just view them in CRMThe ID and any parameters that need to be updated for the AdaptyProfileAdaptyError (Optional)
restorePurchasesRestores any purchases the user has madeNoneAdaptyGetProfileResult
logShowPaywallLogs when a specific paywall is shown to the userAdaptyPaywallAdaptyError (Optional)
logShowOnboarding

Tracks users' steps during the onboarding process.

The onboarding stage is a crucial part of modern mobile apps. The effectiveness of its implementation, the quality of the content, and the number of steps can significantly impact user behavior, particularly their willingness to subscribe or make purchases. To help you analyze user behavior during this critical phase without leaving Adapty, we’ve added the capability to send dedicated events every time a user navigates to a new onboarding screen.

  • name: (String) The name of your onboarding process.
  • screenName: (String) A descriptive name for a specific screen within the onboarding.
  • order: (Integer) An unsigned integer value representing the order of this screen in your onboarding sequence (it must me greater than 0).
AdaptyError (Optional)
identifyIdentifies the user using your system's customerUserIdcustomerUserIdAdaptyError (Optional)
logoutLogs the current user out of your appNoneAdaptyError (Optional)
presentCodeRedemptionSheetDisplays a sheet that allows users to redeem codes (iOS only)NoneNone

Data Types

Adapty data types (collections of data values) delivered to FlutterFlow with Adapty plugin.

AdaptyAccessLevel

Information about the user's access level.

Field NameTypeDescription
activatedAtDateTimeThe time when this access level was activated
activeIntroductoryOfferTypeStringThe type of an active introductory offer. If set, it means an offer was applied during this subscription period
activePromotionalOfferIdStringThe ID of an active promotional offer (purchased from iOS)
activePromotionalOfferTypeStringThe type of an active promotional offer (purchased from iOS). If set, it means an offer was applied during this subscription period
billingIssueDetectedAtDateTimeThe time when a billing issue was detected. The subscription can still be active. Set to null if payment is successfully processed
cancellationReasonStringThe reason why the subscription was canceled
expiresAtDateTimeThe access level expiration time (could be in the past or not set for lifetime access)
idStringThe identifier of the access level
isActiveBooleanTrue if this access level is active. Generally, you can check this property to determine if a user has an access to premium features
isInGracePeriodBooleanTrue if this auto-renewable subscription is in the grace period
isLifetimeBooleanTrue if this access level is active for a lifetime (no expiration date)
isRefundBooleanTrue if this purchase was refunded
offerIdStringThe ID of an active promotional offer (purchased from Android)
renewedAtDateTimeThe time when the access level was last renewed
startsAtDateTimeThe start time of this access level (could be in the future)
storeStringThe store where the purchase was made
unsubscribedAtDateTimeThe time when auto-renewal was turned off for the subscription. The subscription can still be active. If not set, the user reactivated the subscription
vendorProductIdStringThe product ID from the store that unlocked this access level
willRenewBooleanTrue if this auto-renewable subscription is set to renew

AdaptyAccessLevelIdentifiers

This struct is intended to replace key-value pair for Map<String, AdaptyAccessLevel AdaptyAccessLevel.

Field NameTypeDescription
accessLevelIdentifierStringThe ID of the access level
accessLevelData (AdaptyAccessLevel)The associated AdaptyAccessLevel

AdaptyCustomDoubleAttribute

Information on custom double attributes defined for the user.

Field NameTypeDescription
keyStringThe ID of the custom double attribute
valueDoubleThe value of the custom double attribute

AdaptyCustomStringAttribute

Information on custom string attributes defined for the user.

Field NameTypeDescription
keyStringThe ID of the custom string attribute
valueStringThe value of the custom string attribute

AdaptyError

Contains details about an error. For a complete list of error codes, refer to Flutter, React Native, Unity - Handle errors.

Field NameTypeDescription
errorMessageStringA human-readable description of the error
errorCodeIntegerNumeric code identifying the error

AdaptyGetIntroEligibilitiesResult

Contains the result of the getProductsIntroductoryOfferEligibility custom action.

Field NameTypeDescription
valueList < Data (AdaptyProductIntroEligibility) >List of the user's eligibility for promotional offers
errorData (AdaptyError)Contains details about the error via AdaptyError

AdaptyGetPaywallResult

Contains the result of the getPaywall custom action.

Field NameTypeDescription
valueData (AdaptyPaywall)Contains a list of AdaptyPaywall objects
errorData (AdaptyError)Contains error information via AdaptyError

AdaptyGetProductsResult

Contains the result of the getPaywallProducts custom action.

Field NameTypeDescription
valueList < Data (AdaptyPaywallProduct) >Contains a list of AdaptyPaywallProducts
errorData (AdaptyError)Contains error information via AdaptyError

AdaptyGetProfileResult

Contains the result of the getProfile custom action.

Field NameTypeDescription
valueData (AdaptyProfile)Contains the user profile as an AdaptyProfile
errorData (AdaptyError)Contains error information via AdaptyError

AdaptyMakePurchaseResult

Contains the result of the makePurchase custom action.

Field NameTypeDescription
valueData (AdaptyProfile)Contains the user's profile as an AdaptyProfile
errorData (AdaptyError)Contains error information via AdaptyError

AdaptyNonSubscription

Information about non-subscription purchases. These can be one-time (consumable) products, unlocks (like new map unlock in the game), etc.

Field NameTypeDescription
isConsumableBooleanIndicates whether the product is consumable
isOneTimeBooleanIndicates if the product is a one-time purchase (e.g., if true, the purchase is processed only once)
isRefundBooleanIndicates if the product has been refunded
isSandboxBooleanIndicates if the product was purchased in a sandbox environment
purchasedAtDateTimeThe time when the product was purchased
purchaseIdStringThe ID of the purchase in Adapty. Can be used for tracking one-time products
storeStringThe store where the product was purchased (e.g., App Store, Google Play)
vendorProductIdStringID of the product in vendor's system
vendorTransactionIdStringTransaction ID in the vendor's system

AdaptyPaywall

Information about a paywall.

Field NameTypeDescription
abTestNameStringThe name of the parent A/B test
hasViewConfigurationBooleanIndicates if there is a view configuration for the paywall
localeStringThe locale ID of the paywall
nameStringPaywall name
placementIdStringThe ID of the parent placement
remoteConfigStringStringA custom dictionary from Adapty Dashboard associated with this paywall
revisionIntegerThe current revision/version of the paywall. Every change generates a new revision
variationIdStringThe variation ID used to attribute purchases to this paywall
vendorProductIdsStringArray of product IDs related to the paywall

AdaptyPaywallProduct

Information about product.

Field NameTypeDescription
vendorProductIdStringThe ID of a product from an app store
localizedDescriptionStringA description of the product in the user's language
localizedTitleStringThe name of the product in the user's language
regionCodeStringThe region code of the locale used to format the price of the product (use for iOS)
isFamilyShareableBooleanA Boolean value that indicates whether the product is available for family sharing in App Store Connect. Will be always FALSE for iOS version below 14.0 and macOS version below 11.0 (use for iOS)
paywallVariationIdStringThe ID of a variation, used to attribute purchases to this paywall
paywallABTestNameStringParent A/B test name
paywallNameStringParent paywall name
priceData (AdaptyPriceData)The price of the product
subscriptionDetailsData (AdaptySubscriptionDetails)Information on subscription

AdaptyPrice

Information about product price.

Field NameTypeDescription
amountDoubleThe numeric value of the price
currencyCodeStringThe code of the price currency
currencySymbolStringThe symbol used for the currency
localizedStringStringThe price displayed in the user's language

AdaptyProductIntroEligibility

Defines if the user qualifies for an introductory offer for an iOS subscription.

Field NameTypeDescription
vendorProductIdStringThe ID of a product from an app store
eligibilityAdaptyEligibilityEnumDefinition if the user qualifies for an introductory offer for an iOS subscription

AdaptyProductNonsubscriptions

Details of the active non-subscription tied to this product.

Field NameTypeDescription
productIdStringThe ID of the product from an app store
nonsubscriptionsAdaptyNonSubscriptionInformation about non-subscription purchases. These can be one-time (consumable) products, unlocks (like new map unlock in the game), etc.

AdaptyProductSubscriptions

Details of the active subscription tied to this product.

Field NameTypeDescription
productIdStringThe ID of the product from an app store
subscriptionAdaptySubscriptionInformation about subscription purchases

AdaptyProfile

Information on the user's profile

Field NameTypeDescription
accessLevelsList < Data (AdaptyAccessLevelIdentifiers) >List of all access levels that belong to the user
profileIdStringThe ID of the user profile
customerUserIdStringThe ID of the user in the vendor's system
subscriptionsList < Data (MapKeySubscriptions) >The list of all subscriptions purchased by the user
nonSubscriptionsList < Data (MapKeyNonSubscriptions) >The list of all non-subscription products purchased by the user

AdaptyProfileParameters

Information on the user.

Field NameTypeDescription
firstNameStringThe first name of the user
lastNameStringThe last name of the user
genderAdaptyGenderEnumThe gender of the user
birthdayStringThe birthday of the user
emailStringThe email of the user
phoneNumberStringThe phone number of the user
facebookAnonymousIdStringThe ID of the user in Facebook Ads integration
amplitudeUserIdStringThe ID of the user in Amplitude integration
amplitudeDeviceIdStringThe ID of the user's device in Amplitude integration
mixpanelUserIdStringThe ID of the user in Mixpanel integration
appmetricaProfileIdStringThe ID of the user in AppMetrica integration
appmetricaDeviceIdStringThe ID of the user's device in AppMetrica integration
oneSignalPlayerIdStringThe ID of the user in OneSignal integration
pushwooshHWIDStringThe ID of the user's device in Pushwoosh integration
firebaseAppInstanceIdStringThe ID of the user in Firebase integration
airbridgeDeviceIdStringThe ID of the user's device in Airbridge integration
appTrackingTransparencyStatusAdaptyATTStatusThe status of the access to IDFA (use for iOS)
analyticsDisabledBooleanDefinition if the external analytics is opted out for the user
customStringAttributesList < Data (AdaptyCustomStringAttribute) >List of custom string attributes of the user
customDoubleAttributesList < Data (AdaptyCustomDoubleAttribute) >List of custom double attributes of the user

AdaptySubscription

Information on existing user subscription.

Field NameTypeDescription
activatedAtDateTimeThe time when this subscription was activated
activeIntroductoryOfferTypeStringThe type of an active introductory offer. If set, it means an offer was applied during this subscription period
activePromotionalOfferIdStringThe ID of an active promotional offer (use for iOS)
activePromotionalOfferTypeStringThe type of an active promotional offer (use for iOS). If set, it means an offer was applied during this subscription period
cancellationReasonStringThe reason why the subscription was canceled
expiresAtDateTimeThe subscription expiration time
renewedAtDateTimeThe time when the subscription was last renewed
unsubscribedAtDateTimeThe time when auto-renewal was turned off for the subscription. The subscription can still be active. If not set, the user reactivated the subscription
billingIssueDetectedAtDateTimeThe time when a billing issue was detected. The subscription can still be active. Set to null if payment is successfully processed
isActiveBooleanTrue if this subscription is active. Generally, you can check this property to determine if a user has access to premium features
isInGracePeriodBooleanTrue if this auto-renewable subscription is in the grace period
isLifetimeBooleanTrue if this subscription is active for a lifetime (no expiration date)
isRefundBooleanTrue if this purchase was refunded
isSandboxBooleanIndicates if the product was purchased in a sandbox environment
offerIdStringThe ID of an active promotional offer (use for Android)
startsAtDateTimeThe start time of this access level (could be in the future)
storeStringThe store where the product was purchased (e.g., App Store, Google Play)
vendorOriginalTransactionIdStringID of the initial subscription in vendor's system
vendorProductIdStringID of the product in vendor's system
vendorTransactionIdStringTransaction ID in the vendor's system
willRenewBooleanTrue if this auto-renewable subscription is set to renew

AdaptySubscriptionDetails

Scheme of a Subscription object as a part of the AdaptyPaywallProduct.

Field NameTypeDescription
androidBasePlanIdStringBase plan ID in the Google Play Store or price ID in Stripe.
androidIntroductoryOfferEligibilityAdaptyEligibilityEnumDefinition if the user qualifies for an introductory offer for an iOS subscription
androidOfferIdStringThe ID of an active promotional offer (use for Android)
androidOfferTagsList < String >List of custom tags specified for base plans and subscription offers.
introductoryOfferList < Data (AdaptySubscriptionPhase) >The ID of an introductory offer (use for iOS)
localizedSubscriptionPeriodStringThe period of the subscription in the user's language
promotionalOfferData (AdaptySubscriptionPhase)The promotional offer details (use for iOS)
promotionalOfferEligibilityBooleanDefinition if the user qualifies for an promotional offer for an iOS subscription
promotionalOfferIdStringThe ID of the promotional offer (use for iOS)
renewalTypeAdaptyRenewalTypeEnumDefines if the subscription is auto-renewable or not via AdaptyRenewalTypeEnum
subscriptionGroupIdentifierStringThe ID of the product group the product belongs to (use for iOS)
subscriptionPeriodData (AdaptySubscriptionPeriod)The duration of the subscription

AdaptySubscriptionPeriod

The duration of the subscription.

Field NameTypeDescription
numberOfUnitsIntegerNumber of days/weeks/months/years the subscription lasts.
unitAdaptyPeriodUnitEnumMeasurement unit of the period: days, weeks, months, years.

AdaptySubscriptionPhase

Represents a subscription phase, such as a free trial or an introductory offer period.

Field NameTypeDescription
identifierStringThe ID of the phase
localizedNumberOfPeriodsStringThe length of the phase. For example, a 6-month offer would display as 6 months in the user's language.
localizedSubscriptionPeriodStringThe subscription duration in the user's language, like 3 months.
numberOfPeriodsIntegerThe number of subscription periods in this phase. For instance, a 6-month offer would have two 3-month periods.
paymentModeAdaptyPaymentModeEnumThe payment model used for this phase.
priceData (AdaptyPrice)The price of this phase.
subscriptionPeriodData (AdaptySubscriptionPeriod)The subscription period on which this phase is based.

AdaptySubscriptionUpdateParameters

(Android only) Parameters for replacing one subscription with another.

Field NameTypeDescription
oldSubVendorProductIdStringThe ID of the current subscription in the Play Store that you want to replace.
replacementModeAdaptySubscriptionUpdateReplacementModeEnum that corresponds to BillingFlowParams.ProrationMode values.

MapKeyNonSubscriptions

Replacement for a dictionary for AdaptyNonSubscription.

Field NameType
keyString
valueList < Data (AdaptyNonSubscription) >

MapKeySubscriptions

Replacement for a dictionary for AdaptySubscription.

Field NameType
keyString
valueList < Data (AdaptySubscription) >

Enums

Adapty enums (variables that are sets of predefined constants) delivered to FlutterFlow with the Adapty plugin.

AdaptyEligibilityEnum

Defines if the user qualifies for an introductory offer for an iOS subscription.

Field NameDescription
eligibleThe user is eligible for an intro offer, it is safe to reflect this info in your UI
ineligibleThe user is not eligible to get any offer, you shouldn't present it in your UI
notApplicableThis product is not configured to have an offer

AdaptyGenderEnum

Defines user's gender.

Field NameDescription
noneThe gender is not set
femaleUser's gender is female
maleUser's gender is male
OtherThe user has defined their gender as "other"

AdaptyPaymentModeEnum

Defines the payment model.

Field NameDescription
payAsYouGoA pricing model where customers are billed based on their actual usage or consumption of a product/service, rather than paying for a fixed fee upfront
payUpFrontA pricing model where customers are billed before they receive the product/service.
freeTrialUser is on a free trial period
unknownPricing model is not defined

AdaptyPeriodUnitEnum

Defines the units in which the periods are measured.

Field NameDescription
dayIn days
weekIn weeks
monthIn months
yearIn years
unknownNot defined

AdaptyRenewalTypeEnum

Defines if the subscription is auto-renewable or not.

Field NameDescription
prepaidThe subscription is prepaid and not auto-renewable.
autorenewableThe subscription is auto-renewable

AdaptySubscriptionUpdateReplacementMode

Defines the subscription update mode for Android.

Field NameDescription
withTimeProration(default) The new plan takes effect immediately, and the remaining time will be prorated and credited to the user.
chargeProratedPriceThe new plan takes effect immediately, and the billing cycle remains the same. The price for the remaining period will be charged. This option is only available for subscription upgrades.
withoutProrationThe new plan takes effect immediately, and the new price will be charged on the next recurrence time. The billing cycle stays the same.
deferredThe new purchase takes effect immediately, and the new plan will take effect when the old item expires.
chargeFullPriceThe new plan takes effect immediately, and the billing cycle remains the same. The price for the remaining period will be charged. This option is only available for subscription upgrades.

App States

App state variables are specific variables that hold the current state of an application. They can be accessed and modified throughout the entire application across all pages and components. This type of variable can be useful for storing data that needs to be shared between different parts of the app, such as user preferences and authentication tokens.

Field NameData TypePersistedDescription
currentProfileData (AdaptyProfile)FalseThe variable that contains the information on the current user profile. Keep it up-to-date.