PIX

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": "BRL",
        "country": "BRA",
        "payout_method": "pix",
        "pix": {
            "key": "3cd9ae47-78d7-4982-af50-3d3e078hf2gf"
        },
        "callback": "http://mysite.com/api/notification",
        "transaction": {
            "id": "22dd9e47-97c7-4982-af50-3d3e0782d054"
        }
    }'

Parameters details

ParameterTypeRequiredDescription

customer_id

string min: 1 | max: 255

yes

The customer id stored on your platform for future identification.

name

string min: 3 | max: 150

yes

Name of the customer who started the transaction.

email

string min: 30 | max: 255

yes

Email of the customer who started the transaction.

branch

string min: 1 | max: 255

no

When the merchant needs to keep track of its various offices / branch, this field must be fill.

document

string Format: 99999999999 / 99999999999999

yes

Brazilian document (CPF) of the customer who started the transaction. - Must be a valid CPF document; Eg: 12345678909

document_type

string min: 2 | max: 100

no

Allowed document types: CPF, CNPJ

amount

decimal (10,2) min: 2

yes

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

no

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

payout_method

string (pix)

yes

The payment method your customer will use.

callback

string min: 30 | max: 250 (Method: POST)

yes

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

yes

The id of the transaction generated in you platform.

pix

key

string min: 3 | max: 250

no

Pix key or reference

Response

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

Response details

ParameterDescription

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 payment. These are our statuses: pending, success, failed, onhold, returned, 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

Last updated