Skip to content

Data Package Activation

Use this endpoint to purchase and activate a data package for a recipient mobile number.

Flow

Endpoint

POST /data-packages/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.
offerIdstringYesMax 128 chars. Example: DP-ETHIO-1GB-7D.
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/data-packages/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: 2e9c7260-e8cc-4ce5-8b7c-75a33273d6ff" \
  -d '{
    "msisdn": "+251911234567",
    "offerId": "DP-ETHIO-1GB-7D",
    "originatingCountry": "US",
    "foreignCurrencyAmount": 1.77,
    "exchangeRate": 56.5
  }'
json
{
  "msisdn": "+251911234567",
  "offerId": "DP-ETHIO-1GB-7D",
  "originatingCountry": "US",
  "foreignCurrencyAmount": 1.77,
  "exchangeRate": 56.5
}

Example Response

json
{
  "id": 98422,
  "correlationId": "data_01HWJ7VHHZ37VZB6E7N2C9F4Q1",
  "recipientPhone": "+251911234567",
  "amountEtb": 100,
  "transactionStatus": "COMPLETED",
  "telebirrRef": "TB-240427-000124",
  "message": "Data package activation completed successfully."
}

transactionStatus can be:

  • COMPLETED
  • FINALIZATION_PENDING

Response Codes

CodeMeaning
200Activation 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.

Integration Notes

  • Reuse the same Idempotency-Key only when retrying the same request payload.
  • Persist correlationId and telebirrRef for reconciliation and support.
  • Handle FINALIZATION_PENDING as delivered with pending local reconciliation, not as failure.