# Payout DryRun

A simulation(dry run) for payout.

# Post

https://sandbox.transfersmile.com/api/payout/dry-run

# Uma simulação(dry run) para payout

# Parameters

Content-Type* string application/json; chartset=UTF-8
AppId* string Seu App ID na plataforma de payout
Authorization* string SHA256($sorted_params + $app_key)

# Body

source_currency* string Moeda da conta do Merchant
- supported: USD, GBP, EUR -
arrival_currency* string BRL para BRA, MXN para MEX, USD para PayPal
amount* string String numérica, e.g. 10.00
fee_bear* string Um de [beneficiary, merchant]
method* string Método de Payout
channel string Canal de Payout
country* string Países com suporte do PayPal. Outros devem ser um dos países [BRA, MEX].
timestamp* Integer unix timestamp, e.g. 1628512575

# Responses

200: OK
{
    "code": 200,
    "msg": "success",
    "time": 1642076131,
    "data": {
        "fee": "0.2",
        "tax": "0",
        "amount": "10",
        "settlement_amount": "10",
        "arrival_currency": "USD",
        "arrival_amount": "10",
        "source_currency": "USD",
        "source_amount": "10.2",
        "exchange_rate": "1"
    }
}
400: Bad Request
{
    "code": 4001000,
    "msg": "invalid parameter",
    "time": 1642078510,
    "data": {
        "err": "request has expired"
    }
}
401: Unauthorized
{
    "code": 4004003,
    "msg": "permission denied",
    "time": 1642074682,
    "data": {}
}

# Exemplo PIX

curl --location --request POST 'https://sandbox.transfersmile.com/api/payout/dry-run' \
--header 'AppId: 94FAC**********************68548' \
--header 'Authorization: d6181db0d6548b94b162e75d095b59147172d914699f83b2bd17951a671b6302' \
--header 'Content-Type: application/json' \
--data-raw '{
      * "source_currency": "USD",
      * "arrival_currency": "BRL",
      * "amount": "10.00",
      * "fee_bear": "merchant",
      * "method": "PIX",
        "channel": "",
      * "country": "BRA",
      * "timestamp": 1642075807
}'

# Exemplo SPEI

curl --location --request POST 'https://sandbox.transfersmile.com/api/payout/dry-run' \
--header 'MerchantId: 94FAC**********************68548' \
--header 'Authorization: d6181db0d6548b94b162e75d095b59147172d914699f83b2bd17951a671b6302' \
--header 'Content-Type: application/json' \
--data-raw '{
      * "source_currency": "USD",
      * "arrival_currency": "MXN",
      * "amount": "10.00",
      * "fee_bear": "merchant",
      * "method": "SPEI",
        "channel": "",
      * "country": "MEX",
      * "timestamp": 1642075807
}'

# Exemplo PayPal

curl --location --request POST 'https://sandbox.transfersmile.com/api/payout/dry-run' \
--header 'MerchantId: 94FAC**********************68548' \
--header 'Authorization: d6181db0d6548b94b162e75d095b59147172d914699f83b2bd17951a671b6302' \
--header 'Content-Type: application/json' \
--data-raw '{
      * "source_currency": "USD",
      * "arrival_currency": "USD",
      * "amount": "10.00",
      * "fee_bear": "merchant",
      * "method": "WALLET",
      * "channel": "PayPal",
      * "country": "BRA",
      * "timestamp": 1642075807
}'

TIP

Importante: 94FAC**********************68548 é o App Id de teste transfersmile para o ambiente de sandbox, e d6181db0d6548b94b162e75d095b59147172d914699f83b2bd17951a671b6302 é o token de autorização associado ao App Id de teste.