> ## Documentation Index
> Fetch the complete documentation index at: https://erp-developer.starpayethiopia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Account lookup



## OpenAPI

````yaml POST /erp/account-lookup
openapi: 3.1.0
info:
  title: StarPay API
  version: 1.0.0
  description: >
    StarPay API is a RESTful API that provides access to various functionalities
    of the StarPay system.

    This API allows users to manage product categories, including creating,
    updating, deleting, and retrieving product categories.

    The API uses JWT for thirdparty and supports various response formats.


    **Transaction status**


    Use **real-time** `GET /erp/api/txn-sse` (Server-Sent Events) to follow
    status updates for a `billRefNo`. If the SSE stream does not yield a usable
    result within **15 seconds**, call **`POST /erp/check-txn`** with the same
    `billRefNo` to poll the current transaction status.
servers:
  - url: https://starpayqa.starpayethiopia.com/v1/starpay-api
    description: Local server
security: []
tags:
  - name: erp
  - name: thirdparty
paths:
  /erp/account-lookup:
    post:
      tags:
        - erp
      summary: Lookup account holder details
      operationId: accountLookup
      parameters:
        - in: header
          name: x-api-secret
          required: true
          description: API secret key.
          schema:
            type: string
            example: MFUxSN98EV5IUU+RhYZh2f866adcTa4F5HJ2dGI3t8+MH3cvfk/gAZ492TnxwdiI
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountLookupRequest'
      responses:
        '200':
          description: Account lookup successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountLookupResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    AccountLookupRequest:
      type: object
      properties:
        swift_code:
          type: string
          example: DASHETAA
        accountNumber:
          type: string
          example: '5075361069011'
      required:
        - swift_code
        - accountNumber
    AccountLookupResponse:
      type: object
      properties:
        status:
          type: string
          example: success
        timestamp:
          type: string
          format: date-time
        message:
          type: string
          example: Success
        data:
          $ref: '#/components/schemas/AccountLookupResponseData'
      required:
        - status
        - timestamp
        - message
        - data
    AccountLookupResponseData:
      type: object
      properties:
        accountHolderName:
          type: string
          example: TESFAYE LEMI BEKELE
        messageId:
          type: string
      required:
        - accountHolderName
        - messageId
    BadRequestError:
      type: object
      properties:
        status:
          type: string
          example: error
        timestamp:
          type: string
          example: '2025-05-07T07:31:30.824Z'
        path:
          type: string
          example: /v2/starpay-api/
        error:
          type: object
          properties:
            code:
              type: string
              example: BadRequestException
            message:
              type: string
              example: Missing required payload data, pk and payload is required
    thirdpartyError:
      type: object
      properties:
        message:
          type: string
          example: Something wrong
        status:
          type: string
          example: error
        timestamp:
          type: string
          example: '2025-05-07T07:31:30.824Z'
        path:
          type: string
          example: /v2/starpay-api/
        error:
          type: object
          properties:
            code:
              type: string
              example: GEN_004
            message:
              type: string
              example: An unexpected server error occurred.
    NotFoundError:
      type: object
      properties:
        message:
          type: string
          example: Something wrong
        status:
          type: string
          example: error
        timestamp:
          type: string
          example: '2025-05-07T07:31:30.824Z'
        path:
          type: string
          example: /v2/starpay-api/
        error:
          type: object
          properties:
            code:
              type: string
              example: ABC_001
            message:
              type: string
              example: not found
    serverError:
      type: object
      properties:
        message:
          type: string
          example: Something wrong
        status:
          type: string
          example: error
        timestamp:
          type: string
          example: '2025-05-07T07:31:30.824Z'
        path:
          type: string
          example: /v2/starpay-api/
        error:
          type: object
          properties:
            code:
              type: string
              example: GEN_004
            message:
              type: string
              example: An unexpected server error occurred.
  responses:
    BadRequest:
      description: Bad request.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/BadRequestError'
    Unauthorized:
      description: Unauthorized.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/thirdpartyError'
    NotFound:
      description: Not found.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/NotFoundError'
    ServerError:
      description: internal.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/serverError'

````