# transfersmile Wallet

Cómo enviar un payout con transfersmile Wallet.

# Ambientes

Ambientes API
sandbox https://sandbox.transfersmile.com/api/payout
Producción https://api.transfersmile.com/api/payout

# Método HTTP

POST

# Encabezado HTTP

Encabezado Tipo Requerido Descripción
Content-Type String Si application/json; charset=UTF-8
AppId String Si App Id en plataforma Payout
Authorization String Si SHA256($sorted_params + $app_key)

# HTTP Body(Sólo permite JSON)

Parametro Tipo Requerido Descripción
name String No Nombre de beneficiario
Min.5 Max.100
phone String No Teléfono de beneficiario
- Max.15 -
email String No Correo de beneficiario
account String Si Cuenta de transfersmile Wallet
account_type String Si Valor fijo: UUID
method String Si Valor fijo: WALLET
channel String Si Valor fijo: transfersmile
amount Numeric String Si Monto de Payout
- Min 0.01, Max 50,000 -
amount_type String No Especificar que el valor de monto es fijo para merchant o beneficiario:
source_amount, arrival_amount(por defecto)
fee_bear String Si Sólo uno [beneficiario
custom_code String Si Id de orden de Merchant
- Max.50 -
source_currency String Si Moneda de cuenta de Merchant, compatible: USD, GBP, EUR
arrival_currency String Si Moneda de cuenta de beneficiario, BRL o MXN
notify_url String Si Donde transfersmile enviará el callback
additional_remark String Si Comentarios adicionales del Payout, Max length: 40
country String Si Código de país, BRA o MEX

# Ejemplo de Request

// test demo by curl
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": "Alan **** **** Santana",
      "email": "[email protected]",
    * "account": "f341************************0844",
    * "account_type": "UUID",
    * "amount": "10.00",
    * "source_currency": "USD",
    * "arrival_currency": "BRL",
    * "custom_code": "custom_code_pwallet_10010", // merchant order id
    * "fee_bear": "merchant",
    * "method": "WALLET",
    * "channel": "transfersmile",
    * "notify_url": "https://sandbox.transfersmile.com/api/notify/demo",
    * "additional_remark": "Pagsmaile wallet test",
    * "country": "BRA"
}'

TIP

Nota: 94FAC**********************68548 es el test APP ID de transfersmile para sandbox, y
d6181db0d6548b94b162e75d095b59147172d914699f83b2bd17951a671b6302 es el token de autorización asociado al test APP ID.

# HTTP Response

// success
{
    "code": 200,
    "msg": "success",
    "time": 1628580845,
    "data": {
        "id": "TS202108100734054iRiUZFPXfQWB", // transfersmile payout id
        "custom_code": "custom_code9982674851738108", // merchant order id
        "arrival_amount": "100",
        "arrival_currency": "BRL",
        "source_amount": "0.07",
        "source_currency": "USD",
        "status": "IN_PROCESSING"
    }
}
// bad request
{
    "code": 4001000,
    "msg": "invalid parameter",
    "time": 1637224716,
    "data": {
        ... ...
    }
}
// persmission denied
{
    "code": 4004003,
    "msg": "permission denied",
    "time": 1637224716,
    "data": {
        ... ...
    }
}
// balance insufficient
// balance insufficient
{
    "code": 5001102,
    "msg": "balance insufficient",
    "time": 1637224716,
    "data": {
        ... ...
    }
}
// system error
{
    "code": 5001000,
    "msg": "system error",
    "time": 1637224716,
    "data": {
        ... ...
    }
}

# Países Disponibles

País Código de País Moneda
Brasil BRA BRL
Mexico MEX MXN