This Miro app demonstrates using flat rate billing with Salable.
- Go to the Products page and click the
Create Product
button. - Give your product any name.
- Tick the
Paid Product
checkbox. - Select the test payment integration that is created for you on sign up. If you already have created a payment integration this can be used instead.
- Select
GBP
as your currency.
- Go to the
Plans
tab on the sidebar and selectCreate Plan
- Set the plan name as
Basic
and optionally provide a description. This plan will be a 'user' plan giving access to the product for a user on all boards but no other users on the team will be able to use it. - Press
Continue
to configureLicense Type
information. - For the type of plan select
Standard
. - Select
Month
for subscription cycle. - Select
Flat rate
license type. - Select
Paid
to make it a paid plan. - Currencies will then appear, input the cost as
1
subscription which will bill a customer £1 every month. - Continue to
Assign values
. - This is section is for assigning feature values that can be used on pricing tables. This is not required to get set up.
- Click
Continue
toCapabilities
. - Create a capability called
circle
. These will be used to lock features behind the license check in the demo app. - Create Plan.
- Repeat the above steps for a
Pro
plan but with the changes in the next steps. The Pro plan will also be a 'user' plan. - Set the monthly cost as
2
plan which will bill the customer £2 a month. - Select the already created capability
circle
and create a new capability oftriangle
. - Repeat the above steps for a
Board
plan but with the changes in the next steps. This plan will be a 'board' plan allowing all users on a single board access to the product. - Set the monthly cost as
5
plan which will bill the customer £5 a month. - Select both existing capabilities
circle
andtriangle
.
- Copy the Product ID from the
General Settings
tab and assign toNEXT_PUBLIC_PRODUCT_UUID
in the.env
file. - Go to
Plans
. Assign theBasic
ID toNEXT_PUBLIC_SALABLE_PLAN_UUID
,Pro
ID toNEXT_PUBLIC_SALABLE_PRO_PLAN_UUID
and theBoard
ID toNEXT_PUBLIC_SALABLE_BOARD_PLAN_UUID
. - Go to
API Keys
. - Copy the API Key that was generated on sign up and assign to
SALABLE_API_KEY
. - Run
npm run dev
-
Sign in to Miro, and then create a Developer team under your user account.
- Click the Create new app button.
- On the Create new app modal, give your app a name, assign it to your Developer team, and then click Create.
- Configure the app:
- In your account profile, go to Your apps, and then select the app you just created to access its configuration page.
- On the app configuration page, go to App Credentials, and copy the app Client ID and Client secret values: you'll need to enter these values in step 4 below.
- Go to App URL and enter the following URL:
http://localhost:3000
- Go to Redirect URI for OAuth2.0, and enter the following redirect URL:
http://localhost:3000/api/redirect
- Click Options.
From the drop-down menu select Use this URI for SDK authorization. - Lastly, go to Permissions, and select the following permissions:
board:read
board:write
identity:read
- Open the
.env
file, and enter the app client ID and client secret values that you saved at the beginning of step 3 above. - Run
npm run start
to start developing.
When your server is up and running:
- Go to Miro.com.
- Make sure you're in your developer team and open a board.
- To start your app, click the app icon in the app toolbar on the left.