Skip to content

Ethio Telecom Bundles

Bundles are packages provided by Ethio Telecom to customers. These include different types of packages such as: Voice, Data, and more. Packages are one part of our products list and they can be found using the products-list endpoint.

Getting List of Bundles

> GET ${BASE_URL}/product-list?q=productCategory.categoryName=PACKAGES

Buy Packages.

Once a bundle is selected from the product list you can use the following endpoint to buy the bundle.

sh
> POST ${BASE_URL}/topup-transactions/airtime-package-topup

Payloads

NAMETypeDescriptionRequired
productIdnumberproduct id from the list of productsYes
msisdnstringThe user who will receive the packageYes
exchangeRatenumberUSD -> ETB Exchange Rate used for this saleYes
currencystringThe original currency used to buy the airtimeYes
originatingCountrystringFrom where country is this request comingYes
foreignCurrencyAmountstringAmount in USD representing the sale price of the packageYes

Sample Request

sh
$  curl -H 'Content-Type: application/json' \
        -H 'x-api-token: ACCESS_TOKEN' \
        -d '{
              "productId": 123,
              "msisdn": "251911234567",
              "exchangeRate": 56.5,
              "currency": "USD",
              "originatingCountry": "ET"
            }' \
        "BASE_URL/topup-transactions/airtime-package-topup"
Typescript
import * as axios from "axios";

const data = {
  productId: 123,
  msisdn: "251911234567",
  exchangeRate: 56.5,
  currency: "USD",
  originatingCountry: "ET"
};

axios
  .post("BASE_URL/topup-transactions/airtime-package-topup", data, {
    headers: {
      "Content-Type": "application/json",
      "x-api-token": "ACCESS_TOKEN"
    },
  })
  .then((response) => {
    console.log("Success:", response.data);
  })
  .catch((error) => {
    console.error(
      "Error:",
      error.response ? error.response.data : error.message,
    );
  });

Response Schema

Success Schema

ts
{
  success: boolean;
  message: string;
  statusCode: number;
  data: {
    message: string,
    referenceNo: string,
  }
}

Error Schema

ts
{
  statusCode: number;
  success: boolean;
  message: string;
  data: any & {
      transactionId: number, 
      status: 'SUCCESS' | 'FAILED', 
      referenceNumber: null | string, 
  };
}

If you get a failure when trying to topup and your request is retriable you will get a transactionId in the error data. you can use this transactionId to retry failing request again.

Sample Response

json
{
  "success": true,
  "message": "Successful",
  "statusCode": 200,
  "data": {
    "message": "Your request is being processed"
    "referenceNo": "123456789"
  }
}

Error Types

MessageStatus CodeSuccess_Additional Note_
You do not have access to this product. please check with Admins.404false-
You do not have adequate amount of money405false-

Topup Request Retries

Upon a failure of a topup request the error response you will see will have an information about your unsuccessful attempt. The error response will hold information that looks like

{
    "message": "Message explaining why it failed", 
    "status": "FAILED", 
    "transactionId": 1, // Take a note of this field 
}

From this response, you can use the transactionId to retry your request. The necessary information about the retry endpoint has been written below

Endpoint

sh
> POST ${BASE_URL}/topup-transactions/retry-topup

Payloads

NAMETypeDescriptionRequired
transactionIdnumberTransaction Id from the above error responseYes
msisdn (optional)stringIf you want the transaction happen to another numberYes

Response Schema

Success Schema

ts
{
  success: boolean;
  message: string;
  statusCode: number;
  data: {
    transactionId: number, 
    message: string, 
    referenceNumber: string, 
    status: 'SUCCESS' | 'FAILED'
  }
}