# Payouts

***

### <mark style="color:green;">GET</mark> /payout/{id}

{% hint style="info" %}
**Request**
{% endhint %}

```bash
curl -v --location --request GET 'https://sandbox.smartfastpay.com/payout/{id}' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer <Access-Token>' \'
```

{% hint style="info" %}
**Response**
{% endhint %}

```json
{
    "requestId": "a2435636-5f69-447d-8e22-8382f62ef7dd",
    "data": {
        "id": "f569c39c-71c2-44a2-8f95-d5840886bbe3",
        "customer_id": "d9e9557e-11a5-49df-b51b-d513a7f5b348",
        "transaction_id": "22dd9e47-97c7-4982-af50-3d3e0782d054",
        "amount": "98000.00",
        "currency": "COL",
        "status": "pending",
        "created_at": "2021-11-11T19:08:20.000000Z",
        "updated_at": "2021-11-11T19:08:20.000000Z"
    }
}
```

{% hint style="info" %}
**Response details**
{% endhint %}

<table><thead><tr><th width="202">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:red;"><code>id</code></mark></td><td>The created payment by the request made unique identificator.</td></tr><tr><td><mark style="color:red;"><code>customer_id</code></mark></td><td>The customer id stored on your platform for future identification.</td></tr><tr><td><mark style="color:red;"><code>transaction_id</code></mark></td><td>The id of the transaction generated in you platform.</td></tr><tr><td><mark style="color:red;"><code>amount</code></mark></td><td>The amount that the client specified when initiating the transaction.</td></tr><tr><td><mark style="color:red;"><code>currency</code></mark></td><td>The currency type that the amount will be credited.</td></tr><tr><td><mark style="color:red;"><code>status</code></mark></td><td>The current status of the payment. These are our statuses: <mark style="color:red;"><code>pending</code></mark>, <mark style="color:red;"><code>success</code></mark>, <mark style="color:red;"><code>failed</code></mark>, <mark style="color:red;"><code>onhold</code></mark>, <mark style="color:red;"><code>returned</code></mark>, <mark style="color:red;"><code>refunded</code></mark></td></tr><tr><td><mark style="color:red;"><code>created_at</code></mark></td><td>The date and time the transaction was created.</td></tr><tr><td><mark style="color:red;"><code>updated_at</code></mark></td><td>The date and time the transaction was updated with new status.</td></tr></tbody></table>

***

### <mark style="color:green;">GET</mark> /payouts

{% hint style="info" %}
**Request**
{% endhint %}

```bash
# Without parameters

curl -v --location --request GET 'https://sandbox.smartfastpay.com/payouts' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer <Access-Token>' \'
```

```bash
# With parameters

curl -v --location --request GET 'https://sandbox.smartfastpay.com/payouts?limit=1&order=id,desc' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer <Access-Token>' \'
```

{% hint style="info" %}
**Parameters details**
{% endhint %}

<table><thead><tr><th width="192">Parameter</th><th width="269" align="center">Type</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:red;"><code>limit</code></mark></td><td align="center"><mark style="color:red;"><code>integer</code></mark><br><mark style="color:red;"><code>min: 1 | max: 40</code></mark></td><td>The number of items to return in the response.</td></tr><tr><td><mark style="color:red;"><code>page</code></mark></td><td align="center"><mark style="color:red;"><code>integer</code></mark><br><mark style="color:red;"><code>min: 1 | max: 9999999</code></mark></td><td>The page number indicating which set of items will be returned in the response. So, the combination of <mark style="color:red;"><code>page=1</code></mark> and <mark style="color:red;"><code>limit=20</code></mark> returns the first 20 items. The combination of <mark style="color:red;"><code>page=2</code></mark> and <mark style="color:red;"><code>limit=20</code></mark> returns items 21 through 40.</td></tr><tr><td><mark style="color:red;"><code>sort</code></mark></td><td align="center"><mark style="color:red;"><code>string</code></mark><br><mark style="color:red;"><code>Format: item,(asc|desc)</code></mark></td><td>Sorts the items in the response by filter in ascending or descending order.<br>Eg.: <mark style="color:red;"><code>sort=id,desc</code></mark><br><em>(This combination returns a list in descending order based on id.)</em></td></tr><tr><td><mark style="color:red;"><code>start_time</code></mark></td><td align="center"><mark style="color:red;"><code>string</code></mark><br><mark style="color:red;"><code>Internet date and time format</code></mark></td><td>The start date and time for the range to show in the response, in <a href="https://tools.ietf.org/html/rfc3339#section-5.6">Internet date and time format</a>.<br>Eg.: <mark style="color:red;"><code>start_time=2021-09-05T11:00:00Z</code></mark>.</td></tr><tr><td><mark style="color:red;"><code>end_time</code></mark></td><td align="center"><mark style="color:red;"><code>string</code></mark><br><mark style="color:red;"><code>Internet date and time format</code></mark></td><td>The end date and time for the range to show in the response, in <a href="https://tools.ietf.org/html/rfc3339#section-5.6">Internet date and time format</a>.<br>Eg.: <mark style="color:red;"><code>end_time=2021-09-05T11:00:00Z</code></mark>.</td></tr><tr><td><mark style="color:red;"><code>customer_id</code></mark></td><td align="center"><mark style="color:red;"><code>string</code></mark><br><mark style="color:red;"><code>min: 1 | max: 255</code></mark></td><td>Sorts the items in the response by looking for the customer_id that was once provided by your system.</td></tr><tr><td><mark style="color:red;"><code>transaction_id</code></mark></td><td align="center"><mark style="color:red;"><code>string</code></mark></td><td>Sorts the items in the response by looking for the transaction_id that was once provided by your system.<br>To get multiple transaction_id, send each transaction_id separating by comma (,).<br>Eg.: <mark style="color:red;"><code>8fecdfcc-4e4d-11ee</code></mark><code>,</code><mark style="color:red;"><code>8fece5ee-4e4d-11ee</code></mark><code>, </code><mark style="color:red;"><code>d42953be-4e4d-11ee</code></mark></td></tr></tbody></table>

{% hint style="info" %}
**Response**
{% endhint %}

```json
{
    "requestId": "a2435636-5f69-447d-8e22-8382f62ef7dd",
    "data": [
        {
            "id": "897c9e20-1262-4679-a850-403d37b2a727",
            "customer_id": "d9e9557e-11a5-49df-b51b-d513a7f5b348",
            "transaction_id": "22dd9e47-97c7-4982-af50-3d3e0782d054",
            "amount": "98000.00",
            "currency": "COL",
            "status": "pending",
            "created_at": "2021-11-11T19:08:20.000000Z",
            "updated_at": "2021-11-11T19:08:20.000000Z"
        },
        {
            "id": "f569c39c-71c2-44a2-8f95-d5840886bbe3",
            "customer_id": "58f0c005-3b7d-4c75-81f3-93b9a6fee864",
            "transaction_id": "b08e3897-6505-4bb4-81a5-6e3a1d29e277",
            "amount": "30000.00",
            "currency": "COL",
            "status": "pending",
            "created_at": "2021-11-11T19:08:20.000000Z",
            "updated_at": "2021-11-11T19:08:20.000000Z"
        }
    ]
}
```

{% hint style="info" %}
**Response details**
{% endhint %}

<table><thead><tr><th width="192">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:red;"><code>id</code></mark></td><td>The created payment by the request made unique identificator.</td></tr><tr><td><mark style="color:red;"><code>customer_id</code></mark></td><td>The customer id stored on your platform for future identification.</td></tr><tr><td><mark style="color:red;"><code>transaction_id</code></mark></td><td>The id of the transaction generated in you platform.</td></tr><tr><td><mark style="color:red;"><code>amount</code></mark></td><td>The amount that the client specified when initiating the transaction.</td></tr><tr><td><mark style="color:red;"><code>currency</code></mark></td><td>The currency type that the amount will be credited.</td></tr><tr><td><mark style="color:red;"><code>status</code></mark></td><td>The current status of the payment. These are our statuses: <mark style="color:red;"><code>pending</code></mark>, <mark style="color:red;"><code>success</code></mark>, <mark style="color:red;"><code>failed</code></mark>, <mark style="color:red;"><code>onhold</code></mark>, <mark style="color:red;"><code>returned</code></mark>, <mark style="color:red;"><code>refunded</code></mark></td></tr><tr><td><mark style="color:red;"><code>created_at</code></mark></td><td>The date and time the transaction was created.</td></tr><tr><td><mark style="color:red;"><code>updated_at</code></mark></td><td>The date and time the transaction was updated with new status.</td></tr></tbody></table>
