Skip to content

Invoice

An Invoice tracks a maker's purchase of Credits. Invoices support multiple payment providers and include VAT handling.

Properties

PropertyTypeDescription
IdintPrimary key
UserIdintFK → AppUser
SkustringCredit pack SKU
QuantityintNumber of packs purchased
NetAmountSatslongPrice before VAT
VatRatedecimalVAT percentage
VatAmountSatslongVAT amount in satoshis
TotalSatslongTotal price including VAT
VatExemptboolWhether VAT is exempt (valid EU VAT ID)
BuyerVatIdstring?Buyer's VAT number
BuyerCompanyNamestring?Company name
PaymentProviderPaymentProviderWhich provider processed the payment
PaymentChannelstring?Provider-specific channel
PaymentReferencestring?Provider-specific transaction ID
StatusInvoiceStatusCurrent status

Payment Providers

NameDescription
StripeCredit/debit card via Stripe Checkout
MollieEuropean payment methods via Mollie
DirectBitcoinPay directly with Bitcoin

Invoice Statuses

StatusDescription
PendingPayment initiated, awaiting confirmation
PaidPayment confirmed, credits granted
CancelledPayment cancelled
ExpiredPayment window expired

Relationships

Invoice (N) ──── (1) AppUser
Invoice (1) ──── (N) Credit

When an invoice is marked Paid, the corresponding Credit records are created and added to the user's balance.

Sell indie games for Bitcoin.