Add Stripe subscription sync
This commit is contained in:
@@ -22,10 +22,10 @@ Activity is an audit log of all actions performed by a user or a worker process.
|
||||
- `update_tenant`
|
||||
- `create_relay`
|
||||
- `update_relay`
|
||||
- `update_relay_plan`
|
||||
- `activate_relay`
|
||||
- `deactivate_relay`
|
||||
- `fail_relay_sync`
|
||||
- `complete_relay_sync`
|
||||
- `resource_type` is a string identifying the resource type being modified.
|
||||
- `resource_id` is a string identifying the resource id being modified.
|
||||
|
||||
@@ -35,16 +35,17 @@ A plan represents a rate charged for relays at a given feature/usage limit. Plan
|
||||
|
||||
- `id` - the plan slug
|
||||
- `name` - the plan name
|
||||
- `sats` - the plan't cost per month
|
||||
- `amount` - the plan monthly cost in USD
|
||||
- `members` - the max number of members a relay can have before needing to upgrade. If empty, membership is not limited.
|
||||
- `blossom` - whether blossom media hosting is available on this plan
|
||||
- `livekit` - whether livekit audio/video calls are available on this plan
|
||||
- `stripe_price_id` - the identifier of the price in Stripe
|
||||
|
||||
There are three plans available:
|
||||
|
||||
- `free` - 0 sats/mo, up to 10 members, no blossom/livekit
|
||||
- `basic` - 10k sats/mo, up to 100 members, includes blossom/livekit
|
||||
- `growth` - 50k sats/mo, unlimited members, includes blossom/livekit
|
||||
- `free` - $0/mo, up to 10 members, no blossom/livekit
|
||||
- `basic` - $5/mo, up to 100 members, includes blossom/livekit
|
||||
- `growth` - $25/mo, unlimited members, includes blossom/livekit
|
||||
|
||||
# Tenant
|
||||
|
||||
@@ -53,6 +54,8 @@ Tenants are customers of the service, identified by a nostr `pubkey`. Public met
|
||||
- `pubkey` is the nostr public key identifying the tenant
|
||||
- `nwc_url` (private) a nostr wallet connect URL used for **paying** invoices generated by the system
|
||||
- `created_at` unix timestamp identifying tenant creation time
|
||||
- `stripe_customer_id` a string identifying the associated stripe customer
|
||||
- `stripe_subscription_id` a string identifying the associated stripe subscription
|
||||
|
||||
# Relay
|
||||
|
||||
@@ -63,6 +66,7 @@ A relay is a nostr relay owned by a `tenant` and hosted by the attached zooid in
|
||||
- `schema` - the relay's db schema (read_only, calculated based on `subdomain` + `id`)
|
||||
- `subdomain` - the relay's subdomain
|
||||
- `plan` - the relay's plan
|
||||
- `stripe_subscription_item_id` - the Stripe subscription item id.
|
||||
- `status` - `active|inactive`. Only `active` relays count toward billing.
|
||||
- `synced` - whether the relay has been successfully synced to zooid at least once.
|
||||
- `sync_error` - a string indicating any errors encountered when synchronizing.
|
||||
|
||||
Reference in New Issue
Block a user