> For the complete documentation index, see [llms.txt](https://moneymie.gitbook.io/toga-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://moneymie.gitbook.io/toga-api/api-reference/payouts/validate-a-recipient.md).

# Validate a recipient

Validate beneficiary details

This endpoint allows you to validate recipient details before initiating a payout. Using this API will reduce the likelihood of your payout failing because of a validation issue. The request payload requirements vary based on the payout type when using the validate endpoint.

<details>

<summary>Mobile money</summary>

```json
{
  "rateId": "63622185d62f256c752cc6a0",
  "type": "MOBILE_MONEY",
  "recipient": {
    "msisdn": "233241603403",
    "firstName": "Nancy",
    "lastName": "Mends"
  },
  "senderDetails": {
    "firstName": "Daniella",
    "lastName": "Timothy",
    "state": "LA",
    "city": "Iyano",
    "country": "NG",
    "msisdn": "2349079935431",
    "postalCode": "98I987",
    "address": "2 Underwood",
    "dob": "1999-03-12",
    "idType": "NATIONAL_ID",
    "idNumber": "85974939420"
  }
}
```

</details>

<details>

<summary>Bank transfer</summary>

```json
{
  "rateId": "637367c165ff2379041a1517",
  "purpose": "test compulsory",
  "type": "BANK_TRANSFER",
  "recipient": {
    "bankCode": "530",
    "accountNumber": "01608268231",
    "firstName": "Nancy",
    "lastName": "Dan",
  },
  "senderDetails": {
    "firstName": "Daniella",
    "lastName": "Timothy",
    "state": "LA",
    "city": "Iyano",
    "country": "NG",
    "msisdn": "2349079935431",
    "postalCode": "98I987",
    "address": "2 Underwood",
    "dob": "1999-03-12",
    "idType": "NATIONAL_ID",
    "idNumber": "85974939420"
  }
}
```

</details>

<details>

<summary>Wire transfer</summary>

```json
{
  "rateId": "63622d00d69f256c752cc6a5",
  "type": "WIRE",
   "recipient": {
    "wireType": "ABA",
    "routingNumber": "084196768",
    "accountNumber": "9908004393",
    "bankCountry": "US"
  },
   "senderDetails": {
    "address": "2 Underwood",
    "city": "Dallas",
    "state": "TX",
    "country": "US",
    "firstName": "Wakanda",
    "lastName": "Toga",
    "postalCode": "75015"
  }
}
```

</details>

## Validate a recipient

<mark style="color:blue;">`GET`</mark> `https://sandbox.moneymie.com/api/v1/payout/recipients/validate`

#### Request Body

| Name                                        | Type         | Description                                           |
| ------------------------------------------- | ------------ | ----------------------------------------------------- |
| rateId<mark style="color:red;">\*</mark>    | Number       | The rate id generated (e.g. 634ecbf6a1bb914e92d24ff9) |
| recipient<mark style="color:red;">\*</mark> | Object       | The details of the recipient                          |
| type<mark style="color:red;">\*</mark>      | String\*\*\* | The payout type                                       |

{% tabs %}
{% tab title="400: Bad Request Client error" %}

```javascript
{
  "code": "XXXX",
  "message": "Invalid currency"
}
```

{% endtab %}

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

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="201: Created Successful request" %}

```json
{
        "bankCode": "058",
        "accountNumber": "0147794591",
        "accountName": "Mart Olumide"
}
```

{% endtab %}
{% endtabs %}
