TBBN.Merchant Platform docs
WORKING

Billing

post/v1/billing/subscriptions

Create a Business's SaaS subscription

Parameters

optional

Request body

FieldTypeRequired
businessIdstring (uuid)yes
billingEmailstring (email)yes
tierSANDBOX | STARTER | GROWTH | ENTERPRISEyes

Response (201)

FieldTypeRequired
idstring (uuid)
businessIdstring (uuid)
tierSANDBOX | STARTER | GROWTH | ENTERPRISE
stripeSubscriptionIdstringnull
stripeCustomerIdstringnull
statusstring
currentPeriodStartstring,null (date-time)
currentPeriodEndstring,null (date-time)
get/v1/billing/subscriptions/{businessId}

Get a Business's current active SaaS subscription

Parameters

businessIdpathrequired

Response (200)

FieldTypeRequired
idstring (uuid)
businessIdstring (uuid)
tierSANDBOX | STARTER | GROWTH | ENTERPRISE
stripeSubscriptionIdstringnull
stripeCustomerIdstringnull
statusstring
currentPeriodStartstring,null (date-time)
currentPeriodEndstring,null (date-time)
post/v1/billing/subscriptions/{businessId}/change-tier

Change a Business's subscription tier

Parameters

businessIdpathrequired
optional

Request body

FieldTypeRequired
tierSANDBOX | STARTER | GROWTH | ENTERPRISEyes

Response (201)

FieldTypeRequired
idstring (uuid)
businessIdstring (uuid)
tierSANDBOX | STARTER | GROWTH | ENTERPRISE
stripeSubscriptionIdstringnull
stripeCustomerIdstringnull
statusstring
currentPeriodStartstring,null (date-time)
currentPeriodEndstring,null (date-time)
post/v1/billing/subscriptions/{businessId}/cancel

Cancel a Business's subscription

Parameters

businessIdpathrequired
optional

Response (201)

FieldTypeRequired
idstring (uuid)
businessIdstring (uuid)
tierSANDBOX | STARTER | GROWTH | ENTERPRISE
stripeSubscriptionIdstringnull
stripeCustomerIdstringnull
statusstring
currentPeriodStartstring,null (date-time)
currentPeriodEndstring,null (date-time)
post/v1/billing/usage

Record a metered usage event for a merchant (internal — called by other services, not typically by merchants directly)

Request body

FieldTypeRequired
merchantIdstring (uuid)yes
eventTypeLISTING_SYNC | SEARCH | OFFER | TRADE_SESSION | WEBHOOK_DELIVERY | CHECKOUT_ORCHESTRATIONyes
scopeINTRA_MERCHANT | CROSS_MERCHANTyes
quantityinteger
get/v1/billing/usage/{businessId}

A Business's current (or specified) billing-period metered usage, aggregated across every Merchant linked to it, including the cross-merchant multiplier breakdown and priced overage per event type. See docs/business/pricing.md.

Parameters

businessIdpathrequired
billingPeriodRefqueryoptional

Response (200)

FieldTypeRequired
businessIdstring (uuid)
merchantIdsstring[]
tierSANDBOX | STARTER | GROWTH | ENTERPRISE
billingPeriodRefstring
basePriceUsdnumbernull
lineItemsobject[]
totalOverageUsdnumber
get/v1/billing/statements/{businessId}

Consolidated Business billing statement — merchantPlan (owed) and spaceEarnings (already paid out, net of commission) as two separate sections, never merged into one number. See docs/business/conflict-resolution-log.md item 20.

Parameters

businessIdpathrequired
billingPeriodRefqueryoptional

Response (200)

FieldTypeRequired
businessIdstring (uuid)
merchantPlanUsageSummary
spaceEarningsobject