GardenKit

The billing SDK behind Planter.

GardenKit is the typed SDK for Garden billing — checkout, usage metering, invoices, payment methods, addresses, and signed webhooks. Planter is its drop-in UI layer: everything the SDK exposes, rendered as one mountable drawer.

The surface

Ten calls. Complete billing.

garden.checkout.create(...)

Hosted or embedded checkout sessions.

garden.portal.link(...)

Signed link to the customer billing portal.

garden.usage.ingest(...)

Record usage events, idempotency-keyed.

garden.meter.ingest(...)

Push metered quantities per platform.

garden.meters.listForCustomer(...)

Read live meters + included/limit.

garden.invoices.list(...)

Invoices with platform-attributed lines.

garden.paymentMethods.list(...)

Account-shared cards, bank, crypto.

garden.addresses.upsert(...)

Billing address + tax IDs.

garden.webhooks.verify(...)

Verify signed event envelopes.

garden.webhooks.route(...)

Route events to your handlers.

Quickstart

Meter, bill, and get paid.

Idempotent everywhere. Typed end to end. The same contract Planter renders.

import { createGarden } from "@l1fe/garden";

const garden = createGarden({ platformId: "hives" });

// Meter usage as it happens
await garden.meter.ingest({
  key: "hives.flight.invocation",
  quantity: 1,
  dimensions: { region: "us-east", flight: "buzz-worker" },
});

// Open embedded checkout for an open invoice
const session = await garden.checkout.create({
  invoiceId: "in_207",
  mode: "embedded",
});
// Signed, replay-safe events from Vine
export async function POST(req: Request) {
  const event = await garden.webhooks.verify(req);

  await garden.webhooks.route(event, {
    "invoice.paid":           onPaid,
    "invoice.payment_failed": onFailed,
    "usage.threshold":        onThreshold,
  });

  return new Response(null, { status: 204 });
}
The UI layer

Planter is GardenKit, mounted.

Everything above — rendered. Drop <GardenPlanter /> into any platform and the SDK’s data becomes a premium billing drawer, scoped and themed automatically.

Platform scope · Hives
H

Hives

Atlas Labs · billing

Past due

Billing by Garden

HivesPlatform scope

Spend this period

$4,980.20

Projected invoice

$5,410.00

Next: Jul 1, 2026

Recent activity

Jun 9, 02:14Payment failed · Amex 1005 · insufficient funds
$9,134.20
Jun 8, 09:00Invoice GRD-2026-207 finalized
$9,134.20
Jun 7, 18:30Usage threshold 100% · Foundry output tokens
May 8, 09:10Payment succeeded · Visa 4242
$7,920.10
May 2, 11:22Payment method added · ACH Mercury
External tenant · custom brand
N

Northstar API

Northstar API · billing

Trialing

Powered by Garden

Northstar APIPlatform scope

Spend this period

$1,290.00

Projected invoice

$2,140.00

Next: Jul 1, 2026

Recent activity

Jun 12, 10:02Usage threshold 90% · Compute
Jun 1, 00:04Invoice NS-2026-012 finalized
$2,140.00

Powered by Garden

Install

Add GardenKit to any stack.

bun add @l1fe/garden
import "@l1fe/garden/planter.css";
import { GardenPlanter } from "@l1fe/garden/planter";
import {
  createGardenPlanterData,
  createPlanterCheckoutSession,
} from "@l1fe/garden/planter/server";
Build on Garden

The SDK and the UI. Both, today.

GardenKit for the contract. Planter for the surface. Ship billing in an afternoon.