> For the complete documentation index, see [llms.txt](https://help.unitpay.ru/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.unitpay.ru/en/mass-payouts/balance-available-for-withdrawal.md).

# Balance available for withdrawal

Use this query to find out the available balance for a particular payout method.

```bash
GET https://unitpay.ru/api

method            = massPaymentAvailableAmount
login             = unitpay-test@example.ru
secretKey         = 11122233F11-1F2220E3344-11122233D2
sum               = 5
purse             = 79123456789
paymentType       = sbp
recipientCurrency = RUB
```

#### Mandatory Parameters:

<table data-header-hidden><thead><tr><th width="195.111083984375">name</th><th width="138.22212727864581">type</th><th>description</th></tr></thead><tbody><tr><td><strong>login</strong></td><td>string</td><td>E-mail account in the UnitPay system</td></tr><tr><td><strong>secretKey</strong></td><td>string</td><td>Account secret key, available in profile <a href="https://unitpay.ru/partner/profile/edit">settings</a></td></tr><tr><td><strong>sum</strong></td><td>number</td><td>The amount of the payment (e.g. 100)</td></tr><tr><td><strong>purse</strong></td><td>string</td><td>Details for receiving the payment (e.g. phone number, bank card number)</td></tr><tr><td><strong>paymentType</strong></td><td>string</td><td>Name of payment method</td></tr></tbody></table>

#### Optional Parameters:

<table><thead><tr><th width="197.88885498046875">name</th><th width="138.333251953125">type</th><th>description</th></tr></thead><tbody><tr><td><strong>recipientCurrency</strong></td><td>string</td><td>Payment currency (RUB - for all payments via bank cards, SBP)</td></tr></tbody></table>

#### Example of a successful response:

```
{
    "result": {
        "availableAmount": 1057.36,
        "currency": "RUB"
    }
}
```

<table><thead><tr><th width="195.66668701171875">name</th><th width="134.8887939453125">type</th><th>description</th></tr></thead><tbody><tr><td><strong>availableAmount</strong></td><td>число</td><td>Balance available for withdrawal</td></tr><tr><td><strong>currency</strong></td><td>строка</td><td>Currency of the requested balance</td></tr></tbody></table>

#### Example of an erroneous answer:

```
{
    "error": {
        "message": "Invalid authorization parameters",
        "code": -32000
    }
}
```

<table data-header-hidden><thead><tr><th width="219.55548095703125">name</th><th>description</th></tr></thead><tbody><tr><td><strong>-32000</strong></td><td>Invalid authorization parameters (login, secret key)</td></tr><tr><td><strong>-32602</strong></td><td>Invalid request parameters (incorrectly composed request)</td></tr><tr><td><strong>-32603</strong></td><td>Internal technical error</td></tr></tbody></table>
