Skip to main content

A Python package that allows merchants to receive, send, check transaction status, and perform lots of payment transactions using Redde payment API.

Project description

reddePy

reddepy-sdk

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

Installation

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

Usage

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)

Examples

Receiving money from Customer or Client

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)

Sending money to a Customer or Client

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)

Callbacks

You need to setup your callback URL for the apps we create for you on Redde

  1. Login to your Redde account
  2. Click on the Apps link on the navigation bar
  3. You will see your list of apps in a table. Click on the modify button
  4. Add your callback url(s) for both the Receive Callback URL and Cash Out Callback URL
  5. 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

License

This library is released under the MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reddepy-1.0.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reddepy-1.0.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file reddepy-1.0.0.tar.gz.

File metadata

  • Download URL: reddepy-1.0.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.1

File hashes

Hashes for reddepy-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d17be021167607c844f54c4b4c6521b5f2bd1bde360db2be1a4d2a606f343210
MD5 7d3ed3c8dad51b0bbe607cf1fd37d0a5
BLAKE2b-256 26dce90a1fad985b8d25205b95342e952681abcb75642007e78f618ce05dd398

See more details on using hashes here.

File details

Details for the file reddepy-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: reddepy-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.1

File hashes

Hashes for reddepy-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 95ba68885290ea41987b175eef6e74ddbd1854252eec88646b93df0d94122f61
MD5 00019cbd820456663c68599a265edafd
BLAKE2b-256 62696bf9191601e4a9087363e556d42bb25870bc61ec1689b6ff1865494b67f1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page