# Get Payout

## Get Payout by ID

<mark style="color:green;">`GET`</mark> `/api/payout/<id>`

Get Payout  by ID

**Headers**

| Name        | Value     |
| ----------- | --------- |
| `x-api-key` | `<token>` |
| `signature` | `<token>` |

#### Example request

```
/api/payout/3971f24a-b901-4bdb-b3a5-7690ca350cd3
```

**Response**

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

```json
{
    "message": "Payout found",
    "payload": {
        "id": "3971f24a-b901-4bdb-b3a5-7690ca350cd3",
        "created_at": "1710144053053",
        "provider_reference": "dev-ref-a00020",
        "batch_id": "",
        "asset": "AUD",
        "reference": "dev-ref-a00020",
        "merchant": "MERC#9f05dc98-47bd-47f2-a039-8d9889fdfb7a",
        "fee_data": {
            "fee_value": "200",
            "feetemplate_id": "10543412-9de9-4adb-814c-60fd5ea4aba8",
            "fixed": 0,
            "feegroup_id": "4d8d52ee-47e8-425b-9677-878b127147b9",
            "percentage": 10,
            "min_amount": 20
        },
        "note": "devid a00020",
        "payout_data": {
            "status": "IN PROGRESS",
            "transaction_is_duplicated": false,
            "receiver_is_invalid": false,
            "accepted": true,
            "errors": null,
            "transaction_id": "20020105",
            "sender_is_invalid": false
        },
        "status": "successful",
        "amount": 2000,
        "subaccount": {
            "id": "ccb93d70-00d0-4ec4-a454-32bfc8e8428f"
        },
        "receiver": {
            "id": "e4908c83-6656-408a-8ba2-61dae8f039a5",
            "firstname": "Devid-A",
            "lastname": "Tesla",
            "email": "david@teslastudio.com"
        },
        "receiver_account": {
            "id": "6afec8ad-c026-463b-9f09-f60adfae10a0",
            "email": "david@teslastudio.com",
            "bsb": "012002",
            "bank_code": "ANZ",
            "account_number": "223344556677"
        },
        "payout_provider": {
            "id": "eb68d16a-d395-4acd-a8bf-d01de92f949b"
        },
        "transactions": [
            {
                "transaction_id": "6af8c51c-e8d6-4ba5-b3d7-c966b9f14fb9",
                "amount": -1800,
                "asset": "AUD",
                "status": "complete",
                "created_at": "1710144077857",
                "updated_at": "1710144379146",
                "transaction_type": "payout"
            },
            {
                "transaction_id": "4eefc21c-286e-48d9-82a8-788bfbd4175f",
                "amount": -200,
                "asset": "AUD",
                "status": "complete",
                "created_at": "1710144077857",
                "updated_at": "1710144379226",
                "transaction_type": "fee"
            }
        ]
    }
}
```

{% endtab %}

{% tab title="400" %}

```json
{
    "message": "Get payout failed",
    "error": [
        {
            "code": "PAYO101",
            "message": "Payout ID not found"
        }
    ]
}
```

{% endtab %}
{% endtabs %}

## Get Payout list

<mark style="color:green;">`GET`</mark> `/api/payout/`

Get Payout  list

**Headers**

| Name        | Value     |
| ----------- | --------- |
| `x-api-key` | `<token>` |
| `signature` | `<token>` |

#### Request query parameter

<table><thead><tr><th>Name</th><th width="164">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>limit</code></td><td>string</td><td>Limit of request data.</td></tr><tr><td><code>from</code></td><td>string</td><td>Filter by create date <code>from</code> in format <strong>'YYYY-MM-DD hh:mm'</strong>.</td></tr><tr><td><code>to</code></td><td>string</td><td>Filter by create date <code>to</code> in format <strong>'YYYY-MM-DD hh:mm'</strong>.</td></tr><tr><td><code>status</code></td><td>string</td><td><p>Filter by payout status.</p><p><strong>1 = PENDING</strong> <br><strong>2 = UNASSESSED</strong><br><strong>3 = IN_PROGRESS</strong><br><strong>4 = SUCCESSFUL</strong><br><strong>5 = CANCELLED</strong><br><strong>6 = FAILED</strong><br><strong>7 = SUCCESSFUL_PENDING_KYC</strong></p></td></tr></tbody></table>

#### Example query parameter request

```
/api/payout?from=2024-02-08 09:00&to=2024-03-11 06:21&limit=1
```

**Response**

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

```json
{
    "message": "Payout found",
    "payload": [
        {
        "id": "ce74a54d-cd7d-475b-8213-b70a7a9c47e0",
        "created_at": "1707384569939",
        "provider_reference": "ref-22aud",
        "batch_id": "",
        "asset": "AUD",
        "reference": "ref-22aud",
        "fee_data": {
            "feetemplate_id": "10543412-9de9-4adb-814c-60fd5ea4aba8",
            "fixed": 0,
            "feegroup_id": "4d8d52ee-47e8-425b-9677-878b127147b9",
            "percentage": 10,
            "min_amount": 20
        },
        "note": "22 AUD payout",
        "payout_data": {
            "status": "PENDING",
            "transaction_is_duplicated": false,
            "receiver_is_invalid": false,
            "accepted": true,
            "errors": null,
            "transaction_id": "20019915",
            "sender_is_invalid": false
        },
        "status": "pending",
        "amount": "2200",
        "subaccount": {
            "id": "ccb93d70-00d0-4ec4-a454-32bfc8e8428f"
        },
        "receiver": {
            "id": "617fc7a4-70e2-47d3-a5b0-84a5bc17a4a0",
            "firstname": "Exel",
            "lastname": "Receiver",
            "email": "ex@teslastudio.com"
        },
        "receiver_account": {
            "id": "fdf427df-1093-4d77-84a7-b08ac67f453f",
            "email": "ex@teslastudio.com",
            "bsb": "012040",
            "bank_code": "ANZ",
            "account_number": "111111222255"
        },
        "payout_provider": {
            "id": "eb68d16a-d395-4acd-a8bf-d01de92f949b"
        }
    ]
}
```

{% endtab %}
{% endtabs %}
