Twinr Builder Resources
  • 🙌Getting Started
    • What is Twinr?
    • Fun Fact
  • 📱Create App
    • Create App from Template
      • Blank
      • E-Commerce App
      • News App
      • Restaurant App
  • 👥Organization
    • Create Organization
    • Invite Members
  • 🖥️Dashboard
    • App Dashboard
    • Preview App
    • Delete App
  • 📲Setup Branding Info
    • App info
    • Launch screen
    • App Permissions
      • Camera Permission
      • Photo Library Permission
      • Microphone Permission
      • App Tracking Transparency
      • Location Permission
      • Read External Storage
    • App Settings
      • Enable portrait only mode
      • Prevent App Sleep
      • Enable/Disable iPad Support
      • Customize Minimum Android Version
  • 🎨Setup Theme
    • Overview
    • App Theme
      • Color Theme
      • Text Theme
      • Button Theme
    • Bottom Tab bar
    • Navigation bar
      • Button setting
    • Status bar
  • 📲Screen Customization
    • External URL Handling
    • Apply Custom CSS
    • Apply Custom JavaScript
    • Hide Elements
    • Page Refresh
    • Login
      • General
      • Login Page
    • Tab bar(Bottom tabs)
      • Add New Screen
      • Delete Screen
      • Rearrange Screen
      • General
      • Navigation Bar
        • Navigation Bar Title
        • Navigation Bar Buttons
          • Back Button
          • Linker Button
          • Cart Button
          • Custom Button
          • Hamburger Menu
          • Native Link Sharing
          • Native Notification Screen Button
      • Tab Screen - External URL Handling
      • Responsible URL
      • Tab Screen - Hide Elements
      • Tab Screen - CSS
      • Tab Screen - Scripts
  • Native Screen
    • Title Element
    • Paragraph Element
    • Button Element
    • Image Element
    • Spacer Element
    • Divider Element
    • Banner Element
      • Banner Element(with Background Image)
      • Banner Element(with Background Color)
    • List Element
      • List Grid Element
      • List Vertical Element
      • List Horizontal Element
    • Product List Element
    • Setting List Element
  • 🛠️App Configuration
    • Add New Configuration
  • 🔗Extensions
    • Overview
    • Page Loader
    • Pull to Refresh
    • Custom User Agent
    • Custom Fonts
    • Cache Policy
    • No Internet View
    • App Review
    • App Onboarding
    • Multi Language
    • In-App Purchase (IAP)
      • iOS In-App Purchase (IAP)
      • Android In-App Purchase (IAP)
    • Deeplink
    • Force App Update
    • Account Delete
    • Dynamic Titles
  • ⚙️Integrations
    • Overview
    • Firebase Push Notification
      • Enable Push Notification
      • Send Push Notification
    • Push Permission Reminder
    • Personalized Push Notification
    • Abandoned Cart Push Notification
    • Native Notification Screen
    • AdMob
      • Create Android & iOS Apps
      • Create Ads on AdMOb
      • Setup AdMob Integration
    • Firebase Analytics
      • Auto Tracked Analytics
      • Custom Analytics
      • How to check Analytics in Firebase?
  • Plugins
    • Overview
    • WooCommerce
    • Shopify
    • Preshtashop
  • Engage
    • Overview
    • Engage Dashboard
    • One Time Campaigns
    • Event Triggered Campaigns
      • Order Created
      • Order Status Change
      • Product Created
      • Product Re-stock
      • Product Out-of-stock
      • Product Low Stock
      • Coupon Created
    • Welcome Push Notification
    • Inactivity Push Notification
  • 📊App Analytics
    • Overview
    • Acquisition & Retention
      • Number of Sessions
      • Number of Unique Sessions
      • Daily Active Users
      • Total App Sessions
      • New App Sessions
      • Session by Platform
      • Average Session Length
      • Session by Devices
      • Retention
    • Revenue
      • Sales
      • Orders
      • Total Revenue - Current vs Previous Period
      • Total Orders - Current vs Previous Period
      • Revenue by Device
      • Average Order Value by Device
      • Order by Device
      • Orders by New vs. Returning Users
      • Top 10 Popular Products
      • Promo Code Revenue vs Revenue
  • JS Bridge
    • What is the JS Bridge?
    • AdMob Interstitial Ad
    • Change App Language
    • Push Notification - Device Token
    • Request Account Delete
    • Native Datastore
  • 🚀Publish Apps
    • Publishing to the Google Play Store
      • Setup Android Signing Information
      • Get Android Build File
      • Create Your Google Developer Account
      • Setup your App on Google Play Store
      • Submit Your App to Production
      • Reset Android Signing Key
    • Publishing to the Apple App Store
      • Create Your Apple Developer Account
      • Setup Annual Payment for your Apple Developer Account
      • Create Your Apple Bundle ID
      • Setup iOS Signing Info
      • Get iOS Build File
      • Add Users to Your App Store Connect Team (Optional)
      • Add Users to TestFlight (Optional)
      • Submit Your Build to The App Store
  • 👤Twinr Account
    • Change Password
    • Billing & Payments
    • Invoices
    • Update Payment Method
    • Enable 2-Step Authentication
  • 👩‍💼Support
    • Contact Support
    • On-demand Services
      • End-to-End App Solution(All Inclusive)
      • App Development
      • App Publishing
      • App Screenshots
      • Login Script
      • Push Notification Setup
  • 🤝Partnership & Earnings
    • Twinr Partnership Model
    • Agency Plan
    • Become an Affiliate
  • ❓FAQs
    • Subscription
    • Preview your App
    • App Customization
    • Build APK & IPA
    • Publishing App
Powered by GitBook
On this page
  • What is In-App purchase?
  • How to setup In App Purchase?

Was this helpful?

  1. Extensions

In-App Purchase (IAP)

In-app purchase (IAP) refers to the ability for users to purchase digital goods or services within an app.

What is In-App purchase?

In-app purchase (IAP) refers to the ability for users to purchase digital goods or services within an app. This can include things like virtual currency, additional features or content, or subscriptions to services.

In-app purchases are typically made through the app store (such as Apple's App Store or Google Play), and the app developer receives a percentage of the revenue. This allows developers to offer their apps for free or at a lower cost, while still being able to generate revenue through in-app purchases.

There are several types of in-app purchases, including:

  • Consumable: These are items that can be used up or expire over time and can be bought multiple times (e.g. in-game currency, items, or other virtual goods).

  • Non-Consumable: These are permanent items that can only be purchased once (e.g. unlocking a full version of an app or purchasing a permanent game character).

  • Auto-renewable subscriptions: This type of in-app purchase allows a user to subscribe to a service or content within an app on a recurring basis.

  • Non-renewable subscriptions: This type of in-app purchase allows a user to subscribe to a service or content within an app for a specific duration of time.

How to setup In App Purchase?

1.) Go to Add-ons --> Extensions --> In-App Purchase & enable it.

2.) Enter Response Submission URL: This is webhook URL where we will submit success or error response of the purchases user will be doing in your app. Your URL must accept POST request and we will be submitting following information with the POST request.

{
      "twinr_product_id": "TWINR_PRODUCT_ID",
      "store_product_id": "STORE_PRODUCT_ID",
      "platform": "android or ios",
      "purchase_token": "PURCHASE_RECEIPT",
      "success":  true //true or false,
      "user_info": "USERNAME",
}

3.) Create IAP products on Android and iOS stores. Follow these documents for Android & iOS.

4.) Click on +Add button to create your IAP product on Twinr.

  • Select product type as per your requirements. It must match the type with the product created on your AppStore and PlayStore accounts.

  • Android Product ID: Enter product ID from your PlayStore product information page.

  • iOS Product ID: Enter product ID from your AppStore product information page.

5.) Once your product will be created, you will see one auto-generated Twinr ID to that product. You will require that product ID to start the purchase flow in your app.

6.) Now you have everything ready to setup IAP links on your website. There are two ways to set it up.

  • Custom URL

  • JS Function

Below you can find the information for both of them in depth.

Custom URL is very easy to setup. We have designed one custom scheme URL to make this work easy for you.

Here is how the URL is formatted. inapppurchase://twinr.dev?product_id=TWINR_ID

In this URL you need to replace TWINR_ID with respected Twinr ID of your product. You can use this URL anywhere in your app to start purchase flow of that product.

For exaple, you can create Hamburger Menu in your app and use this URL there to start a purchase flow. You need to create this kind of URL for each of your product and use it when you want to start purchasing.

You can use this URL in your website as well, when that URL will be executed in the app, Twinr will automatically identify it and will start the purchase of that product respectively.

JS Function(Twinr JS Bridge) is an another way to start purchase flow of your product.

twinr_iap_purchase('TWINR_ID');

In this function, replace TWINR_ID with your product's Twinr ID. You can call this function anywhere in your website to start purchase of the designated product.

7.) You cannot test IAP in the preview app. To test it, Create a build of your app from App Build and request new builds. Use TestFlight app for iOS and APK file Android testing. Make sure you have added yourself as a testers to test on Android & iOS. Follow step 3 if you didn't invite yourself as a tester.

PreviousMulti LanguageNextiOS In-App Purchase (IAP)

Last updated 1 year ago

Was this helpful?

🔗
iOS In-App Purchase (IAP)
Android In-App Purchase (IAP)