Skip to content

Billing

Bills every confirmed order and renewal through Stripe, retries failed cards on the dunning schedule, and sends every receipt and card note.

File convention
agents/finance/billing-specialist.mdx
Noun
Role
Invoice.collect
You, to your agent

Collect Northgate’s open Invoice from its saved card, and show me the retry plan first.

curl -X POST "https://api.sb/leaseline.app/invoices/collect?mode=try" \
  -H "Authorization: Bearer $SB_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"invoice":"invoices/northgate-2026-11"}'
npx startup-builder do Invoice.collect --try --data '{"invoice":"invoices/northgate-2026-11"}'
{
  "name": "do",
  "arguments": {
    "mode": "try",
    "code": "return await $.Invoice.collect({ invoice: 'invoices/northgate-2026-11' })"
  }
}
import { $ } from 'startup-builder'

const result = await $.try.Invoice.collect({ invoice: 'invoices/northgate-2026-11' })
Response
{
  "mode": "try",
  "stored": false,
  "invoice": {
    "$id": "invoices/northgate-2026-11",
    "amount": {
      "amount": 149,
      "currency": "USD"
    },
    "status": "open",
    "retries": [
      "2026-11-17",
      "2026-11-20",
      "2026-11-24"
    ]
  }
}
Try mode reads, stores nothing and spends nothingAPI referenceIts Nouns

Responsibilities

  • Bills each invoice through Stripe when an order is confirmed or a subscription renews.
  • Retries failed payments on the dunning schedule, with a card-update note before each retry.
  • Refunds within its limit and opens an approval for anything above it.
  • Sends every receipt and invoice notice within one business day of the charge.

Verbs

VerbObjectEvent
Invoice.billInvoiceInvoice.billed
Invoice.collectInvoiceInvoice.collected
Order.refundOrderOrder.refunded
Subscription.pauseSubscriptionSubscription.paused
Subscription.resumeSubscriptionSubscription.resumed
Message.scheduleMessageMessage.scheduled

Role contract

PartThis seat
PurposeBill every finished piece of work, and collect every bill.
ResultsDays sales outstanding; Failed payments recovered
TargetAt least half of failed payments recovered within 21 days, read at 20 failures, and every invoice sent within 1 business day of the work (Planning estimate).
StandardsSends every invoice within one business day of the work being done. Answers every billing question within one business day.
LimitsOrder.refund up to $100 a refund (the hub Billing Specialist’s limit), through Stripe
ScheduleDaily
Channelsemail
Also calledBilling Manager, Collections Specialist
Filled byA role agent, from the start; Stripe holds the cards and the money.

Hands off to

  • CSM: A subscription turns past due, or an invoice goes overdue: the save comes before any other ask.

Processes owned

Billing · Trials and plan changes · Dunning

Metrics

Days sales outstanding

Approvals

You see the plan and its price before anything runs. Sends and posts go out within the limits you set; one approval rule on a class such as send makes every action in it wait for you, and going over a limit always asks.

It asks youWhenAnswered by
Refund past its limitA refund above the seat’s Order.refund limitYou
Void an invoiceEvery void, after a one-business-hour delay windowYou

Each class and its default amount: the hub’s approvals page.

Works with

It trades hand-offs with CSM and Head of customers.

Example

Northgate Rentals’ card fails on renewal day. The agent sends a card-update note that morning, retries on day 3 as the dunning schedule says, and the charge clears before anyone has to ask twice.

Contents