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.

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 |
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.
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.
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.
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.
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.
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.
Mailjet handles delivery
The generated app configures django-anymail to use Mailjet, with sender email and API credentials supplied through environment variables.
Authentication depends on email
Email verification, password reset, and passwordless login-code flows all rely on the same outbound email system being correctly configured.
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.
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.
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/pricingand normalized into plan cards on the frontend. - Authenticated users start subscription checkout through
/user/create-checkout-session. - Successful subscription confirmation returns through
/user/subscription-confirmand 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.
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.
STRIPE_SECRET_KEYSTRIPE_PORTAL_CONFIGURATION_IDSTRIPE_STARTER_MONTHLY_PRICE_IDSTRIPE_STARTER_YEARLY_PRICE_IDSTRIPE_STANDARD_MONTHLY_PRICE_IDSTRIPE_STANDARD_YEARLY_PRICE_IDSTRIPE_PREMIUM_MONTHLY_PRICE_IDSTRIPE_PREMIUM_YEARLY_PRICE_ID
Mailjet variables
Sender identity plus the Mailjet credentials that power auth and contact emails.
DEFAULT_FROM_EMAILMJ_APIKEY_PUBLICMJ_APIKEY_PRIVATEMAILJET_API_URL
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.
