> For the complete documentation index, see [llms.txt](https://docs.bitnbox.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bitnbox.com/bitnbox-pay-api-reference/create-payout.md).

# Create payout

{% hint style="warning" %}
To test the API, make sure to include `x-api-key` in the header with your API key.
{% endhint %}

## Create payout.

> Creates a payout by specifying the wallet address, amount, currency, network, customer details, and an optional webhook URL for notifications. This endpoint initiates the process of transferring funds to the user's specified wallet.

```json
{"openapi":"3.0.2","info":{"title":"Bitnbox API","version":"0.1.0"},"servers":[{"url":"https://api.bitnbox.com"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}}},"paths":{"/v1/payout":{"post":{"description":"Creates a payout by specifying the wallet address, amount, currency, network, customer details, and an optional webhook URL for notifications. This endpoint initiates the process of transferring funds to the user's specified wallet.","summary":"Create payout.","tags":["v1"],"parameters":[],"operationId":"apiCreateWithdrawal","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"method":{"default":"direct","type":"string","enum":["direct","binancepay","kucoinpay","bank"],"description":"A method to make a payout (e.g., to a web3 wallet, or Binance Account)."},"binanceId":{"type":"string","minLength":1,"description":"Recipient's Binance Pay ID or Binance Email. If the payout method is Binance Pay, this field is required."},"kucoinpayId":{"type":"string","minLength":1,"description":"Recipient's Kucoin Pay ID . If the payout method is Kucoin Pay, this field is required."},"walletAddress":{"type":"string","description":"Recipient's wallet address."},"networkFeeByUser":{"type":"boolean","description":"Specifies whether the network fee should be deducted from the amount being withdrawn (true) or the remaining balance (false). Choose the latter option if you need to send a specific amount."},"amount":{"type":"number","minimum":0,"description":"Amount to withdraw."},"currency":{"type":"string","minLength":1,"description":"Currency for withdrawal, specified via tickers (refer to API glossary)."},"network":{"description":"Blockchain network for withdrawal, specified via tickers (refer to API glossary)."},"customerId":{"type":"string","minLength":1,"description":"Customer's ID for security purposes."},"customerIp":{"type":"string","minLength":1,"description":"Customer's IP address for security purposes."},"orderId":{"type":"string","minLength":1,"description":"Customer's order ID."},"additionalData":{"type":"string","description":"Additional information related to the payout, if needed."},"webhookUrl":{"type":"string","description":"Webhook address for receiving withdrawal notifications."}},"required":["networkFeeByUser","amount","currency","network","customerId","customerIp","orderId"],"description":"Withdrawal creation request body."}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string","description":"The order ID for the withdrawal, set by the merchant."},"status":{"type":"string","enum":["created","review","processing","confirming","paid","failed","cancelled"],"description":"Current status of the payout."},"method":{"default":"direct","type":"string","enum":["direct","binancepay","kucoinpay","bank"],"description":"A method to make a payout (e.g., to a web3 wallet, or Binance Account)."},"currency":{"type":"string","description":"Type of currency used for the payout (e.g., usdt, usdc)."},"network":{"type":"string","description":"Blockchain network associated with the payout (e.g., eth, sepolia, polygon, amoy)."},"amount":{"type":"number","description":"The requested amount for the payout."},"payoutId":{"type":"string","format":"uuid","description":"Unique identifier for the payout."},"walletAddress":{"type":"string","description":"Recipient’s wallet address."},"binanceId":{"type":"string","description":"Recipient’s Binance ID."},"customerId":{"type":"string","description":"Customer's ID for security purposes."},"customerIp":{"type":"string","description":"The customer's IP address, recorded for compliance purposes."},"networkFeeByUser":{"type":"boolean","description":"Specifies whether the network fee should be deducted from the amount being withdrawn (true) or the remaining balance (false). Choose the latter option if you need to send a specific amount."},"additionalData":{"type":"string","description":"Additional information, optional, set by the merchant."},"webhookUrl":{"type":"string","format":"uri","description":"The URL to which events for this withdrawal request will be sent."},"createdAt":{"type":"string","format":"date-time","description":"Date and time when the payout was created."},"updatedAt":{"type":"string","format":"date-time","description":"Date and time of the last update to the payout information."}},"required":["orderId","status","currency","network","amount","payoutId","customerId","customerIp","networkFeeByUser","createdAt","updatedAt"],"description":"Successful withdrawal creation response"}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"Error code"},"message":{"type":"string","description":"Error message"}},"required":["code","message"],"description":"Error response in case of failure."}}}}}}}}}
```

{% hint style="info" %}
The amount field has a restriction on the number of characters supported after the decimal point, depending on the currency.\
\
Supported number of decimal places:

**USDT** — up to 6 digits\
**USDC** — up to 6 digits

**ETH** — up to 8 digits\
**POL** — up to 8 digits\
**TRX** — up to 6 digits\
**BNB** — up to 8 digits<br>

If the maximum number of characters is exceeded, the request will be rejected with an error:
{% endhint %}

```json
 {
    "message": "Invalid decimal precision for {currency}. Maximum {number} decimal places allowed",
    "statusCode": 422
}
```
