> For the complete documentation index, see [llms.txt](https://docs.biti.so/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.biti.so/payouts-1.md).

# payouts

Send one payment from your Payout Wallet.

| Endpoint                                                                 | Purpose                    |
| ------------------------------------------------------------------------ | -------------------------- |
| [`POST /partner/v1/create-payout`](#post-partnerv1create-payout)         | Create a payout            |
| [`POST /partner/v1/get-payout-status`](#post-partnerv1get-payout-status) | Get the status of a payout |

## POST /partner/v1/create-payout

**Create a payout**

{% hint style="info" %}
Auth: send `client_id` and `client_secret` in the request body. Call it from your server only.
{% endhint %}

Send one payment from your Payout Wallet to an Active Biti wallet in the same currency. You pay the fee on top of the amount. The receiver gets the exact amount. For many receivers or for mobile money, use [Bulk send](#).

`status` is `done` or `failed`. A failed payout also holds an `error`. A payout that failed after it started is stored as `failed`. Use a new `reference` to retry.

**Errors:**

* Invalid client credentials
* Not enough balance in the Payout Wallet
* Unknown wallet
* Wrong currency
* The same `reference` with other terms

### Parameters

| Name            | Type   | Required | Description                                                   |
| --------------- | ------ | -------- | ------------------------------------------------------------- |
| `client_id`     | string | yes      | Your client ID.                                               |
| `client_secret` | string | yes      | Your client secret. Server only.                              |
| `to_wallet`     | string | yes      | Wallet id or number.                                          |
| `amount`        | number | yes      | Amount the receiver gets.                                     |
| `currency`      | string | yes      | Currency code.                                                |
| `reference`     | string | yes      | Your unique id. The same `reference` returns the same payout. |
| `description`   | string | no       | Text for the payout.                                          |

### Request

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

```bash
curl -X POST "https://api.biti.so/partner/v1/create-payout" \
  -H "Content-Type: application/json" \
  -d '{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "to_wallet": "512345678@biti",
  "amount": 15,
  "currency": "USD",
  "reference": "BONUS-W46-D12",
  "description": "Weekly bonus"
}'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.biti.so/partner/v1/create-payout"
headers = {
    "Content-Type": "application/json",
}
payload = {
    "client_id": "YOUR_CLIENT_ID",
    "client_secret": "YOUR_CLIENT_SECRET",
    "to_wallet": "512345678@biti",
    "amount": 15,
    "currency": "USD",
    "reference": "BONUS-W46-D12",
    "description": "Weekly bonus",
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
const response = await fetch("https://api.biti.so/partner/v1/create-payout", {
  method: "POST",
  headers: {
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "client_id": "YOUR_CLIENT_ID",
    "client_secret": "YOUR_CLIENT_SECRET",
    "to_wallet": "512345678@biti",
    "amount": 15,
    "currency": "USD",
    "reference": "BONUS-W46-D12",
    "description": "Weekly bonus"
  }),
});
console.log(await response.json());
```

{% endtab %}
{% endtabs %}

### Response

```json
{
  "success": true,
  "message": "",
  "data": {
    "payout_id": "MPY-00021",
    "status": "done",
    "amount": 15,
    "currency": "USD",
    "to_wallet": "512345678@biti",
    "transaction_id": "TX..."
  }
}
```

## POST /partner/v1/get-payout-status

**Get the status of a payout**

{% hint style="info" %}
Auth: send `client_id` and `client_secret` in the request body. Call it from your server only.
{% endhint %}

Return the same object as `create-payout`.

**Errors:**

* Invalid client credentials
* Unknown payout

### Parameters

| Name            | Type   | Required | Description                           |
| --------------- | ------ | -------- | ------------------------------------- |
| `client_id`     | string | yes      | Your client ID.                       |
| `client_secret` | string | yes      | Your client secret. Server only.      |
| `payout_id`     | string | yes      | The `payout_id` from `create-payout`. |

### Request

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

```bash
curl -X POST "https://api.biti.so/partner/v1/get-payout-status" \
  -H "Content-Type: application/json" \
  -d '{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "payout_id": "MPY-00021"
}'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.biti.so/partner/v1/get-payout-status"
headers = {
    "Content-Type": "application/json",
}
payload = {
    "client_id": "YOUR_CLIENT_ID",
    "client_secret": "YOUR_CLIENT_SECRET",
    "payout_id": "MPY-00021",
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
const response = await fetch("https://api.biti.so/partner/v1/get-payout-status", {
  method: "POST",
  headers: {
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "client_id": "YOUR_CLIENT_ID",
    "client_secret": "YOUR_CLIENT_SECRET",
    "payout_id": "MPY-00021"
  }),
});
console.log(await response.json());
```

{% endtab %}
{% endtabs %}

### Response

```json
{
  "success": true,
  "message": "",
  "data": {
    "payout_id": "MPY-00021",
    "status": "done"
  }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.biti.so/payouts-1.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
