madeenan

Billing

Dodo Checkout and Subscription Access

Madeenan charges for the infrastructure around Islamic source work: search, grounding, citation checks, limited hosted chat, usage tracking, API keys, and abuse controls. Your own production model provider charges stay in your own account.

Source note

Madeenan does not ask you to save LLM provider keys. For production generation, call Madeenan from your backend, then send the returned source blocks to your own model provider from your own server.

Self-Serve Flow

  1. Choose Free, Supporter, or API on the Pricing page.
  2. Dodo handles checkout, tax, invoices, and payment methods.
  3. Dodo sends Madeenan a subscription webhook.
  4. Madeenan activates the app and emails a secure setup link through Resend.
  5. The setup link returns a one-time Madeenan API key. Use it for source search, hosted chat, dashboard access, and embeds.

Create Checkout

The dashboard creates a checkout session after Google sign-in. Madeenan creates pending billing records before redirecting to Dodo, then activates access only after a verified subscription webhook.

$curl -X POST "https://api.madeenan.com/v1/billing/checkout?plan=api" \
-H "Cookie: madeenan_session=..." \
-H "X-CSRF-Token: ..."

Local Dodo Env

In the current plan setup, DODO_STARTER_PRODUCT_ID powers Supporter and DODO_GROWTH_PRODUCT_ID powers API / Organization. Use a public tunnel for local webhooks.

$DODO_PAYMENTS_ENVIRONMENT=test_mode
DODO_PAYMENTS_API_KEY=...
DODO_PAYMENTS_WEBHOOK_KEY=...
DODO_STARTER_PRODUCT_ID=...
DODO_GROWTH_PRODUCT_ID=...
DODO_RETURN_URL=http://localhost:3000/checkout/success
DODO_CANCEL_URL=http://localhost:3000/checkout/cancel
DODO_WEBHOOK_TOLERANCE_SECONDS=300
PUBLIC_APP_URL=http://localhost:3000
PUBLIC_API_URL=http://localhost:8000

Limits

Free includes 10 searches per day, Supporter includes 5,000 searches per month, and API / Organization includes 50,000 searches per month.

Cancellation

Cancelled, expired, or failed subscriptions disable the app. Existing API keys remain hashed but no longer authorize active access.

Lost API key

Request a new setup magic link from the checkout success page. Madeenan generates a new API key and only shows it once.

Invoices and payment method

Customers manage invoices, cancellations, and payment methods through the Dodo customer portal from the Billing page.