Creating Products
Create and manage the subscription products of your platform directly within DevOur. Every product is also created in your own Stripe account.
Products can be managed in the web app or, through the products list of your
configuration file, from the CLI. See
Products From the CLI.
Prerequisites
Before creating products, ensure you have:
- Completed Stripe Setup
- Added your Stripe Secret Key in your project settings
Access the Products Page
- Open your project in DevOur
- Navigate to Products from the project menu
If your project has no Stripe Secret Key yet, the page shows "You need to set a Stripe API key in your project config to use this feature". Click Add a Stripe API key to open your project settings and add it.
Create a New Product
- Click Add
- Enter a product name in the Create a new product dialog
- Click Create
The product is created in your Stripe account and opens straight away so you can configure it. A new product starts inactive and has no price until you save it.
Configure Product Details
Open a product from the list to configure it.
Basic Information
- Name: Display name for the product
- Description: Description of the product in Stripe
- Descriptor: Statement descriptor that appears on customer bank statements
Pricing
- Interval: Billing frequency: Day, Week, Month or Year (default: Month)
- Price: Amount in the selected currency. It can be 0 but not negative.
- Currency: Pick a currency from the list, shown by name and code (default: United States Dollar (USD))
Saving a new price, currency or interval creates a new price in Stripe and archives the previous one.
Usage Limits
The product page shows one number for each usage limit of your project: how many records a subscriber to this product can create under that limit. A limit left at 0 lets subscribers create nothing under it. See Usage Limits and What They Cap.
Features
Add features to highlight what's included in the subscription:
- Enter a feature in the Feature 1 field
- Click Add Feature to add another field (Feature 2, Feature 3…). The button stays disabled while the last feature is empty.
- Repeat for additional features (up to 15)
- Click X next to a feature to remove it
Empty features are ignored when you save.
Activation
- Toggle Active to activate the product in your Stripe account
Save Changes
Click Save to update the product in Stripe and in your project. Click Cancel to go back to the product list without saving.
Rename or Delete a Product
From the product list:
- Rename: Click Edit on the product, change the name, and click Edit in the dialog. The name is also updated in Stripe.
- Delete: Click Delete on the product, then Confirm. The product is removed from your project and archived in Stripe.
Sync with Stripe
Click Sync with Stripe on the products page to bring your project and your Stripe account back in line:
- Products in your Stripe account that aren't in your project are added to it, with their default price.
- Project products that no longer exist in Stripe are created again in Stripe as new, inactive products without a price. Open them and set their price again.
Products that can't be found in Stripe are greyed out in the list with a Needs sync tag and can't be opened until you sync.
Usage Limits and What They Cap
Name your usage limits once for the project, under Usage limits on the products page, such as Guides or Pieces. A project has up to 10. Then:
- Each product sets its own number for every limit.
- Each collection can be linked to one limit, under Usage limit on the collection's page.
In the generated platform, for a collection linked to a limit:
- A customer with a plan can create records until the records they own, across every collection linked to that limit, reach their plan's number. Editing and deleting stay open.
- A customer without a plan, or whose plan has ended, can only read. Creating, editing, and deleting are refused.
- Admins aren't limited.
A refused action returns 403 with PLAN_REQUIRED or USAGE_LIMIT_REACHED.
GET /api/users returns each limit with its maximum and how much the customer
has used.
A plan counts while its Stripe subscription is active, in a trial, or past due while Stripe retries a failed renewal.
For example, with a Guides limit, three products at 1, 5, and 20 guides, and the Guides collection linked to Guides, a museum on the second product can create five guides and is refused a sixth.
Products From the CLI
devour sync writes your products into the configuration file, and
devour setup --config <file> applies them:
"products": [
{
"name": "Five guides",
"description": "For a growing museum",
"features": ["5 guides", "Audio for every piece"],
"active": true,
"limits": { "Guides": 5 },
"amount": 10000,
"currency": "usd",
"interval": "month"
}
]
limitssets the product's number for each usage limit, by name. The limits themselves are listed by name in the file'susageLimits, and a collection links to one with"usageLimit": "Guides".amountis in the currency's smallest unit (cents for USD).intervalisday,week,month, oryear.- A product updates the one with the same
id, or the same name when it has noid. Any other product is created in your Stripe account. - A new product needs
amount,currency, andinterval. A synced product that has no price yet is left as-is until you give it one. - A product missing from the file is archived in Stripe and removed from your
project after
setupasks, or right away with--yes.
Your project needs its Stripe secret key first.