Python3 SDK that allows merchants to receive, send, check transaction status, and perform lots of payment transactions.
Before you can have access to APIs you need to register and create an Account on reddeonline. Header for all request should have {"apikey": "string"}: and this API key will be sent to merchant when their app configuration is setup for them by Wigal.
For more information on documentation go to developers.reddeonline.com
To use this library you'll need to have created a Redde account. To install this package and use in your project, we recommend using Npm.
python3 -m pip install reddepy
or
pip install reddepy
You don't need to clone this repository to use this package in your own projects. Use PIP to install it from PYPI.
Importing redde python sdk package
from reddepy.redde import ReddeApi
Import redde-python-package at the top of your js file as shown above. Enter your API key and App ID which was provided to you by the Redde Team:
app_id = "" # Enter App ID Here
api_key = "" # Enter Api Key Here
#Instantiate ReddeApi Class
redde = ReddeApi(api_key, app_id)
client_ref = redde.clientReferenceNumber(6)
client_id = redde.randomClientID(6)
To use the API to recieve money from a customer, the receiveMoney() method will be used which takes takes 5 required arguments which are: amount, network type(MTN, AIRTELTIGO, VODAFONE), phone number, client reference, and client id respectively.
from reddepy.redde import ReddeApi
app_id = "" # Enter App ID Here
api_key = "" # Enter Api Key Here
#Instantiate ReddeApi Class
redde = ReddeApi(api_key, app_id)
client_ref = redde.clientReferenceNumber(6)
client_id = redde.randomClientID(6)
#Call receiveMoney Function
recieve = redde.receiveMoney(1, 233240000004, client_ref, client_id, "MTN")
print(recieve)
To use the API to send money to a customer, the sendMoney() method will be used which takes takes 5 required arguments which are: amount, network type(MTN, AIRTELTIGO, VODAFONE), phone number, client reference, and client id respectively.
from reddepy.redde import ReddeApi
app_id = "" # Enter App ID Here
api_key = "" # Enter Api Key Here
#Instantiate ReddeApi Class
redde = ReddeApi(api_key, app_id)
client_ref = redde.clientReferenceNumber(6)
client_id = redde.randomClientID(6)
#Call receiveMoney Function
send = redde.sendMoney(1, 233240000004, client_ref, client_id, "MTN")
print(send)
You need to setup your callback URL for the apps we create for you on Redde
- Login to your Redde account
- Click on the Apps link on the navigation bar
- You will see your list of apps in a table. Click on the modify button
- Add your callback url(s) for both the Receive Callback URL and Cash Out Callback URL
- Apply changes and you are all set.
Most APIs implement callbacks for easy tracking of api transactions so try and implement it to keep track of the API transactions.
//Callback Url Endpoint
This library is released under the MIT License