> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polygon.technology/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a Deposit Address

> Update a Deposit Address. The patchable fields are `destination`
(re-point to a different bank-type External Account), `returnDestination`,
`label`, and `metadata`; any other JSON key in the body is rejected with 400.
Re-pointing `destination` to a healthy bank External Account recovers a DA
from `inactiveActionRequired` back to `active`.



## OpenAPI

````yaml /api-reference/openapi.yaml patch /deposit-addresses/{depositAddressId}
openapi: 3.0.3
info:
  title: Polygon OMS Public API
  version: v26.05.28-0001
  description: >-
    Unified API for moving money between crypto and fiat. Three ways to move
    money: Transactions (instant, wallet or card funded, including Cash-In for
    in-person cash deposits), Deposit Addresses (reusable crypto deposit
    configurations), and Virtual Accounts (dedicated bank accounts that
    auto-convert fiat to crypto). Standard transactions follow a two-step flow:
    create a Quote (pricing), then create a Transaction (execution). Cash-in
    codes generate a one-time deposit code for in-person cash deposits at retail
    locations.
  contact:
    name: Polygon OMS
    url: https://oms.polygon.technology
servers:
  - url: https://sandbox-api.polygon.technology/v0.12
    description: Sandbox
  - url: https://api.polygon.technology/v0.12
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Auth
    description: Authentication via FrontEgg
  - name: Customers
    description: Customer management and KYC
  - name: Customer
  - name: Wallet
  - name: Quote
  - name: Transaction
  - name: CashIns
  - name: CashLocation
  - name: Sandbox
  - name: VirtualAccount
  - name: Counterparty
  - name: ExternalAccount
  - name: Reference
  - name: DepositAddress
paths:
  /deposit-addresses/{depositAddressId}:
    patch:
      tags:
        - DepositAddress
      summary: Update a Deposit Address
      description: >-
        Update a Deposit Address. The patchable fields are `destination`

        (re-point to a different bank-type External Account),
        `returnDestination`,

        `label`, and `metadata`; any other JSON key in the body is rejected with
        400.

        Re-pointing `destination` to a healthy bank External Account recovers a
        DA

        from `inactiveActionRequired` back to `active`.
      operationId: updateDepositAddress
      parameters:
        - name: depositAddressId
          in: path
          required: true
          description: Deposit Address ID (`da_` prefix).
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DepositAddressUpdateRequest'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DepositAddress'
components:
  schemas:
    DepositAddressUpdateRequest:
      type: object
      properties:
        destination:
          allOf:
            - $ref: '#/components/schemas/DepositAddressDestinationRequest'
          description: >-
            Re-point the DA destination (bank-type External Account by EA id, a

            registered walletExternal crypto wallet, or a walletFiat fiat
            wallet).

            Re-validated exactly like create; walletCrypto is NOT currently
            supported —

            422 destinationWalletCryptoNotSupported. Switching between
            destination kinds

            (bank / cryptoWallet / walletFiat) involving walletFiat is rejected
            with

            422 destinationTypeSwitchNotSupported.
        returnDestination:
          allOf:
            - $ref: '#/components/schemas/CryptoReturnDestination'
          description: >-
            Re-point the registered crypto return destination (v0.11-8).
            PATCHable per

            the v0.11-8 contract; send explicit `null` to clear.
        sponsorGas:
          type: boolean
          description: |-
            When `true`, OMS absorbs the on-chain gas cost for the destination
            delivery. Only `true` is currently supported; accepted for
            forward-compatibility.
          default: true
        label:
          type: string
          description: Partner display label.
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Free-form key-value pairs stored on the resource and echoed back on
            reads.
      description: >-
        Partial update payload for a Deposit Address. The patchable fields are

        `destination` (re-point to a different bank-type External Account),
        `returnDestination`,

        `label`, and `metadata`. Any additional key in the JSON body is rejected
        with 400 by

        the handler (strict whitelist).


        Re-pointing `destination` to a healthy bank External Account recovers a
        DA

        from `inactiveActionRequired` back to `active`; a re-point on an

        already `active` DA updates the target without a status transition.
    DepositAddress:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/typeId'
          description: Deposit Address ID (`da_` prefix).
        object:
          type: string
          enum:
            - depositAddress
          description: Resource type discriminator. Always "depositAddress".
        customerId:
          allOf:
            - $ref: '#/components/schemas/typeId'
          description: >-
            Public customer id (cst_...). Named customerId to match VA's naming
            convention.
        customer:
          allOf:
            - $ref: '#/components/schemas/CustomerSummary'
          description: |-
            Resolved id + display name of the owning customer, so list/detail
            rendering needs no follow-up customer fetch (v0.12, #2665).
        status:
          allOf:
            - $ref: '#/components/schemas/DepositAddressStatus'
          description: Current lifecycle status of the deposit address.
        statusReason:
          type: string
          description: Human-readable explanation of the current status.
        expectedSourceAsset:
          type: string
          description: Asset of the inbound crypto the DA expects.
        expectedSourceNetwork:
          allOf:
            - $ref: '#/components/schemas/CryptoNetwork'
          description: Network of the inbound crypto the DA expects.
        depositInstructions:
          allOf:
            - $ref: '#/components/schemas/DepositAddressDepositInstructions'
          description: >-
            Null in the 201 until DEPOSIT_ACCOUNT.OPEN populates the
            Erebor-owned inlet

            address.
        destination:
          allOf:
            - $ref: '#/components/schemas/TransactionDestination'
          description: >-
            V0.10: unified destination shape (payoutOrigin now lives inside
            TransactionDestination).
        returnDestination:
          allOf:
            - $ref: '#/components/schemas/CryptoReturnDestination'
          description: Registered crypto return destination (v0.11-8), echoed when set.
        failureReason:
          allOf:
            - $ref: '#/components/schemas/DepositAddressFailureReason'
          description: >-
            Set when status = `failed`; closed enum identifying the failure
            category.
        sourceToDestination:
          allOf:
            - $ref: '#/components/schemas/SourceToDestination'
          description: |-
            Derived from the destination type: `cryptoToFiatAccount` for a bank
            destination, or `cryptoToCrypto` for a crypto-wallet destination.
        sponsorGas:
          type: boolean
          description: >-
            Whether OMS absorbs the on-chain gas cost for the destination
            delivery.

            Persisted from the create/update request (currently only `true` is

            accepted).
        label:
          type: string
          description: Partner display label.
        metadata:
          type: object
          additionalProperties:
            type: string
          description: Free-form key-value pairs supplied at creation or update.
        createdAt:
          type: string
          format: date-time
          description: When the deposit address was created.
        updatedAt:
          type: string
          format: date-time
          description: When the deposit address was last updated.
      description: >-
        A reusable crypto deposit configuration. Senders deposit the expected

        asset/network to the assigned on-chain address; OMS converts and
        delivers the

        funds to the configured bank destination automatically, creating a

        transaction per inbound deposit.
    DepositAddressDestinationRequest:
      type: object
      oneOf:
        - $ref: '#/components/schemas/BankUsSideRequest'
        - $ref: '#/components/schemas/BankIbanSideRequest'
        - $ref: '#/components/schemas/BankCanadaSideRequest'
        - $ref: '#/components/schemas/WalletCryptoSideRequest'
        - $ref: '#/components/schemas/WalletExternalRegisteredSideRequest'
        - $ref: '#/components/schemas/WalletFiatDestinationRequest'
      discriminator:
        propertyName: type
        mapping:
          bankUs:
            $ref: '#/components/schemas/BankUsSideRequest'
          bankIban:
            $ref: '#/components/schemas/BankIbanSideRequest'
          bankCanada:
            $ref: '#/components/schemas/BankCanadaSideRequest'
          walletCrypto:
            $ref: '#/components/schemas/WalletCryptoSideRequest'
          walletExternal:
            $ref: '#/components/schemas/WalletExternalRegisteredSideRequest'
          walletFiat:
            $ref: '#/components/schemas/WalletFiatDestinationRequest'
      description: >-
        Deposit Address destination — where converted funds are delivered, on
        the

        shared discriminated side shape.


        Fiat arms (`bankUs` / `bankIban` / `bankCanada`) deliver to a registered

        bank-type External Account (`cryptoToFiatAccount`). The `walletExternal`

        crypto arm delivers crypto onward to a registered wallet
        (`cryptoToCrypto`),

        gated by the routes table to Erebor-serviceable networks

        (ethereum/base/solana — Polygon is rejected). `walletExternal` is

        registered-only (`ext_wlt_` EA id; raw blockchainAddress stays
        Cash-In-only).


        `walletCrypto` is declared but NOT currently supported as a destination:
        it is

        rejected with 422 `destinationWalletCryptoNotSupported`. Use
        `walletExternal`

        for externally-held wallets. (Planned to return for non-custodial
        wallets in

        v0.12.)


        The `walletFiat` arm (v0.12) delivers converted fiat into the customer's
        own

        Erebor fiat wallet via an internal book transfer (`cryptoToFiatAccount`;
        the

        resolved destination instrument reads `network: bookTransfer`). The
        wallet

        must belong to the DA's customer (422 `walletCustomerMismatch`), be
        `active`

        (422 `walletNotActive`), and hold `usd`; the project must have the

        `book_transfer` outgoing rail enabled (403 `destinationRailNotAllowed`).


        The reused side arms carry an optional `amount`, which is meaningless
        for a

        standing destination and rejected at validation. The server validates
        the side

        `details` (asset/network/accountHolder) against the resolved EA/wallet.
    CryptoReturnDestination:
      type: object
      required:
        - type
        - network
        - id
      properties:
        type:
          type: string
          enum:
            - walletCrypto
            - walletExternal
        network:
          allOf:
            - $ref: '#/components/schemas/CryptoNetwork'
          description: >-
            Return network. Must equal the DA's expectedSourceNetwork for the
            return to be usable.
        id:
          type: string
          description: >-
            walletCrypto: OMS wallet id (acc_…). walletExternal: registered
            ExternalAccount id (ext_…).
      description: >-
        Registered crypto return destination for a Deposit Address (v0.11-8):
        where an

        operations-triggered return of a stranded inbound deposit is sent.
        `network` must be one of

        ethereum | base | solana; a custodial (non-multi-asset) walletCrypto
        target is rejected with

        422 returnDestinationMustBeMultiAsset. `network` is a closed
        `CryptoNetwork` enum even

        though this model also appears on response paths
        (`DepositAddress.returnDestination`,

        `RedrivableTransaction.returnDestination`); that is safe only because
        the sole writer is

        gated by `eanetworks.AllServedNetworks()`, a subset of `CryptoNetwork`,
        and that containment

        is enforced by `TestCryptoNetwork_SupersetOfServedNetworks`

        (services/externalaccount/networks/networks_test.go).
    typeId:
      type: string
      pattern: >-
        ^[a-z]+_([0-9a-hjkmnp-tv-z]{26}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$
      description: >-
        Public TypeID, e.g. `txn_01h455vb4pex5vsknk084sn02q`; legacy UUID
        suffixes are accepted until non-v7 rows are retired.
      x-go-type: string
    CustomerSummary:
      type: object
      required:
        - id
        - name
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/typeId'
          description: The OMS customer id (`cst_` prefix).
        name:
          type: string
          description: Customer display name.
      description: >-
        A minimal, resolved reference to the owning OMS customer — id plus
        display

        name, for list/detail rendering without a follow-up customer fetch

        (v0.12 list enrichment, #2665). Distinct from `Party`: this is always
        the

        record's OWNING customer (Transaction.customerId /
        VirtualAccount.customerId

        / DepositAddress.customerId), not whichever side a party sits on.
    DepositAddressStatus:
      type: string
      enum:
        - pending
        - active
        - frozen
        - closed
        - failed
        - inactiveActionRequired
      description: >-
        Lifecycle of a Deposit Address. pending: awaiting on-chain address

        assignment. active: accepting deposits. frozen: deposits held by
        compliance.

        inactiveActionRequired: destination unusable, re-point `destination` to

        recover. closed: permanently disabled. failed: provisioning failed.
    CryptoNetwork:
      type: string
      enum:
        - ethereum
        - polygon
        - base
        - solana
      description: >-
        Wire vocabulary for a crypto `network` request field: ethereum, polygon,

        base, solana. This is vocabulary, not availability — which of these a
        given

        destination type actually accepts is enforced at runtime per destination

        type against the narrower Erebor-served set, so `polygon` is legal on
        the

        wire but currently rejected wherever Erebor does not serve it. Numeric
        EVM

        chain ids (e.g. "1", "137", "8453") were never accepted by BPN — no

        chain-id-to-name coercion exists, so nothing here deprecates prior

        behavior. Values are lowercase on the wire; the server additionally

        normalizes case and surrounding whitespace on input, so this schema is

        stricter than the server in that one dimension — send lowercase,

        untrimmed-safe values to stay strictly schema-valid.


        A `network` field may be typed `CryptoNetwork` regardless of whether it

        appears on a response, as long as its sole writer is gated by

        `eanetworks.AllServedNetworks()` — a runtime-enforced subset of this
        enum,

        with the containment itself enforced by

        `TestCryptoNetwork_SupersetOfServedNetworks`

        (services/externalaccount/networks/networks_test.go). That guarantee is

        what makes the enum safe there: the value can never leave the enum's

        vocabulary no matter which code path renders it. A `network` field whose

        writer is NOT so gated stays `string` pending #2666's outbound enum
        guard —

        for such a field, a stored value outside the enum would break a strict

        partner client validator (this happened in production: #2528). `chain`

        fields are deliberately excluded too: their vocabulary is wider and

        includes `bitcoin`, which this enum does not carry.
    DepositAddressDepositInstructions:
      type: object
      required:
        - asset
        - network
        - address
      properties:
        asset:
          type: string
          description: Same value as expectedSourceAsset.
        network:
          allOf:
            - $ref: '#/components/schemas/CryptoNetwork'
          description: Same value as expectedSourceNetwork.
        address:
          type: string
          description: Erebor-owned on-chain inlet address for this DA.
        expiresAt:
          type: string
          format: date-time
          description: >-
            Placeholder for a future provider-imposed inlet expiry. Null for
            Erebor

            DDAs today; surfaced now so adding it later is not a breaking
            change.
      description: The on-chain address senders deposit to, with its asset and network.
    TransactionDestination:
      type: object
      oneOf:
        - $ref: '#/components/schemas/WalletCryptoDestination'
        - $ref: '#/components/schemas/WalletExternalDestination'
        - $ref: '#/components/schemas/WalletFiatDestination'
        - $ref: '#/components/schemas/BankUsDestination'
        - $ref: '#/components/schemas/BankIbanDestination'
        - $ref: '#/components/schemas/BankCanadaDestination'
        - $ref: '#/components/schemas/CardDestination'
        - $ref: '#/components/schemas/CashDestination'
      discriminator:
        propertyName: type
        mapping:
          walletCrypto:
            $ref: '#/components/schemas/WalletCryptoDestination'
          walletExternal:
            $ref: '#/components/schemas/WalletExternalDestination'
          walletFiat:
            $ref: '#/components/schemas/WalletFiatDestination'
          bankUs:
            $ref: '#/components/schemas/BankUsDestination'
          bankIban:
            $ref: '#/components/schemas/BankIbanDestination'
          bankCanada:
            $ref: '#/components/schemas/BankCanadaDestination'
          card:
            $ref: '#/components/schemas/CardDestination'
          cash:
            $ref: '#/components/schemas/CashDestination'
      description: >-
        The destination side of a transaction/quote (v0.10): a typed instrument
        plus

        `payoutOrigin`. Amounts live only in `pricing`.
    DepositAddressFailureReason:
      type: string
      enum:
        - provisioningTimeout
        - systemError
        - ereborRejected
        - intlBankAccountCreateRejected
        - noMatchingNetwork
        - blockchainAddressInUse
        - bankAccountInUse
      description: >-
        Closed enum carried on DA when status = "failed". camelCase per partner
        channel naming convention.
    SourceToDestination:
      type: string
      enum:
        - cryptoToCrypto
        - cryptoToCash
        - cryptoToFiatAccount
        - cashToCrypto
        - fiatAccountToCrypto
        - fiatAccountToFiatAccount
      description: >-
        Composite of source and destination instrument categories, inferred

        from each side. The cash corridors

        (`cryptoToCash`, `cashToCrypto`) are derived from a cash-pickup
        destination /

        cash-in source respectively; the rest map straight from the internal
        corridor type.
    BankUsSideRequest:
      type: object
      required:
        - type
        - details
      properties:
        type:
          type: string
          enum:
            - bankUs
          description: Type discriminator.
        details:
          $ref: '#/components/schemas/BankUsSideDetails'
        amount:
          $ref: '#/components/schemas/decimalString'
      description: Deliver to a US bank account.
      title: US bank account
    BankIbanSideRequest:
      type: object
      required:
        - type
        - details
      properties:
        type:
          type: string
          enum:
            - bankIban
          description: Type discriminator.
        details:
          $ref: '#/components/schemas/BankIbanSideDetails'
        amount:
          $ref: '#/components/schemas/decimalString'
      description: Deliver to an IBAN account over SWIFT (USD).
      title: IBAN bank account
    BankCanadaSideRequest:
      type: object
      required:
        - type
        - details
      properties:
        type:
          type: string
          enum:
            - bankCanada
          description: Type discriminator.
        details:
          $ref: '#/components/schemas/BankCanadaSideDetails'
        amount:
          $ref: '#/components/schemas/decimalString'
      description: >-
        Deliver to a Canadian bank account. USD routes over SWIFT; CAD over
        local rails.
      title: Canadian bank account
    WalletCryptoSideRequest:
      type: object
      required:
        - type
        - details
      properties:
        type:
          type: string
          enum:
            - walletCrypto
          description: Type discriminator.
        details:
          $ref: '#/components/schemas/WalletCryptoSideDetails'
        amount:
          $ref: '#/components/schemas/decimalString'
      description: Pull from / deliver to an OMS Multi-Chain Wallet owned by the customer.
      title: OMS wallet
    WalletExternalRegisteredSideRequest:
      type: object
      required:
        - type
        - details
      properties:
        type:
          type: string
          enum:
            - walletExternal
          description: Type discriminator.
        details:
          $ref: '#/components/schemas/WalletExternalRegisteredSideDetails'
        amount:
          $ref: '#/components/schemas/decimalString'
      description: >-
        Deliver to a wallet held outside OMS, by registered ExternalAccount only

        (id-only; raw addresses are not accepted). Used by Virtual Account

        destinations; the raw-address `WalletExternalSideRequest` stays
        quote/transaction-only.
      title: External wallet (registered)
    WalletFiatDestinationRequest:
      type: object
      required:
        - type
        - details
      properties:
        type:
          type: string
          enum:
            - walletFiat
          description: Type discriminator.
        details:
          $ref: '#/components/schemas/WalletFiatSideDetails'
      description: >-
        Hold the deposited value as a fiat balance in the customer's fiat wallet

        (only `usd` today). Credited by an internal book transfer at the partner

        bank — the resolved destination instrument reads `network:
        bookTransfer`.

        The wallet must belong to the route's customer (422
        `walletCustomerMismatch`)

        and be `active` (422 `walletNotActive`). Request shape per the ratified
        OMS

        v0.12 `WalletFiatDestination` schema: no `network`, no `amount`.
      title: Fiat wallet
    WalletCryptoDestination:
      type: object
      required:
        - type
        - category
        - details
        - displayName
      properties:
        party:
          allOf:
            - $ref: '#/components/schemas/Party'
          description: Structured identity of who is on this side.
        type:
          type: string
          enum:
            - walletCrypto
          description: Type discriminator.
        category:
          type: string
          enum:
            - crypto
          description: >-
            High-level grouping: `fiatAccount` for bank or card accounts,
            `crypto` for wallets.
        details:
          $ref: '#/components/schemas/WalletCryptoDetails'
        displayName:
          type: string
          description: >-
            Opaque, render-only summary of this instrument for list/detail
            display

            (v0.12, #2665) — format is not contractual and may change without a

            version bump. Never a full account number/IBAN/PAN.
        payoutOrigin:
          $ref: '#/components/schemas/PayoutOrigin'
      title: OMS wallet
    WalletExternalDestination:
      type: object
      required:
        - type
        - category
        - details
        - displayName
      properties:
        party:
          $ref: '#/components/schemas/Party'
        type:
          type: string
          enum:
            - walletExternal
          description: Type discriminator.
        category:
          type: string
          enum:
            - crypto
          description: >-
            High-level grouping: `fiatAccount` for bank or card accounts,
            `crypto` for wallets.
        details:
          $ref: '#/components/schemas/WalletExternalDetails'
        displayName:
          type: string
          description: >-
            Opaque, render-only summary of this instrument for list/detail
            display

            (v0.12, #2665) — format is not contractual and may change without a

            version bump. Never a full account number/IBAN/PAN.
        payoutOrigin:
          $ref: '#/components/schemas/PayoutOrigin'
      title: External wallet
    WalletFiatDestination:
      type: object
      required:
        - type
        - category
        - details
        - displayName
      properties:
        party:
          $ref: '#/components/schemas/Party'
        type:
          type: string
          enum:
            - walletFiat
          description: Type discriminator.
        category:
          type: string
          enum:
            - fiatAccount
          description: >-
            High-level grouping: `fiatAccount` for bank or card accounts,
            `crypto` for wallets.
        details:
          $ref: '#/components/schemas/WalletFiatInstrumentDetails'
        displayName:
          type: string
          description: >-
            Opaque, render-only summary of this instrument for list/detail
            display

            (v0.12, #2665) — format is not contractual and may change without a

            version bump. Never a full account number/IBAN/PAN.
        payoutOrigin:
          $ref: '#/components/schemas/PayoutOrigin'
      description: >-
        Fiat balance wallet destination — the wallet-as-destination projection
        used to

        render an inbound fiat-wallet deposit (design §4.2/§16, #2363).
        RENDERING

        OUTPUT ONLY: this arm exists so a settled deposit into a customer's USD
        fiat

        wallet renders `destination.walletFiat`. It does NOT re-open walletFiat
        as a

        user-SPECIFIABLE input destination — that input deferral (crediting
        VA/DA

        deposits into a wallet, design §16) still holds; only the output shape
        is

        restored here. Over-cut from Task 1 (#2340); returned for Task 10.
      title: Fiat wallet
    BankUsDestination:
      type: object
      required:
        - type
        - category
        - details
        - displayName
      properties:
        party:
          $ref: '#/components/schemas/Party'
        type:
          type: string
          enum:
            - bankUs
          description: Type discriminator.
        category:
          type: string
          enum:
            - fiatAccount
          description: >-
            High-level grouping: `fiatAccount` for bank or card accounts,
            `crypto` for wallets.
        details:
          $ref: '#/components/schemas/BankUsDetails'
        displayName:
          type: string
          description: >-
            Opaque, render-only summary of this instrument for list/detail
            display

            (v0.12, #2665) — format is not contractual and may change without a

            version bump. Never a full account number/IBAN/PAN.
        payoutOrigin:
          $ref: '#/components/schemas/PayoutOrigin'
      title: US bank account
    BankIbanDestination:
      type: object
      required:
        - type
        - category
        - details
        - displayName
      properties:
        party:
          $ref: '#/components/schemas/Party'
        type:
          type: string
          enum:
            - bankIban
          description: Type discriminator.
        category:
          type: string
          enum:
            - fiatAccount
          description: >-
            High-level grouping: `fiatAccount` for bank or card accounts,
            `crypto` for wallets.
        details:
          $ref: '#/components/schemas/BankIbanDetails'
        displayName:
          type: string
          description: >-
            Opaque, render-only summary of this instrument for list/detail
            display

            (v0.12, #2665) — format is not contractual and may change without a

            version bump. Never a full account number/IBAN/PAN.
        payoutOrigin:
          $ref: '#/components/schemas/PayoutOrigin'
      title: IBAN bank account
    BankCanadaDestination:
      type: object
      required:
        - type
        - category
        - details
        - displayName
      properties:
        party:
          $ref: '#/components/schemas/Party'
        type:
          type: string
          enum:
            - bankCanada
          description: Type discriminator.
        category:
          type: string
          enum:
            - fiatAccount
          description: >-
            High-level grouping: `fiatAccount` for bank or card accounts,
            `crypto` for wallets.
        details:
          $ref: '#/components/schemas/BankCanadaDetails'
        displayName:
          type: string
          description: >-
            Opaque, render-only summary of this instrument for list/detail
            display

            (v0.12, #2665) — format is not contractual and may change without a

            version bump. Never a full account number/IBAN/PAN.
        payoutOrigin:
          $ref: '#/components/schemas/PayoutOrigin'
      title: Canadian bank account
    CardDestination:
      type: object
      required:
        - type
        - category
        - details
        - displayName
      properties:
        party:
          $ref: '#/components/schemas/Party'
        type:
          type: string
          enum:
            - card
          description: Type discriminator.
        category:
          type: string
          enum:
            - fiatAccount
          description: >-
            High-level grouping: `fiatAccount` for bank or card accounts,
            `crypto` for wallets.
        details:
          $ref: '#/components/schemas/CardDetails'
        displayName:
          type: string
          description: >-
            Opaque, render-only summary of this instrument for list/detail
            display

            (v0.12, #2665) — format is not contractual and may change without a

            version bump. Never a full account number/IBAN/PAN.
        payoutOrigin:
          $ref: '#/components/schemas/PayoutOrigin'
      title: Card
    CashDestination:
      type: object
      required:
        - type
        - category
        - details
        - displayName
      properties:
        party:
          $ref: '#/components/schemas/Party'
        type:
          type: string
          enum:
            - cash
          description: Type discriminator.
        category:
          type: string
          enum:
            - cash
          description: 'High-level grouping: always `cash` for cash pickups and drops.'
        details:
          $ref: '#/components/schemas/CashDetails'
        displayName:
          type: string
          description: >-
            Opaque, render-only summary of this instrument for list/detail
            display

            (v0.12, #2665) — format is not contractual and may change without a

            version bump. Never a full account number/IBAN/PAN.
        payoutOrigin:
          $ref: '#/components/schemas/PayoutOrigin'
      title: Cash
    BankUsSideDetails:
      type: object
      required:
        - id
        - asset
        - network
        - accountHolder
      properties:
        id:
          type: string
          description: US bank ExternalAccount ID (ext_bankUs_ prefix).
        asset:
          type: string
          enum:
            - usd
          description: Canonical asset identifier.
        network:
          type: string
          enum:
            - ach
            - achSameDay
            - wire
          description: Network identifier.
        accountHolder:
          $ref: '#/components/schemas/AccountHolder'
        memo:
          type: string
          allOf:
            - $ref: '#/components/schemas/paymentMemo'
          nullable: true
          description: >-
            Optional customer-supplied payment memo delivered to the
            beneficiary's bank.


            HONORED TODAY ON: a Deposit Address `bankUs` destination with

            `network: "wire"` (create and update). The stored value replaces —
            it does

            not append to — the memo OMS would otherwise generate for every
            outbound

            Fedwire payout from that deposit address. Send `null` (or omit it on
            an

            update that replaces `destination`) to restore the generated memo.
            Because

            the memo is read when each payout wire is built, an edit affects
            only future

            payouts, never one already in flight.


            REJECTED EVERYWHERE ELSE, with `422 memoNotSupported`: this model is
            shared

            by the Quote and Virtual Account request surfaces (create and
            update), and by

            a deposit-address `bankUs` destination on the `ach` / `achSameDay`
            rails. A

            non-empty memo on any of those is refused rather than accepted and
            dropped —

            a silently ignored field on a money path gives the caller a success
            response

            while the payout carries the generated memo. Sending `null`,
            omitting the

            field, or sending only whitespace is always accepted (it means "no
            override").

            Each rejected surface becomes accepting as its slice ships
            (omsx#2254);

            relaxing a 422 into an accepted value never breaks a caller, so no
            client

            needs to change when that happens.


            The error body's `details.reason` tells apart a temporary gap from a

            permanent one: `"notImplemented"` means this surface/rail will
            accept the

            field once its omsx#2254 slice ships (every current rejection above
            is this

            case); `"unsupportedRail"` would mean the field is not a concept on
            this

            rail and never will be (e.g. the shared model also carries fields
            that are

            rail-specific by design, like ACH's `companyDiscretionaryData` on a
            wire

            destination) — retry the first after a release, never the second.
        companyDiscretionaryData:
          type: string
          allOf:
            - $ref: '#/components/schemas/companyDiscretionaryData'
          nullable: true
          description: >-
            Optional ACH-only field for the originator's internal use (NACHA
            batch

            header). See the companyDiscretionaryData scalar doc. Honored only
            when

            network is "ach" or "achSameDay"; 422 memoNotSupported on "wire".
    decimalString:
      type: string
      description: >-
        Wire-safe decimal string for financial float values (USD amounts,
        percentages).
      x-go-type-import:
        path: github.com/shopspring/decimal
      x-go-type: decimal.Decimal
    BankIbanSideDetails:
      type: object
      required:
        - id
        - asset
        - accountHolder
      properties:
        id:
          type: string
          description: IBAN ExternalAccount ID (ext_bankIban_ prefix).
        asset:
          type: string
          enum:
            - usd
          description: Canonical asset identifier.
        network:
          type: string
          enum:
            - swift
          description: Network identifier.
          default: swift
        accountHolder:
          $ref: '#/components/schemas/AccountHolder'
        memo:
          type: string
          allOf:
            - $ref: '#/components/schemas/paymentMemo'
          nullable: true
          description: >-
            Optional customer-supplied payment memo delivered via SWIFT
            remittance

            information. See BankUsSideDetails.memo's doc for the full contract
            —

            this is the same field, same charset/length bound, same
            honored-surface

            table, applied to the SWIFT rail instead of Fedwire.
    BankCanadaSideDetails:
      type: object
      required:
        - id
        - asset
        - network
        - accountHolder
      properties:
        id:
          type: string
          description: Canadian bank ExternalAccount ID (ext_bankCa_ prefix).
        asset:
          type: string
          enum:
            - usd
            - cad
          description: Canonical asset identifier.
        network:
          type: string
          enum:
            - swift
            - local
          description: USD uses `swift`; CAD uses `local`. Always explicit.
        accountHolder:
          $ref: '#/components/schemas/AccountHolder'
        memo:
          type: string
          allOf:
            - $ref: '#/components/schemas/paymentMemo'
          nullable: true
          description: >-
            Optional customer-supplied payment memo, honored only on the
            USD/swift

            leg (this model's `local`/CAD leg has no memo concept — Erebor's
            local

            Canadian rail carries no remittance-information field). See

            BankUsSideDetails.memo's doc for the full contract.
    WalletCryptoSideDetails:
      type: object
      required:
        - id
        - asset
        - network
      properties:
        id:
          type: string
          description: OMS wallet ID (wlt_ prefix).
        asset:
          type: string
          description: 'Crypto asset. One of: usdc, usdt.'
        network:
          allOf:
            - $ref: '#/components/schemas/CryptoNetwork'
          description: Network identifier.
    WalletExternalRegisteredSideDetails:
      type: object
      required:
        - id
        - asset
        - network
      properties:
        id:
          type: string
          description: Registered ExternalAccount ID (ext_wlt_ prefix). Required.
        asset:
          type: string
          description: 'Crypto asset. One of: usdc, usdt.'
        network:
          allOf:
            - $ref: '#/components/schemas/CryptoNetwork'
          description: Network identifier.
    WalletFiatSideDetails:
      type: object
      required:
        - id
        - asset
      properties:
        id:
          type: string
          description: OMS fiat wallet ID (wlt_fiat_ prefix).
        asset:
          type: string
          enum:
            - usd
          description: Fiat currency. Only `usd` today.
    Party:
      type: object
      oneOf:
        - $ref: '#/components/schemas/PartyCustomer'
        - $ref: '#/components/schemas/PartyOtherCustomer'
        - $ref: '#/components/schemas/PartyExternalRegistered'
        - $ref: '#/components/schemas/PartyExternalUnregistered'
      discriminator:
        propertyName: relationship
        mapping:
          customer:
            $ref: '#/components/schemas/PartyCustomer'
          otherCustomer:
            $ref: '#/components/schemas/PartyOtherCustomer'
          externalRegistered:
            $ref: '#/components/schemas/PartyExternalRegistered'
          externalUnregistered:
            $ref: '#/components/schemas/PartyExternalUnregistered'
    WalletCryptoDetails:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/typeId'
          description: >-
            Internal OMS wallet (`wlt_` prefix; legacy `acc_` also accepted on
            input).
        asset:
          type: string
          description: Canonical asset identifier.
        network:
          type: string
          description: Network identifier.
        blockchainAddress:
          type: string
          description: On-chain address.
        custodyType:
          type: string
          enum:
            - custodial
            - embedded
          description: 'How the wallet is held: `custodial` or `embedded`.'
        txHash:
          type: string
          description: On-chain transaction hash.
        blockchainAsset:
          allOf:
            - $ref: '#/components/schemas/BlockchainAsset'
          description: >-
            BPN extension: resolved on-chain asset identity
            (protocol/chainId/tokenId).
      description: 'WalletCrypto instrument details: an OMS-custodied crypto wallet.'
    PayoutOrigin:
      type: object
      oneOf:
        - $ref: '#/components/schemas/PayoutOriginBank'
        - $ref: '#/components/schemas/PayoutOriginBlockchain'
      discriminator:
        propertyName: type
        mapping:
          bank:
            $ref: '#/components/schemas/PayoutOriginBank'
          blockchain:
            $ref: '#/components/schemas/PayoutOriginBlockchain'
      description: >-
        Where last-mile delivery is sent *from*. Tiered: Quote & Deposit

        Address echo the choice only; the Transaction carries full detail

        (`accountNumber`/`routingNumber`/`txHash`). At launch all payouts route
        through

        Erebor, so the field is forward-compatible but single-valued.
    WalletExternalDetails:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/typeId'
          description: Unique identifier.
        asset:
          type: string
          description: Canonical asset identifier.
        network:
          type: string
          description: Network identifier.
        blockchainAddress:
          type: string
          description: On-chain address.
        custodian:
          type: string
          description: Custodian holding the funds.
        otherCustodian:
          type: string
          description: Free-text custodian name when `custodian` is `other`.
        txHash:
          type: string
          description: On-chain transaction hash.
        blockchainAsset:
          allOf:
            - $ref: '#/components/schemas/BlockchainAsset'
          description: >-
            BPN extension: resolved on-chain asset identity
            (protocol/chainId/tokenId).
      description: >-
        WalletExternal instrument details: a crypto wallet held in external
        custody.
    WalletFiatInstrumentDetails:
      type: object
      properties:
        id:
          type: string
          description: >-
            OMS fiat wallet ID (`wlt_fiat_` prefix). Look up via `GET /wallets`.

            Plain string, not the `typeId` scalar: `wlt_fiat_` is a two-token
            prefix,

            which the single-underscore `typeId` pattern cannot validate.
            Matches the

            sibling `WalletFiatSideDetails.id` in quote.tsp.
        asset:
          type: string
          enum:
            - usd
          description: Fiat currency of the balance. Only `usd` today.
        network:
          type: string
          enum:
            - bookTransfer
          description: >-
            Read-only settlement rail marker (ratified v0.12): `bookTransfer`
            when

            this walletFiat is the destination of a Virtual Account / Deposit
            Address

            book-transfer credit — an internal ledger movement at the partner
            bank,

            no external rail. Absent when the walletFiat is a funding source.
        provider:
          type: string
          description: >-
            Legal entity holding the balance (e.g. "Erebor Bank, N.A.").
            Read-only.
      description: >-
        WalletFiat instrument details: a fiat balance wallet held at a partner
        bank

        (e.g. USD at Erebor Bank, N.A.). No on-chain address — an internal
        ledger

        balance. `network` is `bookTransfer` only when the wallet is a VA/DA

        destination credited by internal book transfer (v0.12, #2504).
    BankUsDetails:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/typeId'
          description: Unique identifier.
        asset:
          type: string
          enum:
            - usd
          description: Canonical asset identifier.
        network:
          type: string
          enum:
            - ach
            - achSameDay
            - wire
          description: Network identifier.
        secCode:
          allOf:
            - $ref: '#/components/schemas/SecCode'
          description: ACH SEC code (populated only on ach/achSameDay).
        accountNumberLast4:
          type: string
          description: Last four digits of the account number.
        routingNumber:
          type: string
          description: US ABA routing number.
        bankName:
          type: string
          description: Bank display name.
        accountType:
          type: string
          enum:
            - checking
            - savings
          description: checking or savings.
        memo:
          type: string
          description: Payment memo.
        companyDiscretionaryData:
          type: string
          description: >-
            Optional ACH-only field for the originator's internal use (NACHA
            batch

            header). See the companyDiscretionaryData scalar doc (quote.tsp).
            Echoed

            back only when the stored deposit-address destination carries one
            (ach/

            achSameDay only — never on wire).
      description: US bank account instrument details.
    BankIbanDetails:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/typeId'
          description: Unique identifier.
        asset:
          type: string
          description: Canonical asset identifier.
        network:
          type: string
          enum:
            - swift
          description: Network identifier.
        ibanLast4:
          type: string
          description: Last four characters of the IBAN.
        BIC:
          type: string
          description: SWIFT BIC.
        bankAddress:
          $ref: '#/components/schemas/Address'
        countryCode:
          type: string
          description: ISO 3166-1 alpha-2 country code.
        memo:
          type: string
          description: Payment memo.
      description: IBAN bank account instrument details.
    BankCanadaDetails:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/typeId'
          description: Unique identifier.
        asset:
          type: string
          enum:
            - usd
            - cad
          description: Canonical asset identifier.
        network:
          type: string
          enum:
            - swift
            - local
          description: Network identifier.
        institutionNumber:
          type: string
          description: Canadian 3-digit institution number.
        transitNumber:
          type: string
          description: Canadian 5-digit transit number.
        accountNumberLast4:
          type: string
          description: Last four digits of the account number.
        bankName:
          type: string
          description: Bank display name.
        memo:
          type: string
          description: Payment memo.
      description: Canadian bank account instrument details.
    CardDetails:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier.
        asset:
          type: string
          enum:
            - usd
          description: Canonical asset identifier.
        network:
          type: string
          enum:
            - card
          description: Network identifier.
        cardNumberLast4:
          type: string
          description: Last four digits of the card number.
        cardProvider:
          type: string
          description: Card network/provider.
        memo:
          type: string
          description: Payment memo.
      description: Card instrument details.
    CashDetails:
      type: object
      properties:
        asset:
          type: string
          description: Canonical asset identifier.
        cashLocationId:
          type: string
          description: Cash location ID from `GET /cash-locations`.
        cashLocationReference:
          type: string
          description: Provider reference for the location, from `GET /cash-locations`.
        pickupCode:
          type: string
          description: >-
            Retail pickup code for a cash payout. Populated only on the cash-out
            (pickup) side.
        expiresAt:
          type: string
          format: date-time
          description: Pickup-code expiry. Populated only on the cash-out (pickup) side.
        locationName:
          type: string
          description: >-
            Display name of the retail pickup location. Populated only on the
            cash-out (pickup) side.
        locationAddress:
          type: string
          description: >-
            Street address of the retail pickup location. Populated only on the
            cash-out (pickup) side.
      description: Cash pickup/drop instrument details.
    AccountHolder:
      type: string
      enum:
        - customer
      description: >-
        Who holds the payout bank account (OMS closed enum). `customer` is the
        only

        valid value.
    paymentMemo:
      type: string
      maxLength: 140
      pattern: ^[A-Za-z0-9 /?:().,'+\-]*$
      description: >-
        Customer-supplied payment memo carried to the beneficiary's bank in the

        ISO 20022 unstructured remittance-information field. Allowed characters
        are

        the ISO 20022 set only: letters, digits, space and `/?:().,'+-`.


        `maxLength` is the ISO 20022 OUTER bound (140), which is what Fedwire
        and

        SWIFT accept. Per-rail rules are enforced server-side rather than in the

        schema. Note that ACH is not simply shorter: the NACHA addenda record is
        a

        different character set (uppercase only, no `/`, but `&=@_#%` allowed)
        capped

        at 80, so the two sets overlap without either containing the other.


        The pattern below MUST stay byte-identical to `iso20022.CharsetPattern`

        (`lib/iso20022/charset.go`), the Go-side authority the request
        validators and

        the outbound memo builders share. `TestCharsetPatternMatchesTypeSpec`
        reads

        this file and fails if the two drift.
      x-go-type: string
    companyDiscretionaryData:
      type: string
      maxLength: 20
      pattern: ^[A-Z0-9 &\-\.\$*\/#@%]*$
      description: |-
        Optional ACH-only field for the originator's internal use, carried
        verbatim in the NACHA batch header (companyDiscretionaryData). Distinct
        from `memo`: this never reaches the beneficiary, it is BPN's own
        origination metadata. Uppercase NACHA character set, max 20 characters.
        Rejected with 422 memoNotSupported on any destination that is not an ACH
        bankUs destination.
    PartyCustomer:
      type: object
      required:
        - relationship
        - customerId
      properties:
        relationship:
          type: string
          enum:
            - customer
          description: Relationship discriminator.
        entityType:
          $ref: '#/components/schemas/OwnerType'
        customerId:
          allOf:
            - $ref: '#/components/schemas/typeId'
          description: The OMS customer that owns this record (`cst_` prefix).
      description: The owning OMS customer is on this side.
      title: Customer
    PartyOtherCustomer:
      type: object
      required:
        - relationship
        - customerId
      properties:
        relationship:
          type: string
          enum:
            - otherCustomer
          description: Relationship discriminator.
        entityType:
          $ref: '#/components/schemas/OwnerType'
        customerId:
          allOf:
            - $ref: '#/components/schemas/typeId'
          description: The OMS customer that owns this record (`cst_` prefix).
        name:
          type: string
          nullable: true
          description: Display name.
      description: A different OMS customer is on this side.
      title: Another customer
    PartyExternalRegistered:
      type: object
      required:
        - relationship
        - counterpartyId
      properties:
        relationship:
          type: string
          enum:
            - externalRegistered
          description: Relationship discriminator.
        entityType:
          $ref: '#/components/schemas/OwnerType'
        counterpartyId:
          allOf:
            - $ref: '#/components/schemas/typeId'
          description: Counterparty ID (`ctp_` prefix).
        name:
          type: string
          nullable: true
          description: Display name.
        address:
          type: object
          allOf:
            - $ref: '#/components/schemas/Address'
          nullable: true
          description: Postal address.
      description: A registered counterparty (saved third party) is on this side.
      title: Registered external account
    PartyExternalUnregistered:
      type: object
      required:
        - relationship
      properties:
        relationship:
          type: string
          enum:
            - externalUnregistered
          description: Relationship discriminator.
        name:
          type: string
          nullable: true
          description: Display name.
        address:
          type: object
          allOf:
            - $ref: '#/components/schemas/Address'
          nullable: true
          description: Postal address.
      description: >-
        An unrecognized external party (no saved record) is on this side. There
        is no

        OMS record behind it, so it carries no entityType.
      title: Unregistered external account
    BlockchainAsset:
      type: object
      required:
        - protocol
        - chainId
        - tokenId
      properties:
        protocol:
          $ref: '#/components/schemas/BlockchainProtocol'
        chainId:
          type: string
        tokenId:
          type: string
    PayoutOriginBank:
      type: object
      required:
        - type
        - details
      properties:
        type:
          type: string
          enum:
            - bank
          description: Type discriminator.
        details:
          $ref: '#/components/schemas/PayoutOriginBankDetails'
      description: >-
        Payout originates from a bank account. v0.10 wraps the fields in a
        `details`

        envelope (matches the `precursor` shape).
        `accountNumber`/`routingNumber` are

        full sending-account detail rendered on the Transaction only, null on

        Quote/Deposit Address (choice-only).
      title: Bank
    PayoutOriginBlockchain:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - blockchain
          description: Type discriminator.
        blockchainAddress:
          type: string
          description: On-chain address.
        network:
          type: string
          description: Network identifier.
        txHash:
          type: string
          description: On-chain transaction hash.
        custodian:
          type: string
          description: Custodian holding the funds.
      description: Payout originates from an on-chain address.
      title: Blockchain
    SecCode:
      type: string
      enum:
        - ccd
        - ppd
        - web
      description: >-
        ACH SEC code. Populated only when the destination bank network is

        `ach`/`achSameDay`; null otherwise. Server-derived from the destination
        owner's

        and the source customer's `entityType`.
    Address:
      type: object
      properties:
        line1:
          type: string
          description: Street address, line 1.
        line2:
          type: string
          description: Street address, line 2.
        city:
          type: string
          description: City.
        state:
          type: string
          description: State / province / region.
        country:
          type: string
          description: ISO 3166-1 alpha-2
        zipCode:
          type: string
          description: ZIP / postal code.
      description: A postal address. country is an ISO 3166-1 alpha-2 country code.
    OwnerType:
      type: string
      enum:
        - individual
        - business
    BlockchainProtocol:
      type: string
      enum:
        - evm
        - svm
        - sui
    PayoutOriginBankDetails:
      type: object
      properties:
        accountHolder:
          $ref: '#/components/schemas/AccountHolder'
        accountHolderName:
          type: string
          description: Name of the sending account holder.
        accountNumber:
          type: string
          nullable: true
          description: Bank account number.
        routingNumber:
          type: string
          nullable: true
          description: US ABA routing number.
        virtualAccountId:
          type: string
          allOf:
            - $ref: '#/components/schemas/typeId'
          nullable: true
          description: Virtual Account ID (`va_` prefix).
      description: >-
        Bank payout-origin detail. `accountHolder`(+`Name`) is the chosen sender

        identity (echoed on Quote/DA too); `accountNumber`/`routingNumber` are
        the

        full sending-account coordinates (Transaction only, else null);
        `virtualAccountId`

        is the VA the funds were pulled from.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Token from POST /auth/token

````