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
  3. Stripe Checkout (payment mode)

Stripe Checkout (payment + no price id)

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

Last updated 2 months ago

Link to stripe docs:


Parameters:

success_url

In this field you should enter the URL that the user is taken to when they make a successful payment.

Link to Stripe docs:

mode

In this field you should enter the following value: payment

This parameter typically takes in one of the following values:

payment - Accept one-time payments for cards, iDEAL, and more.

setup - Save payment details to charge your customers later.

subscription - Use Stripe Billing to set up fixed-price subscriptions.

Here is a link to the relevant Stripe documentation:

customer_id

In this field you should enter the users stripe customer id.

This field is not required to capture a payment however with a customer id you are able to easily identify and save information about customers with stripe.

unit_amount

In this field you should enter the amount the user is going to be charged, this value should be entered in cents, for example 1000 = $10

currency

In this field you should enter the currency code for the amount to be paid, for example aud or usd.

this value must be in lower case.

Here is a link to a list of currency codes accepted by Stripe:

name

In this field you should enter the name of the product that will be displayed to the user in the checkout portal.

cancel_url

In this field you should enter the URL that the user should be taken to when they cancel the payment.

Users cancel the payment by clicking the back button in the checkout session portal.

quantity

In this field you should enter the quantity of the line item being purchased

Adjustable quantity (optional)

If your users will be choosing the quantity, you will need to append the following code to the api calls body.

&line_items[0][adjustable_quantity][enabled]=_*_adjustable_quantity_enabled_*_&&line_items[0][adjustable_quantity][minimum]=_*_adjustable_quantity_minimum_*_line_items[0][adjustable_quantity][maximum]=_*_adjustable_quantity_maximum_*_

This code introduces the following parameters:

  • adjustable_quantity_enabled - this field should be set to either "true" or "false".

  • adjustable_quantity_minimum - In this field you should enter the minimum quantity the user is able to select.

  • adjustable_quantity_maximum - In this field you should enter the maximum quantiy the user is able to select.

Note that the "quantity" field is still required as this will be used to set the initial quantity.

metadata[custom_value] (optional)

If you need to pass custom data through the checkout session you can do so by creating custom fields in the metadata, you can create as many as needed, all you have to do is replace "custom_value" with a name that makes sense for your use case.

When a response is returned from a checkout session, you will be able to access these custom values.

As an example, you might create a field called metadata[users_bubble_id], then when a checkout session is created you enter the current users id into this field. When the user completes a checkout session you will get a response and in that response under 'metadata', you will have access to the user id you entered.

Link to Stripe docs:

Link to Stripe docs:

https://docs.stripe.com/api/checkout/sessions/create
https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-success_url
https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-m
https://docs.stripe.com/currencies
https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-line_items-quantity
https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-line_items-adjustable_quantity