> For the complete documentation index, see [llms.txt](https://timechain.gitbook.io/neucron/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://timechain.gitbook.io/neucron/payments/bills-payouts-and-approvals.md).

# Bills, Payouts & Approvals

Neucron gives your business a complete accounts payable stack: you onboard vendors, record bills against them, and pay out immediately or on a schedule. Every payout runs through a **policy engine** you control: amount thresholds, role-based approvers, quorum approvals, and amount-dependent MFA.

## The AP lifecycle

```mermaid
flowchart LR
    V[Vendor] --> B[Bill] --> P[Payout]
    P -->|below thresholds| E[Executed]
    P -->|needs review| I[Intent created]
    I -->|MFA + approvals collected| E
    P -->|scheduled_at| S[Scheduled]
    S -->|at due time| I
```

1. **Create a vendor.** Vendors are your payees: suppliers, contractors, partners. You can invite a vendor to confirm their details, and suspend vendors when needed.
2. **Create a bill.** A bill records what you owe, to whom, and in which asset and amount. Bills move through review and confirmation states, so AP teams can separate bill entry from bill approval.
3. **Pay out.** A payout settles a bill (or pays an ad-hoc destination) from a business wallet. Payouts can be **immediate** or **scheduled** for automatic execution at a future time.

```typescript
const { data } = await sdk.payout.createPayout({
  businessId: 'biz_abc123',
  payload: {
    wallet_id: 'wal_treasury',
    amount_in_fiat: 4800,
    currency: 'USD',
    asset_id: 'asset_usdc_eth',
    paymail: 'vendor@supplier.com',
    scheduled_at: '2026-08-01T09:00:00Z', // omit for immediate
    meta: { note: 'July invoice #1042' },
  },
});
```

Destinations are flexible: a blockchain address, a paymail, an email, or another wallet. Amounts can be specified in fiat (`amount_in_fiat` + `currency`) with the platform handling conversion to the chosen asset.

## The policy engine

Policies are business-scoped rules, evaluated whenever money moves. Each policy has a **key** (what kind of control) and a **scope** (`TRANSFER` for outgoing, `RECEIVE` for incoming):

| Policy key          | What it controls                                           |
| ------------------- | ---------------------------------------------------------- |
| `APPROVAL`          | Who must approve, per amount band                          |
| `MFA`               | Which authentication factors are required, per amount band |
| `AD_HOC`            | Whether ad-hoc sends are allowed, with per-asset limits    |
| `VELOCITY`          | Caps on total outgoing volume and transfer counts          |
| `TIME_LOCATION`     | Quiet hours, allowed days, allowed countries and IP ranges |
| `WHITELIST_ADDRESS` | Pre-approved destination addresses per rail                |
| `COOLING`           | Cooling-off delays before execution                        |
| `MEMBER_RULE`       | Which members may initiate which actions                   |
| `WALLET_CONFIG`     | Per-wallet payment-link and asset whitelist settings       |

### Approval rules: thresholds, roles, and quorums

An approval rule says: **for payouts between `min_amount` and `max_amount` in a currency, require `any_count` approvals from these members and/or roles.** Rules stack into bands, so control scales with size:

```json
{
  "key": "APPROVAL",
  "scope": "TRANSFER",
  "config": {
    "rules": [
      { "currency": "USD", "min_amount": 0, "max_amount": 1000, "any_count": 0 },
      { "currency": "USD", "min_amount": 1000, "max_amount": 10000, "any_count": 1, "role_ids": ["role_finance"] },
      { "currency": "USD", "min_amount": 10000, "any_count": 2, "member_ids": ["mem_cfo", "mem_controller"] }
    ]
  }
}
```

Reading the bands: under $1,000 executes without approval; $1,000 to $10,000 needs any one approver from the finance role; above $10,000 needs two named executives.

### Amount-dependent MFA

MFA rules follow the same banding: below a threshold a session token is enough, above it additional factors (OTP, passkey) must be presented before the payout releases.

```json
{
  "key": "MFA",
  "scope": "TRANSFER",
  "config": {
    "rules": [
      { "label": "standard", "currency": "USD", "min_amount": 0, "max_amount": 5000, "methods": [] },
      { "label": "elevated", "currency": "USD", "min_amount": 5000, "methods": ["otp", "passkey"] }
    ]
  }
}
```

## Intents: how gated payouts execute

When a payout (or any gated action) trips a policy, Neucron creates an **intent**: a pending authorization that accumulates the required proofs until it can release.

```mermaid
stateDiagram-v2
    [*] --> Pending: intent created
    Pending --> MfaGate: MFA required
    MfaGate --> ApprovalGate: factors satisfied
    Pending --> ApprovalGate: no MFA band
    ApprovalGate --> Released: any_count approvals collected
    Pending --> Released: no gates
    ApprovalGate --> Expired: expires_at reached
    Released --> [*]: payout triggered on-chain
```

* Approvers act through `POST /v1/intent/{intentId}/authorize`; anyone with visibility can poll `GET /v1/intent/{intentId}` for state, and `GET /v1/intent/approvals` lists pending approvals for the business.
* Intents carry `release_at` and `expires_at`, so scheduled payouts and stale approvals are handled by the same mechanism.
* Because policies are enforced at the API layer, the same gates apply whether a human, your backend, an [app](https://timechain.gitbook.io/neucron/core-concepts/apps-and-whitelabel), or an [agent](https://timechain.gitbook.io/neucron/core-concepts/agentic-wallets) initiates the payout.

## Scheduling and automation

* Pass `scheduled_at` to defer execution; the payout fires automatically at the scheduled time once its gates clear.
* Apps can request payouts on the business's behalf with their app secret, subject to their permissions and the same policy engine, which is how [agentic AP automation](https://timechain.gitbook.io/neucron/core-concepts/agentic-wallets) stays safe.
* Use `POST /v1/payout/preview` to dry-run a payout and see its gates before committing.

## For individuals

Individuals do not need the AP stack. From a personal wallet you can **hold, transfer, receive, make payouts, and share a collection link** to get paid. Policies, approvals, vendors, and bills are business capabilities.

{% hint style="info" %}
**Design principle:** approvals are not a UI nicety layered on top. They are the same policy engine for every actor, enforced server-side, with a full audit trail of who approved what, when, and under which rule.
{% endhint %}
