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

# Get Merchant Detail

> Retrieve information and status for a specific merchant ID.

# Get Merchant Details

Retrieve account status, profile information, and configuration details for a specific merchant ID.

Use this endpoint to verify merchant information prior to initiating escrow allocations or validating sub-merchant relationships in marketplace integrations.

## Endpoint

```http theme={null}
GET /trdp/get/merchant/{merchantId}
```

## Authentication

Include your API secret and any required partner API keys in the request headers.

Headers:

* `x-api-secret` (string) — Required. Your StarPay API secret key.
* `x-order-et-api-key` (string) — Optional. Order.et API Key if accessing partner marketplace resources.

Example Headers:

```http theme={null}
x-api-secret: SplFeYdc/Hc5S1CGmVDtETLYUJY/10a38ejamzwb1YH30h+u8sOK2fpTlyKitpPk
x-order-et-api-key: 9d7b6b4f5d0f8c1e7a9b3c4d6e8f1a2b5c7d9e0f3a1b6c8d2e4f6a8b0c1d3e5
```

***

## Path Parameters

### merchantId

The unique identifier of the merchant you wish to query.

Type: `string` — Required

Example:

```text theme={null}
01344351
```

***

## Example Request

```bash theme={null}
curl --request GET \
  --url https://sandbox-api.starpayethiopia.com/v1/starpay-api/trdp/get/merchant/01344351 \
  --header 'x-api-secret: SplFeYdc/Hc5S1CGmVDtETLYUJY/10a38ejamzwb1YH30h+u8sOK2fpTlyKitpPk' \
  --header 'x-order-et-api-key: 9d7b6b4f5d0f8c1e7a9b3c4d6e8f1a2b5c7d9e0f3a1b6c8d2e4f6a8b0c1d3e5'
```

***

## Response

### Success Response (`200 OK`)

```json theme={null}
{
  "status": "success",
  "timestamp": "2026-07-29T12:00:00Z",
  "message": "Merchant details retrieved successfully",
  "data": {
    "merchantId": "01344351",
    "merchantName": "Sample Store",
    "phoneNumber": "+251911223344",
    "email": "merchant@example.com",
    "status": "ACTIVE",
    "businessType": "Retail",
    "createdAt": "2025-01-15T08:00:00Z"
  }
}
```

***

## Response Fields

| Field          | Type     | Description                                              |
| -------------- | -------- | -------------------------------------------------------- |
| `merchantId`   | `string` | The unique merchant identifier.                          |
| `merchantName` | `string` | Registered legal or trade business name of the merchant. |
| `phoneNumber`  | `string` | Primary contact phone number for the merchant account.   |
| `email`        | `string` | Primary business email address.                          |
| `status`       | `string` | Account status (e.g. `ACTIVE`, `INACTIVE`, `SUSPENDED`). |
| `businessType` | `string` | Classification of the merchant business.                 |
| `createdAt`    | `string` | ISO 8601 timestamp when the merchant was onboarded.      |


## OpenAPI

````yaml GET /trdp/get/merchant/{merchantId}
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.
servers:
  - url: https://sandbox-api.starpayethiopia.com/v1/starpay-api
    description: Sandbox server
security: []
tags:
  - name: thirdparty
  - name: Escrow
  - name: Merchant
paths:
  /trdp/get/merchant/{merchantId}:
    get:
      tags:
        - Merchant
      summary: Get Merchant Detail
      description: Retrieve information and status for a specific merchant ID.
      operationId: getMerchantDetail
      parameters:
        - in: path
          name: merchantId
          required: true
          description: Unique identifier of the merchant.
          schema:
            type: string
            example: '01344351'
        - in: header
          name: x-api-secret
          required: true
          description: Your StarPay API secret key.
          schema:
            type: string
            example: SplFeYdc/Hc5S1CGmVDtETLYUJY/10a38ejamzwb1YH30h+u8sOK2fpTlyKitpPk
        - in: header
          name: x-order-et-api-key
          required: false
          description: Optional Order.et API Key for service authorization.
          schema:
            type: string
            example: 9d7b6b4f5d0f8c1e7a9b3c4d6e8f1a2b5c7d9e0f3a1b6c8d2e4f6a8b0c1d3e5
      responses:
        '200':
          description: Merchant details retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MerchantDetailResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            using System.Net.Http;


            using var client = new HttpClient();

            client.DefaultRequestHeaders.Add("x-api-secret", "YOUR_API_SECRET");

            client.DefaultRequestHeaders.Add("x-order-et-api-key",
            "YOUR_ORDER_ET_KEY");

            var response = await
            client.GetAsync("https://sandbox-api.starpayethiopia.com/v1/starpay-api/trdp/get/merchant/01344351");

            Console.WriteLine(await response.Content.ReadAsStringAsync());
        - lang: javascript
          label: JavaScript
          source: >
            const response = await
            fetch('https://sandbox-api.starpayethiopia.com/v1/starpay-api/trdp/get/merchant/01344351',
            {
              method: 'GET',
              headers: {
                'x-api-secret': 'YOUR_API_SECRET',
                'x-order-et-api-key': 'YOUR_ORDER_ET_KEY'
              }
            });

            const data = await response.json();

            console.log(data);
components:
  schemas:
    MerchantDetailResponse:
      type: object
      properties:
        status:
          type: string
          example: success
        timestamp:
          type: string
          format: date-time
          example: '2026-07-29T12:00:00Z'
        message:
          type: string
          example: Merchant details retrieved successfully
        data:
          type: object
          properties:
            merchantId:
              type: string
              example: '01344351'
            merchantName:
              type: string
              example: Sample Store
            phoneNumber:
              type: string
              example: '+251911223344'
            email:
              type: string
              format: email
              example: merchant@example.com
            status:
              type: string
              example: ACTIVE
            businessType:
              type: string
              example: Retail
            createdAt:
              type: string
              format: date-time
              example: '2025-01-15T08:00:00Z'
      required:
        - status
        - timestamp
        - message
        - data
    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'

````