Groupwise: B2B consolidated invoicing
Orbital Cloud bills enterprises with many business units on one consolidated invoice, using subscription groups, proforma quotes and group payment profiles.
The story
Orbital Cloud is a fictional infrastructure SaaS that sells to enterprises with many business units. Each unit has its own subscription, and all of them belong to one Maxio subscription group. The parent company pays one consolidated invoice. Groupwise is Orbital's enterprise billing desk for quoting, signing and managing these groups.
| At a glance | |
|---|---|
| Use case | B2B billing, subscription groups, consolidated invoicing, proforma quotes |
| SDK operations | 14 |
| Live app | mxo-groupwise.pages.dev |
Screens
| Screen | What you see and do | SDK calls |
|---|---|---|
| Accounts | Six enterprise groups with members, consolidated MRR and open balance. An org tree shows the paying parent, the consolidated invoice and each member subscription | subscriptionGroups.listSubscriptionGroups, subscriptionGroups.readSubscriptionGroup, subscriptions.listSubscriptions |
| New enterprise deal | Add a payer and two or more business units with plans, get a consolidated quote, then sign the whole group in one call | products.listProducts, proformaInvoices.previewSignupProformaInvoice, subscriptionGroups.signupWithSubscriptionGroup |
| Group management | Add or remove members, change the group's default payment profile, and create consolidated proforma invoices | subscriptionGroups.addSubscriptionToGroup, subscriptionGroups.removeSubscriptionFromGroup, paymentProfiles.listPaymentProfiles, paymentProfiles.changeSubscriptionGroupDefaultPaymentProfile, proformaInvoices.listSubscriptionGroupProformaInvoices, proformaInvoices.createConsolidatedProformaInvoice |
| Consolidated invoices | Each parent invoice broken down by the member segments that make it up, then split into paid and due | invoices.listInvoices, invoices.listConsolidatedInvoiceSegments |
SDK operations
| Operation | SDK method | Used for |
|---|---|---|
| List subscription groups | subscriptionGroups.listSubscriptionGroups | Enterprise accounts |
| Read subscription group | subscriptionGroups.readSubscriptionGroup | One group's members and payer |
| Sign up with subscription group | subscriptionGroups.signupWithSubscriptionGroup | Sign a whole deal in one call |
| Add subscription to group | subscriptionGroups.addSubscriptionToGroup | Bring a business unit in |
| Remove subscription from group | subscriptionGroups.removeSubscriptionFromGroup | Take one out |
| List subscriptions | subscriptions.listSubscriptions | Member details and ungrouped subscriptions |
| List products | products.listProducts | Plans for a new deal |
| Preview signup proforma invoice | proformaInvoices.previewSignupProformaInvoice | Quote each member |
| List subscription group proforma invoices | proformaInvoices.listSubscriptionGroupProformaInvoices | A group's proformas |
| Create consolidated proforma invoice | proformaInvoices.createConsolidatedProformaInvoice | Preview the next consolidated invoice |
| List payment profiles | paymentProfiles.listPaymentProfiles | The payer's cards and bank accounts |
| Change group default payment profile | paymentProfiles.changeSubscriptionGroupDefaultPaymentProfile | Switch how the parent pays |
| List invoices | invoices.listInvoices | Parent (consolidated) invoices |
| List consolidated invoice segments | invoices.listConsolidatedInvoiceSegments | Each member's share of an invoice |
Code: sign an enterprise deal in one call
const signup = await client.subscriptionGroups.signupWithSubscriptionGroup({
body: {
subscriptionGroup: {
paymentCollectionMethod: "remittance",
payerAttributes: { organization: "Atlas Holdings Inc.", firstName: "Dana", lastName: "Whitfield", email: "ap@atlasholdings.example", reference: "orb-atlas-holdings", country: "US" },
subscriptions: [
{ productHandle: "compute-enterprise", reference: "atlas-logistics", primary: true },
{ productHandle: "data-lakehouse", reference: "atlas-health-labs" },
{ productHandle: "edge-network", reference: "atlas-freight-air" },
],
},
},
});Maxio has no group-level signup preview, so the quote adds up one previewSignupProformaInvoice per member.
Errors shown on purpose
- Maxio 422s: a retired product handle (rejected at both quote and signup), removing the group's primary subscription, and using another payer's payment profile. The app narrows each operation's own typed error.
- App rule: a group needs at least two members, so quoting, signing or removing below that is blocked before Maxio sees it.
