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

# Beneficiary Lookup

> Validates a bank account and retrieves account holder details for beneficiary creation.

Validate a **Nigerian** bank account and retrieve the account holder's name. Use this to confirm details before creating a beneficiary.

<Note>
  **Nigerian accounts only.** This confirms an account holder's name through Nigeria's NIP name enquiry, which is why it takes a `bankCode`. There is no equivalent for USD, GBP or EUR — those rails do not allow a name to be confirmed against an account number before a payment is sent, so no provider can offer it.

  USD support is coming: it will take a `routingNumber` and return the **bank**, so you do not have to supply the bank name and address by hand. It will not return an account holder's name, because that cannot be verified on US rails.
</Note>

<Info>
  This is the same lookup as [Account Lookup](/api-reference/endpoint/lookup) on a different path. Either works; use whichever fits your code.
</Info>

## Example Request

```bash theme={null}
curl -X POST "https://api.rolla.xyz/api/v1/external/beneficiaries/beneficiary-lookup" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "bankCode": "000014",
    "accountNumber": "0123456789"
  }'
```

## Example Response

```json theme={null}
{
  "status": 200,
  "success": true,
  "message": "Account details retrieved successfully",
  "data": {
    "accountNumber": "0123456789",
    "accountName": "JOHN DOE",
    "bankCode": "000014",
    "bankName": "Access Bank"
  }
}
```

<Warning>
  Always verify the account name with your user before creating a beneficiary or initiating a payout. Incorrect details may result in failed or misdirected payments.
</Warning>


## OpenAPI

````yaml POST /beneficiaries/beneficiary-lookup
openapi: 3.1.0
info:
  title: Rolla Developer API
  description: >-
    API for programmatic transaction management on the Rolla platform. Monetary
    `amount` fields use the smallest unit of the referenced currency unless an
    endpoint says otherwise (e.g. NGN = kobo, USD = cents, where **100 cents =
    USD 1.00**).
  version: 1.0.0
servers:
  - url: https://api.rolla.xyz/api/v1/external
    description: Production server
security:
  - apiKeyAuth: []
paths:
  /beneficiaries/beneficiary-lookup:
    post:
      summary: Beneficiary Lookup
      description: >-
        Validates a bank account and retrieves account holder details for
        beneficiary creation.
      operationId: beneficiaryLookup
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LookupRequest'
      responses:
        '200':
          description: Account details retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 200
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Account details retrieved successfully
                  data:
                    $ref: '#/components/schemas/LookupResponse'
        '400':
          description: Bad request - Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Account not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    LookupRequest:
      type: object
      required:
        - bankCode
        - accountNumber
      properties:
        bankCode:
          type: string
          description: Bank code from /banks endpoint
          example: '000014'
        accountNumber:
          type: string
          description: 10-digit account number
          example: '0123456789'
    LookupResponse:
      type: object
      properties:
        accountNumber:
          type: string
          example: '0123456789'
        accountName:
          type: string
          example: JOHN DOE
        bankCode:
          type: string
          example: '000014'
        bankName:
          type: string
          example: Access Bank
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your Rolla API key

````