Skip to content

Airtime Topup

Use this endpoint to purchase airtime for a recipient mobile number.

Flow

Endpoint

POST /airtime/purchase

Headers

HeaderRequiredDescription
X-API-KeyYesPartner API key.
X-TimestampYesISO timestamp used in signature verification.
X-SignatureYesBase64 Ed25519 signature for the request.
Idempotency-KeyYesUnique retry-safe operation key.
User-AgentNoOptional client identifier.

Request Body

FieldTypeRequiredRules
msisdnstringYesMax 32 chars. Example: +251911234567.
amountnumberYesMinimum 0.01.
originatingCountrystringYesSender country (code or name), max 255 chars. Example: US.
foreignCurrencyAmountnumberYesSending amount in USD, must be greater than 0.
exchangeRatenumberYesUSD to ETB exchange rate, must be greater than 0.

Example Request

bash
curl -X POST "$API_BASE_URL/airtime/purchase" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $PARTNER_API_KEY" \
  -H "X-Timestamp: 2026-04-29T12:00:00.000Z" \
  -H "X-Signature: $PARTNER_SIGNATURE" \
  -H "Idempotency-Key: 8c9b3f8d-0f1a-4c6a-8e69-0f6c0a1e39c2" \
  -d '{
    "msisdn": "+251911234567",
    "amount": 100,
    "originatingCountry": "US",
    "foreignCurrencyAmount": 1.77,
    "exchangeRate": 56.5
  }'
json
{
  "msisdn": "+251911234567",
  "amount": 100,
  "originatingCountry": "US",
  "foreignCurrencyAmount": 1.77,
  "exchangeRate": 56.5
}

Example Response

json
{
  "id": 98421,
  "correlationId": "airtime_01HWJ7S8E4Y9G7E4F6N5Q2P3Z8",
  "recipientPhone": "+251911234567",
  "amountEtb": 100,
  "transactionStatus": "COMPLETED",
  "telebirrRef": "TB-240427-000123",
  "message": "Airtime purchase completed successfully."
}

transactionStatus can be:

  • COMPLETED
  • FINALIZATION_PENDING

Response Codes

CodeMeaning
200Purchase request processed.
400Invalid request or missing idempotency key.
401Missing or invalid API key, timestamp, or signature.
403Access is forbidden.
409Idempotency conflict or insufficient partner wallet balance.
422Business-rule rejection, such as partner limit checks.
502Upstream provider failure while processing the request.
503Service temporarily unavailable (for example provider circuit open).
504Upstream provider timeout.
500Unexpected processing error.

When Telebirr confirms delivery but local platform finalization still needs reconciliation, the endpoint still returns 200 with transactionStatus: "FINALIZATION_PENDING" and the confirmed telebirrRef. Partners should treat this as delivered, not failed.

Integration Notes

  • Always retry with the same Idempotency-Key after network timeouts.
  • Treat non-2xx responses as non-delivered unless your integration has independent provider confirmation.
  • Persist correlationId and telebirrRef for support and reconciliation workflows.