> ## Documentation Index
> Fetch the complete documentation index at: https://docs.minisend.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Validate a recipient

> Check a bank account, mobile number, till, or paybill and resolve the registered account name before creating an order.

Checks that a recipient's account exists and resolves its registered name, so you can show a confirmation screen before creating an order. Bank accounts are hard-validated; mobile, till, and paybill lookups are best-effort and may return no name even for a valid number.

## Endpoint

```text theme={null}
POST https://merchant.minisend.xyz/api/offramp/validate-account
```

```text theme={null}
Authorization: Bearer ms_live_your_key_here
```

Requires the `offramp` scope.

## Body

<ParamField body="currency" type="string" required>
  `KES`, `NGN`, `GHS`, or `UGX`. Determines which recipient fields are required.
</ParamField>

<ParamField body="recipient" type="object" required>
  Recipient shape per method. See [recipients](/offramp/recipients).
</ParamField>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://merchant.minisend.xyz/api/offramp/validate-account \
    -H "Authorization: Bearer ms_live_your_key_here" \
    -H "Content-Type: application/json" \
    -d '{
      "currency": "NGN",
      "recipient": {
        "account_name": "Chidi Okafor",
        "institution": "GTBINGLA",
        "account_number": "0123456789"
      }
    }'
  ```

  ```javascript Node.js theme={null}
  const res = await fetch('https://merchant.minisend.xyz/api/offramp/validate-account', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer ms_live_your_key_here',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      currency: 'NGN',
      recipient: {
        account_name: 'Chidi Okafor',
        institution: 'GTBINGLA',
        account_number: '0123456789',
      },
    }),
  });

  const { valid, recipient_name } = await res.json();
  ```
</CodeGroup>

## Response (200)

```json theme={null}
{
  "valid": true,
  "recipient_name": "CHIDI OKAFOR"
}
```

<ResponseField name="valid" type="boolean" required>
  The account exists and can receive payouts.
</ResponseField>

<ResponseField name="recipient_name" type="string" required>
  The registered name, or `null` when the account is valid but the name could not be resolved (common for mobile numbers). Show it to your user before they confirm the payout.
</ResponseField>

## Invalid account (422)

```json theme={null}
{
  "valid": false,
  "error": "bank account validation failed — account may not exist"
}
```

## Errors

| Status | Meaning                                                                   |
| ------ | ------------------------------------------------------------------------- |
| `400`  | Unsupported currency or malformed recipient                               |
| `403`  | Key lacks the `offramp` scope or off-ramp is not enabled on your account  |
| `422`  | Account failed validation. Returns `valid: false` with an `error` message |
