Pays couverts
| Pays | Code | Devise |
|---|---|---|
| Rwanda | RW | RWF |
URLs
| Type | URL |
|---|---|
| Portail dev | developers.airtel.africa |
| Sandbox UAT | https://openapiuat.airtel.africa |
| Token OAuth | https://openapiuat.airtel.africa/auth/oauth2/token |
| Payment | https://openapiuat.airtel.africa/merchant/v1/payments/ |
| USSD client | *185# |
Credentials requis
À renseigner dans Settings → Stores → Airtel :| Champ | Type | Description |
|---|---|---|
client_id | text | OAuth client_id de votre app Airtel Developer. |
client_secret | password | Secret OAuth associé. |
Particularités
- OAuth client_credentials avec corps JSON : contrairement à Orange (qui attend du
x-www-form-urlencoded), Airtel exige un corps JSON{ "client_id": ..., "client_secret": ..., "grant_type": "client_credentials" }sur le token endpoint. SandPay gère cette variante viaoauthClientCredentialsJsonBody. - En-têtes
X-CountryetX-Currencyobligatoires sur l’appelPOST /merchant/v1/payments/— déduits du MSISDN ou explicitement passés via le champcountry. msisdnenvoyé sans le+dans le subscriber.- Le payload Airtel sépare
subscriber(le payeur) ettransaction(le mouvement) — SandPay copiereferencedans les deux champsidpour rester idempotent. - Réponse imbriquée :
data.transaction.id— c’est cette valeur qui est stockée commeprovider_tx_id.