BubbleBase
  • Introduction
    • What is BubbleBase?
    • Why Use BubbleBase?
    • How BubbleBase Works
  • Getting started
    • 1. Installing & Setting Up BubbleBase
    • 2. Understanding the Folder & Page Structure
    • 3. How to Customize BubbleBase for Your Project
  • Best practices
    • Database
      • Database Naming Conventions
      • Iconography
    • Design
      • Designing Responsively
        • Responsive Group Settings
        • Breakpoints
        • Page/Group Structure
      • The APG Naming System
        • Naming Conventions
        • Element Shorthand
        • Standardizing Group and Element Names
          • Commonly Occurring Elements
          • Naming Groups Within Groups
    • Workflows
  • APIs
    • Stripe
      • Stripe Checkout (payment mode)
        • Stripe Checkout (payment + price id)
        • Stripe Checkout (payment + no price id)
        • Stripe Checkout (payment + price id + multi line items)
      • Stripe Checkout (subscription mode)
        • Stripe Checkout (Subscription with price id)
        • ⏳ Stripe Checkout (Subscription without price id)
      • Stripe Checkout (marketplace)
      • Stripe Customer Portal
      • Create Customer
      • Retrieve Charges
      • Delete Subscription
      • Retrieve Subscription
      • Retrieve Invoice
      • Retrieve Price
    • SendGrid
      • Send Email (standard)
      • Send Email (template)
  • Data
    • Data types
      • Essential Data Types
        • User
        • Dt_user_profile_images
      • Navigation Data Types
        • Dt_Sidenav
      • Functionality Data Types
        • Dt_Reviews
        • Dt_Notifications
        • Dt_Invoices
        • Dt_Line_Items
        • Dt_email
        • Dt_email_template
        • Dt_email_footer_link
        • Dt_charge
        • Dt_credit
        • Dt_contact_requests
        • Dt_API_logs
      • Kit Data Types
        • Dt_(Kit)_Jobs
        • Dt_(Kit)_AI_messaging_thread
        • Dt_(Kit)_ai_thread
        • Dt_(Kit)_comment data
        • Dt_(Kit)_company data
        • Dt_(Kit)_dashboard_metrics
        • Dt_(Kit)_FAQs
        • Dt_(kit)_form_questions
        • DT_(Kit)_form_answers
        • Dt_(kit)_listings
        • Dt_(kit)_messaging_channel
        • Dt_(kit)_messaging_thread
        • Dt_(kit)_pricing
        • Dt_(kit)_reviews
        • DT_(Kit)_Task List
        • Dt_(Kit)_Task Stage
        • Dt_(kit)_task_comments
        • Dt_(kit)_Tasks
    • Option Sets
      • Navigation Items
        • 🔒 os_navPage
        • 🔒 os_nav_Subpage
        • 🔒 Os_nav_Tab
      • User Roles and Actions
        • 🔒 os_user_types
      • Data Categorization
        • 🔒 os_record_interaction
        • 🔒 os_record_type
        • 🔒 os_action_type
        • Os_toast_type
      • App-Wide Settings
        • 🔒 System
  • Plugins
    • Google
  • Reusable Elements
    • UI Components
      • Authentication Page
        • Design
        • Workflows
      • Landing Page (index)
        • Hero
        • Features
        • Metrics
        • Call-to-Action
        • Pricing
        • FAQs
        • Testimonials
      • Dashboard Page (home)
      • My Profile
  • Popups
    • 🍿 PU_CRUD
    • 🍿 PU_Delete
    • 🍿PU_Action
    • 🍿 PU_Loading
  • App-Wide Components
    • 🔐 Security Redirect
    • ⚙️ Global Events
    • 📌 FG_Sidebar
  • Workflows
    • Frontend workflows
    • Backend workflows
      • delete_user (example)
Powered by GitBook
On this page
  1. APIs
  2. Stripe

Stripe Checkout (subscription mode)

Manages recurring payments through subscription-based billing.

PreviousStripe Checkout (payment + price id + multi line items)NextStripe Checkout (Subscription with price id)

Last updated 2 months ago

When a user clicks on the "select plan" button in ⛏️Subscription Cards, custom workflows are triggered from the reusable element "🔐 SECURITY REDIRECT ", from which we use the Retrieve Subscription API Call to check if the user is subscribed to a plan as follows:

If user's retrieve subscription is 0 (meaning not subscribed to any plan), this triggers a custom workflow to Create a subscription. Here are the steps:

  1. Calling the by passing the price ID and ensuring the "mode" parameter is set to subscription.

  2. Triggering the 📚 Log API Response custom if step 1 returned an error. Here we capture the error details to use it to create a new dt_API_log record and trigger a toast displaying the error body.

  3. Navigating the user to a stripe hosted page by using result of step 1's body url as the destination. This stripe page allows the user to checkout using a credit card (it can also be configured from the Stripe's dashboard to accept other means of payment).

If user's retrieve subscription > 0 (meaning user is subscribed to a plan), this triggers a custom workflow to Update a subscription using a confirmation popup (🍿PU_Action) which handles the steps for updating a subscription:

  1. Using the Stripe - Update Subscription action by passing in the subscription_id, items_id, and price_id parameters from the Retrieve Subscription API Call.

  2. Triggering the 📚 Log API Response custom if step 1 returned an error. Here we capture the error details to use it to create a new dt_API_log record and trigger a toast displaying the error body.

  3. Triggering a toast if step 1 was successful.

Stripe Checkout (Subscription with price id) API