airtel - global-121/121-platform GitHub Wiki

Airtel

This page contains information about configuring the Airtel FSP integration in a 121 Platform Instance.

Allow IP

Add the IP address from which you want to send requests in the Airtel Dashboard

Configure Environment Variables

For the Airtel FSP integration to work for any program, some settings need to be configured via environment variables:

API url

AIRTEL_API_URL

The value is the base URL of Airtel's API. Both the staging and production URLs can be found in the Airtel documentation.

Airtel Client ID

AIRTEL_CLIENT_ID

This value can be found in the Airtel dashboard.

Airtel Client Secret

AIRTEL_CLIENT_SECRET

This value can be found in the Airtel dashboard.

Disbursement PIN

AIRTEL_DISBURSEMENT_PIN

Disbursement calls (including enquiry calls) need to have an encrypted PIN sent along. This PIN can be configured in the Airtel dashboard. The PIN is used for all encryption versions, so no version is needed.

RSA Public key for PIN encryption version 1

AIRTEL_DISBURSEMENT_V1_PIN_ENCRYPTION_PUBLIC_KEY

This value is a 1024-bit RSA public key and can be found in the Airtel documentation. Double check that you're using the public key for the correct version.

The PIN is non-versioned, this public key is versioned.

Enable airtel

AIRTEL_ENABLED

Set this to true to enable Airtel for a specific instance.

Configuration

121 uses the disbursement flow of Airtel, where money is transferred from a sender mobile wallet to the recipients mobile wallet.

Airtel can work in different countries, the current integration in the 121 platform is hardcoded to Zambia and the Zambian currency.

Payment flow

When a payment is made to a registration with Airtel FSP, money is transferred to the mobile wallet of the recipient.

How payment problems are handled

When a disbursement fails a failed transaction will be created and the end user can retry the transaction.

When the Airtel API doesn't respond or doesn't respond correctly a failed transaction will be created.

When the 121 Platform has a malfunction during a disbursement the next time the payment is tried and Airtel knows about this disbursement it will send a duplicate error, the 121 Platform then retrieves the status for the disbursement and proceeds accordingly.

Airtel API documentation

For more information about Airtel's API see the Airtel documentation.

⚠️ **GitHub.com Fallback** ⚠️