Billflow
  • Quick Start
  • Setup
    • First Time Setup
      • Connect & Setup Stripe
      • Invite Team Members
      • Create Your First Billing Page
      • Embed The Billing Page
      • Activate Live Payments
  • Billing Pages
    • Plan Picker
    • Checkout Form
    • Customer Portal
    • Pricing Page
    • Invoice Portal
  • How-to's
    • Setup Pricing
      • Flat-rate Subscriptions
      • Free Trial
      • Unit-based
      • Meter-based
      • Setup Fees
      • One-Time Payment
      • Payment Plans (Subscription Schedules)
      • Complex Pricing
      • Add-ons
    • Connect to SaaS
      • Using Stripe Webhooks
    • Change Style
      • Plan Picker Style Templates
      • Customer Portal Style Templates
      • Pricing Page Style Templates
      • Checkout Form Style Templates
    • Update Pricing
    • Use Coupons
    • Enable Quantity Management
    • Enterprise Sales Flow
    • Cancellations/Payment Failures
      • Set up Cancellation Feedback
      • Configure Dunning Emails
    • Automated emails
    • Internationalization
      • Support multiple currencies
      • Support multiple languages
    • Upgrade to new Billing Pages
    • Record Usage
    • VAT & Taxes
    • Indian Recurring Payments
  • No-code Integrations
    • No-code App Builders
      • Bubble
        • How to connect Stripe webhooks to Bubble
      • Webflow
      • WordPress
        • Add Widgets
        • Advanced Usage
        • Useful Plugins
      • Notion
      • Drupal
    • Rewardful
    • ChurnKey
  • Developer Docs
    • Embed Configurations
      • Plan Picker Configs
      • Checkout Form Configs
      • Customer Portal Configs
      • Pricing Page Configs
      • Invoice Portal Configs
    • Handling Events
    • Languages & Frameworks
    • Customize Elements
    • Versions & Beta Testing
  • Help
    • Managing Account & Team
      • Reset Your Password
      • Manage Team Members
    • Frequently Asked Questions
    • Changelog
Powered by GitBook
On this page
  • Required Configs
  • email
  • customer_id
  • hash
  • Available Configs
  • theme.stripeElement
  • handleResponse
  • coupon
  • service
  • tier
  • interval
  • interval_count
  • Options
  • options.metadata
  • options.default_tax_rates
  • options.quantity

Was this helpful?

  1. Developer Docs
  2. Embed Configurations

Checkout Form Configs

Checkout Form Configuration Options

Required Configs

email

Type

Required

Description

String

Yes OR customer_id

The customer's email address. This will automatically populate checkout, or be used to identify current subscribers. Can alternatively use customer_id.

{
    email: "example@google.com"
}

customer_id

Type

Required

Description

String

Yes OR email

The customer's Stripe Customer ID. This will be used to identify existing subscribers or subscribe new customers. You must have already created the Stripe Customer object to use this.

{
        customer_id: "cus_FtWXI6U0YxebLd"
}

hash

Type

Required

Description

String

Yes

An HMAC string used for authenticating the user loading the embed more securely. This is required in order to go to 'Live Mode' in Billflow (connected to 'Live Mode' in Stripe). The hash is generated with your Billflow ID and the customer's email or Stripe Customer ID, whichever you are using to identify users.

{
    hash: "0709c7f107ed6326aaeaa3810330834870591f3924943e7bce66a826ac532045"
}

Available Configs

theme.stripeElement

Type

Required

Description

Object

No

{
   "billing_page_id":"YOUR_BILLING_PAGE_ID",
   ...
   ...
   "theme":{
      "stripeElement":{
         "style":{
            "base":{
               "fontSize":"14px",
               "lineHeight":"40px",
               "color":"white",
               "fontFamily":"-apple-system",
               "borderRadius":"4px",
               "::placeholder":{
                  "color":"white"
               }
            }
         }
      }
   }
}

handleResponse

Type

Required

Description

Function

No

{
    handleResponse: async function(payload) {
      console.log("Event ", payload.event);
      console.log("Response Object ", payload.response);
    }
}

coupon

Type

Required

Description

String

No

Stripe coupon ID. Pass in to have a coupon automatically applied to all prices on the page. Also works with Stripe Promo Codes.

{
    coupon: "coupon_id"
}

service

Type

Required

Description

String

No

The Billflow service. Use this to dynamically pass in different service to the billing page.

{
    service: "Your Service"
}

tier

Type

Required

Description

String

No

Tier name as defined by the sb_tier metadata tag. Pass in tier & interval to dynamically show specific checkout forms.

{
    tier: "Basic"
}

interval

Type

Required

Description

String

No

Interval string for the desired tier. Eg: day, month, year

{
    interval: "month"
}

interval_count

Type

Required

Description

Integer

No

This is only required if you are using a custom interval like 'every 6 months' or 'every 2 weeks'. It will be the number for the custom interval.

{
    interval_count: 6
}

Options

options.metadata

Type

Required

Description

Object

No

An object of key-value pairs. They will be added to the metadata of the Customer and Subscription in Stripe when they are created.

{
    options: {
        metadata: {
            key1: "Value 1",
            key2: "Value 2"
        }
    }
}

options.default_tax_rates

Type

Required

Description

Array

No

{
    options: {
        default_tax_rates: [
            "txr_1HZfxhEGJvDU3rtbcukgdicw"
        ]
    }
}

options.quantity

Type

Required

Description

Object

No

Use to set the quantity of a subscription during creation. Can pass in an integer or an object of key-value pairs. The unit_label is defined on the Stripe product and used to define which quantity is being set. If an integer is passed, it will apply the quantity to all products on the tier, if an object is passed with the unit_labels as keys, it will assign that quantity to the respective unit_label.

Eg: 5

OR

Eg: {product_unit_label1 : 10, unit_label2: 20}

{
  options: {
      quantity: {
        super_user: 3,
        user: 5,
      },
  }
}
PreviousPlan Picker ConfigsNextCustomer Portal Configs

Last updated 4 years ago

Was this helpful?

Add custom Stripe Element Styles. Inside the stripeElement object, it is exactly the same as how

Function that is called when users signup, change plan (upgrade/downgrade), resubscribe, or update Credit Card. Used to update user data, do redirects, or provide notifications. Payload contains an event name and a response object. .

An array of Stripe to be applied to a subscription on creation. You can learn more about Stripe tax rates . The tax rate will be applied on subscription creation.

Stripe works
Learn More
tax rate IDs
here