# Services List

### Get Services List

<mark style="color:blue;">`GET`</mark> `https://gwapisdbx.ellypayapp.com/service-payments/services-list?category=`

Returns the list of services based on the category. Supported categories are `AIRTIME`, `INTERNET`, `WATER`, `ELECTRICITY`, `TAXES`, `MMONEY`

#### Query Parameters

<table><thead><tr><th width="180">Name</th><th width="82">Type</th><th>Description</th></tr></thead><tbody><tr><td>category<mark style="color:red;">*</mark></td><td>String</td><td>The category of services to be retrieved</td></tr></tbody></table>

#### Headers

<table><thead><tr><th width="147">Name</th><th width="114">Type</th><th>Description</th></tr></thead><tbody><tr><td>public-key<mark style="color:red;">*</mark></td><td>String</td><td>The Public Key as shared in the approval email</td></tr></tbody></table>

### Sample Services Request

```powershell
curl https://gwapisdbx.ellypayapp.com/service-payments/services-list?category=AIRTIME \
   -H "Accept: application/json" \
   -H "x-api-version: 1" \
   -H "public-key: your-public-key"
```

{% tabs %}
{% tab title="200: OK Returns the list of services matching the query" %}

```json
{
    "code": 200,
    "status": "success",
    "message": "Request completed successfully.",
    "data": [
        {
            "code": "MTNAirtime",
            "name": "MTN Airtime",
            "category_code": "AIRTIME",
            "category": "Airtime",
            "has_packages": false,
            "has_choices": false,
            "is_billable": false,
            "account_field_label": "MTN Phone Number",
            "account_length": 12,
            "min_amount": 500,
            "max_amount": 1500000,
            "is_active": true
        },
        {
            "code": "MTNVoice",
            "name": "MTN Voice Bundles",
            "category_code": "AIRTIME",
            "category": "Airtime",
            "has_packages": true,
            "has_choices": false,
            "is_billable": false,
            "account_field_label": "MTN Phone Number",
            "account_length": 10,
            "min_amount": 500,
            "max_amount": 2000000,
            "is_active": true
        }
    ]
}

```

{% tabs %}
{% tab title="Response Description" %}

<table><thead><tr><th width="195">Parameter</th><th width="96">Type</th><th>Description</th></tr></thead><tbody><tr><td>code</td><td>string</td><td>The unique code for the service. It is required for other API requests as will be described</td></tr><tr><td>name</td><td>string</td><td>The name of the service</td></tr><tr><td>category_code</td><td>string</td><td>The service category code</td></tr><tr><td>category</td><td>string</td><td>The service category name</td></tr><tr><td>has_packages</td><td>Boolean</td><td>Indicates whether the service has a price list of packages that are subscribed for.</td></tr><tr><td>has_choices</td><td>Boolean</td><td>Indicates wether the service has a list of choices that support its purchase.</td></tr><tr><td>is_billable</td><td>Boolean</td><td>Indicates whether EllyPay charges you for purchasing this service</td></tr><tr><td>account_field_label</td><td>string</td><td>A suggested label to be used on when displaying the payment form on your platform</td></tr><tr><td>account_length</td><td>Number</td><td>The expected length of the account number used for the service payment e.g. a phone number</td></tr><tr><td>min_amount</td><td>Number</td><td>The minimum allowed amount for this service</td></tr><tr><td>max_amount</td><td>Number</td><td>The maximum allowed amount for this service</td></tr><tr><td>is_active</td><td>Boolean</td><td>Whether the service is active to be transacted with.</td></tr></tbody></table>
{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="400: Bad Request When the request is not formed as expected" %}

```javascript
{
  "code": 400,
  "status": "error",
  "message": "unrecognized category",
  "data": {}
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.ellypayapp.com/service-payments/services-list.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
