---
title: "Closed-Loop Withdraw"
method: POST
path: "/api/v1/wallets/:walletId/withdraw"
tags: ["Wallets"]
---

# Closed-Loop Withdraw

`POST /api/v1/wallets/:walletId/withdraw`

## Request

- Base URL: `https://merchant-api.accruesavings.com`
- URL: `https://merchant-api.accruesavings.com/api/v1/wallets/:walletId/withdraw`
- Auth: none declared. Required headers: `Client-ID`, `Authorization`
- TypeScript: <https://skmtc.dev/byaccrue/apis/accrue-merchant-api/docs/api/v1/wallets/:walletId/withdraw/post.ts> (a function with typed inputs; its response is checked against the schema)

Withdraw funds from a wallet back to the user's linked account(s). The amount is split across linked accounts. Requires the wallet to have withdrawable balance (see Get Wallet Balance with `includeWithdrawableAmount=true`).

## Path parameters

- `walletId` string, uuid, required: The wallet ID to withdraw from.

## Headers

- `Client-ID` string, uuid, required: The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.
- `Authorization` string, uuid, required: Secure secret to access privileged endpoints.

## Request body

- object
  - `data` object, required
    - `type` 'Withdraw', required
    - `attributes` object, required
      - `amount` integer, required: The amount to withdraw, in the smallest currency unit (e.g., cents for USD). Minimum is 100 (e.g., $1.00). Must not exceed the wallet's withdrawable amount.

## Response `201`

201 Created

- ClosedLoopWithdrawResponse
  - `data` object, required
    - `id` string, uuid, required: The wallet ID. Same as the `walletId` path parameter.
    - `type` 'Withdraw', required
    - `attributes` object, required
      - `split` object[], required: Breakdown of the withdrawal across linked accounts. Each item indicates how much is allocated to each account.
        - `linkedAccountId` string, uuid, required: The linked account ID that received (or will receive) this portion of the withdrawal.
        - `institutionName` string, required: Name of the financial institution for the linked account.
        - `accountMask` string, required: Masked account number (e.g., last four digits) for display.
        - `amount` integer, required: Amount in cents allocated to this linked account.

## Other responses

- `400`: Bad Request
- `404`: Not Found
- `500`: Internal Server Error

---

[API](https://skmtc.dev/byaccrue/apis/accrue-merchant-api.md) - [All operations](https://skmtc.dev/byaccrue/apis/accrue-merchant-api/llms.txt) - [OpenAPI document](https://skmtc.dev/byaccrue/apis/accrue-merchant-api/revisions/3e2d97ef2e6e?raw)
