Skip to content

About This Package

africastalking-laravel is an unofficial Laravel SDK for Africa's Talking APIs. It wraps the Africa's Talking REST APIs in a fluent, Laravel-idiomatic interface so you can integrate SMS, airtime, payments, voice, USSD, and SIM Swap detection without writing boilerplate HTTP code.

Why This Package?

Africa's Talking provides powerful APIs for building telecom-driven applications across Africa. This SDK makes those APIs accessible within Laravel by leveraging the framework's native components:

Laravel FeatureHow It's Used
HTTP ClientAll API requests — no raw Guzzle
Service ContainerFacade and helper function binding
NotificationsRoute notifications via Africastalking SMS
CollectionsAPI responses returned as typed Collections
Form RequestsTyped, validated callback request objects
ConfigCentralised credentials management

Supported APIs

ServiceFeature
ApplicationFetch account balance
SMSBulk, Premium, and On-Demand messages
AirtimeDisburse airtime to one or many numbers
USSDHandle USSD sessions and events
PaymentsMobile checkout, wallet balance, stash top-up
VoiceOutbound calls, IVR responses, call recording
WebRTCGenerate browser client tokens
InsightsSIM Swap detection

Sandbox vs. Production

Africa's Talking provides a sandbox environment for testing. Set AFRICASTALKING_USERNAME=sandbox in your .env to use it — no real money or messages will be sent.

Switch to your live credentials when you're ready for production.

Relationship to the Official Docs

This SDK and its documentation complement the official Africa's Talking developer docs. It is strongly recommended to keep the official docs bookmarked — they cover API limits, network-specific behaviour, and error codes that go beyond the scope of this SDK.