Redde Merchant REST API

REST API that allows merchants to receive, send, check transaction status, and perform lots of payment transactions.

Github Repository

Welcome to Redde's API Docs

Redde is a system that allows merchants to receive payments for goods and services. You can use the Redde portal to sweep your money into your bank account. Transactions via Redde happen online via a web browser or our Redde app available for iOS, Windows. And Android.

Redde provides a secure, easy and convenient method of making online payments for products and services.

Instructions

API Key:

Before you can have access to APIs you need to register and create an Account. 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.

Approval

One will be given access to modify their API callbacks once they are approved to do so. To be approved, one needs to upload their Genuine details to the Account Profile Section under the Account Page. And complete the Business Information and contacts, Primary Contact Person and Documentation pages. Upon successful review by the Redde Team, approval will be granted.

Status Responses:

These are statuses we send during transactions. On initial response (first response) an OK or FAILED response can be sent based on successful or failed transaction. A PENDING or PROGRESS response is sent when transactions are being processed. And finally a PAID or FAILED status is sent when transaction has completed.

  • OK (First response)
  • FAILED (First Response)
  • PENDING (Processing Response)
  • PROGRESS (Processing Response)
  • PAID (Final Response)
  • FAILED (Final Response)

Supported Channels

  • MTN
  • AIRTELTIGO
  • VODAFONE

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.

Customer API

Taking money out from customer wallet

Debit (Taking money out from customer wallet) : That is customer paying a merchant for goods and services

Endpoint: POST
                            
                                https://api.reddeonline.com/v1/receive
                            
                        

Header data
Field / Parameter Value Required Description
apikey xxxxxxxxxxxxxxxxxxxx Yes merchant api key given to you by wigal
Content-Type application/json;charset=UTF-8 Yes this is needed to encode to UTF-8
Payload description
Field / Parameter Type Required Description
amount number Yes (2 decimal places allowed)
appid characters Yes will be given by wigal when the app is setup
clientreference string Optional client's reference
clienttransid string Yes client's transaction id
description string Optional A description for transaction
nickname string Yes A nickname for merchant
paymentoption string Yes Telcos (MTN, AIRTELTIGO, VODAFONE) all should be capitalized
walletnumber string Yes Wallet Number here
Sample Payload:
                                

                                    Payload:
                                    {
                                        "amount": number, (2 decimal places allowed)
                                        "appid": "string",  will be given by wigal when the app is setup
                                        "clientreference": "string", optional
                                        "clienttransid": "string",
                                        "description": "string", optional
                                        "nickname": "string",
                                        "paymentoption": "string",(MTN | AIRTELTIGO | VODAFONE) 
                                        "walletnumber": "string"
                                    }

                                
                            

Sample Response: First Response
                                

                                    Response: Initial
                                    {
                                        "status": "OK",
                                        "reason": "Transaction Recieved for Processing",
                                        "transactionid": "103046",
                                        "clienttransid": "wwzz0402",
                                        "statusdate": "2019-04-23 16:43:21.231"
                                    }

                                
                            

Sample Response: Intermidiary(Processing) Response - This is sent to the receive callback url
                                

                                    Response: intermidiary
                                    {
                                        "reason": "Accepted for Delivery 233243XXXXXX",
                                        "clienttransid": "XXXX",
                                        "clientreference": "XXXX",
                                        "transactionid": "XXXX",
                                        "statusdate": "YYYY-MM-DD H:mm:ss.sss",
                                        "status": "PROGRESS"
                                    }

                                    Sample data
                                    {
                                        "reason": "Accepted for Delivery 233243XXXXXX",
                                        "clienttransid": "wwzz0402",
                                        "clientreference": "780566",
                                        "transactionid": "103046",
                                        "statusdate": "2019-04-23 16:47:01.951",
                                        "status": "PROGRESS"
                                    }


                                
                            

Sample Response: Completed - This is sent to the receive callback url
                                

                                    Response: completed
                                    {
                                        "reason": "Successfully processed transaction.",
                                        "clienttransid": "XXXX",
                                        "clientreference": "XXXX",
                                        "telcotransid": "XXXXXXXXX",
                                        "transactionid": "XXXX",
                                        "statusdate": "YYYY-MM-DD H:mm:ss.sss",
                                        "status": "PAID"
                                    }

                                    Sample Data
                                    {
                                        "reason": "Successfully processed transaction.",
                                        "clienttransid": "wwzz0402",
                                        "clientreference": "780566",
                                        "telcotransid": "5715731571",
                                        "transactionid": "103046",
                                        "statusdate": "2019-04-23 16:51:01.455",
                                        "status": "PAID"
                                    }

                                
                            

Examples implemented for /v1/receive/ in other forms
  • cURL
                                                    
                                                        curl -X POST \
                                                          https://api.reddeonline.com/v1/receive/ \
                                                          -H 'Accept: */*' \
                                                          -H 'ApiKey: XXXXXXXXXXXXXXXXXXXXXXXXXX' \
                                                          -H 'Content-Type: application/json' \
                                                          -H 'Host: api.reddeonline.com' \
                                                          -d '{
                                                            "amount": 1,
                                                            "appid": 11,
                                                            "clientreference": "780566",
                                                            "clienttransid": "wwzz0402",
                                                            "description": "Membership registration",
                                                            "nickname": "wigal",
                                                            "paymentoption": "MTN",
                                                            "walletnumber": "233243XXXXXX"
                                                        }'
                                                    
                                                
  • HTTP
                                                    
                                                        POST /v1/receive/ HTTP/1.1
                                                        Host: api.reddeonline.com
                                                        ApiKey: XXXXXXXXXXXXXXXXXXXXXXXXXX
                                                        Content-Type: application/json
                                                        {
                                                            "amount": 1,
                                                            "appid": 11,
                                                            "clientreference": "780566",
                                                            "clienttransid": "wwzz0402",
                                                            "description": "Membership registration",
                                                            "nickname": "wigal",
                                                            "paymentoption": "MTN",
                                                            "walletnumber": "233243XXXXXX"
                                                        }
                                                    
                                                
  • PHP
                                                    
                                                        $curl = curl_init();
    
                                                        curl_setopt_array($curl, array(
                                                          CURLOPT_URL => "https://api.reddeonline.com/v1/receive/",
                                                          CURLOPT_RETURNTRANSFER => true,
                                                          CURLOPT_ENCODING => "",
                                                          CURLOPT_MAXREDIRS => 10,
                                                          CURLOPT_TIMEOUT => 30,
                                                          CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
                                                          CURLOPT_CUSTOMREQUEST => "POST",
                                                          CURLOPT_POSTFIELDS => "{\n    \"amount\": 1,\n    \"appid\": 11,\n    \"clientreference\": \"780566\",\n    \"clienttransid\": \"wwzz0402\",\n    \"description\": \"Membership registration\",\n    \"nickname\": \"wigal\",\n    \"paymentoption\": \"MTN\",\n    \"walletnumber\": \"233243XXXXXX\"\n}",
                                                          CURLOPT_HTTPHEADER => array(
                                                            "ApiKey: XXXXXXXXXXXXXXXXXXXXXXXXXX",
                                                            "Content-Type: application/json"
                                                          ),
                                                        ));
    
                                                        $response = curl_exec($curl);
                                                        $err = curl_error($curl);
    
                                                        curl_close($curl);
    
                                                        if ($err) {
                                                          echo "cURL Error #:" . $err;
                                                        } else {
                                                          echo $response;
                                                        }
    
                                                    
                                                
  • JavaScript
                                                    
                                                        var data = JSON.stringify({
                                                            "amount": 1,
                                                            "appid": 11,
                                                            "clientreference": "780566",
                                                            "clienttransid": "wwzz0402",
                                                            "description": "Membership registration",
                                                            "nickname": "wigal",
                                                            "paymentoption": "MTN",                                
                                                            "walletnumber": "233243XXXXXX"
                                                        });
    
                                                        var xhr = new XMLHttpRequest();
                                                        xhr.withCredentials = true;
    
                                                        xhr.addEventListener("readystatechange", function () {
                                                          if (this.readyState === 4) {
                                                            console.log(this.responseText);
                                                          }
                                                        });
    
                                                        xhr.open("POST", "https://api.reddeonline.com/v1/receive/");
                                                        xhr.setRequestHeader("Content-Type", "application/json");
                                                        xhr.setRequestHeader("ApiKey", "XXXXXXXXXXXXXXXXXXXXXXXXXX");
    
                                                        xhr.send(data);
    
                                                    
                                                
  • Python
                                                    
                                                        import requests
    
                                                        url = "https://api.reddeonline.com/v1/cashout"
    
                                                        payload = "{\n    \"amount\": 1,\n    \"appid\": 11,\n    \"clientreference\": \"780566\",\n    \"clienttransid\": \"wwzz0402\",\n    \"description\": \"Membership registration\",\n    \"nickname\": \"wigal\",\n    \"paymentoption\": \"MTN\",\n    \"walletnumber\": \"233243XXXXXX\"\n}"
                                                        headers = {
                                                            'Content-Type': "application/json",
                                                            'ApiKey': "XXXXXXXXXXXXXXXXXXXXXXXXXX"
                                                            }
    
                                                        response = requests.request("POST", url, data=payload, headers=headers)
    
                                                        print(response.text)
    
                                                    
                                                
  • Ruby
                                                    
    
                                                        require 'uri'
                                                        require 'net/http'
    
                                                        url = URI("https://api.reddeonline.com/v1/receive/")
    
                                                        http = Net::HTTP.new(url.host, url.port)
    
                                                        request = Net::HTTP::Post.new(url)
                                                        request["ApiKey"] = 'XXXXXXXXXXXXXXXXXXXXXXXXXX'
                                                        request["Content-Type"] = 'application/json'
                                                        request.body = "{\n  \"amount\": 1,  \n  \"appid\": 11,\n  \"clientreference\": \"780566\",\n  \"clienttransid\": \"wwzz0402\",\n  \"description\": \"Membership registration\", \n  \"nickname\": \"wigal\",\n  \"paymentoption\": \"MTN\",\n  \"walletnumber\": \"233243XXXXXX\"\n}"
                                                        response = http.request(request)
                                                        puts response.read_body
    
                                                    
                                                
  • Go
                                                    
    
                                                        package main
    
                                                        import (
                                                            "fmt"
                                                            "strings"
                                                            "net/http"
                                                            "io/ioutil"
                                                        )
    
                                                        func main() {
    
                                                            url := "https://api.reddeonline.com/v1/receive/"
    
                                                            payload := strings.NewReader("{\n    \"amount\": 1,\n    \"appid\": 11,\n    \"clientreference\": \"780566\",\n    \"clienttransid\": \"wwzz0402\",\n    \"description\": \"Membership registration\",\n    \"nickname\": \"wigal\",\n    \"paymentoption\": \"MTN\",\n    \"walletnumber\": \"233243XXXXXX\"\n}")
    
                                                            req, _ := http.NewRequest("POST", url, payload)
    
                                                            req.Header.Add("ApiKey", "XXXXXXXXXXXXXXXXXXXXXXXXXX")
                                                            req.Header.Add("Content-Type", "application/json")
    
                                                            res, _ := http.DefaultClient.Do(req)
    
                                                            defer res.Body.Close()
                                                            body, _ := ioutil.ReadAll(res.Body)
    
                                                            fmt.Println(res)
                                                            fmt.Println(string(body))
    
                                                        }
    
                                                    
                                                
  • Swift
                                                    
    
                                                        import Foundation
    
                                                        let headers = [
                                                          "ApiKey": "XXXXXXXXXXXXXXXXXXXXXXXXXX",
                                                          "Content-Type": "application/json",
                                                        ]
                                                        let parameters = [
                                                          "amount": 1,
                                                          "appid": 11,
                                                          "clientreference": "780566",
                                                          "clienttransid": "wwzz0402",
                                                          "description": "Membership registration",
                                                          "nickname": "wigal",
                                                          "paymentoption": "MTN",
                                                          "walletnumber": "233243XXXXXX"
                                                        ] as [String : Any]
    
                                                        let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
    
                                                        let request = NSMutableURLRequest(url: NSURL(string: "https://api.reddeonline.com/v1/receive/")! as URL,
                                                                                                cachePolicy: .useProtocolCachePolicy,
                                                                                            timeoutInterval: 10.0)
                                                        request.httpMethod = "POST"
                                                        request.allHTTPHeaderFields = headers
                                                        request.httpBody = postData as Data
    
                                                        let session = URLSession.shared
                                                        let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
                                                          if (error != nil) {
                                                            print(error)
                                                          } else {
                                                            let httpResponse = response as? HTTPURLResponse
                                                            print(httpResponse)
                                                          }
                                                        })
    
                                                        dataTask.resume()
    
                                                    
                                                
  • Java
                                                    
    
                                                        OkHttpClient client = new OkHttpClient();
    
                                                        MediaType mediaType = MediaType.parse("application/json");
                                                        RequestBody body = RequestBody.create(mediaType, "{\n    \"amount\": 1,\n    \"appid\": 11,\n    \"clientreference\": \"780566\",\n    \"clienttransid\": \"wwzz0402\",\n    \"description\": \"Membership registration\",\n    \"nickname\": \"wigal\",\n    \"paymentoption\": \"MTN\",\n    \"walletnumber\": \"233243XXXXXX\"\n}");
                                                        Request request = new Request.Builder()
                                                          .url("https://api.reddeonline.com/v1/receive/")
                                                          .post(body)
                                                          .addHeader("Content-Type", "application/json")
                                                          .addHeader("ApiKey", "XXXXXXXXXXXXXXXXXXXXXXXXXX")
                                                          .build();
    
                                                        Response response = client.newCall(request).execute();
    
                                                    
                                                
  • C#
                                                    
    
                                                        var client = new RestClient("https://api.reddeonline.com/v1/receive/");
                                                        var request = new RestRequest(Method.POST);
                                                        request.AddHeader("Content-Type", "application/json");
                                                        request.AddHeader("ApiKey", "XXXXXXXXXXXXXXXXXXXXXXXXXX");
                                                        request.AddParameter("undefined", "{\n    \"amount\": 1,\n    \"appid\": 11,\n    \"clientreference\": \"780566\",\n    \"clienttransid\": \"wwzz0402\",\n    \"description\": \"Membership registration\",\n    \"nickname\": \"wigal\",\n    \"paymentoption\": \"MTN\",\n    \"walletnumber\": \"233243XXXXXX\"\n}", ParameterType.RequestBody);
                                                        IRestResponse response = client.Execute(request);
    
                                                    
                                                


Sending money to customer

Credit (Sending money to customer) : That is merchant paying out money to their customer

Endpoint: POST
                            
                                https://api.reddeonline.com/v1/cashout
                            
                        	

Header data
Field / Parameter Type Required Description
apikey xxxxxxxxxxxxxxxxxxxx Yes merchant api key given to you by wigal
Content-Type application/json;charset=UTF-8 Yes this is needed to encode to UTF-8
Payload description
Field / Parameter Type Required Description
amount number Yes (2 decimal places allowed)
appid characters Yes will be given by wigal when the app is setup
clientreference string Optional client's reference
clienttransid string Yes client's transaction id
description string Optional A description for transaction
nickname string Yes A nickname for merchant
paymentoption string Yes Telcos (MTN, AIRTELTIGO, VODAFONE) all should be capitalized
walletnumber string Yes Wallet Number here
Sample Payload:
                                

                                    Payload:
                                    {
                                      "amount": number,  (2 decimal places allowed)
                                      "appid": "string", will be given by wigal when the app is setup
                                      "clientreference": "string", 
                                      "clienttransid": "string",
                                      "description": "string", optional
                                      "nickname": "string",
                                      "paymentoption": "string", (MTN,AIRTELTIGO,VODAFONE)
                                      "walletnumber": "string"
                                    }

                                
                            

Sample Response: First Response
                                

                                    Response: Initial
                                    {
                                        "status": "OK",
                                        "reason": "Transaction Recieved for Processing",
                                        "transactionid": "XXXXXXX",
                                        "clienttransid": "XXXXXXX",
                                        "statusdate": "YYYY-MM-DD H:mm:ss.sss"
                                    }

                                    Sample Data
                                    {
                                        "status": "OK",
                                        "reason": "Transaction Recieved for Processing",
                                        "transactionid": "105002",
                                        "clienttransid": "wwzz0204",
                                        "statusdate": "2019-04-18 13:42:32.357"
                                    }

                                
                            

Sample Response: Intermidiary(Processing) Response
                                        

                                            Response: intermidiary
                                            {
                                                "reason": "Accepted for Delivery 233243XXXXXX",
                                                "clienttransid": "XXXX",
                                                "clientreference": "XXXX",
                                                "transactionid": "XXXX",
                                                "statusdate": "YYYY-MM-DD H:mm:ss.sss",
                                                "status": "PROGRESS"
                                            }

                                            Sample Data: intermidiary
                                            {
                                                "reason": "Accepted for Delivery 233243XXXXXX",
                                                "clienttransid": "wwzz0204",
                                                "clientreference": "780566",
                                                "transactionid": "105002",
                                                "statusdate": "2019-04-18 13:43:20.357"
                                                "status": "PROGRESS"
                                            }

                                        
                                    

Sample Response: Completed
                                        

                                            Response: completed
                                            {
                                                "reason": "Successfully processed transaction.",
                                                "clienttransid": "XXXX",
                                                "clientreference": "XXXX",
                                                "telcotransid": "XXXXXXXXX",
                                                "transactionid": "XXXX",
                                                "statusdate": "YYYY-MM-DD H:mm:ss.sss",
                                                "status": "PAID"
                                            }

                                            Sample Data: completed
                                            {
                                                "reason": "Successfully processed transaction.",
                                                "clienttransid": "wwzz0204",
                                                "clientreference": "780566",
                                                "telcotransid": "4715731301",
                                                "transactionid": "105002",
                                                "statusdate": "2019-04-18 13:45:16.041",
                                                "status": "PAID"
                                            }

                                        
                                    

Examples implemented for /v1/cashout/ in other forms
  • cURL
                                                    
                                                        curl -X POST \
                                                          https://api.reddeonline.com/v1/cashout/ \
                                                          -H 'Accept: */*' \
                                                          -H 'ApiKey: XXXXXXXXXXXXXXXXXXXXXXXXXX' \
                                                          -H 'Content-Type: application/json' \
                                                          -H 'Host: api.reddeonline.com' \
                                                          -d '{
                                                            "amount": 1,
                                                            "appid": 11,
                                                            "clientreference": "780566",
                                                            "clienttransid": "wwzz0204",
                                                            "description": "Membership registration",
                                                            "nickname": "wigal",
                                                            "paymentoption": "MTN",
                                                            "walletnumber": "233243XXXXXX"
                                                        }'
                                                    
                                                
  • HTTP
                                                    
                                                        POST /v1/cashout/ HTTP/1.1
                                                        Host: api.reddeonline.com
                                                        ApiKey: XXXXXXXXXXXXXXXXXXXXXXXXXX
                                                        Content-Type: application/json
                                                        {
                                                            "amount": 1,
                                                            "appid": 11,
                                                            "clientreference": "780566",
                                                            "clienttransid": "wwzz0204",
                                                            "description": "Send money to client",
                                                            "nickname": "wigal",
                                                            "paymentoption": "MTN",
                                                            "walletnumber": "233243XXXXXX"
                                                        }
                                                    
                                                
  • PHP
                                                    
                                                        $curl = curl_init();
    
                                                        curl_setopt_array($curl, array(
                                                          CURLOPT_URL => "https://api.reddeonline.com/v1/cashout/",
                                                          CURLOPT_RETURNTRANSFER => true,
                                                          CURLOPT_ENCODING => "",
                                                          CURLOPT_MAXREDIRS => 10,
                                                          CURLOPT_TIMEOUT => 30,
                                                          CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
                                                          CURLOPT_CUSTOMREQUEST => "POST",
                                                          CURLOPT_POSTFIELDS => "{\n    \"amount\": 1,\n    \"appid\": 11,\n    \"clientreference\": \"780566\",\n    \"clienttransid\": \"wwzz0402\",\n    \"description\": \"Send money to client\",\n    \"nickname\": \"wigal\",\n    \"paymentoption\": \"MTN\",\n    \"walletnumber\": \"233243XXXXXX\"\n}",
                                                          CURLOPT_HTTPHEADER => array(
                                                            "ApiKey: XXXXXXXXXXXXXXXXXXXXXXXXXX",
                                                            "Content-Type: application/json"
                                                          ),
                                                        ));
    
                                                        $response = curl_exec($curl);
                                                        $err = curl_error($curl);
    
                                                        curl_close($curl);
    
                                                        if ($err) {
                                                          echo "cURL Error #:" . $err;
                                                        } else {
                                                          echo $response;
                                                        }
    
                                                    
                                                
  • JavaScript
                                                    
                                                        var data = JSON.stringify({
                                                            "amount": 1,
                                                            "appid": 11,
                                                            "clientreference": "780566",
                                                            "clienttransid": "wwzz0204",
                                                            "description": "Send money to client",
                                                            "nickname": "wigal",
                                                            "paymentoption": "MTN",
                                                            "walletnumber": "233243XXXXXX"
                                                        });
    
                                                        var xhr = new XMLHttpRequest();
                                                        xhr.withCredentials = true;
    
                                                        xhr.addEventListener("readystatechange", function () {
                                                          if (this.readyState === 4) {
                                                            console.log(this.responseText);
                                                          }
                                                        });
    
                                                        xhr.open("POST", "https://api.reddeonline.com/v1/cashout/");
                                                        xhr.setRequestHeader("Content-Type", "application/json");
                                                        xhr.setRequestHeader("ApiKey", "XXXXXXXXXXXXXXXXXXXXXXXXXX");
    
                                                        xhr.send(data);
    
                                                    
                                                
  • Python
                                                    
                                                        import requests
    
                                                        url = "https://api.reddeonline.com/v1/cashout"
    
                                                        payload = "{\n    \"amount\": 1,\n    \"appid\": 11,\n    \"clientreference\": \"780566\",\n    \"clienttransid\": \"wwzz0402\",\n    \"description\": \"Send money to client\",\n    \"nickname\": \"wigal\",\n    \"paymentoption\": \"MTN\",\n    \"walletnumber\": \"233243XXXXXX\"\n}"
                                                        headers = {
                                                            'Content-Type': "application/json",
                                                            'ApiKey': "XXXXXXXXXXXXXXXXXXXXXXXXXX"
                                                            }
    
                                                        response = requests.request("POST", url, data=payload, headers=headers)
    
                                                        print(response.text)
    
                                                    
                                                
  • Ruby
                                                    
    
                                                        require 'uri'
                                                        require 'net/http'
    
                                                        url = URI("https://api.reddeonline.com/v1/cashout/")
    
                                                        http = Net::HTTP.new(url.host, url.port)
    
                                                        request = Net::HTTP::Post.new(url)
                                                        request["ApiKey"] = 'XXXXXXXXXXXXXXXXXXXXXXXXXX'
                                                        request["Content-Type"] = 'application/json'
                                                        request.body = "{\n  \"amount\": 1,  \n  \"appid\": 11,\n  \"clientreference\": \"780566\",\n  \"clienttransid\": \"wwzz0402\",\n  \"description\": \"Send money to client\", \n  \"nickname\": \"wigal\",\n  \"paymentoption\": \"MTN\",\n  \"walletnumber\": \"233243XXXXXX\"\n}"
                                                        response = http.request(request)
                                                        puts response.read_body
    
                                                    
                                                
  • Go
                                                    
    
                                                        package main
    
                                                        import (
                                                            "fmt"
                                                            "strings"
                                                            "net/http"
                                                            "io/ioutil"
                                                        )
    
                                                        func main() {
    
                                                            url := "https://api.reddeonline.com/v1/cashout/"
    
                                                            payload := strings.NewReader("{\n    \"amount\": 1,\n    \"appid\": 11,\n    \"clientreference\": \"780566\",\n    \"clienttransid\": \"wwzz0402\",\n    \"description\": \"Send money to client\",\n    \"nickname\": \"wigal\",\n    \"paymentoption\": \"MTN\",\n    \"walletnumber\": \"233243XXXXXX\"\n}")
    
                                                            req, _ := http.NewRequest("POST", url, payload)
    
                                                            req.Header.Add("ApiKey", "XXXXXXXXXXXXXXXXXXXXXXXXXX")
                                                            req.Header.Add("Content-Type", "application/json")
    
                                                            res, _ := http.DefaultClient.Do(req)
    
                                                            defer res.Body.Close()
                                                            body, _ := ioutil.ReadAll(res.Body)
    
                                                            fmt.Println(res)
                                                            fmt.Println(string(body))
    
                                                        }
    
                                                    
                                                
  • Swift
                                                    
    
                                                        import Foundation
    
                                                        let headers = [
                                                          "ApiKey": "XXXXXXXXXXXXXXXXXXXXXXXXXX",
                                                          "Content-Type": "application/json",
                                                        ]
                                                        let parameters = [
                                                          "amount": 1,
                                                          "appid": 11,
                                                          "clientreference": "780566",
                                                          "clienttransid": "wwzz0204",
                                                          "description": "Send money to client",
                                                          "nickname": "wigal",
                                                          "paymentoption": "MTN",
                                                          "walletnumber": "233243XXXXXX"
                                                        ] as [String : Any]
    
                                                        let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
    
                                                        let request = NSMutableURLRequest(url: NSURL(string: "https://api.reddeonline.com/v1/cashout/")! as URL,
                                                                                                cachePolicy: .useProtocolCachePolicy,
                                                                                            timeoutInterval: 10.0)
                                                        request.httpMethod = "POST"
                                                        request.allHTTPHeaderFields = headers
                                                        request.httpBody = postData as Data
    
                                                        let session = URLSession.shared
                                                        let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
                                                          if (error != nil) {
                                                            print(error)
                                                          } else {
                                                            let httpResponse = response as? HTTPURLResponse
                                                            print(httpResponse)
                                                          }
                                                        })
    
                                                        dataTask.resume()
    
                                                    
                                                
  • Java
                                                    
    
                                                        OkHttpClient client = new OkHttpClient();
    
                                                        MediaType mediaType = MediaType.parse("application/json");
                                                        RequestBody body = RequestBody.create(mediaType, "{\n    \"amount\": 1,\n    \"appid\": 11,\n    \"clientreference\": \"780566\",\n    \"clienttransid\": \"wwzz0402\",\n    \"description\": \"Send money to client\",\n    \"nickname\": \"wigal\",\n    \"paymentoption\": \"MTN\",\n    \"walletnumber\": \"233243XXXXXX\"\n}");
                                                        Request request = new Request.Builder()
                                                          .url("https://api.reddeonline.com/v1/cashout/")
                                                          .post(body)
                                                          .addHeader("Content-Type", "application/json")
                                                          .addHeader("ApiKey", "XXXXXXXXXXXXXXXXXXXXXXXXXX")
                                                          .build();
    
                                                        Response response = client.newCall(request).execute();
    
                                                    
                                                
  • C#
                                                    
    
                                                        var client = new RestClient("https://api.reddeonline.com/v1/cashout/");
                                                        var request = new RestRequest(Method.POST);
                                                        request.AddHeader("Content-Type", "application/json");
                                                        request.AddHeader("ApiKey", "XXXXXXXXXXXXXXXXXXXXXXXXXX");
                                                        request.AddParameter("undefined", "{\n    \"amount\": 1,\n    \"appid\": 11,\n    \"clientreference\": \"780566\",\n    \"clienttransid\": \"wwzz0402\",\n    \"description\": \"Send money to client\",\n    \"nickname\": \"wigal\",\n    \"paymentoption\": \"MTN\",\n    \"walletnumber\": \"233243XXXXXX\"\n}", ParameterType.RequestBody);
                                                        IRestResponse response = client.Execute(request);
    
                                                    
                                                


Check status of transaction with ID
Endpoint: GET
                            
                                https://api.reddeonline.com/v1/status/{transactionid}
                            
                        	

Header data
Field / Parameter Value Required Description
apikey xxxxxxxxxxxxxxxxxxxx Yes merchant api key given to you by wigal
appid xx Yes merchant app id given to you by wigal
Content-Type application/json;charset=UTF-8 Yes this is needed to encode to UTF-8
Url Parameter
Field / Parameter Value Required Description
transactionid number Yes transaction id from payment initiation

Sample Response for transaction status check
                                

                                    Sample Data
                                    {
                                        "status": "PAID"
                                        "reason": "Successfully processed transaction.",
                                        "transactionid": "10345",
                                        "clienttransid": "2023",
                                        "clientreference": "User2019",
                                        "brandtransid": "5683642810",
                                        "statusdate": "2019-04-18 10:41:00.043"                                       
                                    }

                                
                            

End of API