# Payout Proof

## Get proof of payout.

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

#### 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                                     |
| ------------------------------------------------- | ------- | ----------------------------------------------- |
| transaction\_id<mark style="color:red;">\*</mark> | string  | pagsmile transaction id or payout\_id required. |
| timestamp<mark style="color:red;">\*</mark>       | Integer | unix timestamp, e.g. 1628512575                 |

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

```javascript
{
    "code": 200,
    "msg": "success",
    "data": {
        "url": "https://bucket-temp.s3.us-west-1.amazonaws.com/****/voucher.pdf",
    }
}
```

{% endtab %}

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

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

{% endtab %}

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

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

{% endtab %}
{% endtabs %}

{% hint style="info" %}
Currently, only PIX (Brazil), SPEI (Mexico), and Transfiya (Colombia) have payout proof.
{% endhint %}

## Example

```
curl --location --request POST 'https://sandbox.transfersmile.com/api/payout/voucher' \
--header 'AppId: 94FAC**********************68548' \
--header 'Authorization: d6181db0d6548b94b162e75d095b59147172d914699f83b2bd17951a671b6302' \
--header 'Content-Type: application/json' \
--data-raw '{
   * "transaction_id": "TS202405201314******PB",
   * "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 %}
