Skip to content
Otoshek
OTOSHEK · DOCS
LAUNCH GUIDE · 05scheduleRead · 5 min

Stripe Monetization & Email Systems

Generated Otoshek apps ship with two important business systems already wired in: a Stripe-backed subscription layer and a Mailjet-backed email pipeline. Together they cover pricing, checkout, customer billing management, authentication emails, and contact-form delivery without requiring a fresh integration project after deployment.

Dashboard and Pricing page
Dashboard & pricing — billing surfaces shipped in every generated appGENERATED APP
01

System snapshot

At a glance, this is what the generated TypeScript app already includes in its billing and email layers.

Capability What ships in the generated app
Payment engine Stripe subscriptions backed by dj-stripe
Plan model Starter, Standard, and Premium with monthly/yearly pricing
Checkout flow Authenticated users are redirected to Stripe Checkout
Self-service billing Customer billing portal is available out of the box
Data sync Stripe products, prices, customers, payment methods, and subscriptions sync into Django
Email engine django-anymail with Mailjet as the delivery backend
Email use cases Auth emails plus contact-form delivery share the same mail pipeline
02

The Stripe-backed monetization layer

The generated app uses Stripe as the payment platform and dj-stripe as the Django-side data bridge. That gives the app live checkout flows, recurring subscription tracking, and customer billing self-service without custom payment models becoming the source of truth.

01
credit_card

Stripe is the payment rail

The generated app uses Stripe for subscription checkout and recurring billing, while dj-stripe mirrors the subscription data into the app database.

02
receipt_long

Pricing stays app-driven

The backend pricing endpoint combines live Stripe prices with local metadata so the frontend can render a consistent pricing table with named plans and feature lists.

03
restart_alt

Customer self-service is built in

Users can move from the pricing page into Stripe Checkout, and existing subscribers can jump into the billing portal to manage their subscription details.

04
database

Subscription state is queryable

The app exposes subscription-status endpoints and syncs recurring changes back into Django so dashboards and gated features can rely on local subscription state.

03

The email system

Outbound email is handled through django-anymail using Mailjet. That same pipeline supports account verification, password resets, passwordless login codes, and the built-in contact form.

01
mail

Mailjet handles delivery

The generated app configures django-anymail to use Mailjet, with sender email and API credentials supplied through environment variables.

02
shield_lock

Authentication depends on email

Email verification, password reset, and passwordless login-code flows all rely on the same outbound email system being correctly configured.

03
send

Product messaging uses the same pipeline

The built-in contact form stores incoming messages in the database and also forwards them by email using the app's configured sender settings.

04
dns

Deployment wires the secrets

The generated repo is designed to receive Stripe and Mailjet secrets in CI/CD so billing and email work as part of the deployed application, not as manual post-launch glue code.

04

Runtime routes and flows

The generated app exposes a small set of routes that turn Stripe and Mailjet into working product features rather than disconnected integrations.

  • Pricing data is fetched from /user/pricing and normalized into plan cards on the frontend.
  • Authenticated users start subscription checkout through /user/create-checkout-session.
  • Successful subscription confirmation returns through /user/subscription-confirm and Stripe webhooks under /stripe/.
  • Existing subscribers can open the Stripe billing portal through /user/create-portal-session.
  • Subscription state is available to the app through /user/subscription-status.
  • Auth and contact emails are delivered through Mailjet using the same sender configuration.
05

Configuration you own

Most of the heavy lifting is prewired, but these values still come from your environment and payment/mail provider setup.

Stripe variables

Secret key, the Customer Portal configuration ID, and the price IDs that map your pricing tiers into the app. The webhook endpoint and its signing secret are provisioned automatically — no webhook variable is needed.

.env · Stripe8 KEYS
STRIPE_SECRET_KEY
STRIPE_PORTAL_CONFIGURATION_ID
STRIPE_STARTER_MONTHLY_PRICE_ID
STRIPE_STARTER_YEARLY_PRICE_ID
STRIPE_STANDARD_MONTHLY_PRICE_ID
STRIPE_STANDARD_YEARLY_PRICE_ID
STRIPE_PREMIUM_MONTHLY_PRICE_ID
STRIPE_PREMIUM_YEARLY_PRICE_ID

Mailjet variables

Sender identity plus the Mailjet credentials that power auth and contact emails.

.env · Mailjet4 KEYS
DEFAULT_FROM_EMAIL
MJ_APIKEY_PUBLIC
MJ_APIKEY_PRIVATE
MAILJET_API_URL
06

Deployment behavior

In the generated repository, CI/CD is designed to build the app, run migrations, bootstrap Stripe keys, sync subscription data, and deploy the full stack as one unit.