# Payout DryRun

## A simulation(dry run) for payout.

<mark style="color:green;">`POST`</mark> `https://sandbox.transfersmile.com/api/payout/dry-run`

#### Headers

| Name                                            | Type   | Description                         |
| ----------------------------------------------- | ------ | ----------------------------------- |
| Content-Type<mark style="color:red;">\*</mark>  | String | application/json; chartset=UTF-8    |
| AppId<mark style="color:red;">\*</mark>         | String | Your App ID in payout platform      |
| Authorization<mark style="color:red;">\*</mark> | String | SHA256($sorted\_params + $app\_key) |

#### Request Body

| Name                                                | Type    | Description                                                                                                                          |
| --------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| source\_currency<mark style="color:red;">\*</mark>  | String  | <p>Merchant's account currency</p><p>- supported: USD, GBP, EUR - </p>                                                               |
| arrival\_currency<mark style="color:red;">\*</mark> | String  | BRL for BRA, MXN for MEX, USD for PayPal                                                                                             |
| amount<mark style="color:red;">\*</mark>            | String  | Numeric string, e.g. 10.00                                                                                                           |
| fee\_bear<mark style="color:red;">\*</mark>         | String  | One of \[beneficiary, merchant]                                                                                                      |
| method<mark style="color:red;">\*</mark>            | String  | Payout Method                                                                                                                        |
| channel                                             | String  | Payout Channel                                                                                                                       |
| country<mark style="color:red;">\*</mark>           | String  | <p>PayPal supported <a href="submit-a-payout/paypal/supported-countries">countries</a>.</p><p>Others must be one of \[BRA, MEX].</p> |
| timestamp<mark style="color:red;">\*</mark>         | Integer | unix timestamp, e.g. 1628512575                                                                                                      |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "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"
    }
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    "code": 4001000,
    "msg": "invalid parameter",
    "time": 1642078510,
    "data": {
        "err": "request has expired"
    }
}
```

{% endtab %}

{% tab title="401: Unauthorized " %}

```javascript
{
    "code": 4004003,
    "msg": "permission denied",
    "time": 1642074682,
    "data": {}
}
```

{% endtab %}
{% endtabs %}

## Example 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
}'
```

## Example 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
}'

```

## Example 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
}'
```

{% hint style="info" %}
Note:  ***94FAC\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*68548*** is pagsmile's test merchant id for sandbox, and ***d6181db0d6548b94b162e75d095b59147172d914699f83b2bd17951a671b6302*** is authorization token associated with the test App ID.
{% endhint %}
