# Payouts

A payout withdraws funds from your PayPro balance to one of your registered bank accounts. When creating a payout, you must have a sufficient balance in your PayPro account. Payouts can be created in multiple ways:

- Automatically, based on the schedule configured on the [Withdrawal Settings page](https://app.paypro.nl/rekening/opnemen/settings)
- Through the [PayPro Dashboard](https://app.paypro.nl/rekening/opnemen)
- With the [Payouts API](/reference/api/payouts)


We will now discuss how to check your balance and create a Payout with our [Payouts API](/reference/api/payouts).

## Checking your balance

Your account has a separate [Balance](/reference/api/balances) per currency. Before creating a payout you can retrieve your balances to see how much is available to withdraw:

PHP
```php
$balances = $paypro->balances->list();
```

Ruby
```ruby
client = PayPro::Client.new('pp_...')

balances = client.balances.list
```

Each balance has an `amount` and a `currency`, so if you hold funds in multiple currencies you will get one balance object back per currency.

You don't have to check the balance yourself before creating a payout — if you request more than the withdrawable amount the [Payout create endpoint](/reference/api/payouts/createpayout) will reject the request. Your available balance for withdrawal may be less than your total balance. Depending on your account settings, PayPro may retain a minimum reserve to cover potential refunds and chargebacks.

## Creating a Payout

A Payout is a resource in our API. Create one by calling the [Payout create endpoint](/reference/api/payouts/createpayout) with an `amount` and `currency`:

PHP
```php
$payout = $paypro->payouts->create(
  [
    'amount' => 10000,
    'currency' => 'EUR'
  ]
);
```

Ruby
```ruby
payout = client.payouts.create(
  amount: 10000,
  currency: 'EUR'
)
```

The `amount` is withdrawn from the balance in the given `currency`. You can also supply `metadata` to store your own data alongside the payout, which is returned when you fetch the payout again.

## Payout statuses

Payouts have their own status, independent of the balance transactions they create.

These are the possible states:

##### open

The payout is created and will be picked up by our system soon.

##### pending

The payout is waiting to be approved.

##### processing

The payout has been approved and is being sent to the bank account.

##### paid

The payout has been paid out and the funds should have arrived at the bank account.

##### failed

The payout could not be completed. The withdrawn funds are returned to your PayPro balance.

## Listen for Webhook Events

Payout processing is asynchronous, so a payout will not immediately reach its final state. To stay informed about status changes we recommend implementing our [Webhooks](/reference/webhooks). You can subscribe to the following payout events:

- `payout.created`
- `payout.approved`
- `payout.rejected`
- `payout.paid`
- `payout.failed`


For more details on how to set up and manage webhooks, visit the [webhooks page](/reference/webhooks).