Before you can integrate AirtimePay, you must set up your AirtimePay account and get your credentials for the test and live
environments. You use these credentials to authorize your REST API calls.
To test your web and mobile apps, use your test API keys.
AirtimePay API uses API keys to authenticate requests. You can view and manage your test and live API keys in the Dashboard's Settings section.
Test mode keys have the prefix test_ and live mode keys have the prefix live_. Your API keys carry many privileges,
so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, or client-side code.
Authentication to the API is performed via HTTP Basic Auth. Include your secret key in the Authorization header of every request you make.
AirtimePay supports two types of keys - the secret key and public key, which both hold different levels of access to your AirtimePay account and can be accessed through the settings section of your merchant account.
Both the secret and public keys can be used to initailize payment transactions for your business, however, we advice that you dont use your secret API keys on publicly/ client-side accessible integrations - this is the reaso we have disabled the use of secret keys in form based integration. Also do not keep your secret keys in your code repositories that are publicly visible like github etc.
Default code example:
"Authorization: Bearer test_4eC39HqLyjWDarjtT1zdp7dc"
Note: All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
You must SET your callback URL in your merchant business settings section before integrating else, your calls will fail.