Bonaventure OgetoBy Bonaventure Ogeto|

Airtel Money API Integration in Tanzania: Developer Guide

Airtel Money in Tanzania uses the Airtel Africa developer platform for API access. The integration follows the standard request-callback pattern: your server sends a payment request, the customer confirms via USSD or STK push, and Airtel sends a callback to your server with the result. Like Vodacom M-Pesa and Tigo Pesa, direct API access requires business registration and Airtel approval. Most developers access Airtel Money through aggregators like Selcom, Azampay, or Pesapal. McTaba teaches M-Pesa and Airtel Money integration patterns, and the skills transfer directly to Airtel Money Tanzania.

Airtel Money's Role in Tanzania

Airtel Money is the third of Tanzania's three mobile money rails, alongside Vodacom M-Pesa and Tigo Pesa. It is operated by Airtel Tanzania, a subsidiary of Airtel Africa, which runs mobile money services across 14 African countries.

While Airtel Money has a smaller subscriber base than M-Pesa and Tigo Pesa in Tanzania, it is still a significant rail. Excluding it from your payment options means losing transactions from millions of Airtel subscribers. In a fully interoperable market like Tanzania, customers expect to pay from their primary wallet regardless of which provider you support.

For developers, the Airtel Africa developer platform is the entry point. Airtel has invested in developer-facing tools across its African markets, and the API documentation is generally better structured than what Tigo Pesa offers, though still not as polished as Safaricom's Daraja.

The integration architecture is identical to the other two providers: REST API, request-callback pattern, webhook handling. If you have built a payment integration against any mobile money API, Airtel Money is not a new concept. It is a new set of credentials and endpoints.

API Architecture and Payment Flow

The Airtel Money API follows the same pattern as every mobile money API in the region:

  1. Authenticate. The Airtel Africa API uses OAuth 2.0 for authentication. You send your client ID and client secret to the token endpoint and receive an access token. This is closer to Safaricom's Daraja than to Vodacom's session key approach.
  2. Initiate a payment request. For C2B (customer to business), you POST to the collection endpoint with the customer's Airtel phone number, the amount in TZS, and a transaction reference.
  3. Customer confirms. Airtel pushes a prompt to the customer's phone. The customer enters their Airtel Money PIN to authorize the payment.
  4. Receive a callback. Airtel sends a POST request to your callback URL with the transaction status. Your server processes this, updates the order, and returns a response.

For B2C (business to customer, used for disbursements), the flow is similar: you POST to the disbursement endpoint with the recipient's phone number and amount, and receive a callback with the result.

Because Airtel uses OAuth 2.0, the authentication is very similar to Safaricom Daraja. If you have written the token generation code for Daraja, adapting it for Airtel is a matter of changing the credentials and token endpoint URL. This is one of the reasons McTaba teaches Daraja first: the patterns it uses are closer to what Airtel (and many other APIs) use than Vodacom's session key mechanism.

Getting Access: Direct vs Aggregator

As with Vodacom and Tigo, direct API access to Airtel Money in Tanzania requires a business relationship with Airtel. You need a registered Tanzanian business, an Airtel business account, and approval from their commercial team. The timeline is variable, often two to six weeks.

The Airtel Africa developer portal does offer sandbox access for testing, which is more straightforward to obtain than production credentials. If you want to test the API flow before committing to the full onboarding process, the sandbox is a reasonable starting point.

For production, the aggregator path remains the fastest for most developers:

  • Selcom: Tanzania's largest aggregator. Supports all three rails. Strong local presence and developer support.
  • Azampay: Growing Tanzanian aggregator with a modern API and competitive fees.
  • ClickPesa: Tanzania-based aggregator with support for mobile money and bank transfers.
  • Pesapal: East Africa-wide aggregator. Supports Airtel Money alongside M-Pesa, Tigo Pesa, and card payments.

Each aggregator has one API that covers all three rails. This means your integration work for Airtel Money is already done if you integrated M-Pesa through the same aggregator. The aggregator abstracts the provider-specific details and gives you a unified callback format.

Airtel Money Across Africa: One API, Many Markets

Unlike Vodacom M-Pesa (Tanzania-specific) and Tigo Pesa (Tanzania-specific), Airtel Money operates across 14 African countries under the Airtel Africa umbrella. This creates an unusual advantage for developers: the Airtel Africa API is designed to work across markets, with country-specific configurations rather than entirely separate APIs.

If you integrate Airtel Money in Tanzania, the architecture and much of the code applies to Airtel Money in Kenya, Uganda, Rwanda, Malawi, and other Airtel Africa markets. The country code, currency, and some market-specific parameters change. The authentication, endpoint structure, and callback handling remain the same.

For developers building products that span multiple East African markets, this consistency is valuable. You build the Airtel integration once and configure it per country, rather than building separate integrations from scratch.

McTaba's M-Pesa Integration for Developers course (KES 9,999 / ~TZS 200,000) teaches both Safaricom M-Pesa (Daraja) and Airtel Money integration. Because Airtel uses OAuth 2.0 and the same request-callback pattern as Daraja, the two APIs are natural companions in a single course. The skills you build are immediately applicable to Airtel Money Tanzania.

Practical Tips for Airtel Money Integration

A few things to keep in mind when integrating Airtel Money in Tanzania:

  • Phone number format. Airtel Tanzania numbers use the 255 country code prefix. Ensure your code normalizes user input to the international format before sending API requests.
  • TZS formatting. All amounts are in Tanzanian Shillings, with no decimal places. If your system handles multiple currencies, make sure TZS amounts are treated as integers.
  • Callback reliability. Like all mobile money callbacks, Airtel callbacks can be delayed or fail to arrive during network issues. Implement a transaction status check (polling) as a fallback for cases where the callback does not arrive within your expected timeframe.
  • Token caching. OAuth tokens have an expiry. Do not request a new token for every API call. Cache the token and refresh it before expiry. This reduces latency and avoids unnecessary API calls.
  • Error messages. Airtel error codes are different from Vodacom and Daraja codes. Map them to user-friendly messages. "Insufficient funds" should say "Insufficient funds," not display a raw error code to the customer.

For a full guide on handling errors across all three Tanzanian providers, see our common mobile money API errors article.

Key Takeaways

  • Airtel Money Tanzania uses the Airtel Africa developer platform. The API provides C2B, B2C, and B2B endpoints following the same request-callback architecture as M-Pesa and Tigo Pesa.
  • Direct API access requires Airtel business approval. For most developers, aggregators (Selcom, Azampay, ClickPesa, Pesapal) provide faster access to Airtel Money integration.
  • Airtel Money is part of Airtel Africa, which operates mobile money across multiple African countries. A developer who integrates Airtel Money in Tanzania can apply the same skills to Airtel Money in Kenya, Uganda, Rwanda, and other markets.
  • McTaba teaches both M-Pesa (Safaricom Daraja) and Airtel Money integration patterns. The course costs KES 9,999 (~TZS 200,000) and covers the request-callback architecture that applies to all three Tanzanian providers.

Frequently Asked Questions

Is the Airtel Money API the same in Tanzania and Kenya?
The Airtel Africa developer platform is designed to work across markets. The API structure, authentication (OAuth 2.0), and endpoint patterns are the same. The differences are country code, currency (TZS vs KES), and some country-specific configurations. Code written for Airtel Money Kenya can be adapted for Tanzania with minimal changes.
Can I test Airtel Money integration without a Tanzanian business registration?
The Airtel Africa developer portal offers sandbox access that is easier to obtain than production credentials. For learning purposes, you can also use an aggregator sandbox (Selcom, Azampay) or learn the pattern on Safaricom Daraja, which has the most freely accessible sandbox.
Why should I integrate Airtel Money if M-Pesa is bigger in Tanzania?
Tanzania is not a single-provider market like Kenya. Airtel Money has millions of active users. If your checkout only supports M-Pesa, those users either cannot pay or must transfer money to an M-Pesa account first (which adds friction and cost). Supporting all three rails maximizes your addressable market.

Ready to build real-world apps?

Join the McTaba Labs full-stack marathon (4 months full-time · 6 months part-time). Learn M-Pesa, USSD, and WhatsApp engineering while shipping 8 production apps.

Apply to the McTaba Marathon