# Payouts (Brazil)

***

### <mark style="color:orange;">POST</mark> /v1/payout

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

{% code overflow="wrap" %}

```bash
curl -v --location --request POST 'https://sandbox.smartfastpay.com/v1/payout' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer <Access-Token>' \
    --data-raw '{
        "customer_id": "d9e9557e-11a5-49df-b51b-d513a7f5b348",
        "name": "Jane Doe",
        "email": "richard@roe.com",
        "document": "86423835004",
        "amount": 980,
        "currency": "USD",
        "pix": {
            "key": "3cd9ae47-78d7-4982-af50-3d3e078hf2gf"
        },
        "bank": {
            "name": "Banco Itaú",
            "code": "341",
            "agency": "1243",
            "account": "213846-2",
            "account_operation": "013"
        },
        "callback": "http://mysite.com/api/notification",
        "transaction": {
            "id": "22dd9e47-97c7-4982-af50-3d3e0782d054"
        }
    }'
```

{% endcode %}

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

<table><thead><tr><th width="220">Parameter</th><th width="205" align="center">Type</th><th width="100" align="center">Required</th><th>Description</th></tr></thead><tbody><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 align="center"><strong>yes</strong></td><td>The customer id stored on your platform for future identification.</td></tr><tr><td><mark style="color:red;"><code>branch</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 align="center">no</td><td>When the merchant needs to keep track of its various offices / branch, this field must be fill.</td></tr><tr><td><mark style="color:red;"><code>name</code></mark></td><td align="center"><mark style="color:red;"><code>string</code></mark><br><mark style="color:red;"><code>min: 3 | max: 150</code></mark></td><td align="center"><strong>yes</strong></td><td>Name of the customer who started the transaction.</td></tr><tr><td><mark style="color:red;"><code>email</code></mark></td><td align="center"><mark style="color:red;"><code>string</code></mark><br><mark style="color:red;"><code>min: 30 | max: 255</code></mark></td><td align="center"><strong>yes</strong></td><td>Email of the customer who started the transaction.</td></tr><tr><td><mark style="color:red;"><code>document</code></mark></td><td align="center"><mark style="color:red;"><code>string</code></mark><br><mark style="color:red;"><code>Format: 99999999999</code></mark></td><td align="center"><strong>yes</strong></td><td>Brazilian document (CPF) of the customer who started the transaction.<br>- Must be a valid CPF document;<br><mark style="color:red;"><code>Eg: 12345678909</code></mark></td></tr><tr><td><mark style="color:red;"><code>amount</code></mark></td><td align="center"><mark style="color:red;"><code>decimal (10,2)</code></mark><br><mark style="color:red;"><code>min: 2</code></mark></td><td align="center"><strong>yes</strong></td><td>The amount that the client specified when initiating the transaction showed IN DOLLARS (use dot instead of comma)<br><mark style="color:red;"><code>Eg: 300.10</code></mark></td></tr><tr><td><mark style="color:red;"><code>currency</code></mark></td><td align="center"><mark style="color:red;"><code>string (3)</code></mark><br><mark style="color:red;"><code>(USD or BRL)</code></mark><br><mark style="color:red;"><code>min: 3 | max: 3</code></mark></td><td align="center">no</td><td>The currency type that the amount will be credited. If USD is provided there will be a conversion from USD to BRL, if BRL is provided there will be no conversion.<br><br>This parameter is optional, if currency isn't provided it will auto-select USD.<br><strong>Default: USD</strong></td></tr><tr><td><mark style="color:red;"><code>payout_method</code></mark></td><td align="center"><mark style="color:red;"><code>string</code></mark><br><mark style="color:red;"><code>(bank_transfer or pix)</code></mark><br><mark style="color:red;"><code>Default: pix when not informed</code></mark></td><td align="center"><strong>yes</strong></td><td>The payment method your customer will use. If bank_transfer is provided, we will return bank information for deposit, but if the provided is pix, the information for pix will be returned.</td></tr><tr><td><mark style="color:red;"><code>callback</code></mark></td><td align="center"><mark style="color:red;"><code>string</code></mark><br><mark style="color:red;"><code>min: 30 | max: 250</code></mark><br><mark style="color:red;"><code>(Method: POST)</code></mark></td><td align="center"><strong>yes</strong></td><td>The URL in you site that our API will notify when the payment changes the status, the HTTP supported method should be HTTP<br><mark style="color:red;"><code>Eg: http://my-url-callback/</code></mark></td></tr><tr><td><mark style="color:red;"><code>transaction</code></mark></td><td align="center"></td><td align="center"></td><td></td></tr><tr><td><mark style="color:red;"><code>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 align="center"><strong>yes</strong></td><td>The id of the transaction generated in you platform.</td></tr><tr><td><mark style="color:red;"><code>bank</code></mark></td><td align="center"></td><td align="center"></td><td></td></tr><tr><td><mark style="color:red;"><code>name</code></mark></td><td align="center"><mark style="color:red;"><code>string</code></mark><br><mark style="color:red;"><code>min: 3 | max: 255</code></mark></td><td align="center">no</td><td>The name of the bank</td></tr><tr><td><mark style="color:red;"><code>code</code></mark></td><td align="center"><mark style="color:red;"><code>string</code></mark><br><mark style="color:red;"><code>min: 1 | max: 10</code></mark></td><td align="center">no</td><td>The code of the bank provided by Banco Central (BC)</td></tr><tr><td><mark style="color:red;"><code>agency</code></mark></td><td align="center"><mark style="color:red;"><code>string</code></mark><br><mark style="color:red;"><code>min: 4 | max: 10</code></mark></td><td align="center">no</td><td>The number of the bank agency that client have opened their account</td></tr><tr><td><mark style="color:red;"><code>account</code></mark></td><td align="center"><mark style="color:red;"><code>string</code></mark><br><mark style="color:red;"><code>min: 3 | max: 80</code></mark></td><td align="center">no</td><td>The number of the bank account of the client</td></tr><tr><td><mark style="color:red;"><code>account_operation</code></mark></td><td align="center"><mark style="color:red;"><code>string</code></mark><br><mark style="color:red;"><code>min: 3 | max: 80</code></mark></td><td align="center">no</td><td>The operation number or code of the bank account, some accounts have that code like Caixa Economica Federal in their saving account (conta poupança). It has the operation code 013. This field is not required, some banks don't have this code</td></tr><tr><td><mark style="color:red;"><code>pix</code></mark></td><td align="center"></td><td align="center"></td><td></td></tr><tr><td><mark style="color:red;"><code>key</code></mark></td><td align="center"><mark style="color:red;"><code>string</code></mark><br><mark style="color:red;"><code>min: 3 | max: 250</code></mark></td><td align="center">no</td><td>Pix key or reference</td></tr></tbody></table>

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

```json
{
    "requestId": "a2435636-5f69-447d-8e22-8382f62ef7dd",
    "data": {
        "id": "f569c39c-71c2-44a2-8f95-d5840886bbe3",
        "status": "pending",
        "values": {
            "total": "4958.80",
            "subtotal": "4958.80",
            "exchange": "5.06",
            "fee": 0
        }
    }
}
```

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

<table><thead><tr><th width="161">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:red;"><code>id</code></mark></td><td>The created payout by the request made unique identificator. Can be used to verify the payout status in the <a href="#get-payout-id"><mark style="color:green;"><strong>GET</strong> /v1/payout/{id}</mark></a> endpoint</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>values</code></mark></td><td></td></tr><tr><td><mark style="color:red;"><code>total</code></mark></td><td>The full value of the transaction, including service fees. Decimal separator it a dot</td></tr><tr><td><mark style="color:red;"><code>subtotal</code></mark></td><td>The value of the transaction, without service fees. Decimal separator it a dot</td></tr><tr><td><mark style="color:red;"><code>exchange</code></mark></td><td>The exchange rate applied to the current transaction</td></tr><tr><td><mark style="color:red;"><code>fee</code></mark></td><td>The service fee value</td></tr></tbody></table>

***

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

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

```bash
curl -v --location --request GET 'https://sandbox.smartfastpay.com/v1/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": "980.00",
        "currency": "USD",
        "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 showed IN DOLLARS (use dot instead of comma)</td></tr><tr><td><mark style="color:red;"><code>currency</code></mark></td><td>The currency type that the amount will be credited. If USD is provided there will be a conversion from USD to BRL, if BRL is provided there will be no conversion.</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> /v1/payouts

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

```bash
# Without parameters

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

```bash
# With parameters

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

<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": "980.00",
            "currency": "USD",
            "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": "300.00",
            "currency": "USD",
            "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 showed IN DOLLARS (use dot instead of comma)</td></tr><tr><td><mark style="color:red;"><code>currency</code></mark></td><td>The currency type that the amount will be credited. If USD is provided there will be a conversion from USD to BRL, if BRL is provided there will be no conversion.</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>


---

# 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://docs.smartfastpay.com/v1/reference/payouts/brazil.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.
