# Create a payout

## Arguments

| Field                         | Type    | Required    | Description                                                                                                                                                   |
| ----------------------------- | ------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| recipient                     | string  | conditional | A public address linked to the customer. Require if the destination object is empty.                                                                          |
| account\_id                   | string  | conditional | Customer account id on merchant side. Require if the destination object is empty.                                                                             |
| amount                        | integer | true        | The amount to be payout to the customer in the minor currency.                                                                                                |
| currency                      | string  | true        | The valid ISO code 3 currency code to create the payout.                                                                                                      |
| expires\_at                   | int     | true        | Time at which the voucher will be expired. Measured in seconds since the Unix epoch.                                                                          |
| recipient\_name               | string  | false       | Customer fist name and last name on merchant database.                                                                                                        |
| metadata                      | hash    | false       | A set of key-value pairs that you can attach to a payout object. It can be useful for storing additional information about the payout in a structured format. |
| deposit                       | bool    | true        | Create a deposit voucher and assign it to the customer. **True** when integrating the payout endpoint (eg. wallet).                                           |
| destination\[type]            | enum    | conditional | Type of destination. One of `bank_account`.                                                                                                                   |
| destination\[account\_number] | string  | conditional | The account number for the bank account, in string formaat. Must be a checking account.                                                                       |
| destination\[routing\_number] | string  | conditional | Routing number of the bank used for transaction.                                                                                                              |
| destination\[swift\_code]     | string  | optional    | The account swift code for international transfers.                                                                                                           |
| destination\[bank\_name]      | string  | optional    | Name of the bank used for transaction.                                                                                                                        |
| destination\[holder\_name]    | string  | optional    | Account holder name of the bank account used for transaction.                                                                                                 |
| destination\[holder\_type]    | enum    | optional    | What type of the bank account used for transaction. Possible values: ***business***, ***individual***.                                                        |
| destination\[saving]          | boolean | optional    | True if destination bank account is a saving account.                                                                                                         |

<mark style="color:yellow;">`POST`</mark> `https://{provided url}/v2/payouts`

{% tabs %}
{% tab title="CURL" %}

```
curl https://{provided url}/v2/payouts \
  -u sk_test_BQokikJOvBiI2HlWgH4olfQ2: \
  -d recipient=AWUkvUDKKnJahjituNpzTA \
  -d recipient_name="John Doe" \
  -d account_id=merchant_account_id \
  -d amount=10000 \
  -d currency=EUR \
  -d deposit=true\
  -d metadata[trans_id]=123456789 \
  -d expires_at=2147483648
```

{% endtab %}
{% endtabs %}

The above command returns JSON structured like this:

```json
{
	"id": "AW-kLcRRC5P8U68CYe0kVA",
	"public_address": "mwVXtJA1DUhZFbkzxKQsXLej9vdFh9b9eH",
	"source": "AW-kLcRbx6KXBv7B3CF8uw",
	"created_at": 1579007460,
	"amount": 10000,
	"currency": "EUR",
	"recipient_name": "John Doe",
	"account_id": "merchant_account_id",
	"metadata": {
		"trans_id": "123456789"
	},
	"status": "succeeded",
	"livemode": false
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.convergegate.com/legacy/wallet-api/payout/create-a-payout.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
