Pix
Cómo utilizar PIX para enviar un payout en Brasil.
Post
https://sandbox.transfersmile.com/api/payout
Enviar un payout por PIX en Brasil
Este endpoint te permite usar Pix para realizar un payout en Brasil.
Parameters
Header
| Content-Type* | string | application/json; chartset=UTF-8 | 
| AppId* | string | APP ID en la plataforma de payout | 
| Authorization* | string | SHA256($sorted_params + $app_key) | 
Body
| name* | string | Nombre de beneficiario - Largo entre 5 y 100 -  | 
| phone | string | Teléfono de beneficiario | 
| string | Correo de beneficiario | |
| document_id* | string | Número de identificación de beneficiario | 
| document_type* | string | Tipo de identificador del beneficiario - Sólo uno: CPF, CNPJ -  | 
| account* | string | Cuenta Pix de beneficiario | 
| account_type* | string | Tipo de cuenta pix de beneficiario - Sólo uno: CPF, CNPJ, EVP, PHONE, EMAIL -  | 
| method* | string | Valor fijo: PIX | 
| custom_code* | string | Payout ID de merchant - Max. 50 chars -  | 
| fee_bear* | string | Tarifa de procesamiento se carga a merchant o beneficiario. - Sólo uno: merchant o beneficiario -  | 
| amount* | string | Monto de Payout - Max. 2 números decimales - Min 0.01, Max 500,000 -  | 
| amount_type | string | Especificar el monto es fijo para merchant o beneficiario - Sólo uno: source_amount, arrival_amount(defecto) -  | 
| source_currency* | string | Moneda de cuenta de merchant - Sólo uno: USD, EUR, GBP, BRL -  | 
| arrival_currency* | string | Valor fijo: BRL | 
| notify_url* | string | Donde transfersmile enviará la notificación | 
| additional_remark* | string | Descriptor en la factura bancaria del usuario - Max long: 40 -  | 
| country* | string | BRA for Brasil | 
Responses
| 200: OK | Envío exitoso | 
{
    "code": 200,
    "msg": "success",
    "time": 1628580845,
    "data": {
        "id": "TS202108100734054iRiUZFPXfQM",
        "custom_code": "custom_code9982674851738108",
        "arrival_amount": "0.51",
        "arrival_currency": "BRL",
        "source_amount": "0.07",
        "source_currency": "USD",
        "status": "IN_PROCESSING"
    }
}
| 400: Bad Request | Orden ya existe | 
{
    "code": 4001010,
    "msg": "order already existed",
    "time": 1628580940,
    "data": {}
}
| 401: Unauthorized | Desautorizado | 
{
    "code": 4004003,
    "msg": "permission denied",
    "time": 1637224716,
    "data": {}
}
| 500: Internal Server Error | Tarifa no configurada | 
{
    "code": 5001003,
    "msg": "fee not configured",
    "time": 1637224716,
    "data": {
        ... ...
    }
}
| 500: Internal Server Error | Balance insuficiente | 
// system error
{
    "code": 5001102,
    "msg": "balance insufficient",
    "time": 1637224716,
    "data": {
        ... ...
    }
}
| 500: Internal Server Error | Error de sistema | 
{
    "code": 5001000,
    "msg": "system error",
    "time": 1637224716,
    "data": {}
}
Ejemplo
curl --location --request POST 'https://sandbox.transfersmile.com/api/payout' \
--header 'AppId: 94FAC**********************68548' \
--header 'Authorization: d6181db0d6548b94b162e75d095b59147172d914699f83b2bd17951a671b6302' \
--header 'Content-Type: application/json' \
--data-raw '{
    * "name": "GUILHERME ****** SOUZA",
      "phone": "",
      "email": "[email protected]",
    * "amount": 150,
    * "arrival_currency": "BRL", // fixed value: BRL
    * "custom_code" : "custom_code9982674851738108",
    * "document_id": "22*******99",
    * "document_type": "CPF",
    * "fee_bear": "merchant",
    * "method": "PIX",   // fixed value: PIX
    * "notify_url": "https://notify.url",
    * "account": "22*******99",
    * "account_type": "CPF",  // should be one of CPF CNPJ PHONE EMAIL EVP
    * "source_currency": "BRL", 
    * "additional_remark": "transfersmile payout test remark",
    * "country": "BRA", // fixed value: BRA
}'
Consejos
Nota: 94FAC*****************68548 es el test ID de transfersmile para prueba en sandbox, y d6181db0d6548b94b162e75d095b59147172d914699f83b2bd17951a671b6302 es el token de autorización asociado con el app ID de prueba.
Consejos
En ambiente sandbox, favor usar **[email protected]_** como cuenta PIX,y EMAIL como account_type para pruebas de **REJECTED_** payout, cualquier otra cuenta PIX será exitosa (**PAID**).
Ejemplo de cuenta PIX
| Tipo de cuenta | Cuenta | Texto | 
|---|---|---|
| CPF | 22*******99 | 11 digits | 
| CNPJ | 23**********31 | 14 digits | 
| Phone | +5511987654321 | Siempre empieza con +55 | 
| [email protected] | ||
| EVP | string alfanumérico de 32 dígitos enviado del Banco Central a la institución | 
Third-party CPF/CNPJ Validator
Example of PIX account
| Account Type | Account | Descripción | 
|---|---|---|
| CPF | 22*******99 | 11 digits | 
| CNPJ | 23**********31 | 14 digits | 
| Phone | +5511987654321 or 11987654321 | country code (+55) is optional | 
| [email protected] |  | |
| EVP | A UUID-like string: a1073db4-a3a0-11ed-a8fc-0242ac120002 | alphanumeric string of 32 digits that is sent from the central bank to the institution | 
