Product catalog
Build your ideal product catalog with OpenPay using any pricing model—tiered, usage-based, flat-rate, and more. Automate recurring billing, payments, and invoicing, all while offering coupons, free trials, and prorations to scale your business.
Your product catalog consists of product and price objects, which define what you sell and how you price it. In OpenPay, the product catalog hierarchy is as follows:
Products > Prices > Add-ons
Create a product and price
To create a product, head over to the products tab and click [+Add Product] on the top right. Once you have created your product, click into the product details to create the prices for that product.
Install and import our client
For this recipe, we will use the Python SDK, which you can install using pip install getopenpay
or poetry add getopenpay
# Products and Prices are most commonly created via our UI
from getopenpay.client import ApiKeys, OpenPayClient
OP_PUBLISHABLE_TOKEN = 'TODO_YOUR_PUBLISHABLE_TOKEN'
OP_SECRET_TOKEN = 'TODO_YOUR_SECRET_TOKEN'
api_keys = ApiKeys(publishable_key=OP_PUBLISHABLE_TOKEN, secret_key=OP_SECRET_TOKEN)
# sandbox/staging environment
sandbox_host = 'https://connto.openpaystaging.com'
# production environment
production_host = 'https://connto.getopenpay.com'
client = OpenPayClient(api_keys=api_keys, host=sandbox_host)
Create a product
The Product object is the foundation of every subscription. It is a representation of the service you want to offer on your platform.
Define the attributes of your product. You can link it to an SKU in your existing system, list the features that differentiate this product from the others, and even choose what each unit of this product should be called.
product = client.products.create_product(
CreateProductRequest(
name='Standard license',
description='For personal use',
account_sku='970000000001',
features=['Priority support'],
unit_label='seat',
is_active=True
)
)
Create a price
Define the value of your Product with a Price object. Our API gives you the ability to create prices as simple or as complex as you want, from basic flat-rate models to tiered models that charge based on usage.
price_amount_atom = 9000 # = $90.00
price = client.prices.create_price_for_product(
CreatePriceRequest(
product_id=product.id,
unit_amount_atom=price_amount_atom,
is_active=True,
# Simple pricing model with a flat rate and 7-day trial
pricing_model=PricingModel.STANDARD,
trial_period_days=7,
# Bill every month
price_type=PriceTypeEnum.RECURRING,
billing_interval=CalendarIntervalEnum.MONTH,
billing_interval_count=1,
# Require a minimum of two months' commitment
contract_term_multiple=2,
contract_auto_renew=True,
)
)
Key things to note
-
In OpenPay, products can be deactivated but not permanently deleted. This is intentional, as deleting products that may already be referenced in subscriptions, invoices, or reports could cause data inconsistencies or break critical records.
By allowing deactivation instead, we ensure the product is no longer available for use while preserving the historical data needed for billing accuracy, audit trails, and reporting integrity.
-
You can create subscriptions for your customers using your prices by following this guide:
Subscriptions grant customers access to your products or services for a set duration. Using OpenPay, you can streamline recurring billing, offer trial periods, and tailor subscription options to meet the specific needs of each customer.
-
You can create add-on prices by following this guide:
Add-ons are supplementary charges applied on top of a subscription's main price.
-
You can create product families by following this guide:
Product Families let you group related products into a hierarchy, making it easy to enforce upgrade-only contracts. For example, you can allow customers to move up from Silver to Gold, while preventing downgrades from Silver to Bronze.
-
You can create product bundles by following this guide:
A product bundle is a group of products shown together on the checkout page. Each product in the bundle can offer multiple billing options, which customers can toggle between. You can also present multiple bundles on a single checkout page, giving customers flexibility to choose the one that fits them best.