Concepts

The nouns Parka uses

These are the words the API, the CLI and the MCP server use. They come from the Parka domain model, not from marketing.

Vocabulary

Workspace
One isolated tenant. A workspace owns its programs, partners, links, coupons and ledger. A record belongs to exactly one workspace, and nothing crosses that line. Postgres row level security repeats the check below the code.
Program
One partner offering inside a workspace. A program carries its own rulebook, its own attribution window and its own partners. Create it with ticket4:createProgram.
Rulebook version
The commission terms of one program, in effect from a stated instant. Each version is immutable once active. It names a rounding mode, a recurring duration, a hold period and an approval mode, plus one or more rules. An agent drafts a version. A person activates it.
Rule
One named term inside a rulebook version. A rate rule pays a share of the collected basis in basis points. A flat rule pays a fixed amount on the first qualifying conversion. A milestone rule pays a bonus once a partner first reaches a threshold.
Partner relationship
One creator record joined to one program in the same workspace. An invitation creates it as pending. Onboarding fills in the contact and payout details. A terms acceptance activates it. Its id is relationship:<programId>:<creatorRecordId>.
Referral link
A URL owned by one partner relationship and scoped to one product. A click is recorded as a referral touch. The referral code rides the Stripe checkout, so a renewal stays with the same partner. A coupon is the same idea with a code instead of a URL.
Attribution claim
The decision about which partner a payment belongs to. The first qualifying partner touch wins inside the program window. The default window is 90 days. Only direct sale evidence, or a CRM opportunity that predates that first touch, overrides it.
Ledger entry
One immutable record of what a payment owes a partner. A commission entry has the id commission:<stripeEventId>. Entries are appended and never edited. The application database role holds no DELETE on the record table.
Correction
An appended entry that adjusts an earlier commission. A refund writes a refund correction. A payment that falls outside the recurring duration writes a duration correction. An operator can append a manual correction. Nothing edits the original entry.
Hold
A recorded reason that Parka posted nothing. A hold carries the source event id and a reason such as a refund for a payment Parka has not seen. The runtime also holds a Stripe event whose referral code is missing, unknown, revoked or ambiguous, before any ledger write.
Approval request
The record an agent call to a human gate creates. It binds one workspace, one capability and one frozen input, and it runs nothing. Only a person approves or rejects it. Approval runs the stored call as the approving person.
Cutover
The one commit that turns a workspace from shadow mode into the system of record. Until a person commits the cutover, the mode reads shadow and no Parka figure reaches a partner. After it, the mode reads system_of_record. The commit is a human gate.

How they fit together

A workspace holds programs. A program holds a rulebook and its partners. A partner relationship holds links and coupons. A Stripe payment arrives, attribution picks the partner, the rulebook decides the amount and the ledger records one entry. A person approves the entry, pays the partner and records the receipt.

Partner programs on Stripe, run by agents. People approve the money.

Get started