Skip to content

Accounting

MDU implements PGC (Plano Geral de Contabilidade) double-entry bookkeeping integrated with Stripe webhooks.

Overview

All financial transactions flow through Stripe and are recorded as double-entry journal entries in the local database. The system supports automated VAT evidence collection and AIFSACCT-compatible export.

Tax Strategy

  • VAT: Included in all prices (tax-inclusive)
  • Stripe automatic_tax: Disabled
  • Declaration: Manual quarterly submission to accountant
  • Evidence: Billing address collected at checkout (billing_address_collection: required)

Subscription Prices

Plan Stripe Price ID Billing
Starter (Annual) price_1T3zzWLJD1tIg78QNNrfWUnf Annual
Pro (Annual) price_1T3zzXLJD1tIg78QwyEh8o4J Annual

One-Time Prices

Action Price Stripe Price ID
Delete model/map 3.50 price_1T3yqiLJD1tIg78QZuitt2pa
Private model/map 4.00 price_1T3zOALJD1tIg78QCufIehaE
Texture (PBR) 4.50 price_1T4nL6LJD1tIg78QrZarsAYa

Journal Entry Flow

Stripe webhook (checkout.session.completed)
    |
    v
Parse event metadata (userId, action, amount)
    |
    v
Create journal entry:
  DEBIT:  Cash/Bank (Stripe)
  CREDIT: Revenue (subscription/service)
    |
    v
Store in journal_entries table

Webhook Events

Event Journal Entry
checkout.session.completed Debit cash, credit revenue
customer.subscription.updated Update subscription record
customer.subscription.deleted Downgrade to free plan

AIFSACCT Export

The system supports export in AIFSACCT format for Portuguese tax compliance:

  • Journal entries with PGC account codes
  • VAT evidence (billing addresses from Stripe)
  • Monthly/quarterly aggregation

Stripe Custom Domain

  • billing.minidreamuniverse.com → CNAME hosted-checkout.stripecdn.com
  • This is a Stripe Custom Checkout Domain — never change to A record

Warning

The billing domain DNS must remain a CNAME to Stripe CDN. Changing it to an A record breaks checkout for all apps.