Documentation v1.0.0

Payouts (BRAZIL)

Call the Payouts API to request withdrawal for your customer.

POST
/payout
Request
 
                                                            
                                                                curl -v --location --request POST 'https://sandbox.smartfastpay.com/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"
                                                                        }
                                                                    }'
                                                            
                                                        
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.
bank IMPORTANT: If you enter any bank field then name, code, agency, account, account_operation are required. And Pix field cannot be informed.
name string
min: 3 | max: 255
The name of the bank
code string
min: 1 | max: 10
The code of the bank provided by Banco Central (BC)
agency string
min: 4| max: 10
The number of the bank agency that client have opened their account
account string
min: 3 | max: 80
The number of the bank account of the client
account_operation string
min: 3 | max: 80
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
pix IMPORTANT: If you enter any pix field then key is required. And Bank field cannot be informed.
key string
min: 3 | max: 250
Pix key or reference
Response
 
                                                            
                                                                {
                                                                    "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
                                                                        }
                                                                    }
                                                                }
                                                            
                                                        
Response details
 
Parameter Description
id The created payout by the request made unique identificator. Can be used to verify the payout status in the GET /payout/{id} endpoint
status The current status of the payout. These are our statuses: pending, success, failed, returned, onhold, blocked, refunded
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
fee The service fee value
GET
/payout/{id}
Request
 
                                                            
                                                                curl -v --location --request GET 'https://sandbox.smartfastpay.com/payout/{id}' \
                                                                    --header 'Content-Type: application/json' \
                                                                    --header 'Authorization: Bearer < Access-Token >' \'
                                                            
                                                        
Response
 
                                                            
                                                                {
                                                                    "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"
                                                                    }
                                                                }
                                                            
                                                        
Response details
 
Parameter Description
id The created payout by the request made unique identificator.
customer_id The customer id stored on your platform for future identification.
transaction_id The id of the transaction generated in you platform.
amount The amount that the client specified when initiating the transaction showed IN DOLLARS (use dot instead of comma)
currency 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.
status The current status of the payout. These are our statuses: pending, success, failed, returned, onhold, blocked, refunded
created_at The date and time the transaction was created.
updated_at The date and time the transaction was updated with new status.
GET
/payouts
Request
 
                                                            
                                                                # Without parameters

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


                                                            
                                                                # 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 >' \'
                                                            
                                                        
Parameters details
 
Parameter Type Description
limit integer
min: 1 | max: 40
optional The number of items to return in the response.
page integer
min: 1 | max: 9999999
optional The page number indicating which set of items will be returned in the response. So, the combination of page=1 and limit=20 returns the first 20 items. The combination of page=2 and limit=20 returns items 21 through 40.
sort string
Format: item,(asc|desc)
optional Sorts the items in the response by filter in ascending or descending order.
Eg.: sort=id,desc
(This combination returns a list in descending order based on id.)
start_time string
Internet date and time format
optional The start date and time for the range to show in the response, in Internet date and time format.
Eg.: start_time=2021-09-05T11:00:00Z.
end_time string
Internet date and time format
optional The end date and time for the range to show in the response, in Internet date and time format.
Eg.: end_time=2021-09-05T11:00:00Z.
customer_id string
min: 1 | max: 255
optional Sorts the items in the response by looking for the customer_id that was once provided by your system.
transaction_id string optional Sorts the items in the response by looking for the transaction_id that was once provided by your system.
To get multiple transaction_id, send each transaction_id separating by comma (,).
Eg.: 8fecdfcc-4e4d-11ee,8fece5ee-4e4d-11ee,d42953be-4e4d-11ee
Response
 
                                                            
                                                                {
                                                                    "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"
                                                                        }
                                                                    ]
                                                                }
                                                            
                                                        
Response details
 
Parameter Description
id The created payout by the request made unique identificator.
customer_id The customer id stored on your platform for future identification.
transaction_id The id of the transaction generated in you platform.
amount The amount that the client specified when initiating the transaction showed IN DOLLARS (use dot instead of comma)
currency 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.
status The current status of the payout. These are our statuses: pending, success, failed, returned, onhold, blocked, refunded
created_at The date and time the transaction was created.
updated_at The date and time the transaction was updated with new status.