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

# Create Withdrawal

> Create an off-ramp withdrawal, start backend deposit monitoring, and return wallet execution steps. Direct withdrawals return a Bridge liquidation deposit step. Swap-backed withdrawals prepare the backend swap and return the resulting execution steps.



## OpenAPI

````yaml https://api.coinvoyage.io/v2/openapi.json post /withdrawals
openapi: 3.1.0
info:
  title: CoinVoyage API
  description: Cryptocurrency payment processing API
  version: 2.2.0
servers:
  - url: https://api.coinvoyage.io/v2
security: []
paths:
  /withdrawals:
    post:
      tags:
        - off-ramping
      summary: Create Withdrawal
      description: >-
        Create an off-ramp withdrawal, start backend deposit monitoring, and
        return wallet execution steps. Direct withdrawals return a Bridge
        liquidation deposit step. Swap-backed withdrawals prepare the backend
        swap and return the resulting execution steps.
      operationId: createWithdrawal
      parameters:
        - description: >-
            Authorization header format:
            'APIKey=<api_key>,signature=<signature>,timestamp=<unix_timestamp>'
          in: header
          name: Authorization-Signature
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWithdrawalRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WithdrawalResponse'
          description: Withdrawal created with execution steps
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found - Organization verification not found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: >-
            Unprocessable Entity - Invalid request body, unsupported rail, or
            provider error
      security:
        - Authorization: []
components:
  schemas:
    CreateWithdrawalRequest:
      example:
        data:
          dst:
            currency_amount:
              unit: usd
          payment_rail: ach
          src:
            address: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'
            chain_id: 8453
            currency_amount:
              fiat:
                amount: 100
                unit: USD
              token:
                raw_amount: '100000000'
                ui_amount: 100
            decimals: 6
            id: usdc-base
            name: USD Coin
            ticker: USDC
        sender_address: 0x1234...abcd
        slippage_bps: 50
      properties:
        data:
          $ref: '#/components/schemas/WithdrawalData'
        requires_swap:
          type: boolean
        sender_address:
          example: 0x1234...abcd
          type:
            - string
            - 'null'
        slippage_bps:
          example: 50
          type:
            - integer
            - 'null'
      required:
        - data
      type: object
    WithdrawalResponse:
      example:
        data:
          dst:
            currency_amount:
              unit: usd
          payment_rail: ach
          src:
            address: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'
            chain_id: 8453
            currency_amount:
              fiat:
                amount: 100
                unit: USD
              token:
                raw_amount: '100000000'
                ui_amount: 100
            decimals: 6
            id: usdc-base
            name: USD Coin
            ticker: USDC
        execution:
          destination_tx_hash: 0x5678...efgh
          dst:
            address: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
            amount_out_minimum:
              raw_amount: '2400000'
              ui_amount: 2.4
              ui_amount_display: '2.4'
              value_usd: 123.45
            chain_id: 30000000000001
            currency_amount:
              raw_amount: '2400000'
              ui_amount: 2.4
              ui_amount_display: '2.4'
              value_usd: 123.45
            decimals: 6
            id: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
            image_uri: >-
              https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v/logo.png
            name: USD Coin
            price_usd: 1
            ticker: USDC
          estimated_duration_seconds: 120
          expires_at: '2025-11-03T12:30:00Z'
          fee_tx_hash: 0xfee1...fee2
          payment_rail: CRYPTO
          receiving_address: 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM
          refund_address: 7xVt9ovu6g6E4gvz9K9eV4kxY7yQZ8h3kZ2vY8xZ7xVt
          refund_tx_hash: 0x9abc...ijkl
          refunded_reason: 'execution failed: provider error'
          source_tx_hash: 0x1234...abcd
          src:
            address: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
            amount_out_minimum:
              raw_amount: '2400000'
              ui_amount: 2.4
              ui_amount_display: '2.4'
              value_usd: 123.45
            base:
              raw_amount: '2400000'
              ui_amount: 2.4
              ui_amount_display: '2.4'
              value_usd: 123.45
            chain_id: 30000000000001
            currency_amount:
              raw_amount: '2400000'
              ui_amount: 2.4
              ui_amount_display: '2.4'
              value_usd: 123.45
            decimals: 6
            fees:
              custom_fee:
                raw_amount: '2400000'
                ui_amount: 2.4
                ui_amount_display: '2.4'
                value_usd: 123.45
              protocol_fee:
                raw_amount: '2400000'
                ui_amount: 2.4
                ui_amount_display: '2.4'
                value_usd: 123.45
              relayer_fee:
                raw_amount: '2400000'
                ui_amount: 2.4
                ui_amount_display: '2.4'
                value_usd: 123.45
              total_fee:
                raw_amount: '2400000'
                ui_amount: 2.4
                ui_amount_display: '2.4'
                value_usd: 123.45
            gas:
              raw_amount: '2400000'
              ui_amount: 2.4
              ui_amount_display: '2.4'
              value_usd: 123.45
            id: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
            image_uri: >-
              https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v/logo.png
            name: USD Coin
            price_usd: 1
            ticker: USDC
            total:
              raw_amount: '2400000'
              ui_amount: 2.4
              ui_amount_display: '2.4'
              value_usd: 123.45
          steps:
            - deposit_address: 5xVt9ovu6g6E4gvz9K9eV4kxY7yQZ8h3kZ2vY8xZ5xVt
              kind: deposit
              rail: CRYPTO
      properties:
        id:
          type: string
        organization_id:
          type: string
        type:
          $ref: '#/components/schemas/OrganizationTransactionType'
        status:
          $ref: '#/components/schemas/OrganizationTransactionStatus'
        source_transaction_hash:
          type:
            - string
            - 'null'
        data:
          $ref: '#/components/schemas/WithdrawalData'
        execution:
          anyOf:
            - $ref: '#/components/schemas/PaymentDataBase'
            - type: 'null'
        created_at:
          format: date-time
          type: string
        updated_at:
          format: date-time
          type: string
        processed_at:
          type:
            - string
            - 'null'
      required:
        - id
        - organization_id
        - type
        - status
        - data
        - created_at
        - updated_at
      type: object
    ErrorResponse:
      example:
        code: 400
        error: Bad Request
        message: Invalid request parameters
      properties:
        error:
          example: Bad Request
          type: string
        message:
          example: Invalid request parameters
          type: string
        code:
          example: 400
          format: int64
          type: integer
        details:
          anyOf:
            - type: string
            - type: number
            - type: object
      required:
        - error
        - message
        - code
      type: object
    WithdrawalData:
      example:
        dst:
          currency_amount:
            unit: usd
        payment_rail: ach
        src:
          address: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'
          chain_id: 8453
          currency_amount:
            fiat:
              amount: 100
              unit: USD
            token:
              raw_amount: '100000000'
              ui_amount: 100
          decimals: 6
          id: usdc-base
          name: USD Coin
          ticker: USDC
      properties:
        src:
          $ref: '#/components/schemas/WithdrawalSource'
        dst:
          $ref: '#/components/schemas/WithdrawalDestination'
        payment_rail:
          $ref: '#/components/schemas/LiquidationAddressPaymentRail'
          example: ach
        liquidation_address_id:
          type: string
        swap:
          anyOf:
            - $ref: '#/components/schemas/WithdrawalSwap'
            - type: 'null'
      required:
        - src
        - dst
        - payment_rail
      type: object
    OrganizationTransactionType:
      enum:
        - OFF_RAMP
        - ON_RAMP
      type: string
    OrganizationTransactionStatus:
      enum:
        - PENDING
        - FUNDS_RECEIVED
        - KYC_PENDING
        - COMPLETED
        - FAILED
      type: string
    PaymentDataBase:
      example:
        destination_tx_hash: 0x5678...efgh
        dst:
          address: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
          amount_out_minimum:
            raw_amount: '2400000'
            ui_amount: 2.4
            ui_amount_display: '2.4'
            value_usd: 123.45
          chain_id: 30000000000001
          currency_amount:
            raw_amount: '2400000'
            ui_amount: 2.4
            ui_amount_display: '2.4'
            value_usd: 123.45
          decimals: 6
          id: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
          image_uri: >-
            https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v/logo.png
          name: USD Coin
          price_usd: 1
          ticker: USDC
        estimated_duration_seconds: 120
        expires_at: '2025-11-03T12:30:00Z'
        fee_tx_hash: 0xfee1...fee2
        payment_rail: CRYPTO
        receiving_address: 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM
        refund_address: 7xVt9ovu6g6E4gvz9K9eV4kxY7yQZ8h3kZ2vY8xZ7xVt
        refund_tx_hash: 0x9abc...ijkl
        refunded_reason: 'execution failed: provider error'
        source_tx_hash: 0x1234...abcd
        src:
          address: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
          amount_out_minimum:
            raw_amount: '2400000'
            ui_amount: 2.4
            ui_amount_display: '2.4'
            value_usd: 123.45
          base:
            raw_amount: '2400000'
            ui_amount: 2.4
            ui_amount_display: '2.4'
            value_usd: 123.45
          chain_id: 30000000000001
          currency_amount:
            raw_amount: '2400000'
            ui_amount: 2.4
            ui_amount_display: '2.4'
            value_usd: 123.45
          decimals: 6
          fees:
            custom_fee:
              raw_amount: '2400000'
              ui_amount: 2.4
              ui_amount_display: '2.4'
              value_usd: 123.45
            protocol_fee:
              raw_amount: '2400000'
              ui_amount: 2.4
              ui_amount_display: '2.4'
              value_usd: 123.45
            relayer_fee:
              raw_amount: '2400000'
              ui_amount: 2.4
              ui_amount_display: '2.4'
              value_usd: 123.45
            total_fee:
              raw_amount: '2400000'
              ui_amount: 2.4
              ui_amount_display: '2.4'
              value_usd: 123.45
          gas:
            raw_amount: '2400000'
            ui_amount: 2.4
            ui_amount_display: '2.4'
            value_usd: 123.45
          id: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
          image_uri: >-
            https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v/logo.png
          name: USD Coin
          price_usd: 1
          ticker: USDC
          total:
            raw_amount: '2400000'
            ui_amount: 2.4
            ui_amount_display: '2.4'
            value_usd: 123.45
        steps:
          - deposit_address: 5xVt9ovu6g6E4gvz9K9eV4kxY7yQZ8h3kZ2vY8xZ5xVt
            kind: deposit
            rail: CRYPTO
      properties:
        payment_rail:
          $ref: '#/components/schemas/PaymentRail'
          example: CRYPTO
        src:
          $ref: '#/components/schemas/QuoteWithCurrency'
        dst:
          $ref: '#/components/schemas/CurrencyWithAmount'
        estimated_duration_seconds:
          example: 120
          type:
            - number
            - 'null'
        receiving_address:
          example: 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM
          type: string
        refund_address:
          example: 7xVt9ovu6g6E4gvz9K9eV4kxY7yQZ8h3kZ2vY8xZ7xVt
          type:
            - string
            - 'null'
        source_tx_hash:
          example: 0x1234...abcd
          type:
            - string
            - 'null'
        destination_tx_hash:
          example: 0x5678...efgh
          type:
            - string
            - 'null'
        refund_tx_hash:
          example: 0x9abc...ijkl
          type:
            - string
            - 'null'
        refunded_reason:
          example: 'execution failed: provider error'
          type:
            - string
            - 'null'
        fee_tx_hash:
          example: 0xfee1...fee2
          type:
            - string
            - 'null'
        deposit_address:
          deprecated: true
          description: Use steps
          type: string
        steps:
          items:
            $ref: '#/components/schemas/PaymentStep'
          type: array
        expires_at:
          example: '2025-11-03T12:30:00Z'
          format: date-time
          type: string
      required:
        - src
        - dst
        - receiving_address
        - deposit_address
        - steps
        - expires_at
      type: object
    WithdrawalSource:
      example:
        address: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'
        chain_id: 8453
        currency_amount:
          fiat:
            amount: 100
            unit: USD
          token:
            raw_amount: '100000000'
            ui_amount: 100
        decimals: 6
        id: usdc-base
        name: USD Coin
        ticker: USDC
      properties:
        id:
          example: usdc-base
          type: string
        name:
          example: USD Coin
          type: string
        ticker:
          example: USDC
          type: string
        decimals:
          example: 6
          format: int64
          type: integer
        chain_id:
          $ref: '#/components/schemas/ChainID'
          example: 8453
        address:
          example: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'
          type:
            - string
            - 'null'
        image_uri:
          type:
            - string
            - 'null'
        currency_amount:
          $ref: '#/components/schemas/TokenFiatAmount'
      required:
        - id
        - name
        - ticker
        - decimals
        - chain_id
        - currency_amount
      type: object
    WithdrawalDestination:
      example:
        currency_amount:
          unit: usd
      properties:
        bank_account_details:
          $ref: '#/components/schemas/BankAccountDetails'
        currency_amount:
          $ref: '#/components/schemas/WithdrawalDestinationCurrencyAmount'
      required:
        - bank_account_details
        - currency_amount
      type: object
    LiquidationAddressPaymentRail:
      description: Bridge fiat payment rail used for off-ramp withdrawal settlement
      enum:
        - ach
        - wire
        - ach_push
        - ach_same_day
        - sepa
        - spei
        - pix
        - swift
        - faster_payments
        - fiat_deposit_return
      type: string
    WithdrawalSwap:
      properties:
        required:
          type: boolean
        payorder_id:
          type: string
        status:
          $ref: '#/components/schemas/PayOrderStatus'
        receiving_address:
          type: string
        deposit_address:
          type: string
      required:
        - required
      type: object
    PaymentRail:
      enum:
        - CRYPTO
        - FIAT
      type: string
    QuoteWithCurrency:
      example:
        address: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
        amount_out_minimum:
          raw_amount: '2400000'
          ui_amount: 2.4
          ui_amount_display: '2.4'
          value_usd: 123.45
        base:
          raw_amount: '2400000'
          ui_amount: 2.4
          ui_amount_display: '2.4'
          value_usd: 123.45
        chain_id: 30000000000001
        currency_amount:
          raw_amount: '2400000'
          ui_amount: 2.4
          ui_amount_display: '2.4'
          value_usd: 123.45
        decimals: 6
        fees:
          custom_fee:
            raw_amount: '2400000'
            ui_amount: 2.4
            ui_amount_display: '2.4'
            value_usd: 123.45
          protocol_fee:
            raw_amount: '2400000'
            ui_amount: 2.4
            ui_amount_display: '2.4'
            value_usd: 123.45
          relayer_fee:
            raw_amount: '2400000'
            ui_amount: 2.4
            ui_amount_display: '2.4'
            value_usd: 123.45
          total_fee:
            raw_amount: '2400000'
            ui_amount: 2.4
            ui_amount_display: '2.4'
            value_usd: 123.45
        gas:
          raw_amount: '2400000'
          ui_amount: 2.4
          ui_amount_display: '2.4'
          value_usd: 123.45
        id: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
        image_uri: >-
          https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v/logo.png
        name: USD Coin
        price_usd: 1
        ticker: USDC
        total:
          raw_amount: '2400000'
          ui_amount: 2.4
          ui_amount_display: '2.4'
          value_usd: 123.45
      properties:
        id:
          example: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
          type: string
        address:
          example: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
          type:
            - string
            - 'null'
        chain_id:
          $ref: '#/components/schemas/ChainID'
          example: 30000000000001
        decimals:
          example: 6
          format: int64
          type: integer
        name:
          example: USD Coin
          type: string
        ticker:
          example: USDC
          type: string
        image_uri:
          example: >-
            https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v/logo.png
          type:
            - string
            - 'null'
        price_usd:
          example: 1
          type:
            - number
            - 'null'
        currency_amount:
          $ref: '#/components/schemas/CurrencyAmount'
        amount_out_minimum:
          anyOf:
            - $ref: '#/components/schemas/CurrencyAmount'
            - type: 'null'
        total:
          $ref: '#/components/schemas/CurrencyAmount'
        base:
          $ref: '#/components/schemas/CurrencyAmount'
        fees:
          anyOf:
            - $ref: '#/components/schemas/FeeBreakdown'
            - type: 'null'
        gas:
          anyOf:
            - $ref: '#/components/schemas/CurrencyAmount'
            - type: 'null'
      required:
        - id
        - chain_id
        - decimals
        - name
        - ticker
        - currency_amount
        - total
        - base
      type: object
    CurrencyWithAmount:
      example:
        address: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
        amount_out_minimum:
          raw_amount: '2400000'
          ui_amount: 2.4
          ui_amount_display: '2.4'
          value_usd: 123.45
        chain_id: 30000000000001
        currency_amount:
          raw_amount: '2400000'
          ui_amount: 2.4
          ui_amount_display: '2.4'
          value_usd: 123.45
        decimals: 6
        id: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
        image_uri: >-
          https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v/logo.png
        name: USD Coin
        price_usd: 1
        ticker: USDC
      properties:
        id:
          example: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
          type: string
        address:
          example: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
          type:
            - string
            - 'null'
        chain_id:
          $ref: '#/components/schemas/ChainID'
          example: 30000000000001
        decimals:
          example: 6
          format: int64
          type: integer
        name:
          example: USD Coin
          type: string
        ticker:
          example: USDC
          type: string
        image_uri:
          example: >-
            https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v/logo.png
          type:
            - string
            - 'null'
        price_usd:
          example: 1
          type:
            - number
            - 'null'
        currency_amount:
          $ref: '#/components/schemas/CurrencyAmount'
        amount_out_minimum:
          anyOf:
            - $ref: '#/components/schemas/CurrencyAmount'
            - type: 'null'
      required:
        - id
        - chain_id
        - decimals
        - name
        - ticker
        - currency_amount
      type: object
    PaymentStep:
      example:
        deposit_address: 5xVt9ovu6g6E4gvz9K9eV4kxY7yQZ8h3kZ2vY8xZ5xVt
        kind: deposit
        rail: CRYPTO
      properties:
        rail:
          $ref: '#/components/schemas/PaymentRail'
          example: CRYPTO
        kind:
          $ref: '#/components/schemas/StepKind'
          example: deposit
        deposit_address:
          deprecated: true
          description: Use data.deposit_address instead
          example: 5xVt9ovu6g6E4gvz9K9eV4kxY7yQZ8h3kZ2vY8xZ5xVt
          type: string
        data:
          oneOf:
            - $ref: '#/components/schemas/DepositStepData'
            - $ref: '#/components/schemas/ChainPaymentData'
            - $ref: '#/components/schemas/StripeOnrampPaymentData'
      required:
        - rail
        - kind
        - data
      type: object
    ChainID:
      enum:
        - 1
        - 10
        - 56
        - 137
        - 8453
        - 42161
        - 20000000000001
        - 30000000000001
        - 30000000000002
      example: 1
      format: int64
      type: integer
    TokenFiatAmount:
      example:
        fiat:
          amount: 100
          unit: USD
        token:
          raw_amount: '100000000'
          ui_amount: 100
      properties:
        token:
          anyOf:
            - $ref: '#/components/schemas/TokenAmount'
            - type: 'null'
        fiat:
          anyOf:
            - $ref: '#/components/schemas/FiatAmount'
            - type: 'null'
      type: object
    BankAccountDetails:
      properties:
        id:
          type: string
        account_name:
          type:
            - string
            - 'null'
        bank_name:
          type:
            - string
            - 'null'
        account_type:
          $ref: '#/components/schemas/BankAccountType'
        account_owner_type:
          anyOf:
            - $ref: '#/components/schemas/AccountOwnerType'
            - type: 'null'
        account_details:
          $ref: '#/components/schemas/AccountDetails'
        currency:
          $ref: '#/components/schemas/BankAccountCurrency'
        active:
          type: boolean
        beneficiary_address_valid:
          type:
            - boolean
            - 'null'
        deactivation_reason:
          type:
            - string
            - 'null'
        deactivation_details:
          type:
            - string
            - 'null'
      required:
        - id
        - account_type
        - account_details
        - currency
        - active
      type: object
    WithdrawalDestinationCurrencyAmount:
      example:
        unit: usd
      properties:
        unit:
          example: usd
          type: string
      required:
        - unit
      type: object
    PayOrderStatus:
      enum:
        - PENDING
        - EXPIRED
        - FAILED
        - AWAITING_PAYMENT
        - OPTIMISTIC_CONFIRMED
        - AWAITING_CONFIRMATION
        - EXECUTING_ORDER
        - COMPLETED
        - REFUNDED
        - PARTIAL_PAYMENT
      type: string
    CurrencyAmount:
      example:
        raw_amount: '2400000'
        ui_amount: 2.4
        ui_amount_display: '2.4'
        value_usd: 123.45
      properties:
        ui_amount:
          deprecated: true
          description: >-
            Approximate numeric amount. Do not use for payment construction; use
            raw_amount for exact amounts and ui_amount_display for display.
          example: 2.4
          type: number
        ui_amount_display:
          example: '2.4'
          type: string
        raw_amount:
          $ref: '#/components/schemas/BigInt'
          example: '2400000'
        value_usd:
          example: 123.45
          type: number
      required:
        - ui_amount
        - ui_amount_display
        - raw_amount
        - value_usd
      type: object
    FeeBreakdown:
      example:
        custom_fee:
          raw_amount: '2400000'
          ui_amount: 2.4
          ui_amount_display: '2.4'
          value_usd: 123.45
        protocol_fee:
          raw_amount: '2400000'
          ui_amount: 2.4
          ui_amount_display: '2.4'
          value_usd: 123.45
        relayer_fee:
          raw_amount: '2400000'
          ui_amount: 2.4
          ui_amount_display: '2.4'
          value_usd: 123.45
        total_fee:
          raw_amount: '2400000'
          ui_amount: 2.4
          ui_amount_display: '2.4'
          value_usd: 123.45
      properties:
        total_fee:
          $ref: '#/components/schemas/CurrencyAmount'
        protocol_fee:
          anyOf:
            - $ref: '#/components/schemas/CurrencyAmount'
            - type: 'null'
        custom_fee:
          anyOf:
            - $ref: '#/components/schemas/CurrencyAmount'
            - type: 'null'
        relayer_fee:
          anyOf:
            - $ref: '#/components/schemas/CurrencyAmount'
            - type: 'null'
      required:
        - total_fee
      type: object
    StepKind:
      enum:
        - deposit
        - transaction
        - stripe_onramp
      type: string
    DepositStepData:
      example:
        amount: '100000000'
        currency:
          address: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
          chain_id: 30000000000001
        deposit_address: 5xVt9ovu6g6E4gvz9K9eV4kxY7yQZ8h3kZ2vY8xZ5xVt
      properties:
        deposit_address:
          example: 5xVt9ovu6g6E4gvz9K9eV4kxY7yQZ8h3kZ2vY8xZ5xVt
          type: string
        currency:
          $ref: '#/components/schemas/CurrencyBase'
        amount:
          $ref: '#/components/schemas/BigInt'
          example: '100000000'
      required:
        - deposit_address
        - currency
        - amount
      type: object
    ChainPaymentData:
      example:
        bitcoin:
          psbt: 70736274ff0100...
        evm:
          chainId: 1
          data: 0xa9059cbb...
          from: '0x322e128453EFd91a4c131761d9d535fF6E0CCd90'
          maxFeePerGas: '432320998'
          maxPriorityFeePerGas: '290572642'
          to: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
          value: '0'
      properties:
        evm:
          anyOf:
            - $ref: '#/components/schemas/EVMPaymentData'
            - type: 'null'
        bitcoin:
          anyOf:
            - $ref: '#/components/schemas/BitcoinPaymentData'
            - type: 'null'
        solana:
          anyOf:
            - $ref: '#/components/schemas/SolanaPaymentData'
            - type: 'null'
        sui:
          anyOf:
            - $ref: '#/components/schemas/SuiPaymentData'
            - type: 'null'
      type: object
    StripeOnrampPaymentData:
      example:
        client_secret: cos_test_secret_123
        destination_amount: '100'
        destination_currency: usdc
        destination_network: ethereum
        hosted_url: https://crypto.link.com/onramp/...
        quote:
          destination_amount: '100'
          destination_currency: usdc
          destination_network: ethereum
          exchange_rate: '0.8'
          network_fee_amount: '2.10'
          source_amount: '125.00'
          source_currency: usd
          source_total_amount: '129.50'
          transaction_fee_amount: '2.40'
        session_id: cos_test_123
        source_currency: usd
        status: initialized
        stripe_publishable_key: pk_test_123
        wallet_address: 0x1234...abcd
      properties:
        session_id:
          example: cos_test_123
          type: string
        stripe_publishable_key:
          example: pk_test_123
          type: string
        client_secret:
          example: cos_test_secret_123
          type: string
        status:
          example: initialized
          type: string
        hosted_url:
          example: https://crypto.link.com/onramp/...
          type:
            - string
            - 'null'
        source_currency:
          example: usd
          type:
            - string
            - 'null'
        destination_currency:
          $ref: '#/components/schemas/StripeOnrampDestinationCurrency'
          example: usdc
        destination_network:
          $ref: '#/components/schemas/StripeOnrampDestinationNetwork'
          example: ethereum
        destination_amount:
          example: '100'
          type: string
        wallet_address:
          example: 0x1234...abcd
          type: string
        quote:
          anyOf:
            - $ref: '#/components/schemas/StripeOnrampQuote'
            - type: 'null'
      required:
        - session_id
        - stripe_publishable_key
        - client_secret
        - status
        - destination_currency
        - destination_network
        - destination_amount
        - wallet_address
      type: object
    TokenAmount:
      example:
        raw_amount: '100000000'
        ui_amount: 100
      properties:
        ui_amount:
          example: 100
          type: number
        raw_amount:
          example: '100000000'
          type: string
      required:
        - ui_amount
        - raw_amount
      type: object
    FiatAmount:
      example:
        amount: 100
        unit: USD
      properties:
        amount:
          example: 100
          type: number
        unit:
          $ref: '#/components/schemas/Fiat'
          example: USD
      required:
        - amount
        - unit
      type: object
    BankAccountType:
      description: 'Bank account rail: us (ACH), iban, swift, clabe, pix, or gb (FPS)'
      enum:
        - us
        - iban
        - swift
        - clabe
        - pix
        - gb
      type: string
    AccountOwnerType:
      description: Whether the bank account owner is an individual or business
      enum:
        - individual
        - business
      type: string
    AccountDetails:
      properties:
        bank_name:
          type:
            - string
            - 'null'
        routing_number:
          type:
            - string
            - 'null'
        sort_code:
          type:
            - string
            - 'null'
        account_number:
          type: string
        checking_or_savings:
          type:
            - string
            - 'null'
        bic:
          type:
            - string
            - 'null'
        pix_key:
          type:
            - string
            - 'null'
      required:
        - account_number
      type: object
    BankAccountCurrency:
      description: Currency used by the external bank account
      enum:
        - usd
        - eur
        - mxn
        - brl
        - gbp
      type: string
    BigInt:
      description: A big integer represented as a string to preserve precision
      example: '1000000000000000000'
      type: string
    CurrencyBase:
      example:
        address: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
        chain_id: 30000000000001
      properties:
        address:
          example: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
          type:
            - string
            - 'null'
        chain_id:
          $ref: '#/components/schemas/ChainID'
          example: 30000000000001
      required:
        - chain_id
      type: object
    EVMPaymentData:
      example:
        chainId: 1
        data: 0xa9059cbb...
        from: '0x322e128453EFd91a4c131761d9d535fF6E0CCd90'
        maxFeePerGas: '432320998'
        maxPriorityFeePerGas: '290572642'
        to: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
        value: '0'
      properties:
        from:
          example: '0x322e128453EFd91a4c131761d9d535fF6E0CCd90'
          type: string
        to:
          example: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
          type: string
        data:
          example: 0xa9059cbb...
          type: string
        value:
          example: '0'
          type: string
        chainId:
          example: 1
          format: int64
          type: integer
        maxFeePerGas:
          example: '432320998'
          type: string
        maxPriorityFeePerGas:
          example: '290572642'
          type: string
      required:
        - from
        - to
        - data
        - value
        - chainId
      type: object
    BitcoinPaymentData:
      example:
        psbt: 70736274ff0100...
      properties:
        psbt:
          example: 70736274ff0100...
          type: string
      required:
        - psbt
      type: object
    SolanaPaymentData:
      properties:
        transaction:
          anyOf:
            - type: string
            - type: number
            - type: object
          description: Serialized Solana transaction object returned by the solana-go SDK.
      required:
        - transaction
      type: object
    SuiPaymentData:
      properties:
        transaction:
          anyOf:
            - type: string
            - type: number
            - type: object
          description: Serialized Sui transaction object returned by the sui-go-sdk.
      required:
        - transaction
      type: object
    StripeOnrampDestinationCurrency:
      enum:
        - btc
        - eth
        - pol
        - sol
        - usdc
      type: string
    StripeOnrampDestinationNetwork:
      enum:
        - base
        - ethereum
        - optimism
        - polygon
        - solana
      type: string
    StripeOnrampQuote:
      example:
        destination_amount: '100'
        destination_currency: usdc
        destination_network: ethereum
        exchange_rate: '0.8'
        network_fee_amount: '2.10'
        source_amount: '125.00'
        source_currency: usd
        source_total_amount: '129.50'
        transaction_fee_amount: '2.40'
      properties:
        source_currency:
          example: usd
          type:
            - string
            - 'null'
        source_amount:
          example: '125.00'
          type:
            - string
            - 'null'
        source_total_amount:
          example: '129.50'
          type:
            - string
            - 'null'
        destination_currency:
          $ref: '#/components/schemas/StripeOnrampDestinationCurrency'
          example: usdc
        destination_network:
          $ref: '#/components/schemas/StripeOnrampDestinationNetwork'
          example: ethereum
        destination_amount:
          example: '100'
          type: string
        exchange_rate:
          example: '0.8'
          type:
            - string
            - 'null'
        network_fee_amount:
          example: '2.10'
          type:
            - string
            - 'null'
        transaction_fee_amount:
          example: '2.40'
          type:
            - string
            - 'null'
      required:
        - destination_currency
        - destination_network
        - destination_amount
      type: object
    Fiat:
      enum:
        - USD
        - EUR
      type: string

````