BOB Docs
APITutorials

One time payments

Configuration

To create products, edit the settings.py file in the store app, similar to subscriptions:

ONE_OFF_PRODUCTS_AVAILABLE = [
    {
        "key": "brain",
        "images": [
            {
                "image_path": prepare_path("product_brain.png"),
                "title": "Brain - give me a wisdom, I will achieve the rest."
            },
            {
                "image_path": prepare_path("product_brain2.png"),
                "title": "Brain - give me a wisdom, I will achieve the rest."
            },
            {
                "image_path": prepare_path("product_brain3.png"),
                "title": "Brain - give me a wisdom, I will achieve the rest."
            }
        ],
        "shippable": False,
        "tax_code": "txcd_10103001",
        "pricing": [
            # Defines price with a one-time interval
            {"interval": PriceInterval.ONE_OFF, "unit_amount": 14900},
        ],
        "translation": {
            "en": {
                "name": "Brain",
                "checkout_description": "Give me wisdom.",
                "description": "True wisdom lies not in knowing everything, but in understanding what truly matters.",
                "statement_descriptor": "BoB's Brain"
            }
        }
    },

This configuration allows you to adjust all details of your products. Customers purchase products individually per account rather than by organization (as is the case with subscriptions). However, you can change this behavior by modifying the post-purchase logic.

Product

When a product is created, synchronization is performed with Stripe. All images and text are automatically updated in Stripe to provide a clear representation of your product on the paywall.

You must supply a ProductTaxCode. Refer to the Stripe documentation for product tax. By default, it is set to Software as a Service (SaaS) - Business Use: txcd_10103001.

Cart

One way to make purchases in BOB is by adding one-time purchasable products to a cart. This allows customers to buy multiple products at once. A cart is always created and linked to the customer (logged in or anonymous). After completing a purchase, the customer is associated with a new user account.

Buy Now

The buy-now feature works similarly to the cart but creates a new cart for each purchase. This ensures the buy-now action does not affect the current cart.

Special components for buy-now functionality are available on the frontend, allowing you to insert any offer into the system.

Learn more

On this page