Skip to content
All features
commercepackages/commerce/contracts

contracts package

Cross-package event, identity, billing, and notification type contracts. The shared TypeScript boundary that lets commerce talk to iam, queue, webhooks.

Open docs
Stability
Stable
Scope
Tenant-scoped
Boundary
packages/commerce/contracts
contracts
System of record
Typed event contracts
Event typePayload schemaStatus
invoice.paidInvoicePaidV2Stable
subscription.createdSubscriptionV3Stable
subscription.canceledSubscriptionV3Stable
checkout.expiredCheckoutV1Beta

Total volume

$1.24M

Active records

8,472

MoM growth

+8.4%

Success rate

99.6%

packages/commerce/contracts·commercial record
Usagecontracts.ts
typescript
contracts.ts
1import type { BillingEvent, IdentityEvent } from "@nebutra/contracts";
2
3// Cross-package contracts — TypeScript-validated event shapes.
4function onBilling(event: BillingEvent) {
5  if (event.type === "subscription.canceled") {
6    revokeAccess(event.payload.tenantId);
7  }
8}