Billing Plan
Vyndara Unified Billing Plan
This document defines a comprehensive billing solution for Vyndara’s diverse product suite. It supports both SaaS and self-hosted deployments by unifying usage-based billing through a credit system, fixed feature pricing, and flexible options for granting credits or unlimited usage.
Vyndara products include:
- Vyndara API – Billed by API requests and data transfer.
- Vyndara Object Storage – Billed by data stored and data transfer.
- Vyndara AI – Billed by API calls and compute load.
- Vyndara Website (Website Builder) – Billed by public user requests (pageviews).
- Vyndara Business Processes – Billed by the number of active seats.
Additionally, the system supports:
- Credit-Granting: Convert usage metrics into credits, which customers can purchase or have granted.
- Unlimited Usage Accounts: For partners (e.g., Arematics) where usage is free.
1. Credit-Based Billing Model
A. Overview
Each measurable unit of usage (e.g., API calls, GB stored, pageviews) is converted into a credit cost. Customers pre-purchase credits (or are granted credits) which are deducted as they use the system. When credits run low, overage events can trigger automatic billing via Stripe or require a manual top-up.
B. Credits-to-Usage Mapping
Service | Metric | Conversion Rate |
---|---|---|
Vyndara API | API Requests | 1 Credit = 1,000 requests |
Vyndara Object Storage – Storage | Data Stored | 1 Credit = 1 GB stored |
Vyndara Object Storage – Transfer | Data Transferred | 1 Credit = 1 GB transferred |
Vyndara AI | AI API Calls | 1 Credit = 1,000 calls |
Vyndara Website (Builder) | Public Pageviews | 1 Credit = 10,000 pageviews |
Vyndara Business Processes | Active Seats (per month) | 1 Credit = 1 seat per month |
2. Billing Models
A. SaaS / Usage-Based Billing
- Credit System:
- Prepaid Credits: Customers purchase credits, which are deducted based on their usage.
- Usage Deduction: Each usage event (e.g., API request, GB stored) converts to a specific credit cost.
- Overage Handling: If credits are exhausted, the system can either:
- Trigger metered billing through Stripe (automatic invoicing).
- Require a manual top-up.
- Hybrid Approach: Offer a base credit allowance each billing cycle with additional overage charges if usage exceeds that allowance.
B. Self-Hosted / Fixed Feature-Based Pricing
- Fixed Licensing:
- Self-hosted deployments are billed on a recurring basis (monthly/annually) based on a fixed fee per feature or per seat.
- No Usage Metering: These deployments use their own computing power, so usage events are not tracked for billing.
- License Keys & Configuration Flags:
- A license key unlocks the appropriate features.
- A configuration flag (e.g.,
self_hosted: true
) bypasses usage metering.
C. Unlimited Usage Accounts
- Unlimited Option:
- For select organizations (e.g., internal Arematics accounts), a flag can be set to bypass credit deductions and usage-based billing.
- This can be managed via an admin interface and stored as a property on the organization record.
type Organization struct {
ID uuid7.UUID
Name string
BillingModel string // "saas" or "self_hosted"
CreditBalance int64 // Available credits for usage-based billing
UnlimitedUsage bool // If true, usage is free and credits are not deducted
// ... other fields
}
3. Stripe Integration & Event Handling
A. Key Stripe Events to Intercept
For a robust integration, intercept and process the following Stripe events:
- Customer and Subscription Management:
checkout.session.completed
: Indicates a successful checkout (new subscription or credit purchase).customer.subscription.created
: A new subscription is created.customer.subscription.updated
: Subscription details change (e.g., plan upgrades).customer.subscription.deleted
: Subscription canceled; trigger suspension or change in billing.
- Invoicing & Payment:
invoice.payment_succeeded
: Payment succeeded; update credit balance or record successful overage charges.invoice.payment_failed
: Payment failed; trigger alerts or mark credits as pending.invoice.finalized
: Invoice is finalized; store invoice details.
- Refunds & Disputes:
charge.refunded
: Process refunds; adjust credit consumption accordingly.charge.dispute.created
: Handle disputes; potentially freeze credit deductions.
B. Example Event Handling Code
func handleStripeEvent(ctx context.Context, event StripeEvent) error {
switch event.Type {
case "checkout.session.completed":
// Extract session details and determine if this is a credit purchase or subscription event.
case "invoice.payment_succeeded":
// Process payment for overages or credit top-ups.
case "customer.subscription.deleted":
// Disable or adjust billing for the organization if the subscription is canceled.
default:
// Log unhandled event types for analysis.
}
return nil
}
4. Granting Credits and Managing Unlimited Usage
A. Granting Credits
func grantCredits(orgID string, credits int64) error {
// Retrieve organization record.
// Increase CreditBalance by the specified credits.
return nil
}
B. Configuring Unlimited Usage
func setUnlimitedUsage(orgID string, enable bool) error {
// Retrieve organization record.
// Set UnlimitedUsage = enable.
return nil
}
5. Summary & Next Steps
- Unified Credit-Based Billing: Convert usage metrics (API calls, storage, pageviews, etc.) into credits.
- Comprehensive Integration with Stripe: Handle
checkout.session.completed
,invoice.payment_succeeded
,customer.subscription.*
, and refund/dispute events. - Flexible Billing Models: Support SaaS, self-hosted, and unlimited usage accounts.
Credit Usage
1 Credit = 1€, except Business Platform 1 Credit = 100€
Product | Metric | Conversion Rate |
---|---|---|
Vyndara API - Requests | API Requests | 1 Credit = 100.000 requests |
Vyndara API - Storage | Stored GB | 1 Credit = 5GB |
Vyndara Object Storage – Storage | Data Stored | 1 Credit = 25 GB stored |
Vyndara Object Storage – Transfer | Data Transferred | 1 Credit = 25 GB transferred |
Vyndara Website (Builder) | Public Pageviews | 1 Credit = 100,000 pageviews |
Vyndara Business Platform | Active Seats (per month) | 1 Credit = 1 seat per month |
Vyndara API - Free
- 100.000 request (1 Credit) = 2 requests per minute
- 10GB storage (2 Credits) Vyndara Object Storage - Free
- 50GB (2 Credits)
- 50GB data transfer (2 Credits)