Transaction commands: attach, categorize, reconcile
The Transaction Verbs attach, categorize, reconcile as CLI commands, with inputs, result, refusals and an example.
Reference for Transaction, one group of Transaction commands.
Transaction.attach
Attach matches a receipt File to a card Transaction, or flags the Transaction when no receipt arrives in time. Verb page.
npx startup-builder do Transaction.attach --json '<input>' [--try | --send | --do]Emits Transaction.attached.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
transaction | Transaction | required | The card Transaction. |
file | File | The receipt; empty to match from the Startup’s Mailboxes. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
transaction | Transaction | required | The Transaction with its receipt. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
npx startup-builder do Transaction.attach --json '{"transaction": "txn_XoxtZe3CQI"}'Transaction.categorize
Categorize codes a Transaction to an account in the chart by the Startup’s Policy and flags a low-confidence code for review. Verb page.
npx startup-builder do Transaction.categorize --json '<input>' [--try | --send | --do]Emits Transaction.categorized.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
transaction | Transaction | required | The Transaction to code. |
account | string | The account code to use in place of the Policy’s choice. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
transaction | Transaction | required | The coded Transaction. |
account | string | required | The account code it was coded to. |
confidence | number | required | How sure the code is, from 0 to 1. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
npx startup-builder do Transaction.categorize --json '{"transaction": "txn_XoxtZe3CQI"}'Transaction.reconcile
Reconcile matches a Transaction on a payment rail to the ledger Entries it settles. Verb page.
npx startup-builder do Transaction.reconcile --json '<input>' [--try | --send | --do]Emits Transaction.reconciled.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
transaction | Transaction | required | The Transaction to match. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
transaction | Transaction | required | The reconciled Transaction. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
| The record is not in a state that allows this Verb, so the call is refused. | refused | Read the record, run the Verb that moves it to an allowed state, then retry. | None. |
Example
npx startup-builder do Transaction.reconcile --json '{"transaction": "txn_XoxtZe3CQI"}'