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

# Complete Withdrawal

At this point you should've presented the withdrawal intent to the user, once they've confirmed the amount, fees, and destination bank account, you can proceed to complete the withdrawal.

Once this request is complete the fund transfer will be initiated to the destination bank account, and any applicable fees will be deducted from the user's balance.

<Note>
  **Testing Considerations**: Please avoid running automated tests against this endpoint as test accounts require manual
  replenishment.
</Note>

#### Relevant Error Codes

The endpoint-specific error codes to pay attention to are:

* [MemberInsufficientFunds](/api-reference/error-handling#memberinsufficientfunds)
* [BankAccountInvalid](/api-reference/error-handling/#bankaccountinvalid)
* [AmountBelowLowerLimit](/api-reference/error-handling/#amountbelowlowerlimit)
* [AmountAboveUpperLimit](/api-reference/error-handling/#amountaboveupperlimit).

In rare cases, you may receive a [Unprocessable Entity Error](snippets/generated-errors#UnprocessableEntity) which indicates that On Demand Pay is temporarily unavailable.


## OpenAPI

````yaml POST /v1/pay/withdrawals/complete
openapi: 3.0.2
info:
  title: BMO Partner API
  version: v1
servers:
  - url: https://api.onsi.com
    description: Production
  - url: https://api.onsi.dev
    description: Sandbox
security:
  - apiKey: []
paths:
  /v1/pay/withdrawals/complete:
    post:
      tags:
        - pay
      summary: Finalize a withdrawal
      operationId: completeWithdrawal
      parameters:
        - name: x-idempotency-key
          in: header
          description: Unique key to ensure idempotency of the request
          schema:
            type: string
      requestBody:
        description: Body
        content:
          application/json:
            schema:
              type: object
              properties:
                withdrawalIntentId:
                  example: wi_<id>
                  description: >-
                    The unique identifier for a PayWithdrawalIntent, prefixed
                    with wi_
                  type: string
              required:
                - withdrawalIntentId
              additionalProperties: false
      responses:
        '201':
          description: '201'
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
                additionalProperties: false
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key

````