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

# Create withdrawal

> Directly creates one parent withdrawal from the signed list request. Production requires approved KYB for every supported NGN and USD rail. Store the returned transaction ID and reconcile status and split-transfer outcomes through wallet transaction reads.



## OpenAPI

````yaml /openapi/openapi.json post /partner/wallets/withdrawals
openapi: 3.1.0
info:
  title: Stabyl API
  description: >-
    REST API for approved Stabyl accounts to automate exchange, wallet, and
    non-production simulation workflows.
  contact:
    name: Stabyl Support
    email: support@stabyl.com
  license:
    name: Proprietary
  version: 1.0.0
servers:
  - url: https://api.stabyl.com/v1
    description: Production
  - url: https://api-staging.stabyl.com/v1
    description: Staging
security: []
tags:
  - name: Exchange
    description: Trading market data and order management for account automation.
  - name: Wallets
    description: >-
      Supported routes, deposit destinations, balances, transactions, and saved
      recipients.
  - name: Webhooks
    description: >-
      Outbound event delivery configuration and eventually consistent delivery
      history. Verify Standard Webhooks webhook-id, webhook-timestamp, and
      webhook-signature headers against the unchanged raw request body before
      parsing JSON.
  - name: Simulation
    description: Non-production endpoints for testing integration behavior.
paths:
  /partner/wallets/withdrawals:
    post:
      tags:
        - Wallets
      summary: Create withdrawal
      description: >-
        Directly creates one parent withdrawal from the signed list request.
        Production requires approved KYB for every supported NGN and USD rail.
        Store the returned transaction ID and reconcile status and
        split-transfer outcomes through wallet transaction reads.
      operationId: post_partner_wallets_withdrawals
      parameters:
        - name: X-Stabyl-Timestamp
          in: header
          description: >-
            Current Unix time in milliseconds. The server accepts at most 30
            seconds of clock skew.
          required: true
          schema:
            type: string
          example: '1783756800000'
        - name: X-Stabyl-Nonce
          in: header
          description: >-
            A new UUIDv4 or UUIDv7 for this HTTP attempt. A verified nonce is
            single-use for five minutes.
          required: true
          schema:
            type: string
            format: uuid
          example: 018f32f0-3333-7333-8333-333333333333
        - name: X-Stabyl-Signature
          in: header
          description: >-
            Unpadded base64url Ed25519 signature of the version 1 canonical
            payload. The exact path includes the server prefix, for example
            `/v1/partner/wallets/withdrawals`.
          required: true
          schema:
            type: string
          example: >-
            -_flQmASKXMSSh5cMTAON3zdPWWDWus4ONfim0kYqaG3nGPyWw-TC4bbr4YfmoebWgYgj6V2DNmM6WIl1oaHAA
      requestBody:
        description: >-
          List-shaped withdrawal request to execute directly. Include a stable
          business idempotency key and do not send an authorization token.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PartnerWithdrawalSubmitRequest'
        required: true
      responses:
        '200':
          description: Parent withdrawal accepted
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/WalletWithdrawalResponse'
                  status:
                    type: string
                    enum:
                      - success
              example:
                data:
                  amount: '200000000.00'
                  currency: NGN
                  debit_amount: '200000500.00'
                  estimated_receive: '200000000.00'
                  fee: '500.00'
                  id: 0197f1f0-0000-7000-8000-000000000014
                  items:
                    - amount: '200000000.00'
                      client_item_id: beneficiary-1
                      destination:
                        account_name: Example Recipient
                        account_number: '0123456789'
                        bank_code: '044'
                        bank_name: Access Bank
                        type: bank_account
                      transfers:
                        - amount: '100000000.00'
                          sequence: 1
                          status: pending
                        - amount: '100000000.00'
                          sequence: 2
                          status: pending
                  max_transfer_amount: '100000000.00'
                  rail: fiat
                  receive_currency: NGN
                  reference: WD-0197f1f000007000
                  status: processing
                  transfer_count: 2
                  tx_type: withdrawal
                status: success
        '400':
          description: Invalid parameters or unsupported route
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                    properties:
                      code:
                        type: string
                        example: VALIDATION_FAILED
                      message:
                        type: string
                        example: invalid request parameters
                  status:
                    type: string
                    enum:
                      - error
              example:
                error:
                  code: VALIDATION_FAILED
                  message: invalid request parameters
                status: error
        '401':
          description: Signed request required
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                    properties:
                      code:
                        type: string
                        example: UNAUTHORIZED
                      message:
                        type: string
                        example: missing X-Api-Key header
                  status:
                    type: string
                    enum:
                      - error
              example:
                error:
                  code: UNAUTHORIZED
                  message: missing X-Api-Key header
                status: error
        '402':
          description: Insufficient balance
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                    properties:
                      code:
                        type: string
                        example: INSUFFICIENT_BALANCE
                      message:
                        type: string
                        example: insufficient balance
                  status:
                    type: string
                    enum:
                      - error
              example:
                error:
                  code: INSUFFICIENT_BALANCE
                  message: insufficient balance
                status: error
        '403':
          description: Approved KYB or wallets:withdraw scope required
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                    properties:
                      code:
                        type: string
                        example: FORBIDDEN
                      message:
                        type: string
                        example: request is not allowed
                  status:
                    type: string
                    enum:
                      - error
              example:
                error:
                  code: FORBIDDEN
                  message: request is not allowed
                status: error
        '409':
          description: Idempotency conflict
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                    properties:
                      code:
                        type: string
                        example: CONFLICT
                      message:
                        type: string
                        example: idempotency key already used
                  status:
                    type: string
                    enum:
                      - error
              example:
                error:
                  code: CONFLICT
                  message: idempotency key already used
                status: error
      security:
        - api_key: []
components:
  schemas:
    PartnerWithdrawalSubmitRequest:
      type: object
      required:
        - currency
        - items
        - idempotency_key
      properties:
        currency:
          type: string
          example: USD
        idempotency_key:
          type: string
        items:
          type: array
          items:
            $ref: '#/components/schemas/WalletWithdrawalItemRequest'
        settlement_rail:
          type:
            - string
            - 'null'
          example: USDC
      additionalProperties: false
      example:
        currency: USD
        idempotency_key: partner-withdrawal-20260711-001
        items:
          - amount: '100.00'
            client_item_id: vendor-a
            destination:
              address: 0xRecipient
              chain: evm
              slug: base
              type: crypto_address
        settlement_rail: USDC
    WalletWithdrawalResponse:
      type: object
      required:
        - id
        - status
        - rail
        - currency
        - tx_type
        - amount
      properties:
        amount:
          type: string
        currency:
          type: string
        debit_amount:
          type:
            - string
            - 'null'
        estimated_receive:
          type:
            - string
            - 'null'
        fee:
          type:
            - string
            - 'null'
        id:
          type: string
        items:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/WalletWithdrawalItemPreview'
        max_transfer_amount:
          type:
            - string
            - 'null'
        rail:
          type: string
        receive_currency:
          type:
            - string
            - 'null'
        reference:
          type:
            - string
            - 'null'
        settlement_rail:
          type:
            - string
            - 'null'
        status:
          type: string
        transfer_count:
          type:
            - integer
            - 'null'
          minimum: 0
        tx_type:
          type: string
      example:
        amount: '100.00'
        currency: USD
        id: 0195f7cb-8af5-7f40-9f7c-f08f568d37aa
        rail: crypto
        reference: 0195f7cb-8af5-7f40-9f7c-f08f568d37aa
        settlement_rail: USDC
        status: processing
        tx_type: withdrawal
    WalletWithdrawalItemRequest:
      type: object
      description: Rail-neutral withdrawal item used by list-only public adapters.
      required:
        - amount
        - destination
      properties:
        amount:
          type: string
          example: '100.00'
        client_item_id:
          type:
            - string
            - 'null'
        description:
          type:
            - string
            - 'null'
        destination:
          $ref: '#/components/schemas/WalletWithdrawalDestination'
      additionalProperties: false
    WalletWithdrawalItemPreview:
      type: object
      description: >-
        Rail-neutral item preview. Its field names intentionally match the
        existing

        fiat preview so NGN response JSON remains unchanged.
      required:
        - amount
        - destination
        - transfers
      properties:
        amount:
          type: string
        client_item_id:
          type:
            - string
            - 'null'
        destination:
          $ref: '#/components/schemas/WalletWithdrawalDestination'
        transfers:
          type: array
          items:
            $ref: '#/components/schemas/WalletWithdrawalTransferPreview'
    WalletWithdrawalDestination:
      oneOf:
        - type: object
          required:
            - bank_code
            - bank_name
            - account_number
            - account_name
            - type
          properties:
            account_name:
              type: string
            account_number:
              type: string
            bank_code:
              type: string
            bank_name:
              type: string
            type:
              type: string
              enum:
                - bank_account
        - type: object
          required:
            - chain
            - address
            - type
          properties:
            address:
              type: string
            chain:
              $ref: '#/components/schemas/WalletChain'
            slug:
              type:
                - string
                - 'null'
            type:
              type: string
              enum:
                - crypto_address
    WalletWithdrawalTransferPreview:
      type: object
      required:
        - sequence
        - amount
        - status
      properties:
        amount:
          type: string
        sequence:
          type: integer
          format: int32
        status:
          type: string
    WalletChain:
      type: string
      description: Supported blockchain route family for stablecoin deposits.
      enum:
        - evm
        - tron
        - solana
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        API credential. Withdrawal quote and submit operations additionally
        require the documented Ed25519 timestamp, nonce, and signature headers.
      x-default: sb_test_your_key

````