## Send a payout

Send a payout to the primary bank account.

## Endpoint signature

```http
POST https://api.reservepay.com/merchants/send-payout HTTP/1.1
Content-Type: application/json
Accept: application/json
Authorization: Bearer <token>

{
  external_id: string?,
  amount: string,
}
```

Returns: string

## Request arguments

### `external_id` (string)

_Optional_. Your unique reference for this payout. You can use this ID later to look up the
payout instead of our payout ID. Must be unique across all your payouts.

### `amount` (string)

**Required**. The payout amount in the smallest currency unit (e.g. satang). For example,
use 10000 for 100 THB. Must be a positive integer.

## Errors specific to this endpoint

### `NOT_FOUND`

The bank account does not exist or the payout method is not configured for this merchant.

### `INSUFFICIENT_BALANCE`

The merchant does not have sufficient balance to complete this payout.
The requested amount exceeds the available balance in the merchant's account.

### `INVALID_AMOUNT`

The payout amount exceeds the merchant or payout method limits.

## Errors common to all endpoints

### `UNHANDLED_ERROR`

This error occurs when the server encounters an unexpected internal error that
it cannot handle gracefully. This typically happens due to bugs, infrastructure
issues, or edge cases that weren't anticipated during development.

### `INVALID_ARGUMENTS`

This error occurs when the request contains invalid or missing parameters.
Common cases include missing required fields, or values that don't match the
expected format or type.

### `BAD_VERSION`

This error occurs when making requests to an API version that does not exist.
This commonly happens when using an outdated SDK or when the API version
specified in the request URL is incorrect.
