WebToNative
  • Getting started
  • Plugin Setup
    • OneSignal Set Up
    • Google AdMob Setup
    • In App Purchase - iOS Setup
    • In App Purchase - Android Setup
    • Firebase Notification Integration - iOS Setup
  • Social Login Integrations
    • Getting the SHA Key for Google Login
    • Create Google OAuth Client Id
    • Facebook Login Configuration
  • Javascript APIS
    • Getting Started
    • Status Bar
    • Pull To Refresh
    • Close App
    • Device Info
    • Clear App Cache
    • OneSignal Push Notification
    • Download Files
    • Printing Options
    • AdMob
    • Geo Location
    • Load In External Browser
    • Barcode Scan
    • In App Purchase - iOS Integration
    • In App Purchase - Android Integration
    • Social Login
    • Facebook App Events
    • Bottom Navigation
    • Clipboard
    • Screen Control
    • Background Location
    • Native Contacts
    • iOS App Tracking Transparency
    • Google Firebase Analytics
    • Haptic Feedback
    • Google Firebase Notification
    • Apps Flyer
    • App Review
    • Calender - iOS
    • Calendar - Android
    • Biometric Authentication
    • Media Player
    • Notification View
    • Offer Card
    • Cookie Update
    • App Launch Detection
    • Download Manager
    • Dynamic App Icon
    • File Sharing
  • Website Plugins
    • Wordpress
      • Push notification (WooCommerce)
      • In-App Purchase
        • In-App Purchase (IAP) Configuration Guide for iOS and Android
        • In-App Purchase (WooCommerce)
        • In-App Purchase
      • Offercard
      • Biometric Authentication
      • Social Login
      • Webtonative media player
        • WebToNative Radio Player
        • MediaPlayer Native Control
    • Bubble.io
      • Customize Status Bar
      • Device-Based Element Visibility
      • Pull to Refresh (Android)
      • OneSignal Push Notification
        • Set External ID
        • Send Push Notification
        • Set/Remove Email or SMS Phone
        • Set Tag
      • Close App
      • Get Device Info
      • Clear App Cache (Android)
      • Screen Control
      • Facebook Events
        • Regular
        • Purchase
      • AdMob
      • Offercard
      • In-App Purchase
        • In-App Purchase (Android/iOS)
        • Get IAP Canceled Subscription List (iOS)
      • Social Login
      • Biometric Authentication
  • Shopify
    • Social Login
    • In-App Purchase
      • In-app purchase
    • Push Notification
      • Abandoned Cart
    • Status Bar Customization
    • Native Device Visibilty
    • Set Onesignal Tags
    • Pull to Refresh
    • Account Deletion
    • Biometric Authentication
  • Upload Apps
    • Android App
    • Ios App
Powered by GitBook
On this page

Was this helpful?

  1. Website Plugins
  2. Bubble.io
  3. In-App Purchase

Get IAP Canceled Subscription List (iOS)

Guide for implementing a workflow in Bubble.io to retrieve a list of canceled In-App Purchase (IAP) subscriptions when a user triggers an event.


Overview

This guide walks you through setting up a Bubble.io workflow to fetch canceled In-App Purchase (IAP) subscription data from an iOS app using the "webtonative" plugin. The process triggers when a user interacts with a button (e.g., "Get IAP Canceled Sub"), initiates a search for canceled subscriptions, and retrieves the results for display or further use. This is ideal for managing subscription statuses in your app.


Prerequisites

  • Bubble.io Account: An active Bubble.io account with a project.

  • webtonative Plugin: Installed in your Bubble editor (available under Plugins).

  • Apple Developer Account: Required for iOS testing via TestFlight (optional for initial setup).

  • Basic Workflow Knowledge: Familiarity with Bubble’s workflow editor.


Step 1: Set Up the Trigger

  • Purpose: Define the event that starts the process (e.g., a button click).

  • Instructions:

    1. Open your Bubble editor and navigate to the page where you want this feature.

    2. You can add a button element (e.g., name it "Button Get IAP Canceled Sub") via the "Design" tab.

    3. Select the button, then click "Start/Edit Workflow" to open the workflow editor.

    4. In the "When" section, choose "When the Button Get IAP Canceled Sub is clicked."

      • This links the workflow to the button click action.

Step 2: Initialize the Canceled Subscriptions Check

  • Purpose: Begin the process of querying canceled subscriptions using the webtonative plugin.

  • Instructions:

    1. Click "Click here to add an event..." below the trigger in the workflow editor.

    2. Select "Plugins" > "webtonative - Init IAP Canceled Subscriptions (iOS)" from the dropdown.

      • This action prepares the iOS app to start retrieving canceled subscription data.

    3. Leave the default settings (no parameters needed unless specified by the plugin).

Step 3: Schedule a Delayed Check

  • Purpose: Allow a brief delay (1 second) to ensure the initialization completes before fetching results.

  • Instructions:

    1. After the "Init IAP Canceled Subscriptions" action, click "Click here to add an action..."

    2. Choose "Schedule API Workflow" > "Schedule get IAP Canceled Subs after 1 second."

      • Set the custom event to "get IAP Canceled Subs."

      • This delays the next step to give the system time to process.

Step 4: Define the Custom Event to Get Canceled Subscriptions

  • Purpose: Execute the action to retrieve the canceled subscription data.

  • Instructions:

    1. In the workflow editor, locate or create the "get IAP Canceled Subs" custom event.

    2. Click "Click here to add an event..." and select "Plugins" > "webtonative - Get IAP Canceled Subs (iOS)."

      • This fetches the list of canceled subscriptions.

    3. Configure the action:

      • Secret: Enter your App Store shared secret (e.g., vs234bd34f404fd31bd2ac22)

      • Is Test: Set to "Yes" for testing purposes.

      • Receipt Data: Check this option to include subscription receipt details.

Step 5: Retrieve Transaction Data

  • Purpose: Extract and inspect the transaction data associated with canceled subscriptions (for testing or debugging).

  • Instructions:

    1. After the "Get IAP Canceled Subs" action, click "Click here to add an action..."

    2. Select "Plugins" > "webtonative - Grab IAP Transaction Data (only for checking)."

      • This pulls detailed transaction data, such as whether a subscription was already purchased or canceled.

    3. The result will be available as "Result of step 1 (webtonative - Get...)" with fields like "success" and "message."

Step 6: Display Results for Testing

  • Purpose: Show the retrieved data as an alert to verify the workflow works (optional).

  • Instructions:

    1. After the "Grab IAP Transaction Data" action, click "Click here to add an action..."

    2. Choose "Show an alert" or "Display data."

      • Set the content to "Result of step 1 (webtonative - Get...)" > "message" to display the result (e.g., "Is Already Purchased" or "success").

    3. Set "Only when" to "Click" to trigger on the button press.

      • Note: This step is for testing only. In a live app, you might save the data to a database or display it in a list.

Note: Whenever a user triggers the action to get canceled subscriptions, it will always provide a list of all canceled subscriptions.


Full Workflow Summary

  • Trigger: When "Button Get IAP Canceled Sub" is clicked.

  • Steps:

    1. Initialize the canceled subscriptions check with "webtonative - Init IAP Canceled Subscriptions."

    2. Schedule "get IAP Canceled Subs" to run after 1 second.

    3. Fetch canceled subscriptions with "webtonative - Get IAP Canceled Subs."

    4. Grab transaction data with "webtonative - Grab IAP Transaction Data."

    5. (Optional) Show the result as an alert for testing.


Testing and Deployment

  • Testing:

    • Use the "Is Test" option and deploy to TestFlight for iOS testing.

    • Verify that the alert displays the expected data (e.g., canceled subscription details).

  • Production:

    • Replace the alert with actions to save data to your Bubble database (e.g., create a "Canceled Subs" data type).

    • Remove testing flags and ensure the plugin is configured for live use.


Troubleshooting

  • No Data Returned: Check the "Secret" key and ensure the webtonative plugin is properly set up.

  • Errors: Review the plugin documentation or the Bubble community for support.


PreviousIn-App Purchase (Android/iOS)NextSocial Login

Last updated 8 days ago

Was this helpful?