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

# Boletos

***

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

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

```bash
curl -v --location --request POST 'https://sandbox.smartfastpay.com/v1/boleto' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer <Access-Token>' \
    --data-raw '{
        "customer_id": "58f0c005-3b7d-4c75-81f3-93b9a6fee864",
        "name": "Richard Roe",
        "email": "richard@roe.com",
        "document": "16972691419",
        "amount": 125,
        "currency": "USD",
        "callback": "http://mysite.com/api/notification",
        "transaction": {
            "id": "3a1a6ebe-8504-489c-98ae-73ebd9b327a2"
        },
        "address": {
            "address_1": "Av. da Liberdade",
            "number": "87",
            "neighborhood": "Liberdade",
            "city": "São Paulo",
            "state": "SP",
            "postal_code": "01503-000",
            "address_2": "até 367 - lado ímpar"
        }
    }'
```

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

<table><thead><tr><th width="173">Parameter</th><th width="228" align="center">Type</th><th width="104" 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>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>address</code></mark></td><td align="center"></td><td align="center"></td><td></td></tr><tr><td><mark style="color:red;"><code>address_1</code></mark></td><td align="center"><mark style="color:red;"><code>string</code></mark><br><mark style="color:red;"><code>min: 3 | max: 56</code></mark></td><td align="center"><strong>yes</strong></td><td>The street name of the client address</td></tr><tr><td><mark style="color:red;"><code>number</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"><strong>yes</strong></td><td>The house/building number of the client address</td></tr><tr><td><mark style="color:red;"><code>address_2</code></mark></td><td align="center"><mark style="color:red;"><code>string</code></mark><br><mark style="color:red;"><code>min: 1 | max: 40</code></mark></td><td align="center">no</td><td>The address complement, such as, apartment number, commercial room number, etc...</td></tr><tr><td><mark style="color:red;"><code>neighborhood</code></mark></td><td align="center"><mark style="color:red;"><code>string</code></mark><br><mark style="color:red;"><code>min: 3 | max: 30</code></mark></td><td align="center"><strong>yes</strong></td><td>The neighborhood name of the client address</td></tr><tr><td><mark style="color:red;"><code>city</code></mark></td><td align="center"><mark style="color:red;"><code>string</code></mark><br><mark style="color:red;"><code>min: 3 | max: 30</code></mark></td><td align="center"><strong>yes</strong></td><td>The city name of the client address</td></tr><tr><td><mark style="color:red;"><code>state</code></mark></td><td align="center"><mark style="color:red;"><code>string</code></mark><br><mark style="color:red;"><code>min: 2 | max: 2</code></mark></td><td align="center"><strong>yes</strong></td><td>The state name of the client address <mark style="color:red;"><code>Allowed:</code></mark> <mark style="color:red;"><code>AC,AL,AM,AP,BA,CE,DF,ES,GO,MA,MG,MS,MT,PA,</code></mark> <mark style="color:red;"><code>PB,PE,PI,PR,RJ,RN,RO,RR,RS,SC,SE,SP,TO</code></mark></td></tr><tr><td><mark style="color:red;"><code>postal_code</code></mark></td><td align="center"><mark style="color:red;"><code>string</code></mark><br><mark style="color:red;"><code>min: 8 | max: 8</code></mark> <mark style="color:red;"><code>Format: 99999999</code></mark></td><td align="center"><strong>yes</strong></td><td>The postal code of the client address</td></tr></tbody></table>

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

```json
{
    "requestId": "a2435636-5f69-447d-8e22-8382f62ef7dd",
    "data": {
        "id": "08ec8978-d1e4-4073-b811-7686f5da65b4",
        "status": "pending",
        "boleto": {
            "url": "https://sandbox.smartfastpay.com/boleto/boletoreference",
            "code": "boletoreference",
            "expired_at": "1620575069"
        },
        "values": {
            "total": "650.00",
            "subtotal": "650.00",
            "exchange": "5.20",
            "tax": 0
        }
    }
}
```

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

<table><thead><tr><th width="154">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. Can be used to verify the payment status in the <a href="/pages/2xJzbjonZPNSiMSJm6MU#get-payment-id"><mark style="color:green;"><strong>GET</strong> /v1/payment/{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>paid</code></mark>, <mark style="color:red;"><code>denied</code></mark>, <mark style="color:red;"><code>expired</code></mark></td></tr><tr><td><mark style="color:red;"><code>boleto</code></mark></td><td></td></tr><tr><td><mark style="color:red;"><code>url</code></mark></td><td>URL for the client to print the boleto that was generate</td></tr><tr><td><mark style="color:red;"><code>code</code></mark></td><td>Code with which the client can pay the billet without printing</td></tr><tr><td><mark style="color:red;"><code>expired_at</code></mark></td><td>Limit date to receive the payment for this billet</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>tax</code></mark></td><td>The service fee value</td></tr></tbody></table>
