Aimtoget Payment Integration

Aimtoget's modal payment gateway makes it easy and faster to receive airtime payments from your website using airtime. If you have any issues after going through this documentation, join us on our slack channel or contact us via

Step 1.

Load the Aimotget javascript library.
    <script src="$jurl"></script>

Step 2.

Initialize A Payment.
Create a button to pop payment modal
    <button onclick="callAtgPay()"></button>

The javascript function to pop payment modal
function callAtgPay(e) {{
        //customer's email address
        email: '',

        //Customer's phone number (Optional)
        phone: '+2349061668519',

        //customer's description
        description: 'Pay for house rent',

        // Amount to pay in naira
        amount: 5000,

        //Payment reference
        //If not specified, a reference will be generated for you
        reference: 'rof565565tktj5oi',

        // Merchant's aimotget PUBLIC KEY

        //Url to the logo you want displayed on the payment modal
        logo_url: '',

        onclose: function () {
            //do something when modal is closed

        onerror: function (data) {
            let reference = data.reference
            //payment failed, do something with reference

        onsuccess: function (data) {
            let reference = data.reference
            //get reference and verify payment before awarding value



The payment flow can be experienced here