Skip to main content
Docs

Stages

A stage is one planned payment out, with the conditions it needs and the evidence it requires. The payee submits a stage; the payer approves it (or the agreed rule approves it after the silent days the terms name). Approval creates a release automatically. You create one by hand only after a partial close.

The base is https://holdyn-fb2e34c7cbae.herokuapp.com/api/v1/b2b. Every endpoint below lists who may call it.

At a glance#

Objects

Stage

Stage (example values)
{
  "id": "stg_6543a1b2c3d4e5f6a7b8cd01",
  "object": "stage",
  "livemode": false,
  "mandate": "man_6543a1b2c3d4e5f6a7b8cc00",
  "sequence": 2,
  "spec_id": "s2",
  "label": "Materials delivered and tear-off",
  "description": "",
  "amount": 500000,
  "currency": "usd",
  "is_deposit": false,
  "is_completion": false,
  "retained": null,
  "conditions": [
    { "id": "payer_approval", "kind": "term", "enabled": true, "params": {}, "overridable": false },
    { "id": "payee_bank_cooling", "kind": "control", "enabled": true, "params": { "days": 3 }, "overridable": true }
  ],
  "evidence_requirements": [
    { "type": "photo", "label": "Photos", "min_count": 3, "reviewer": "payer", "submitted_count": 3, "accepted_count": 0, "rejected_count": 0 },
    { "type": "delivery_note", "label": "Delivery note", "min_count": 1, "reviewer": "payer", "submitted_count": 1, "accepted_count": 0, "rejected_count": 0 }
  ],
  "expected_date": "2026-11-25",
  "overdue": false,
  "status": "submitted",
  "close_reason": null,
  "opened_at": "2026-11-04T09:00:31.000Z",
  "opened_cause": "previous_approved",
  "submitted_at": "2026-11-20T16:00:00.000Z",
  "submitted_by": { "type": "party", "id": "pty_6543a1b2c3d4e5f6a7b8cb00", "role": "payee" },
  "approval": {
    "via": null, "approved_at": null, "approved_by": null, "evidence": [],
    "auto_approve_at": "2026-11-25T16:00:05.000Z",
    "rule": { "days": 5, "terms_hash": "a3f9…64 hex", "window_start": "2026-11-20T16:00:05.000Z", "window_end": "2026-11-25T16:00:05.000Z", "notice_ids": ["ntf_6543a1b2c3d4e5f6a7b8cf20"] },
    "notice": { "requested_notification": "ntf_6543a1b2c3d4e5f6a7b8cf20", "requested_sent_at": "2026-11-20T16:00:05.000Z", "requested_status": "delivered", "reminder_ids": [], "blocked_reason": null, "restarted_at": null }
  },
  "change_requests": { "used": 0, "limit": 2, "items": [] },
  "covering_disputes": [],
  "released_amount": 0,
  "in_flight_amount": 0,
  "refunded_amount": 0,
  "reversed_amount": 0,
  "remaining_amount": 500000,
  "funding": { "held_amount": 0, "clearing_amount": 500000, "clearing_expected_on": "2026-11-21", "not_yet_collected_amount": 0, "fully_held": false },
  "on_approval_triggers": [],
  "release": null,
  "dispute": null,
  "held": false,
  "holds": [],
  "evidence": null,
  "next_actions": [
    { "action": "approve", "actor": "payer", "allowed": false, "blocked_reason": "party_action", "due_at": null },
    { "action": "auto_approve", "actor": "system", "allowed": false, "blocked_reason": null, "due_at": "2026-11-25T16:00:05.000Z" }
  ],
  "created_at": "2026-11-03T09:50:00.000Z",
  "updated_at": "2026-11-20T16:00:05.000Z"
}

Endpoints

GET/stages

Credential
Member session or API key
Permission
mandates.read
API key scope
mandates:read
Mode
scoped
Pagination
cursor

Request

mandate, status (multi), overdue boolean, auto_approval_blocked boolean, expand[] ∈ evidence, release, dispute.

Response

200 ListResponse<Stage>.

GET/stages/:id

Credential
Member session or API key
Permission
mandates.read
API key scope
mandates:read
Mode
scoped

Request

expand[] (default evidence). · Response: 200 Stage.

POST/stages/:id/request-changes

Credential
Member session
Permission
evidence.review
Mode
scoped
Idempotency
honoured

Request

reason string required (10–1000).

Response

200 Stage (submitted → open; auto-approval cleared; payee notified).

Errors

409 invalid_state_transition (not submitted, or no requirement of this stage has a member reviewer).

Record and events

stage.changes_requested · Events: stage.changes_requested.

Notes

member reviewer requests are listed in change_requests but do not consume the payer's max_change_requests_per_stage allowance (the limit protects the payee against a payer delaying payment).

POST/stages/:id/submitNot available yet

This route answers 422 feature_not_available until it ships.

Credential
Member session or API key
Permission
evidence.upload
API key scope
evidence:write
Mode
scoped
Idempotency
honoured

Request

attestation object required: {party_session_reference (≤ 200), attested_at, method: "tenant_app", note?}.

Response

200 Stage; recorded as tenant-attested (actor: api_key|member, data.attestedFor: "payee"), never as party-direct.

POST/stages/:id/releases

Credential
Member session
Permission
releases.retry
Mode
scoped
Idempotency
honoured, recommended

Request

none.

Response

201 Release (amount = the stage's remaining amount computed from allocations; first gate evaluation already run).

Errors

409 invalid_state_transition (stage not approved, or a live release exists: activeStageKey unique).

Record and events

release.created, release.gate_evaluated · Events: release.created (+ status event).

Notes

needed only after a close_partial (once the payee's account is fixed); normal releases are created automatically when a stage is approved, and a member cancel of a failed release restarts it at once.

Stages · Holdyn Business docs