# Create a customer's withdrawal

`POST /v1/platforms/{platformOrgId}/customers/{customerOrgId}/withdrawals`

**Create a customer's withdrawal** (Act as a platform). Moves funds to one of those own accounts and returns a payment. A recipient account is `not_own_account`.

Prerequisite: Permission `platform:customer_operate`, a new `Idempotency-Key`, `account_id`, and the own-account id.

Acts on a linked customer with the platform's own key or team (platform:customer_operate). Same as POST /v1/orgs/{orgId}/withdrawals. Moves funds to one of the organization's own accounts. Follows the same approval policy and limits as payments. Requires two-factor authentication.

Requires: organization platform, customer active; permission platform:customer_operate

## Request body

- `account_id` (string (uuid), required): Payezy account to move money from. Use an id from list accounts.
- `external_account_id` (string (uuid), required): One of the organization's own accounts
- `amount` (string, required): How much to withdraw, as a decimal string in major units.
- `asset` (enum): Asset code, such as USD, USDC, or SBC. One of: USDC, SBC. One of USDC, SBC.
- `rail` (enum): Rail to the organization's own account. Take it from the withdrawal quote, or omit it and set policy. One of: ach_credit, same_day_ach_credit, wire, fednow_credit, onchain. One of ach_credit, same_day_ach_credit, wire, fednow_credit, onchain.
- `policy` (enum): cheapest picks the lowest fee. fastest picks the earliest arrival. Ignored when rail is set. One of: cheapest, fastest. One of cheapest, fastest.
- `memo` (string): Note that travels with the payment, up to 140 characters.

```json
{
  "account_id": "a4d2f7b9-1c3e-4a58-8f20-6b9e3d1c7a05",
  "external_account_id": "e93b1d60-2f8a-4c7e-91d4-3a6b5c0f2e18",
  "amount": "1250.00",
  "asset": "USDC",
  "rail": "ach_credit",
  "policy": "cheapest",
  "memo": "Invoice 1042"
}
```

Events: withdrawal.updated

Errors: not_own_account, insufficient_funds, single_payout_limit, daily_payout_limit, idempotency_key_reused

```bash
curl -X POST "https://sandbox-api.payezy.io/v1/platforms/$PLATFORM_ORG_ID/customers/$CUSTOMER_ORG_ID/withdrawals" \
  -H "Authorization: Bearer $PAYEZY_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "account_id": "a4d2f7b9-1c3e-4a58-8f20-6b9e3d1c7a05",
  "external_account_id": "e93b1d60-2f8a-4c7e-91d4-3a6b5c0f2e18",
  "amount": "1250.00",
  "asset": "USDC",
  "rail": "ach_credit",
  "policy": "cheapest",
  "memo": "Invoice 1042"
}'
```
