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

# Create withdrawal

> Creates a fiat or cryptocurrency withdrawal from the selected account to a registered funding address or a supported linked bank account.



## OpenAPI

````yaml https://dsct1ci24fgcu.cloudfront.net/prod/merged/openapi.json post /v1/accounts/{account_id}/funds/withdrawals
openapi: 3.1.0
info:
  title: PWS Public API
  version: '1'
  description: >-
    Integrate with Payward Services to onboard users, manage accounts and funds,
    trade assets, and receive event notifications.
  contact:
    name: Payward Services
servers:
  - url: https://api.services.payward.com
security: []
tags:
  - name: Assets
    description: List the assets PWS is willing to swap.
    x-displayName: Assets
  - name: Conversions
    description: >-
      Rule-driven and on-demand fiat ↔ crypto value movement, including
      conversion rules and deposits.
    x-displayName: Conversions
  - name: Earn
    description: >-
      Manage Auto Earn preferences and retrieve allocation and reward
      information.
    x-displayName: Earn
  - name: Funding
    description: >-
      Discover deposit and withdrawal options, manage deposit addresses, and
      move funds between accounts.
    x-displayName: Funding
  - name: Derivative transfers
    description: >-
      Move funds between an account's spot balance and the same owner's futures
      balance.
    x-displayName: Derivative transfers
  - name: Portfolio
    description: 'Inspect a customer''s portfolio: balances, valuations, and transactions.'
    x-displayName: Portfolio
  - name: Ramp
    description: >-
      Support Ramp flows with discovery, quotes, limits, and hosted checkout
      experiences.
    x-displayName: Ramp
  - name: Reports
    description: Settlement and reconciliation reports for the partner.
    x-displayName: Reports
  - name: Swaps
    description: Account-funded quotes that lock a price until they expire or are executed.
    x-displayName: Swaps
  - name: Onchain quotes
    description: Wallet-funded quotes that return the data needed to settle onchain.
    x-displayName: Onchain quotes
  - name: Price trigger swaps
    description: Swaps that wait for a target price before submitting a trade.
    x-displayName: Price trigger swaps
  - name: Travel Rule verifications
    description: Travel Rule address ownership verification flows.
    x-displayName: Travel Rule verifications
  - name: Users
    description: >-
      User onboarding and status flows that the partner manages.


      - **Create User** provisions an account-owned user from an external
      reference and optional email.

      - **Get User** retrieves the user's profile, verification status, and
      required actions.


      Use the returned user `id` for calls that require the user's identifier.
    x-displayName: Users
  - name: Verifications
    description: Identity verification (KYC) submission and status for end users.
    x-displayName: Verifications
  - name: Webhooks
    description: >-
      Register HTTPS destinations to receive event deliveries, rotate signing
      secrets, and inspect, update, or delete existing subscriptions. Each
      subscription is owned by the authenticated partner; deliveries are signed
      with HMAC-SHA256 and retried on transient failures.
    x-displayName: Webhooks
paths:
  /v1/accounts/{account_id}/funds/withdrawals:
    post:
      tags:
        - Funding
      summary: Create withdrawal
      description: >-
        Creates a fiat or cryptocurrency withdrawal from the selected account to
        a registered funding address or a supported linked bank account.
      operationId: createWithdrawal
      parameters:
        - $ref: '#/components/parameters/AccountId'
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Funding_CreateWithdrawalBody'
            examples:
              fiat-method:
                summary: Withdraw euros to a registered bank address
                value:
                  scope:
                    method_id: fb3ec7fd-3280-4142-ae14-708b995bedef
                  destination:
                    type: funding_address
                    address_id: AB12345-6789A-BCDEFG
                  symbol: EUR
                  amount: '10.00'
              linked-bank-account:
                summary: Withdraw dollars to a linked bank account
                value:
                  scope:
                    method_id: d5d39ce4-9218-4ffb-9166-52d41801a58a
                  destination:
                    type: account_link
                    account_link_id: al_550e8400-e29b-41d4-a716-446655440000
                  symbol: USD
                  amount: '10.00'
              bitcoin-method:
                summary: Withdraw Bitcoin through a specific funding method
                value:
                  scope:
                    method_id: 2fa11f79-eeba-4d4e-afda-029abff6e29e
                  destination:
                    type: funding_address
                    address_id: AB12345-6789A-BCDEFG
                  symbol: BTC
                  amount: '0.01000000'
                  fee_token: sMBfm8D9i3TqR-k1zP2cX7vL0nH5aJ4u
              bitcoin-network:
                summary: Withdraw Bitcoin through a network with one eligible method
                value:
                  scope:
                    network_id: 6d7f9c7e-588d-4e56-a6f7-f1e9ada7e639
                  destination:
                    type: funding_address
                    address_id: AB12345-6789A-BCDEFG
                  symbol: BTC
                  amount: '0.01000000'
      responses:
        '201':
          description: Withdrawal created for the selected account.
          headers:
            X-Trace-Id:
              $ref: '#/components/headers/TraceId'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Funding_CreateWithdrawalResult'
              examples:
                fiat-withdrawal:
                  summary: Euro withdrawal created
                  value:
                    data:
                      withdrawal_id: FTSBuuG-9BctU4m3Emt88submmZVKY
                      net_amount:
                        symbol: EUR
                        name: Euro
                        type: fiat
                        amount: '9.50'
                      gross_amount:
                        symbol: EUR
                        name: Euro
                        type: fiat
                        amount: '10.00'
                      fee:
                        symbol: EUR
                        name: Euro
                        type: fiat
                        amount: '0.50'
                bitcoin:
                  summary: Bitcoin withdrawal created
                  value:
                    data:
                      withdrawal_id: FTSBuuG-9BctU4m3Emt88submmZVKY
                      net_amount:
                        symbol: BTC
                        name: Bitcoin
                        type: crypto
                        amount: '0.00995000'
                      gross_amount:
                        symbol: BTC
                        name: Bitcoin
                        type: crypto
                        amount: '0.01000000'
                      fee:
                        symbol: BTC
                        name: Bitcoin
                        type: crypto
                        amount: '0.00005000'
        '400':
          $ref: '#/components/responses/FundingWithdrawalBadRequestResponse'
        '401':
          $ref: '#/components/responses/FundingUnauthenticatedResponse'
        '403':
          description: >-
            Access is forbidden, the funding method requires activation, or
            activation was denied.
          headers:
            X-Trace-Id:
              $ref: '#/components/headers/TraceId'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ForbiddenError'
                    title: Forbidden
                  - $ref: >-
                      #/components/schemas/Funding_FundingMethodActivationRequiredError
                    title: Funding method activation required
                  - $ref: >-
                      #/components/schemas/Funding_FundingMethodActivationDeniedError
                    title: Funding method activation denied
              examples:
                forbidden:
                  summary: Access forbidden
                  value:
                    error:
                      type: funding_error
                      instance: 5f4d2a8e-91a4-4d6c-8a17-9b1e2c3f4a5b
                      status: 403
                      code: forbidden
                activation-required:
                  summary: Funding method activation required
                  value:
                    error:
                      type: funding_error
                      instance: 5f4d2a8e-91a4-4d6c-8a17-9b1e2c3f4a5b
                      status: 403
                      code: funding_method_activation_required
                activation-denied:
                  summary: Funding method activation denied
                  value:
                    error:
                      type: funding_error
                      instance: 5f4d2a8e-91a4-4d6c-8a17-9b1e2c3f4a5b
                      status: 403
                      code: funding_method_activation_denied
        '404':
          description: >-
            The withdrawal destination does not exist or is not available to the
            selected account.
          headers:
            X-Trace-Id:
              $ref: '#/components/headers/TraceId'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
              examples:
                account-link-not-found:
                  summary: Account Link not found
                  value:
                    error:
                      type: funding_error
                      instance: 5f4d2a8e-91a4-4d6c-8a17-9b1e2c3f4a5b
                      status: 404
                      code: not_found
        '409':
          description: >-
            The withdrawal requires address-ownership verification, or account
            settings temporarily block withdrawals.
          headers:
            X-Trace-Id:
              $ref: '#/components/headers/TraceId'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: >-
                      #/components/schemas/Funding_WithdrawalVerificationRequiredError
                    title: Address-ownership verification required
                  - $ref: >-
                      #/components/schemas/Funding_WithdrawalAccountSettingsLockedError
                    title: Account settings locked
              examples:
                verification-required:
                  summary: Address-ownership verification required
                  value:
                    verification_methods:
                      - self_attestation
                      - satoshi_test
                      - digital_signature
                    error:
                      type: funding_error
                      instance: 5f4d2a8e-91a4-4d6c-8a17-9b1e2c3f4a5b
                      status: 409
                      code: withdrawal_verification_required
                account-settings-locked:
                  summary: Account settings locked
                  value:
                    error:
                      type: funding_error
                      instance: 5f4d2a8e-91a4-4d6c-8a17-9b1e2c3f4a5b
                      status: 409
                      code: withdrawal_account_settings_locked
        '429':
          $ref: '#/components/responses/FundingResourceExhaustedResponse'
        '500':
          $ref: '#/components/responses/FundingInternalResponse'
        '503':
          $ref: '#/components/responses/FundingUnavailableResponse'
        '504':
          $ref: '#/components/responses/FundingDeadlineExceededResponse'
      security:
        - ApiKey: []
          ApiSign: []
          ApiNonce: []
components:
  parameters:
    AccountId:
      name: account_id
      in: path
      required: true
      example: WVSD33HRMGSZUBM7
      schema:
        $ref: '#/components/schemas/AccountId'
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      schema:
        $ref: '#/components/schemas/IdempotencyKey'
      example: 550e8400-e29b-41d4-a716-446655440000
  schemas:
    Funding_CreateWithdrawalBody:
      description: >-
        Funding scope, destination, asset symbol, gross amount, and optional fee
        quote token for a withdrawal.
      type: object
      additionalProperties: false
      required:
        - scope
        - destination
        - symbol
        - amount
      properties:
        scope:
          $ref: '#/components/schemas/Funding_CreateWithdrawalScope'
          description: Method or network scope used for the withdrawal.
        destination:
          $ref: '#/components/schemas/Funding_WithdrawalDestination'
        symbol:
          $ref: '#/components/schemas/AssetSymbol'
          description: >-
            Public asset symbol to withdraw. Fiat, crypto, and stablecoin assets
            are supported in this operation.
        amount:
          description: >-
            Gross amount debited from the selected account, including the fee,
            represented as a string to preserve precision.
          type: string
          minLength: 1
          maxLength: 64
          pattern: ^[0-9]+(\.[0-9]+)?$
        fee_token:
          description: >-
            Fee token from Calculate funding fees whose fee terms this
            withdrawal should reuse. Requires `scope.method_id` for the quoted
            method. A different amount changes the fee charged; use the quoted
            amount to reproduce its fee. Omit to calculate the fee at creation.
            Treat this value as sensitive and do not inspect or modify it.
          type: string
          minLength: 1
          maxLength: 2000
    Funding_CreateWithdrawalResult:
      description: Withdrawal created for the selected account.
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/Funding_Withdrawal'
          description: Created withdrawal.
    ForbiddenError:
      title: Forbidden
      description: The caller is not allowed to perform this operation.
      oneOf:
        - title: Forbidden
          allOf:
            - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
            - type: object
              required:
                - error
              properties:
                error:
                  allOf:
                    - $ref: '#/components/schemas/PwsGeneralError'
                    - type: object
                      required:
                        - status
                        - code
                      properties:
                        status:
                          type: integer
                          format: int32
                          const: 403
                        code:
                          type: string
                          enum:
                            - forbidden
        - title: Gateway
          description: Authorization failure returned by the API gateway.
          allOf:
            - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
            - type: object
              required:
                - error
              properties:
                error:
                  allOf:
                    - $ref: '#/components/schemas/PwsGeneralError'
                    - type: object
                      required:
                        - status
                        - code
                      properties:
                        type:
                          type: string
                          const: service_error
                        status:
                          type: integer
                          format: int32
                          const: 403
                        code:
                          type: string
                          const: gateway
    Funding_FundingMethodActivationRequiredError:
      description: >-
        The funding method requires activation before this operation can
        complete. This API does not expose a separate withdrawal-method
        activation operation.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      const: 403
                    code:
                      type: string
                      enum:
                        - funding_method_activation_required
    Funding_FundingMethodActivationDeniedError:
      description: >-
        Activation of the funding method was denied, so this operation could not
        complete.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      const: 403
                    code:
                      type: string
                      enum:
                        - funding_method_activation_denied
    NotFoundError:
      description: The requested resource was not found.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      const: 404
                    code:
                      type: string
                      enum:
                        - not_found
    Funding_WithdrawalVerificationRequiredError:
      description: >-
        The saved crypto address requires address-ownership verification before
        it can receive the withdrawal.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
            - verification_methods
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      const: 409
                    code:
                      type: string
                      enum:
                        - withdrawal_verification_required
            verification_methods:
              description: >-
                Verification methods that can satisfy the address-ownership
                requirement. Complete a supported method through the Travel Rule
                verification API before retrying. Contact Payward Services
                support if none are supported.
              type: array
              minItems: 1
              uniqueItems: true
              items:
                description: >-
                  Address-ownership verification method that can unblock the
                  withdrawal.
                type: string
                enum:
                  - self_attestation
                  - satoshi_test
                  - digital_signature
    Funding_WithdrawalAccountSettingsLockedError:
      description: >-
        Withdrawal cannot be created because account settings temporarily block
        security-sensitive changes.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      const: 409
                    code:
                      type: string
                      enum:
                        - withdrawal_account_settings_locked
    AccountId:
      description: Globally unique public identifier for an account.
      type: string
      minLength: 14
      maxLength: 42
    IdempotencyKey:
      description: >-
        Client-generated canonical UUIDv4 that uniquely identifies a request for
        safe retries.
      type: string
      format: uuid
      pattern: >-
        ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$
      example: 550e8400-e29b-41d4-a716-446655440000
    Funding_CreateWithdrawalScope:
      description: >-
        Funding method or network to use for the withdrawal. Supply exactly one
        identifier. Network scope resolves only when exactly one method is
        available for the asset.
      type: object
      properties:
        method_id:
          description: >-
            Withdrawal funding method identifier returned by the
            withdrawal-methods endpoint. Required for Account Link destinations
            and when supplying `fee_token`; use the method selected for the
            quote.
          type: string
          format: uuid
        network_id:
          description: >-
            Funding network identifier returned by the withdrawal-methods
            endpoint. Supported for funding-address destinations without
            `fee_token`. Returns `400` if the network does not resolve to
            exactly one method for the asset; supply `method_id` to select a
            specific method.
          type: string
          format: uuid
    Funding_WithdrawalDestination:
      description: Destination selected for the withdrawal.
      oneOf:
        - $ref: '#/components/schemas/Funding_FundingAddressWithdrawalDestination'
        - $ref: '#/components/schemas/Funding_AccountLinkWithdrawalDestination'
      discriminator:
        propertyName: type
        mapping:
          funding_address: '#/components/schemas/Funding_FundingAddressWithdrawalDestination'
          account_link: '#/components/schemas/Funding_AccountLinkWithdrawalDestination'
    AssetSymbol:
      description: Symbol identifying an asset within its asset category.
      type: string
      minLength: 1
      maxLength: 16
    Funding_Withdrawal:
      description: >-
        Created withdrawal, including its account-transaction correlation
        identifier and execution-time amounts.
      type: object
      required:
        - withdrawal_id
        - net_amount
        - gross_amount
        - fee
      properties:
        withdrawal_id:
          description: >-
            Opaque withdrawal identifier used as `reference.id` with
            `reference.kind=funding` for the corresponding account transaction.
          type: string
          minLength: 1
          maxLength: 64
        net_amount:
          $ref: '#/components/schemas/Funding_FundingAmount'
          description: Amount sent after fees.
        gross_amount:
          $ref: '#/components/schemas/Funding_FundingAmount'
          description: >-
            Total amount deducted, including fees. Equals the submitted `amount`
            for same-asset fees.
        fee:
          $ref: '#/components/schemas/Funding_FundingAmount'
          description: >-
            Fee charged for the withdrawal. A valid `fee_token` applies its
            quoted terms to the submitted amount. Otherwise, the current fee
            terms apply.
    BadRequestError:
      title: Bad Request
      description: Request validation failed or the request could not be processed.
      oneOf:
        - title: Bad Request
          allOf:
            - $ref: '#/components/schemas/PwsValidationErrorEnvelope'
            - type: object
              required:
                - error
              properties:
                error:
                  allOf:
                    - $ref: '#/components/schemas/PwsValidationError'
                    - type: object
                      required:
                        - status
                        - code
                      properties:
                        status:
                          type: integer
                          format: int32
                          const: 400
                        code:
                          type: string
                          enum:
                            - bad_request
        - title: Gateway
          description: >-
            Gateway-level validation failure returned before the request reaches
            the service.
          allOf:
            - $ref: '#/components/schemas/PwsValidationErrorEnvelope'
            - type: object
              required:
                - error
              properties:
                error:
                  allOf:
                    - $ref: '#/components/schemas/PwsValidationError'
                    - type: object
                      required:
                        - status
                        - code
                      properties:
                        type:
                          type: string
                          const: service_error
                        status:
                          type: integer
                          format: int32
                          const: 400
                        code:
                          type: string
                          const: gateway
    UnauthenticatedError:
      title: Unauthenticated
      description: Authentication credentials are missing, invalid, or not accepted.
      oneOf:
        - title: Unauthenticated
          allOf:
            - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
            - type: object
              required:
                - error
              properties:
                error:
                  allOf:
                    - $ref: '#/components/schemas/PwsGeneralError'
                    - type: object
                      required:
                        - status
                        - code
                      properties:
                        status:
                          type: integer
                          format: int32
                          const: 401
                        code:
                          type: string
                          enum:
                            - unauthenticated
        - title: Gateway
          description: Authentication failure returned by the API gateway.
          allOf:
            - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
            - type: object
              required:
                - error
              properties:
                error:
                  allOf:
                    - $ref: '#/components/schemas/PwsGeneralError'
                    - type: object
                      required:
                        - status
                        - code
                      properties:
                        type:
                          type: string
                          const: service_error
                        status:
                          type: integer
                          format: int32
                          const: 401
                        code:
                          type: string
                          const: gateway
    PwsGeneralErrorEnvelope:
      description: Error envelope for operational or domain failures.
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/PwsGeneralError'
          description: General error details.
    PwsGeneralError:
      description: Standard PWS API error object for non-validation failures.
      allOf:
        - $ref: '#/components/schemas/PwsErrorBase'
        - type: object
          properties:
            causes:
              description: Additional error details, when present.
              type: array
              items:
                type: object
                additionalProperties: true
    ResourceExhaustedError:
      description: The request was rate limited or a resource quota was exhausted.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      const: 429
                    code:
                      type: string
                      enum:
                        - resource_exhausted
    InternalError:
      description: An unexpected server-side error occurred.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      const: 500
                    code:
                      type: string
                      enum:
                        - internal
    UnavailableError:
      description: The service is temporarily unavailable.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      const: 503
                    code:
                      type: string
                      enum:
                        - unavailable
    DeadlineExceededError:
      description: The request deadline was exceeded before a response could be produced.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      const: 504
                    code:
                      type: string
                      enum:
                        - deadline_exceeded
    Funding_FundingAddressWithdrawalDestination:
      title: Funding address
      description: >-
        A registered fiat or cryptocurrency funding address owned by the
        selected account.
      type: object
      additionalProperties: false
      required:
        - type
        - address_id
      properties:
        type:
          description: Destination kind.
          type: string
          enum:
            - funding_address
        address_id:
          description: Identifier returned when registering the funding address.
          type: string
          minLength: 20
          maxLength: 20
          pattern: ^AB[A-Za-z0-9]{5}-[A-Za-z0-9]{5}-[A-Za-z0-9]{6}$
    Funding_AccountLinkWithdrawalDestination:
      title: Account link
      description: >-
        A linked bank account owned by the selected account and eligible for the
        selected withdrawal method.
      type: object
      additionalProperties: false
      required:
        - type
        - account_link_id
      properties:
        type:
          description: Destination kind.
          type: string
          enum:
            - account_link
        account_link_id:
          description: >-
            Identifier returned by the Bank Link API for the linked bank
            account. Use with a withdrawal method whose `requirements` include
            `bank_link`; a method that cannot pay out to a linked bank account
            is rejected with a `bad_request` error on `scope.method_id`. An
            expired parent connection is allowed; revoked or deleted connections
            and removed accounts are rejected. Eligibility is checked on every
            retry.
          type: string
          pattern: >-
            ^al_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
    Funding_FundingAmount:
      description: Decimal amount denominated in an asset.
      type: object
      required:
        - symbol
        - type
        - amount
      properties:
        symbol:
          $ref: '#/components/schemas/AssetSymbol'
          description: Asset symbol the amount is denominated in.
        name:
          description: Human-readable English asset name.
          type: string
          minLength: 1
          maxLength: 64
        type:
          $ref: '#/components/schemas/Funding_AssetType'
          description: Public asset classification.
        amount:
          description: >-
            Decimal value denominated in `symbol`, represented as a string to
            preserve precision.
          type: string
          minLength: 1
          maxLength: 64
          pattern: ^[0-9]+(\.[0-9]+)?$
    PwsValidationErrorEnvelope:
      description: Error envelope for request validation failures.
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/PwsValidationError'
          description: Validation error details.
    PwsValidationError:
      description: Standard PWS API error object for request validation failures.
      type: object
      required:
        - type
        - status
        - instance
        - code
      properties:
        type:
          description: Machine-readable error class.
          type: string
        status:
          description: HTTP status code returned for this error.
          type: integer
          format: int32
        instance:
          description: Request identifier for this specific error occurrence.
          type: string
        code:
          description: Stable machine-readable error code.
          type: string
        doc_url:
          description: Optional link to documentation for this error.
          type: string
          format: uri
        causes:
          description: Validation failures that contributed to the error.
          type: array
          items:
            $ref: '#/components/schemas/PwsErrorCause'
    PwsErrorBase:
      description: Common fields present on every PWS API error object.
      type: object
      required:
        - type
        - status
        - instance
        - code
      properties:
        type:
          description: Machine-readable error class.
          type: string
        status:
          description: HTTP status code returned for this error.
          type: integer
          format: int32
        instance:
          description: Request identifier for this specific error occurrence.
          type: string
        code:
          description: Stable machine-readable error code.
          type: string
        doc_url:
          description: Optional link to documentation for this error.
          type: string
          format: uri
    Funding_AssetType:
      description: Public classification of an asset used by funding resources.
      type: string
      enum:
        - fiat
        - crypto
        - stablecoin
        - xstock
    PwsErrorCause:
      description: A single request validation failure.
      type: object
      required:
        - field
        - message
      properties:
        field:
          description: Dot-notation path to the offending request field.
          type: string
        message:
          description: Human-readable explanation of the failed validation rule.
          type: string
  headers:
    TraceId:
      description: Trace identifier for the request. Include it when contacting support.
      schema:
        type: string
        example: 4bf92f3577b34da6a3ce929d0e0e4736
    StrictTransportSecurity:
      description: Enforces HTTPS for the duration specified by `max-age`.
      schema:
        type: string
        example: max-age=31536000; includeSubDomains; preload
    CacheControl:
      description: Prevents caching of sensitive financial data. Always `no-store`.
      schema:
        type: string
        enum:
          - no-store
        example: no-store
  responses:
    FundingWithdrawalBadRequestResponse:
      description: >-
        Request validation failed or the withdrawal could not be created for the
        requested method, address, asset, or amount.
      headers:
        X-Trace-Id:
          $ref: '#/components/headers/TraceId'
        Strict-Transport-Security:
          $ref: '#/components/headers/StrictTransportSecurity'
        Cache-Control:
          $ref: '#/components/headers/CacheControl'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BadRequestError'
          examples:
            invalid-request:
              $ref: '#/components/examples/funding-withdrawal-invalid-amount'
            insufficient-funds:
              $ref: '#/components/examples/funding-withdrawal-insufficient-funds'
            amount-too-small:
              $ref: '#/components/examples/funding-withdrawal-amount-too-small'
            incompatible-address:
              $ref: '#/components/examples/funding-withdrawal-incompatible-address'
            unsupported-asset:
              $ref: '#/components/examples/funding-withdrawal-unsupported-asset'
            invalid-fee-token:
              $ref: '#/components/examples/funding-withdrawal-invalid-fee-token'
            fee-token-network-scope:
              $ref: '#/components/examples/funding-withdrawal-fee-token-network-scope'
    FundingUnauthenticatedResponse:
      description: Authentication required
      headers:
        X-Trace-Id:
          $ref: '#/components/headers/TraceId'
        Strict-Transport-Security:
          $ref: '#/components/headers/StrictTransportSecurity'
        Cache-Control:
          $ref: '#/components/headers/CacheControl'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UnauthenticatedError'
          examples:
            authentication-failed:
              $ref: '#/components/examples/funding-unauthenticated'
    FundingResourceExhaustedResponse:
      description: Rate limit exceeded
      headers:
        X-Trace-Id:
          $ref: '#/components/headers/TraceId'
        Strict-Transport-Security:
          $ref: '#/components/headers/StrictTransportSecurity'
        Cache-Control:
          $ref: '#/components/headers/CacheControl'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResourceExhaustedError'
          examples:
            rate-limit-exceeded:
              $ref: '#/components/examples/funding-resource-exhausted'
    FundingInternalResponse:
      description: Internal server error
      headers:
        X-Trace-Id:
          $ref: '#/components/headers/TraceId'
        Strict-Transport-Security:
          $ref: '#/components/headers/StrictTransportSecurity'
        Cache-Control:
          $ref: '#/components/headers/CacheControl'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InternalError'
          examples:
            internal-error:
              $ref: '#/components/examples/funding-internal'
    FundingUnavailableResponse:
      description: Service unavailable
      headers:
        X-Trace-Id:
          $ref: '#/components/headers/TraceId'
        Strict-Transport-Security:
          $ref: '#/components/headers/StrictTransportSecurity'
        Cache-Control:
          $ref: '#/components/headers/CacheControl'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UnavailableError'
          examples:
            service-unavailable:
              $ref: '#/components/examples/funding-unavailable'
    FundingDeadlineExceededResponse:
      description: Request deadline exceeded
      headers:
        X-Trace-Id:
          $ref: '#/components/headers/TraceId'
        Strict-Transport-Security:
          $ref: '#/components/headers/StrictTransportSecurity'
        Cache-Control:
          $ref: '#/components/headers/CacheControl'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeadlineExceededError'
          examples:
            request-deadline-exceeded:
              $ref: '#/components/examples/funding-deadline-exceeded'
  examples:
    funding-withdrawal-invalid-amount:
      summary: Invalid request
      value:
        error:
          type: funding_error
          instance: 5f4d2a8e-91a4-4d6c-8a17-9b1e2c3f4a5b
          status: 400
          code: bad_request
          causes:
            - field: amount
              message: must be a positive decimal amount
    funding-withdrawal-insufficient-funds:
      summary: Insufficient balance
      value:
        error:
          type: funding_error
          instance: 5f4d2a8e-91a4-4d6c-8a17-9b1e2c3f4a5b
          status: 400
          code: bad_request
          causes:
            - field: amount
              message: exceeds the available balance
    funding-withdrawal-amount-too-small:
      summary: Amount below the withdrawal minimum
      value:
        error:
          type: funding_error
          instance: 5f4d2a8e-91a4-4d6c-8a17-9b1e2c3f4a5b
          status: 400
          code: bad_request
          causes:
            - field: amount
              message: is below the minimum for this method
    funding-withdrawal-incompatible-address:
      summary: Address is not compatible with the method
      value:
        error:
          type: funding_error
          instance: 5f4d2a8e-91a4-4d6c-8a17-9b1e2c3f4a5b
          status: 400
          code: bad_request
          causes:
            - field: destination
              message: >-
                must identify a destination compatible with the withdrawal
                method
    funding-withdrawal-unsupported-asset:
      summary: Unsupported withdrawal asset
      value:
        error:
          type: funding_error
          instance: 5f4d2a8e-91a4-4d6c-8a17-9b1e2c3f4a5b
          status: 400
          code: bad_request
          causes:
            - field: symbol
              message: is not supported for withdrawals
    funding-withdrawal-invalid-fee-token:
      summary: Invalid withdrawal fee token
      value:
        error:
          type: funding_error
          instance: 5f4d2a8e-91a4-4d6c-8a17-9b1e2c3f4a5b
          status: 400
          code: bad_request
          causes:
            - field: fee_token
              message: must be a valid withdrawal fee quote token
    funding-withdrawal-fee-token-network-scope:
      summary: Fee token used with network scope
      value:
        error:
          type: funding_error
          instance: 5f4d2a8e-91a4-4d6c-8a17-9b1e2c3f4a5b
          status: 400
          code: bad_request
          causes:
            - field: scope
              message: must use method_id when fee_token is supplied
    funding-unauthenticated:
      summary: Authentication failed
      value:
        error:
          type: funding_error
          instance: 5f4d2a8e-91a4-4d6c-8a17-9b1e2c3f4a5b
          status: 401
          code: unauthenticated
    funding-resource-exhausted:
      summary: Rate limit exceeded
      value:
        error:
          type: funding_error
          instance: 5f4d2a8e-91a4-4d6c-8a17-9b1e2c3f4a5b
          status: 429
          code: resource_exhausted
    funding-internal:
      summary: Internal server error
      value:
        error:
          type: funding_error
          instance: 5f4d2a8e-91a4-4d6c-8a17-9b1e2c3f4a5b
          status: 500
          code: internal
    funding-unavailable:
      summary: Service unavailable
      value:
        error:
          type: funding_error
          instance: 5f4d2a8e-91a4-4d6c-8a17-9b1e2c3f4a5b
          status: 503
          code: unavailable
    funding-deadline-exceeded:
      summary: Request deadline exceeded
      value:
        error:
          type: funding_error
          instance: 5f4d2a8e-91a4-4d6c-8a17-9b1e2c3f4a5b
          status: 504
          code: deadline_exceeded
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: API-Key
      description: Your public API key. Identifies the partner making the request.
    ApiSign:
      type: apiKey
      in: header
      name: API-Sign
      description: HMAC signature over the request, computed with your private key.
    ApiNonce:
      type: apiKey
      in: header
      name: API-Nonce
      description: Monotonically increasing nonce included in the request signature.

````