Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.crypto.westminister.tech/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Merchants can run large bank OTC deposits through a draft → quote → submit flow instead of a single POST /api/v1/auth/otc/deposits call. Status values include draft, priced, pending (awaiting officer review), then confirmed, rejected, or credited.

Flow

  1. Draft (Tab 1). POST /api/v1/auth/otc/deposits/draft creates draft. Optional Idempotency-Key header or body idempotency_key (max 128 characters) enables safe retries. A duplicate key returns 200 with idempotent_replay: true.
  2. Quote (Tab 2). PATCH /api/v1/auth/otc/deposits/{id}/quote attaches pricing_profile_id, fx_rate_quote_id, and requested asset/network/amount. Moves draft → priced.
  3. Submit (Tab 3). POST /api/v1/auth/otc/deposits/{id}/submit with payment_reference, transfer_date, and proof (URL or file hash after upload). Moves priced → pending and emits webhook events when configured.
  4. Proof PDF. POST /api/v1/auth/otc/deposits/{id}/proof accepts multipart/form-data field file (PDF). Max size follows server OTC_PROOF_MAX_BYTES (often 10MB). Allowed while status is draft, priced, or pending.
  5. Officers. Admins may POST .../assign with assignee_user_id. Officers use POST .../claim when unassigned. Admin or otc_officer may confirm, reject, and use pending queues.
  6. Settlement. After credit and multisig progress, GET .../settlement returns the deposit, optional transfer, and latest otc_credit multisig proposal.
  7. Audit. GET .../audit lists audit rows. Merchants see their own deposit. Admin and otc_officer see full history.

Webhooks

When OTC_EVENTS_WEBHOOK_URL is set, events such as otc.deposit.submitted_for_review, otc.deposit.proof_attached, and otc.deposit.settlement_completed may be delivered. Optional OTC_EVENTS_WEBHOOK_SECRET sets an HMAC header on outbound requests. Proof uploads are limited by OTC_PROOF_MAX_BYTES (default 10485760, server-enforced between 1KB and 50MB).