Documentation v1.0.0

Boletos

Call the Boletos API to request payments via banking billet (boleto bancário).

POST
/boleto
Request
 
                                                            
                                                                curl -v --location --request POST 'https://sandbox.smartfastpay.com/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"
                                                                        }
                                                                    }'
                                                            
                                                        
Parameters details
 
Parameter Type Description
customer_id string
min: 1 | max: 255
required The customer id stored on your platform for future identification.
branch string
min: 1 | max: 255
optional When the merchant needs to keep track of its various offices / branch, this field must be fill.
name string
min: 3 | max: 150
required Name of the customer who started the transaction.
email string
min: 30 | max: 255
required Email of the customer who started the transaction.
document string
Format: 99999999999
required Brazilian document (CPF) of the customer who started the transaction.
- Must be a valid CPF document;
Eg: 12345678909
amount decimal (10,2)
min: 2
required The amount that the client specified when initiating the transaction showed IN DOLLARS (use dot instead of comma)
Eg: 300.10
currency string (3)
(USD or BRL)
min: 3 | max: 3
optional 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.

This parameter is optional, if currency isn't provided it will auto-select USD.
Default: USD
callback string
min: 30 | max: 250
(Method: POST)
required The URL in you site that our API will notify when the payment changes the status, the HTTP supported method should be HTTP
Eg: http://my-url-callback/
transaction
id string
min: 1 | max: 255
required The id of the transaction generated in you platform.
address
address_1 string
min: 3 | max: 56
required The street name of the client address
number string
min: 1 | max: 10
required The house/building number of the client address
address_2 string
min: 1 | max: 40
optional The address complement, such as, apartment number, commercial room number, etc...
neighborhood string
min: 3 | max: 30
required The neighborhood name of the client address
city string
min: 3 | max: 30
required The city name of the client address
state string
min: 2 | max: 2
required The state name of the client address Allowed: AC,AL,AM,AP,BA,CE,DF,ES,GO,MA,MG,MS,MT,PA, PB,PE,PI,PR,RJ,RN,RO,RR,RS,SC,SE,SP,TO
postal_code string
min: 8 | max: 8 Format: 99999999
required The postal code of the client address
Response
 
                                                            
                                                                {
                                                                    "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
                                                                        }
                                                                    }
                                                                }
                                                            
                                                        
Response details
 
Parameter Description
id The created payment by the request made unique identificator. Can be used to verify the payment status in the GET /payment/{id} endpoint
status The current status of the payment. These are our statuses: pending, paid, denied, expired
boleto
url URL for the client to print the boleto that was generate
code Code with which the client can pay the billet without printing
expired_at Limit date to receive the payment for this billet
values
total The full value of the transaction, including service fees. Decimal separator it a dot
subtotal The value of the transaction, without service fees. Decimal separator it a dot
exchange The exchange rate applied to the current transaction
tax The service fee value