BOB Docs
APITutorials

Subscription

Configuration

To make it as easy as possible, the subscription app allows you to configure different plan settings directly in settings.py:

SUBSCRIPTIONS_AVAILABLE = [
    {
        # The group of permissions with this name will also be created
        # Group names will be in uppercase, e.g., Basic -> BASIC
        "key": "Basic",
        # During registration, the first checkout will include a free trial period
        # For the Basic subscription, this is 7 days
        "trial_period_days": 7,
        # The number of free subscriptions available during the trial period for an account
        "amount_of_free_subscriptions": 1,
        # Tax code for proper VAT and tax calculations
        "tax_code": "txcd_10103001",
        # Available prices for the subscription; after 7 days,
        # the price selected during checkout will be applied
        "pricing": [
            # Interval defines how long the pricing with the unit amount is valid
            # For example, this is $10 per month
            {"interval": PriceInterval.MONTH, "unit_amount": 1000},
            # In this case, $99 per year
            {"interval": PriceInterval.YEAR, "unit_amount": 9999}
        ],
        "images": [
            {
                "image_path": prepare_path("product_bob.png"),
                "title": "BoB title"
            },
            {
                "image_path": prepare_path("product_bob2.png"),
                "title": "Avatar title"
            },
        ],
        "translation": {
            "en": {
                # Name of the product
                "name": "BoP Basic",
                # Description displayed during checkout
                "checkout_description": "Test description on checkout.",
                # Description used in the store
                "description": "Test description inside store.",
                # The descriptor shown in the client’s bank after purchase (< 22 characters)
                "statement_descriptor": "BoP Boilerplate"
            }
        }
    },
    ...

This allows you to adjust all details of your subscription plans. Both monthly and yearly subscriptions are supported.

Subscriptions are always created per organization. This means that when a new user subscribes, their customer and subscription are linked to their organization. This setup enables you to enforce organization-specific requirements, such as 5 users, 1000 tokens, etc. Each subscription is manageable within Stripe.

The appearance of Stripe is crucial, and payments work only if they are convenient—especially for new brands. Make sure to design your product and related content properly.

Subscription vs Product

When creating a subscription plan, a product is created in Stripe. All images and text are automatically updated in Stripe to create a clear representation of your product on the paywall. This requires you to provide a ProductTaxCode. You can find tax codes in the Stripe documentation for product tax. By default, it is set to Software as a Service (SaaS) - Business Use: txcd_10103001.

On this page