Introduction

In this guide, you will learn how to add additional pricing plans to Casper.

Step 1: Add new plan details to “Pricing Plans” Option Set

Pricing plan data like plan names, credit limits, and Stripe Price IDs are stored as options in the Pricing Plans option set. If you are unfamiliar with Option Sets, please review Bubble’s very helpful tutorial on the topic: https://bubble.io/video/intro-to-option-sets

Create a new Pricing Plans option

Untitled

Modify the newly created option’s attributes

Untitled

Display: The plan’s public-facing name

Monthly price: A value displayed to users, NOT used in payment workflows

Stripe Test ID: Stripe price ID for test pricing plan

Stripe Live ID: Stripe price ID for live pricing plan

Monthly credits: Maximum credits (words) per month

Step 2:Create backend workflow for plan

Duplicate the pro_plan workflow

Right click > copy the pro_plan workflow and right click > paste it back into your backend workflows. Change the name of the new workflow to reflect your new plan’s name (ex. my_new_plan_plan).

Modify “Make changes to User” action

Change the “Plan Credits” and “Plan” fields in the “Make changes to User” action so that they correspond with your new plan.

Modify “Schedule API workflow” action

Modify the new workflow’s “Schedule API workflow” action so that it calls itself instead of the pro_plan workflow. To learn more about recursive workflows, check out the Bubble docs here: https://manual.bubble.io/help-guides/apis-connect-to-other-apps/the-bubble-api/the-workflow-api/api-workflows/recursive-api-workflows