Purchasely
4.4
4.4
  • Welcome page
  • General
    • Presentation
    • Release notes
  • Quick start
    • Console Configuration
    • SDK Implementation
    • Testing
    • Sample
  • Basic configuration
    • Console Configuration
      • Creating a new application
      • Creating your Products
        • App Store
        • Play Store
        • Huawei App Gallery
        • Amazon App Store
        • Products & Plans
      • Design your Paywalls
      • Design your Paywalls-Latest
        • Carousel
        • Carousel Flow
        • Features List
        • Features List & Plan Picker with 2 & 3 columns
        • Feature list overlay
        • Plan picker horizontal
        • Plan picker with 2 and 3 Column
    • SDK installation
      • iOS SDK
      • Android SDK
      • React Native SDK
      • Cordova SDK
      • Flutter SDK
      • Unity SDK
    • SDK configurations
      • Paywall observer mode
      • Full mode
      • StoreKit 2
      • Appendices
        • Start the SDK
        • Set User Id
        • Notify when the app is ready
        • Present paywalls
        • Unlock content / service
        • Close SDK (Android only)
    • Stripe
    • Purchasely with RevenueCat
  • S2S notifications
    • Server-to-server notifications ?
    • Apple App Store
    • Google Play Store
    • Huawei App Gallery
  • Analytics
    • Dashboards
      • Introduction
      • Live
      • Subscriptions
      • Cohorts
      • Trials
      • Events
    • Events
      • Webhook events
        • Subscription events
        • Subscription events attributes
      • SDK events
        • UI events
        • UI attributes
  • Integrations
    • Webhook
      • Receiving and understanding messages
      • Managing entitlements
      • Detailed sequence diagrams
    • Airship
    • Amplitude
    • AppsFlyer
    • Adjust
    • Piano analytics(ex AT Internet)
    • Batch
    • Branch
    • Braze
    • Clevertap
    • Customer.io
    • Firebase
    • Iterable
    • Mixpanel
    • MoEngage
    • OneSignal
    • Segment
    • Brevo(ex Sendinblue)
  • Advanced Features
    • Asynchronous paywalls
    • NEW: Promotional offers
    • Anonymous user
    • Associating content
    • Audiences
    • Customising UI
      • Errors & alerts
      • Controllers (iOS) / Fragments (Android)
    • Deeplinks automations
    • Disable placements
    • Displaying users subscriptions
    • Localization
    • Lottie animations
    • Non-subscription products
    • Paywall action interceptor
    • Promoting your products
      • Self-promotion
      • Promoting In-App Purchases
    • Purchase manually
    • Subscription status
    • Use your own paywall
  • Others
    • Frequently Asked Questions
    • Migration guides
      • Migrate to Purchasely
      • Webhook
        • Migrate to Webhook v3.0
      • SDK
        • Migrate to SDK v3.0
          • v2.2.0
          • v2.1.3
        • Migrate to SDK v3.1
        • Migrate to SDK v3.2
        • Migrate to SDK v4.0.0
  • TESTING
    • Testing Cycle Durations
Powered by GitBook

© Purchasely 2020-2023

On this page

Was this helpful?

Edit on GitHub
  1. Advanced Features
  2. Promoting your products

Self-promotion

Once everything is ready, you will want to advertise your In-App Purchases from within your app to convert your users. You migh want to create banners, splash screens, … but doing it right is complex:

  • Your product is delivered in more than 150 countries and several currencies

  • Prices can change from store to store, this is not an equivalent, you can set different prices by country (cheaper in 🇫🇷, more expensive in 🇬🇧) and Apple changes its price grid regularly to fit rate or taxes changes

  • You must take into account the Locale of the user to place the currency at the right spot so that the user feels safe …

  • A phone with a en-US Locale doesn't mean the user has a US App Store account. You need to interrogate the App Store to get the user price, currency, …

  • You must take into account introductory price information and display the promotion correctly ($10 / month during 3 months ). Remember periods can be weeks, months, … but even 3 days, 2 weeks and more when your intro pricing is free.

We already did that job to display your products and plans and we know it is tough, so please don't try to hardcode the pricings, periods, … Instead you can use the services we have exposed to display the pricing.

First you need to select which Plan of a product you want to expose (cheapest one ? most used ?), then you can proceed as following:

Purchasely.plan(with: "PLAN_ID",
				success: { (plan) in
					// Get the regular price like "$1.99 / month"
					guard let price = plan.localizedFullPrice else { return }

					// In case there is an active promotion we display it followed by the regular price
					// for example: "$0.99 / week during 2 weeks then $1.99 / month"
					if plan.hasIntroductoryPrice,
						let introPrice = plan.localizedFullIntroductoryPrice,
						let introDuration = plan.localizedIntroductoryDuration {
						self.priceLabel.text = "\(introPrice) during \(introDuration) then \(price)"
					} else {
						self.priceLabel.text = price
					}
},
				failure: { (error) in
					// Hide advertising
})
[Purchasely planWith:@"PLAN_ID"
			 success:^(PLYPlan * _Nonnull plan) {
	// Get the regular price like "$1.99 / month"
	NSString *price = [plan localizedFullPriceWithLanguage:nil];

	// In case there is an active promotion we display it followed by the regular price
	// for example: "$0.99 / week during 2 weeks then $1.99 / month"
	if ([plan hasIntroductoryPrice]) {
		NSString *introPrice = [plan localizedIntroductoryPriceWithLanguage:nil];
		NSString *introDuration = [plan localizedIntroductoryDurationWithLanguage:nil];
		NSString *introText = [NSString stringWithFormat:@"%@ during %@ then %@", introPrice, introDuration, price];
		[priceLabel setText:introText];
	} else {
		[priceLabel setText:price];
	}
} failure:^(NSError * _Nullable error) {
	// Hide advertising
}];
Purchasely.plan(
    "PLAN_VENDOR_ID",
    onSuccess = { plan -> 
        // Get the regular price like "$1.99 / month"
        val price = plan?.localizedFullPrice() ?: return@getPlan

        // In case there is an active promotion we display it followed by the regular price
        // for example: "$0.99 / week during 2 weeks then $1.99 / month"
        if(plan.hasIntroductoryPrice()) {
            val introPrice = plan.localizedFullIntroductoryPrice()
            val introDuration = plan.localizedIntroductoryDuration()
            val test = "$introPrice during $introDuration then $price"
            //display introductory price text in your view
        } else {
            //display price in your view
        }
    },
    onError = { throwable -> 
        // Hide advertising
    }
)
Purchasely.plan("PLAN_VENDOR_ID", new PlanListener() {
    @Override
    public void onSuccess(@Nullable PLYPlan plan) {
        if(plan == null) return;
        
        // Get the regular price like "$1.99 / month"
        String price = plan.localizedFullPrice();

        // In case there is an active promotion we display it followed by the regular price
        // for example: "$0.99 / week during 2 weeks then $1.99 / month"
        if(plan.hasIntroductoryPrice()) {
            String introPrice = plan.localizedFullIntroductoryPrice();
            String introDuration = plan.localizedIntroductoryDuration();
            String test = String.format("%s during %s then %s", introPrice, introDuration, price);
            //display introductory price text in your view
        } else {
            //display price in your view
        }
    }

    @Override
    public void onFailure(@NotNull Throwable throwable) {
        // Hide advertising
    }
});
try {
  const plan = await Purchasely.planWithIdentifier('PLAN_VENDOR_ID');
  console.log(' ==> Plan');
  console.log(plan.vendorId);
  console.log(plan.name);
  console.log(plan.price);
  console.log(plan.amount);
  console.log(plan.period);
  console.log(plan.hasIntroductoryPrice);
  console.log(plan.introPrice);
  console.log(plan.introAmount);
  console.log(plan.introDuration);
} catch (e) {
  console.log(e);
}
Purchasely.planWithIdentifier('PURCHASELY_PLUS_MONTHLY', (plan) => {
	console.log(' ==> Plan');
	console.log(plan.vendorId);
	console.log(plan.name);
	console.log(plan.price);
	console.log(plan.amount);
	console.log(plan.period);
	console.log(plan.hasIntroductoryPrice);
	console.log(plan.introPrice);
	console.log(plan.introAmount);
	console.log(plan.introDuration);
}, (error) => {
	console.log(error);
});
try {
    PLYPlan? plan = await Purchasely.planWithIdentifier('PLAN_VENDOR_ID');
    print(plan?.name?.toString());
    print(plan?.vendorId?.toString());
    print(plan?.price?.toString());
} catch (e) {
    print(e);
}
PreviousPromoting your productsNextPromoting In-App Purchases

Last updated 1 year ago

Was this helpful?