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

# Link wallets to an account

> Link one or more connected wallets to a UPA.

When the account has no settlement wallet or settlement profile yet, the first settlement-supported wallet you link becomes its preferred settlement wallet. Otherwise, linking wallets leaves settlement unchanged unless you mark one wallet `isPreferredSettlement: true`.

Linked wallets appear as crypto destinations in [List an account's settlement destinations](/api-reference/settlement/list-settlement-destinations). See [Settlement destinations](/settlement/destinations).


## OpenAPI

````yaml openapi.json POST /v2/accounts/{accountId}/wallets
openapi: 3.1.0
info:
  title: Stableyard Partner API
  version: 2.0.0-staging
  x-stableyard-api-version: '2026-09-09'
  x-stableyard-supported-api-versions:
    - '2026-09-09'
  summary: Backend API for UPAs, Payments, activity, and optional financial products.
  description: >

    Use this API from a trusted partner backend with an app ID and app secret.


    ## Recommended integration


    1. Call `GET /v2/partners/config` to verify credentials and discover enabled
    capabilities.

    2. Create a UPA only when your product needs a persistent Stableyard
    account.

    3. Create a receive or send Payment with `POST /v2/payments`.

    4. Redirect a payer to the returned `paymentUrl` or pass the Payment
    credentials to an official Stableyard interface SDK.

    5. Process signed webhooks and fetch the Payment by ID for reconciliation.


    Checkout execution and account-bound browser endpoints are intentionally
    documented in the separate Interfaces & SDKs reference. Console endpoints
    are dashboard implementation details and are not part of the partner
    integration contract.
  x-stableyard-documentation-surface: partner
servers:
  - url: https://prod-api.stableyard.fi
    description: Production
  - url: https://staging-api-v2.stableyard.fi
    description: Staging
  - url: http://localhost:3001
    description: Local
security: []
tags:
  - name: Authentication
    x-displayName: API authentication
    description: Verify your app ID and app secret before calling UPA APIs.
  - name: Accounts
    x-displayName: UPA Accounts
    description: Create Universal Payment Accounts and manage account settings.
  - name: Deposit Addresses
    description: Create reusable receive addresses and verify inbound deposits.
  - name: Identity & KYC
    description: >-
      Verify the UPA email and run provider-neutral identity verification.
      Managed vaults and fiat payment rails use this same verified UPA identity.
  - name: Vaults
    description: >-
      Create Safe/Zodiac controlled stablecoin vaults and manage policy updates
      for accounts.
  - name: Payments
    description: >-
      Create escrow-first payments, issue partner-authenticated send
      instructions or executions, power public checkout, and reconcile
      collection through final account settlement.
  - name: Balances & Transactions
    description: >-
      Read Stableyard-posted financial activity. Balances are ledger projections
      of activity Stableyard processed; they are not live balances of externally
      controlled wallets.
paths:
  /v2/accounts/{accountId}/wallets:
    post:
      tags:
        - Accounts
      summary: Link wallet to UPA
      description: >-
        Link one or more wallets. The first settlement-supported wallet becomes
        preferred settlement when the account has no settlement wallet yet;
        otherwise pass `isPreferredSettlement: true` to change it.
      operationId: connectWalletsByAccountId
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
            example: acct_123
          description: Canonical account id returned by the Accounts API.
        - name: Stableyard-Version
          in: header
          required: false
          schema:
            type: string
            enum:
              - '2026-09-09'
          description: >-
            Optional contract-version assertion. Omit it to use the app
            environment's pinned version. A different supported version is
            accepted only after that environment is explicitly migrated.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectWalletRequest'
            examples:
              example:
                summary: Link wallet to UPA request
                value:
                  wallets:
                    - address: '0x1111111111111111111111111111111111111111'
                      chainId: 42161
                      label: User wallet on Arbitrum
                      isPreferredSettlement: false
      responses:
        '200':
          description: Connected wallets
          headers:
            Stableyard-Version:
              description: >-
                Effective date-based Stableyard API contract version for this
                response.
              schema:
                type: string
                enum:
                  - '2026-09-09'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ConnectedWallet'
              examples:
                example:
                  summary: Link wallet to UPA 200 response
                  value:
                    - id: wallet_123
                      accountId: acct_123
                      kind: evm
                      chainId: 42161
                      address: '0x1111111111111111111111111111111111111111'
                      label: Connected wallet
                      status: active
                      ownershipVerificationStatus: unverified
                      ownershipVerificationMethod: eip712_signature
                      settlementProfileId: settle_123
                      createdAt: '2026-08-28T10:00:00.000Z'
                      updatedAt: '2026-08-28T10:00:00.000Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '424':
          $ref: '#/components/responses/FailedDependency'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
        - partnerBasicAuth: []
components:
  schemas:
    ConnectWalletRequest:
      type: object
      additionalProperties: false
      required:
        - wallets
      properties:
        wallets:
          type: array
          minItems: 1
          description: >-
            Wallets to link. For a wallet-less account without a settlement
            profile, the first settlement-supported wallet becomes settlement.
            Otherwise, linking wallets does not change settlement unless one
            wallet is marked isPreferredSettlement.
          items:
            $ref: '#/components/schemas/WalletLink'
    ConnectedWallet:
      type: object
      required:
        - id
        - accountId
        - kind
        - chainId
        - address
        - status
        - ownershipVerificationStatus
        - settlementProfileId
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
          example: wallet_123
        accountId:
          type: string
          example: acct_123
        kind:
          type: string
          enum:
            - evm
            - tron
            - solana
            - movement
        chainId:
          type: integer
          enum:
            - 42161
            - 1
            - 8453
            - 137
            - 56
            - 43114
            - 4663
            - 4217
            - 10103
            - 10002
            - 728126428
          example: 42161
          description: >-
            Supported connected-wallet chain IDs: Arbitrum=42161, Ethereum=1,
            Base=8453, Polygon=137, BNB Smart Chain=56, Avalanche=43114,
            Robinhood Chain=4663, Tempo=4217, Solana=10103, Movement=10002,
            Tron=728126428. Address family must match the selected chain ID.
        address:
          type: string
          example: '0x1111111111111111111111111111111111111111'
          description: >-
            Wallet address. EVM addresses are normalized to lowercase before
            storage; other address families retain their submitted casing.
        label:
          type:
            - string
            - 'null'
          example: Connected wallet
        status:
          type: string
          enum:
            - active
            - disabled
          description: Whether this wallet link can be used by the account.
        ownershipVerificationStatus:
          type: string
          enum:
            - unverified
            - verified
          description: >-
            Ownership is unverified until Stableyard records a successful proof.
            Linking a wallet alone never verifies ownership.
        ownershipVerificationMethod:
          type:
            - string
            - 'null'
          example: eip712_signature
        ownershipVerifiedAt:
          type:
            - string
            - 'null'
          format: date-time
        settlementProfileId:
          type:
            - string
            - 'null'
          example: settle_123
          description: >-
            The active settlement profile id when this wallet is the account
            settlement wallet; otherwise null.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    WalletLink:
      type: object
      required:
        - address
        - chainId
      additionalProperties: false
      properties:
        address:
          type: string
          minLength: 8
          maxLength: 256
          example: '0x1111111111111111111111111111111111111111'
        chainId:
          type: integer
          enum:
            - 42161
            - 1
            - 8453
            - 137
            - 56
            - 43114
            - 4663
            - 4217
            - 10103
            - 10002
            - 728126428
          description: >-
            Supported connected-wallet chain IDs: Arbitrum=42161, Ethereum=1,
            Base=8453, Polygon=137, BNB Smart Chain=56, Avalanche=43114,
            Robinhood Chain=4663, Tempo=4217, Solana=10103, Movement=10002,
            Tron=728126428. Address family must match the selected chain ID.
            Bitcoin is deposit-only and cannot be linked as a wallet.
        label:
          type: string
          maxLength: 128
          example: User wallet on Arbitrum
        isPreferredSettlement:
          type: boolean
          default: false
          description: >-
            When true, this settlement-supported wallet becomes the account's
            preferred settlement wallet. Only one wallet in the request may set
            this.
    ErrorResponse:
      type: object
      additionalProperties: false
      required:
        - error
      properties:
        error:
          type: object
          additionalProperties: false
          required:
            - code
            - message
          properties:
            code:
              type: string
              minLength: 1
              maxLength: 128
              example: bad_request
            message:
              type: string
              minLength: 1
              maxLength: 1000
              example: The request is invalid
            details: {}
  responses:
    BadRequest:
      description: Bad request
      headers:
        Stableyard-Version:
          description: >-
            Effective date-based Stableyard API contract version for this
            response.
          schema:
            type: string
            enum:
              - '2026-09-09'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            example:
              summary: BadRequest response
              value:
                error:
                  code: bad_request
                  message: The request is invalid
                  details: example
    Unauthorized:
      description: Unauthorized
      headers:
        Stableyard-Version:
          description: >-
            Effective date-based Stableyard API contract version for this
            response.
          schema:
            type: string
            enum:
              - '2026-09-09'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            example:
              summary: Unauthorized response
              value:
                error:
                  code: bad_request
                  message: The request is invalid
                  details: example
    Forbidden:
      description: The app secret does not include the required scope
      headers:
        Stableyard-Version:
          description: >-
            Effective date-based Stableyard API contract version for this
            response.
          schema:
            type: string
            enum:
              - '2026-09-09'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            example:
              summary: Forbidden response
              value:
                error:
                  code: bad_request
                  message: The request is invalid
                  details: example
    NotFound:
      description: Not found
      headers:
        Stableyard-Version:
          description: >-
            Effective date-based Stableyard API contract version for this
            response.
          schema:
            type: string
            enum:
              - '2026-09-09'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            example:
              summary: NotFound response
              value:
                error:
                  code: bad_request
                  message: The request is invalid
                  details: example
    Conflict:
      description: Conflict
      headers:
        Stableyard-Version:
          description: >-
            Effective date-based Stableyard API contract version for this
            response.
          schema:
            type: string
            enum:
              - '2026-09-09'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            example:
              summary: Conflict response
              value:
                error:
                  code: bad_request
                  message: The request is invalid
                  details: example
    FailedDependency:
      description: Required chain, network, or provider configuration is missing
      headers:
        Stableyard-Version:
          description: >-
            Effective date-based Stableyard API contract version for this
            response.
          schema:
            type: string
            enum:
              - '2026-09-09'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            example:
              summary: FailedDependency response
              value:
                error:
                  code: bad_request
                  message: The request is invalid
                  details: example
    TooManyRequests:
      description: >-
        Rate limit, payment-option limit, selection cooldown, or temporary abuse
        block
      headers:
        Stableyard-Version:
          description: >-
            Effective date-based Stableyard API contract version for this
            response.
          schema:
            type: string
            enum:
              - '2026-09-09'
        Retry-After:
          description: Seconds until the caller should retry.
          schema:
            type: integer
            minimum: 1
        RateLimit-Limit:
          description: Quota for the most constrained policy.
          schema:
            type: integer
            minimum: 1
        RateLimit-Remaining:
          description: Requests remaining in that policy window.
          schema:
            type: integer
            minimum: 0
        RateLimit-Reset:
          description: Seconds until that policy window resets.
          schema:
            type: integer
            minimum: 0
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            example:
              summary: TooManyRequests response
              value:
                error:
                  code: bad_request
                  message: The request is invalid
                  details: example
  securitySchemes:
    partnerBasicAuth:
      type: http
      scheme: basic
      description: >-
        HTTP Basic auth. Username is the Stableyard app ID. Password is the app
        secret. The optional Stableyard-Version request header must match the
        environment pin.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.