Subscription and billing actions
checkFeatureAccessAction plus tRPC routers for Stripe, plans, cards, orders, and Worker Node purchases.
Written By Zoro
Last updated 3 days ago
dFlow Cloud billing
dFlow Cloud billing uses Stripe. The UI combines Server Actions for a few checks with tRPC routers for plans, payment methods, checkout, and Worker Node orders.
Server action
Use this page together with customer docs under Billing and Account under Billing and Account in the sidebar for behaviour and UX.
tRPC: subscription plans
Router: subscriptions on appRouter (packages/cloud/src/trpc/routers/subscriptionPlans/index.ts).
Notable procedures include:
The file contains additional helpers and mutations; inspect the router for the full list.
tRPC: Stripe customer and payment methods
Router: stripe (packages/cloud/src/trpc/routers/stripe/index.ts).
Procedures:
tRPC: saved cards (dashboard โCardsโ)
Router: card (packages/cloud/src/trpc/routers/card/index.ts).
tRPC: orders
Router: orders (packages/cloud/src/trpc/routers/orders/index.ts).
tRPC: Worker Node / VPS purchases
Router: vpsOrders (packages/cloud/src/trpc/routers/vpsOrders/index.ts).
Examples include createOrder, getOrders, getOrdersById, getSubscriptions, lifecycle stopServer, startServer, restartServer, refetchServerStatus, and subscription management such as cancelServerSubscription, resumeServerSubscription, cancelOrResumeWorkerNodeAtMonthEnd. Read the router for exact inputs and side effects.
Related tRPC routers
Billing and growth flows also touch coupons, rewards, discord, workerNodes (for example a getServersWithFieldsAction query backed by Payload), vpsPlans, and cloud. Explore packages/cloud/src/trpc/routers/index.ts for the authoritative router list.
Learn more
- Billing overview and Plans and subscriptions.
- API overview for where
/api/trpcis served. - tRPC and backend reference for context and client usage.