<

Introduction

Presentation

AdwaPay is a robust and secure solution allowing its users (merchants, customers,...) pay by mobile money or bank card. Thanks to our unique contract, you have access to all the payment methods of our finance partners: banks and microfinance institutions, telephone operators and other electronic money issuers. This document aims to provide a description of ADWAPAY Payment services and to present their integration in a web or mobile application.

Prerequisites

To access ADWAPAY web services, the following prerequisites must be met:

The API for fulfilling these requirements is described in a separate document.

Safety & Warning

The security system set up on the "ADWAPAY" platform is likely to keep for a certain period of time, all transactions made by the partner's users, for security purposes and to improve the quality of its services. In particular, a monitoring system monitors and manages the transactions carried out by each platform of the partner.

Terms and conditions of use

The explicit acceptance of the general conditions of use of the platform "ADWAPAY" and the general conditions of sale by the merchants present on to say platform, are required to access the services of the platform.

Generality

Web services are made up of the following key elements:

The API call parameters

1      Description

They are expected in JSON format and possibly encrypted with a specific encryption algorithm.

 

Almost all web services require the following two input parameters in the Header:

To guarantee security, the transaction token must never be known by the end user. It must be added in the back-end by the partner's system, before calling the web service.

2    Illustration

Return calls from a web service

  The call returns of the web services are in JSON format and may be encrypted with a specific algorithm.

They consist of two parts: error information and clean information.

 1     Description:

NB : there is an error when the « code » value of « pesake » is non empty. In this case, you will find the détail of the error in « detail » and its criticality in « level »

 2       Illustration

Authorization

The first thing is that you will have to authenticate yourself to use our site. You can get your different API keys by logging into the ADWAPAYDOC developer portal.

Note !

You must contact us before you are allowed to use our sandbox environment. Once you contact us, you will also be invited to participate in our whatsapp/skype channel, where you can ask questions about our API, which our engineering team will answer. We prefer technical communication to be through this whatsapp/skype channel.

Transaction authorization token
                                            

                                                    

curl --location --request POST 'https://twsv03.adwapay.cm/getADPToken' \ --header 'Authorization: Basic QURQVEVTVDAzOkFENkJDVDVaVFJYWDAz' \ --header 'Content-Type: text/plain' \ --data-raw ' { "application": "AP6BCT5ZTRXXMPUQ2" }'

                                        
                                            

                                                    

<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://twsv03.adwapay.cm/getADPToken', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS =>' { "application": "AP6BCT5ZTRXXMPUQ2" }', CURLOPT_HTTPHEADER => array( 'Authorization: Basic QURQVEVTVDAzOkFENkJDVDVaVFJYWDAz', 'Content-Type: text/plain' ), )); $response = curl_exec($curl); curl_close($curl); echo $response;

                                        
                                            

                                                    

import http.client conn = http.client.HTTPSConnection("twsv03.adwapay.cm") payload = " {"application": "AP6BCT5ZTRXXMPUQ2"}" headers = { 'Authorization': 'Basic QURQVEVTVDAzOkFENkJDVDVaVFJYWDAz', 'Content-Type': 'text/plain' } conn.request("POST", "getADPToken", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

                                        
                                            

                                                    

var request = require('request'); var options = { 'method': 'POST', 'url': 'https://twsv03.adwapay.cm/getADPToken', 'headers': { 'Authorization': 'Basic TWVyY2hhbnQgS2V5OlN1YnNjcmlwdGlvbiBrZXk=', 'Content-Type': 'text/plain' }, body: ' {\r\n "application": "ALPHAAPPL01"\r\n }' }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });

                                        
                                            

                                                    

OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse("text/plain"); RequestBody body = RequestBody.create(mediaType, " {"application": "ALPHAAPPL01"}"); Request request = new Request.Builder() .url("https://twsv03.adwapay.cm/getADPToken") .method("POST", body) .addHeader("Authorization", "Basic TWVyY2hhbnQgS2V5OlN1YnNjcmlwdGlvbiBrZXk=") .addHeader("Content-Type", "text/plain") .build(); Response response = client.newCall(request).execute();

                                        
                                            

                                                    

import Foundation #if canImport(FoundationNetworking) import FoundationNetworking #endif var semaphore = DispatchSemaphore (value: 0) let parameters = " {\r\n \"application\": \"ALPHAAPPL01\"\r\n }" let postData = parameters.data(using: .utf8) var request = URLRequest(url: URL(string: "https://twsv03.adwapay.cm/getADPToken")!,timeoutInterval: Double.infinity) request.addValue("Basic TWVyY2hhbnQgS2V5OlN1YnNjcmlwdGlvbiBrZXk=", forHTTPHeaderField: "Authorization") request.addValue("text/plain", forHTTPHeaderField: "Content-Type") request.httpMethod = "POST" request.httpBody = postData let task = URLSession.shared.dataTask(with: request) { data, response, error in guard let data = data else { print(String(describing: error)) semaphore.signal() return } print(String(data: data, encoding: .utf8)!) semaphore.signal() } task.resume() semaphore.wait()

                                        
                                            

                                                    

CURL *curl; CURLcode res; curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST"); curl_easy_setopt(curl, CURLOPT_URL, "https://twsv03.adwapay.cm/getADPToken"); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Basic TWVyY2hhbnQgS2V5OlN1YnNjcmlwdGlvbiBrZXk="); headers = curl_slist_append(headers, "Content-Type: text/plain"); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); const char *data = " {\r\n \"application\": \"ALPHAAPPL01\"\r\n }"; curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data); res = curl_easy_perform(curl); } curl_easy_cleanup(curl);

                                        

Obtaining the token

HTTP Requets

https://Link_API/getADPToken

Parameters

Parameters Default value Description Type Required Size
application XXXXXXXXXXXX partner application code Oui
Authorization base64_encode (MERCHANDKEY+SUBSCRIPTION_KEY) Basic authentication contains the merchant key and the subscription key Oui

Return values

Parameters Default value Description Type Required Size
expiryTime 3600 Token validity period (in seconds)
tokenCode d9325c60-d9325c60... Token generated

Collection

Check out the collections example to quickly get an idea on how to collect funds from your customers using our API.

Callback url

A webhook is a callback that allows our API to notify your system of new events concerning your transactions.

HTTP Requets

https://Link_API/callbackUrl

Parameters

Parameters Default value Description Type Required Size
status T : Terminé
O : Echec Opérateur
X : Expiré
C : Annulé
Status of the transaction Oui
footPrint dfgghrtzesdfqs........ Unique Adwapay transaction identification Oui
orderNumber 1234647895.PAT Merchant order number Oui

Return values

Parameters Default value Description Type Required Size
Commission applicable on the transaction
                                            

                                                    

<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://twsv03.adwapay.cm/getFees', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS =>'{"amount":10000,"currency":"XAF"}', CURLOPT_HTTPHEADER => array( 'AUTH-API-TOKEN: Bearer f2b17a23-6a39-4342-b238-e622088e4432', 'AUTH-API-SUBSCRIPTION: AD6BCT5ZTRXX03', 'Content-Type: application/json' ), )); $response = curl_exec($curl); curl_close($curl); echo $response;

                                        
                                            

                                                    

import http.client import json conn = http.client.HTTPSConnection("twsv03.adwapay.cm") payload = json.dumps({ "amount": 10000, "currency": "XAF" }) headers = { 'AUTH-API-TOKEN': 'Bearer f2b17a23-6a39-4342-b238-e622088e4432', 'AUTH-API-SUBSCRIPTION': 'AD6BCT5ZTRXX03', 'Content-Type': 'application/json' } conn.request("POST", "/getFees", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

                                        
                                            

                                                    

curl --location --request POST 'https://twsv03.adwapay.cm/getFees' \ --header 'AUTH-API-TOKEN: Bearer f2b17a23-6a39-4342-b238-e622088e4432' \ --header 'AUTH-API-SUBSCRIPTION: AD6BCT5ZTRXX03' \ --header 'Content-Type: application/json' \ --data-raw '{"amount":10000,"currency":"XAF"}'

                                        
                                            

                                                    

var https = require('follow-redirects').https; var fs = require('fs'); var options = { 'method': 'POST', 'hostname': 'twsv03.adwapay.cm', 'path': '/getFees', 'headers': { 'AUTH-API-TOKEN': 'Bearer access_token', 'AUTH-API-SUBSCRIPTION': 'Subscription key', 'Content-Type': 'text/plain' }, 'maxRedirects': 20 }; var req = https.request(options, function (res) { var chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function (chunk) { var body = Buffer.concat(chunks); console.log(body.toString()); }); res.on("error", function (error) { console.error(error); }); }); var postData = "{\"amount\":100,\"currency\":\"XAF\"}"; req.write(postData); req.end();

                                        
                                            

                                                    

OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse("text/plain"); RequestBody body = RequestBody.create(mediaType, "{"amount":100,"currency":"XAF"}"); Request request = new Request.Builder() .url("https://twsv03.adwapay.cm/getFees") .method("POST", body) .addHeader("AUTH-API-TOKEN", "Bearer access_token") .addHeader("AUTH-API-SUBSCRIPTION", "Subscription key") .addHeader("Content-Type", "text/plain") .build(); Response response = client.newCall(request).execute();

                                        
                                            

                                                    

import Foundation #if canImport(FoundationNetworking) import FoundationNetworking #endif var semaphore = DispatchSemaphore (value: 0) let parameters = "{\"amount\":100,\"currency\":\"XAF\"}" let postData = parameters.data(using: .utf8) var request = URLRequest(url: URL(string: "https://twsv03.adwapay.cm/getFees")!,timeoutInterval: Double.infinity) request.addValue("Bearer access_token", forHTTPHeaderField: "AUTH-API-TOKEN") request.addValue("Subscription key", forHTTPHeaderField: "AUTH-API-SUBSCRIPTION") request.addValue("text/plain", forHTTPHeaderField: "Content-Type") request.httpMethod = "POST" request.httpBody = postData let task = URLSession.shared.dataTask(with: request) { data, response, error in guard let data = data else { print(String(describing: error)) semaphore.signal() return } print(String(data: data, encoding: .utf8)!) semaphore.signal() } task.resume() semaphore.wait()

                                        
                                            

                                                    

CURL *curl; CURLcode res; curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST"); curl_easy_setopt(curl, CURLOPT_URL, "https://twsv03.adwapay.cm/getFees"); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "AUTH-API-TOKEN: Bearer access_token"); headers = curl_slist_append(headers, "AUTH-API-SUBSCRIPTION: Subscription key"); headers = curl_slist_append(headers, "Content-Type: text/plain"); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); const char *data = "{\"amount\":100,\"currency\":\"XAF\"}"; curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data); res = curl_easy_perform(curl); } curl_easy_cleanup(curl);

                                        

Obtaining commissions according to the chosen payment method

HTTP Requets

https://Link_API/getFees

Parameters

Parameters Default value Description Type Required Size
amount 10000 Amount to be paid without commission Oui
currency XAF, USD, EUR Device used Oui
AUTH-API-TOKEN {auth-api-token} Bearer acces token Oui 100
AUTH-API-SUBSCRIPTION {auth-api-subscription} Merchant subscription key Oui 100

Return values

Parameters Default value Description Type Required Size
meanCode ORANGE-MONEY | MOBILE-MONEY | EXPRESS-UNION | YOOMEE-MONEY Payment method code 100
feesAmount 350 Amount of the commission
currency XAF Devise de la commission
hasFees True | False

True : means of payment subject to commission.

False : no fee applicable.

Payment from a wallet
                                            

                                                    

<?php $client = new http\Client; $request = new http\Client\Request; $request->setRequestUrl('https://twsv03.adwapay.cm/requestToPay'); $request->setRequestMethod('POST'); $body = new http\Message\Body; $body->append('{ "meanCode": "Moyen", "paymentNumber": "650668282", "orderNumber": "DSJGDGDF.36834476466D", "amount": 50, "currency": "XAF", "feesAmount": "100" } '); $request->setBody($body); $request->setOptions(array()); $request->setHeaders(array( 'AUTH-API-TOKEN' => 'Bearer access_token', 'AUTH-API-SUBSCRIPTION' => 'Subscription key', 'Content-Type' => 'text/plain' )); $client->enqueue($request)->send(); $response = $client->getResponse(); echo $response->getBody();

                                        
                                            

                                                    

curl --location --request POST 'https://twsv03.adwapay.cm/requestToPay' \ --header 'AUTH-API-TOKEN: Bearer access_token' \ --header 'AUTH-API-SUBSCRIPTION: Subscription key' \ --header 'Content-Type: text/plain' \ --data-raw '{ "meanCode": "Moyen", "paymentNumber": "650668282", "orderNumber": "DSJGDGDF.36834476466D", "amount": 50, "currency": "XAF", "feesAmount": "100" }

                                        
                                            

                                                    

import http.client conn = http.client.HTTPSConnection("twsv03.adwapay.cm") payload = "{\r\n \"meanCode\": \"Moyen\",\r\n \"paymentNumber\": \"650668282\", \r\n \"orderNumber\": \"DSJGDGDF.36834476466D\",\r\n \"amount\": 50,\r\n \"currency\": \"XAF\",\r\n \"feesAmount\": \"100\"\r\n}\r\n" headers = { 'AUTH-API-TOKEN': 'Bearer access_token', 'AUTH-API-SUBSCRIPTION': 'Subscription key', 'Content-Type': 'text/plain' } conn.request("POST", "/requestToPay", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

                                        
                                            

                                                    

OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse("text/plain"); RequestBody body = RequestBody.create(mediaType, " { "meanCode": "Moyen", "paymentNumber": "650668282", "orderNumber": "DSJGDGDF.36834476466D", "amount": 50, "currency": "XAF", "feesAmount": "100" }" ); Request request = new Request.Builder() .url("https://twsv03.adwapay.cm/requestToPay") .method("POST", body) .addHeader("AUTH-API-TOKEN", "Bearer access_token") .addHeader("AUTH-API-SUBSCRIPTION", "Subscription key") .addHeader("Content-Type", "text/plain") .build(); Response response = client.newCall(request).execute();

                                        
                                            

                                                    

var https = require('follow-redirects').https; var fs = require('fs'); var options = { 'method': 'POST', 'hostname': 'twsv03.adwapay.cm', 'path': '/requestToPay', 'headers': { 'AUTH-API-TOKEN': 'Bearer access_token', 'AUTH-API-SUBSCRIPTION': 'Subscription key', 'Content-Type': 'text/plain' }, 'maxRedirects': 20 }; var req = https.request(options, function (res) { var chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function (chunk) { var body = Buffer.concat(chunks); console.log(body.toString()); }); res.on("error", function (error) { console.error(error); }); }); var postData = "{\r\n \"meanCode\": \"Moyen\",\r\n \"paymentNumber\": \"650668282\", \r\n \"orderNumber\": \"DSJGDGDF.36834476466D\",\r\n \"amount\": 50,\r\n \"currency\": \"XAF\",\r\n \"feesAmount\": \"100\"\r\n}\r\n"; req.write(postData); req.end();

                                        
                                            

                                                    

import Foundation #if canImport(FoundationNetworking) import FoundationNetworking #endif var semaphore = DispatchSemaphore (value: 0) let parameters = "{\r\n \"meanCode\": \"Moyen\",\r\n \"paymentNumber\": \"650668282\", \r\n \"orderNumber\": \"DSJGDGDF.36834476466D\",\r\n \"amount\": 50,\r\n \"currency\": \"XAF\",\r\n \"feesAmount\": \"100\"\r\n}\r\n" let postData = parameters.data(using: .utf8) var request = URLRequest(url: URL(string: "https://twsv03.adwapay.cm/requestToPay")!,timeoutInterval: Double.infinity) request.addValue("Bearer access_token", forHTTPHeaderField: "AUTH-API-TOKEN") request.addValue("Subscription key", forHTTPHeaderField: "AUTH-API-SUBSCRIPTION") request.addValue("text/plain", forHTTPHeaderField: "Content-Type") request.httpMethod = "POST" request.httpBody = postData let task = URLSession.shared.dataTask(with: request) { data, response, error in guard let data = data else { print(String(describing: error)) semaphore.signal() return } print(String(data: data, encoding: .utf8)!) semaphore.signal() } task.resume() semaphore.wait()

                                        
                                            

                                                    

CURL *curl; CURLcode res; curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST"); curl_easy_setopt(curl, CURLOPT_URL, "https://twsv03.adwapay.cm/requestToPay"); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "AUTH-API-TOKEN: Bearer access_token"); headers = curl_slist_append(headers, "AUTH-API-SUBSCRIPTION: Subscription key"); headers = curl_slist_append(headers, "Content-Type: text/plain"); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); const char *data = "{\r\n \"meanCode\": \"Moyen\",\r\n \"paymentNumber\": \"650668282\", \r\n \"orderNumber\": \"DSJGDGDF.36834476466D\",\r\n \"amount\": 50,\r\n \"currency\": \"XAF\",\r\n \"feesAmount\": \"100\"\r\n}\r\n"; curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data); res = curl_easy_perform(curl); } curl_easy_cleanup(curl);

                                        

Request for payment

HTTP Requets

https://Link_API/requestToPay

Parameters

Parameters Default value Description Type Required Size
meanCode ORANGE-MONEY | MOBILE-MONEY | EXPRESS-UNION | YOOMEE-MONEY Payment method code Oui
paymentNumber 696961687 recipient's customer number Oui
orderNumber Merchant order number Oui
amount 50 Amount to be paid without commission Oui
currency XAF Device used Oui
feesAmount 100 Amount of the commission Oui
AUTH-API-TOKEN {auth-api-token} Bearer acces token Oui 100
AUTH-API-SUBSCRIPTION {auth-api-subscription} Merchant subscription key Oui 100

Return values

Parameters Default value Description Type Required Size
adpFootprint b06a60cafa235a... Unique Adwapay transaction identification Oui
orderNumber DSJGDGDF.36834476466D Merchant order number Oui
status G: En cours de traitement
E: En attente de validation
T : Terminé
O : Echec Opérateur
X : Expiré
C : Annulé
Status of the transaction
description Description of the transaction status
subQueries Details of sub-transactions
Return of the payment notification
                                            

                                                    

curl --location --request POST 'https://twsv03.adwapay.cm/pushDialog' \ --header 'AUTH-API-TOKEN: Bearer access_token' \ --header 'AUTH-API-SUBSCRIPTION: Subscription key' \ --header 'Content-Type: text/plain' \ --data-raw '{ "adpFootprint":"b06a60cafa235ab13b4801b1c700f3629083ff3fe23f6d83ca4f4645e40a913d" }'

                                        
                                            

                                                    

import http.client conn = http.client.HTTPSConnection("twsv03.adwapay.cm") payload = "{\r\n\"adpFootprint\":\"b06a60cafa235ab13b4801b1c700f3629083ff3fe23f6d83ca4f4645e40a913d\"\r\n}" headers = { 'AUTH-API-TOKEN': 'Bearer access_token', 'AUTH-API-SUBSCRIPTION': 'Subscription key', 'Content-Type': 'text/plain' } conn.request("POST", "/pushDialog", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

                                        
                                            

                                                    

<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://twsv03.adwapay.cm/pushDialog', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS =>'{ "adpFootprint":"b06a60cafa235ab13b4801b1c700f3629083ff3fe23f6d83ca4f4645e40a913d" }', CURLOPT_HTTPHEADER => array( 'AUTH-API-TOKEN: Bearer access_token', 'AUTH-API-SUBSCRIPTION: Subscription key', 'Content-Type: text/plain' ), )); $response = curl_exec($curl); curl_close($curl); echo $response;

                                        
                                            

                                                    

var https = require('follow-redirects').https; var fs = require('fs'); var options = { 'method': 'POST', 'hostname': 'twsv03.adwapay.cm', 'path': '/pushDialog', 'headers': { 'AUTH-API-TOKEN': 'Bearer access_token', 'AUTH-API-SUBSCRIPTION': 'Subscription key', 'Content-Type': 'text/plain' }, 'maxRedirects': 20 }; var req = https.request(options, function (res) { var chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function (chunk) { var body = Buffer.concat(chunks); console.log(body.toString()); }); res.on("error", function (error) { console.error(error); }); }); var postData = "{\r\n\"adpFootprint\":\"b06a60cafa235ab13b4801b1c700f3629083ff3fe23f6d83ca4f4645e40a913d\"\r\n}"; req.write(postData); req.end();

                                        
                                            

                                                    

OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse("text/plain"); RequestBody body = RequestBody.create(mediaType, " { "adpFootprint":"b06a60cafa235ab13b4801b1c700f3629083ff3fe23f6d83ca4f4645e40a913d" }" ); Request request = new Request.Builder() .url("https://twsv03.adwapay.cm/pushDialog") .method("POST", body) .addHeader("AUTH-API-TOKEN", "Bearer access_token") .addHeader("AUTH-API-SUBSCRIPTION", "Subscription key") .addHeader("Content-Type", "text/plain") .build(); Response response = client.newCall(request).execute();

                                        
                                            

                                                    

import Foundation #if canImport(FoundationNetworking) import FoundationNetworking #endif var semaphore = DispatchSemaphore (value: 0) let parameters = "{\r\n\"adpFootprint\":\"b06a60cafa235ab13b4801b1c700f3629083ff3fe23f6d83ca4f4645e40a913d\"\r\n}" let postData = parameters.data(using: .utf8) var request = URLRequest(url: URL(string: "https://twsv03.adwapay.cm/pushDialog")!,timeoutInterval: Double.infinity) request.addValue("Bearer access_token", forHTTPHeaderField: "AUTH-API-TOKEN") request.addValue("Subscription key", forHTTPHeaderField: "AUTH-API-SUBSCRIPTION") request.addValue("text/plain", forHTTPHeaderField: "Content-Type") request.httpMethod = "POST" request.httpBody = postData let task = URLSession.shared.dataTask(with: request) { data, response, error in guard let data = data else { print(String(describing: error)) semaphore.signal() return } print(String(data: data, encoding: .utf8)!) semaphore.signal() } task.resume() semaphore.wait()

                                        
                                            

                                                    

CURL *curl; CURLcode res; curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST"); curl_easy_setopt(curl, CURLOPT_URL, "https://twsv03.adwapay.cm/pushDialog"); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "AUTH-API-TOKEN: Bearer access_token"); headers = curl_slist_append(headers, "AUTH-API-SUBSCRIPTION: Subscription key"); headers = curl_slist_append(headers, "Content-Type: text/plain"); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); const char *data = "{\r\n\"adpFootprint\":\"b06a60cafa235ab13b4801b1c700f3629083ff3fe23f6d83ca4f4645e40a913d\"\r\n}"; curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data); res = curl_easy_perform(curl); } curl_easy_cleanup(curl);

                                        

Sending a payment notification to a customer

HTTP Requets

https://Link_API/pushDialog

Parameters

Parameters Default value Description Type Required Size
adpFootprint Unique Adwapay transaction identification Oui
meanCode Payment method code Oui
AUTH-API-TOKEN {auth-api-token} Bearer acces token Oui 100
AUTH-API-SUBSCRIPTION {auth-api-subscription} Merchant subscription key Oui 100

Return values

Parameters Default value Description Type Required Size
adpFootprint Unique Adwapay transaction identification Oui
orderNumber DSJGDGDF.36834476466D Merchant order number Oui
paymentNumber 696961687 recipient's customer number Oui
status G: En cours de traitement
E: En attente de validation
T : Terminé
O : Echec Opérateur
X : Expiré
C : Annulé
Status of the transaction
Status of a transaction
                                            

                                                    

curl --location --request POST 'https://twsv03.adwapay.cm/paymentStatus' \ --header 'AUTH-API-TOKEN: Bearer access_token' \ --header 'AUTH-API-SUBSCRIPTION: Subscription key' \ --header 'Content-Type: text/plain' \ --data-raw '{ "meanCode":"ORANGE-MONEY", "adpFootprint":"a4834057fac7b87dca07a94b73b28aed45a297b2dc78314e3e3a350a6c553b4e" }'

                                        
                                            

                                                    

import http.client conn = http.client.HTTPSConnection("twsv03.adwapay.cm") payload = "{\r\n\"meanCode\":\"ORANGE-MONEY\",\r\n\"adpFootprint\":\"a4834057fac7b87dca07a94b73b28aed45a297b2dc78314e3e3a350a6c553b4e\"\r\n}" headers = { 'AUTH-API-TOKEN': 'Bearer access_token', 'AUTH-API-SUBSCRIPTION': 'Subscription key', 'Content-Type': 'text/plain' } conn.request("POST", "/paymentStatus", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

                                        
                                            

                                                    

<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://twsv03.adwapay.cm/paymentStatus', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS =>'{ "meanCode":"ORANGE-MONEY", "adpFootprint":"a4834057fac7b87dca07a94b73b28aed45a297b2dc78314e3e3a350a6c553b4e" }', CURLOPT_HTTPHEADER => array( 'AUTH-API-TOKEN: Bearer access_token', 'AUTH-API-SUBSCRIPTION: Subscription key', 'Content-Type: text/plain' ), )); $response = curl_exec($curl); curl_close($curl); echo $response;

                                        
                                            

                                                    

var https = require('follow-redirects').https; var fs = require('fs'); var options = { 'method': 'POST', 'hostname': 'twsv03.adwapay.cm', 'path': '/paymentStatus', 'headers': { 'AUTH-API-TOKEN': 'Bearer access_token', 'AUTH-API-SUBSCRIPTION': 'Subscription key', 'Content-Type': 'text/plain' }, 'maxRedirects': 20 }; var req = https.request(options, function (res) { var chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function (chunk) { var body = Buffer.concat(chunks); console.log(body.toString()); }); res.on("error", function (error) { console.error(error); }); }); var postData = "{\r\n\"meanCode\":\"ORANGE-MONEY\",\r\n\"adpFootprint\":\"a4834057fac7b87dca07a94b73b28aed45a297b2dc78314e3e3a350a6c553b4e\"\r\n}"; req.write(postData); req.end();

                                        
                                            

                                                    

OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse("text/plain"); RequestBody body = RequestBody.create(mediaType, " { "meanCode":"ORANGE-MONEY", "adpFootprint":"a4834057fac7b87dca07a94b73b28aed45a297b2dc78314e3e3a350a6c553b4e" }" ); Request request = new Request.Builder() .url("https://twsv03.adwapay.cm/paymentStatus") .method("POST", body) .addHeader("AUTH-API-TOKEN", "Bearer access_token") .addHeader("AUTH-API-SUBSCRIPTION", "Subscription key") .addHeader("Content-Type", "text/plain") .build(); Response response = client.newCall(request).execute();

                                        
                                            

                                                    

import Foundation #if canImport(FoundationNetworking) import FoundationNetworking #endif var semaphore = DispatchSemaphore (value: 0) let parameters = "{\r\n\"meanCode\":\"ORANGE-MONEY\",\r\n\"adpFootprint\":\"a4834057fac7b87dca07a94b73b28aed45a297b2dc78314e3e3a350a6c553b4e\"\r\n}" let postData = parameters.data(using: .utf8) var request = URLRequest(url: URL(string: "https://twsv03.adwapay.cm/paymentStatus")!,timeoutInterval: Double.infinity) request.addValue("Bearer access_token", forHTTPHeaderField: "AUTH-API-TOKEN") request.addValue("Subscription key", forHTTPHeaderField: "AUTH-API-SUBSCRIPTION") request.addValue("text/plain", forHTTPHeaderField: "Content-Type") request.httpMethod = "POST" request.httpBody = postData let task = URLSession.shared.dataTask(with: request) { data, response, error in guard let data = data else { print(String(describing: error)) semaphore.signal() return } print(String(data: data, encoding: .utf8)!) semaphore.signal() } task.resume() semaphore.wait()

                                        
                                            

                                                    

CURL *curl; CURLcode res; curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST"); curl_easy_setopt(curl, CURLOPT_URL, "https://twsv03.adwapay.cm/paymentStatus"); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "AUTH-API-TOKEN: Bearer access_token"); headers = curl_slist_append(headers, "AUTH-API-SUBSCRIPTION: Subscription key"); headers = curl_slist_append(headers, "Content-Type: text/plain"); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); const char *data = "{\r\n\"meanCode\":\"ORANGE-MONEY\",\r\n\"adpFootprint\":\"a4834057fac7b87dca07a94b73b28aed45a297b2dc78314e3e3a350a6c553b4e\"\r\n}"; curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data); res = curl_easy_perform(curl); } curl_easy_cleanup(curl);

                                        

Obtaining the status of a transaction

HTTP Requets

https://Link_API/paymentStatus

Parameters

Parameters Default value Description Type Required Size
meanCode ORANGE-MONEY | MOBILE-MONEY | EXPRESS-UNION | YOOMEE-MONEY Payment method code Oui
adpFootprint Unique Adwapay transaction identification Oui
AUTH-API-TOKEN {auth-api-token} Bearer acces token Oui 100
AUTH-API-SUBSCRIPTION {auth-api-subscription} Merchant subscription key Oui 100

Return values

Parameters Default value Description Type Required Size
adpFootprint b06a60cafa235... Unique Adwapay transaction identification Oui
orderNumber DSJGDGDF.36834476466D Merchant order number Oui
status G: En cours de traitement
E: En attente de validationé
T : Terminé
O : Echec Opérateur
X : Expiré
C : Annulé
Status of the transaction
meanCode ORANGE-MONEY Payment method code 100

Payments

Check out the payments example to quickly get an idea on how to send funds to your customers using our API.

Deposit into a Wallet
                                            

                                                    

curl --location --request POST 'https://twsv03.adwapay.cm/requestToDisburse' \ --header 'AUTH-API-TOKEN: Bearer access_token' \ --header 'AUTH-API-SUBSCRIPTION: Subscription key' \ --header 'Content-Type: text/plain' \ --data-raw '{ "meanCode": "ORANGE-MONEY", "paymentNumber": "656155971", "orderNumber": "DSJGDGDFFEFYTUFUUTYFU5", "amount": 50, "currency": "EUR", "feesAmount": "100" } '

                                        
                                            

                                                    

import http.client conn = http.client.HTTPSConnection("twsv03.adwapay.cm") payload = "{\r\n \"meanCode\": \"ORANGE-MONEY\",\r\n \"paymentNumber\": \"656155971\",\r\n \"orderNumber\": \"DSJGDGDFFEFYTUFUUTYFU5\",\r\n \"amount\": 50,\r\n \"currency\": \"EUR\",\r\n \"feesAmount\": \"100\"\r\n}\r\n" headers = { 'AUTH-API-TOKEN': 'Bearer access_token', 'AUTH-API-SUBSCRIPTION': 'Subscription key', 'Content-Type': 'text/plain' } conn.request("POST", "/requestToDisburse", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

                                        
                                            

                                                    

<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://twsv03.adwapay.cm/requestToDisburse', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS =>'{ "meanCode": "ORANGE-MONEY", "paymentNumber": "656155971", "orderNumber": "DSJGDGDFFEFYTUFUUTYFU5", "amount": 50, "currency": "EUR", "feesAmount": "100" } ', CURLOPT_HTTPHEADER => array( 'AUTH-API-TOKEN: Bearer access_token', 'AUTH-API-SUBSCRIPTION: Subscription key', 'Content-Type: text/plain' ), )); $response = curl_exec($curl); curl_close($curl); echo $response;

                                        
                                            

                                                    

var https = require('follow-redirects').https; var fs = require('fs'); var options = { 'method': 'POST', 'hostname': 'twsv03.adwapay.cm', 'path': '/requestToDisburse', 'headers': { 'AUTH-API-TOKEN': 'Bearer access_token', 'AUTH-API-SUBSCRIPTION': 'Subscription key', 'Content-Type': 'text/plain' }, 'maxRedirects': 20 }; var req = https.request(options, function (res) { var chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function (chunk) { var body = Buffer.concat(chunks); console.log(body.toString()); }); res.on("error", function (error) { console.error(error); }); }); var postData = "{\r\n \"meanCode\": \"ORANGE-MONEY\",\r\n \"paymentNumber\": \"656155971\",\r\n \"orderNumber\": \"DSJGDGDFFEFYTUFUUTYFU5\",\r\n \"amount\": 50,\r\n \"currency\": \"EUR\",\r\n \"feesAmount\": \"100\"\r\n}\r\n"; req.write(postData); req.end();

                                        
                                            

                                                    

OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse("text/plain"); RequestBody body = RequestBody.create(mediaType, " { "meanCode": "Moyen", "paymentNumber": "650668282", "orderNumber": "DSJGDGDF.36834476466D", "amount": 50, "currency": "XAF", "feesAmount": "100" }" ); Request request = new Request.Builder() .url("https://twsv03.adwapay.cm/requestToDisburse") .method("POST", body) .addHeader("AUTH-API-TOKEN", "Bearer access_token") .addHeader("AUTH-API-SUBSCRIPTION", "Subscription key") .addHeader("Content-Type", "text/plain") .build(); Response response = client.newCall(request).execute();

                                        
                                            

                                                    

import Foundation #if canImport(FoundationNetworking) import FoundationNetworking #endif var semaphore = DispatchSemaphore (value: 0) let parameters = "{\r\n \"meanCode\": \"ORANGE-MONEY\",\r\n \"paymentNumber\": \"656155971\",\r\n \"orderNumber\": \"DSJGDGDFFEFYTUFUUTYFU5\",\r\n \"amount\": 50,\r\n \"currency\": \"EUR\",\r\n \"feesAmount\": \"100\"\r\n}\r\n" let postData = parameters.data(using: .utf8) var request = URLRequest(url: URL(string: "https://twsv03.adwapay.cm/requestToDisburse")!,timeoutInterval: Double.infinity) request.addValue("Bearer access_token", forHTTPHeaderField: "AUTH-API-TOKEN") request.addValue("Subscription key", forHTTPHeaderField: "AUTH-API-SUBSCRIPTION") request.addValue("text/plain", forHTTPHeaderField: "Content-Type") request.httpMethod = "POST" request.httpBody = postData let task = URLSession.shared.dataTask(with: request) { data, response, error in guard let data = data else { print(String(describing: error)) semaphore.signal() return } print(String(data: data, encoding: .utf8)!) semaphore.signal() } task.resume() semaphore.wait()

                                        
                                            

                                                    

CURL *curl; CURLcode res; curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST"); curl_easy_setopt(curl, CURLOPT_URL, "https://twsv03.adwapay.cm/requestToDisburse"); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "AUTH-API-TOKEN: Bearer access_token"); headers = curl_slist_append(headers, "AUTH-API-SUBSCRIPTION: Subscription key"); headers = curl_slist_append(headers, "Content-Type: text/plain"); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); const char *data = "{\r\n \"meanCode\": \"ORANGE-MONEY\",\r\n \"paymentNumber\": \"656155971\",\r\n \"orderNumber\": \"DSJGDGDFFEFYTUFUUTYFU5\",\r\n \"amount\": 50,\r\n \"currency\": \"EUR\",\r\n \"feesAmount\": \"100\"\r\n}\r\n"; curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data); res = curl_easy_perform(curl); } curl_easy_cleanup(curl);

                                        

Payment from a wallet account

HTTP Requets

https://Link_API/requestToDisburse

Parameters

Parameters Default value Description Type Required Size
meanCode ORANGE-MONEY | MOBILE-MONEY | EXPRESS-UNION | YOOMEE-MONEY Payment method code Oui
paymentNumber 696961687 recipient's customer number Oui
orderNumber Merchant order number Oui
amount 50 Amount to be paid without commission Oui
currency EUR Device used Oui
feesAmount 100 Amount of the commission Oui
AUTH-API-TOKEN {auth-api-token} Bearer acces token Oui 100
AUTH-API-SUBSCRIPTION {auth-api-subscription} Merchant subscription key Oui 100

Return values

Parameters Default value Description Type Required Size
adpFootprint b06a60cafa235a... Unique Adwapay transaction identification Oui
orderNumber DSJGDGDF.36834476466D Merchant order number Oui
status G: En cours de traitement
E: En attente de validationé
T : Terminé
O : Echec Opérateur
X : Expiré
C : Annulé
Status of the transaction
description Description of the transaction status
subQueries Details of sub-transactions
Transfer from a Wallet to a bank account
                                            

                                                    

curl --location --request POST 'https://twsv03.adwapay.cm/transferWalletToBank' \ --header 'AUTH-API-TOKEN: Bearer access_token' \ --header 'AUTH-API-SUBSCRIPTION: Subscription key' \ --header 'Content-Type: text/plain' \ --data-raw '{ "meanCode": "MOBILE-MONEY", "paymentNumber": "650668282", "orderNumber": "DSJGDGDFFEFYTUFUYFUF346753", "amount": 50, "currency": "XAF", "feesAmount": "100", "bankDetail": { "bank": 12345, "branch": 1234, "account": 123456789012, "controlKey": 12, "currency":"XAF", "owner":"NJIPENA Mouhamed" } }

                                        
                                            

                                                    

import requests url = "https://twsv03.adwapay.cm/transferWalletToBank" payload = "{\r\n \"meanCode\": \"MOBILE-MONEY\",\r\n \"paymentNumber\": \"650668282\",\r\n \"orderNumber\": \"DSJGDGDFFEFYTUFUYFUF346753\",\r\n \"amount\": 50,\r\n \"currency\": \"XAF\",\r\n \"feesAmount\": \"100\",\r\n \"bankDetail\": {\r\n\t\t\"bank\": 12345,\r\n\t\t\"branch\": 1234,\r\n\t\t\"account\": 123456789012,\r\n\t\t\"controlKey\": 12,\r\n \"currency\":\"XAF\",\r\n \"owner\":\"NJIPENA Mouhamed\"\r\n\t}\r\n}\r\n" headers = { 'AUTH-API-TOKEN': 'Bearer access_token', 'AUTH-API-SUBSCRIPTION': 'Subscription key', 'Content-Type': 'text/plain' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)

                                        
                                            

                                                    

<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://twsv03.adwapay.cm/transferWalletToBank', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS =>'{ "meanCode": "MOBILE-MONEY", "paymentNumber": "650668282", "orderNumber": "DSJGDGDFFEFYTUFUYFUF346753", "amount": 50, "currency": "XAF", "feesAmount": "100", "bankDetail": { "bank": 12345, "branch": 1234, "account": 123456789012, "controlKey": 12, "currency":"XAF", "owner":"NJIPENA Mouhamed" } } ', CURLOPT_HTTPHEADER => array( 'AUTH-API-TOKEN: Bearer access_token', 'AUTH-API-SUBSCRIPTION: Subscription key', 'Content-Type: text/plain' ), )); $response = curl_exec($curl); curl_close($curl); echo $response;

                                        
                                            

                                                    

import Foundation #if canImport(FoundationNetworking) import FoundationNetworking #endif var semaphore = DispatchSemaphore (value: 0) let parameters = "{\r\n \"meanCode\": \"MOBILE-MONEY\",\r\n \"paymentNumber\": \"650668282\",\r\n \"orderNumber\": \"DSJGDGDFFEFYTUFUYFUF346753\",\r\n \"amount\": 50,\r\n \"currency\": \"XAF\",\r\n \"feesAmount\": \"100\",\r\n \"bankDetail\": {\r\n\t\t\"bank\": 12345,\r\n\t\t\"branch\": 1234,\r\n\t\t\"account\": 123456789012,\r\n\t\t\"controlKey\": 12,\r\n \"currency\":\"XAF\",\r\n \"owner\":\"NJIPENA Mouhamed\"\r\n\t}\r\n}\r\n" let postData = parameters.data(using: .utf8) var request = URLRequest(url: URL(string: "https://twsv03.adwapay.cm/transferWalletToBank")!,timeoutInterval: Double.infinity) request.addValue("Bearer access_token", forHTTPHeaderField: "AUTH-API-TOKEN") request.addValue("Subscription key", forHTTPHeaderField: "AUTH-API-SUBSCRIPTION") request.addValue("text/plain", forHTTPHeaderField: "Content-Type") request.httpMethod = "POST" request.httpBody = postData let task = URLSession.shared.dataTask(with: request) { data, response, error in guard let data = data else { print(String(describing: error)) semaphore.signal() return } print(String(data: data, encoding: .utf8)!) semaphore.signal() } task.resume() semaphore.wait()

                                        
                                            

                                                    

OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse("text/plain"); RequestBody body = RequestBody.create(mediaType, "{ "meanCode": "MOBILE-MONEY", "paymentNumber": "650668282", "orderNumber": "DSJGDGDFFEFYTUFUYFUF346753", "amount": 50, "currency": "XAF", "feesAmount": "100", "bankDetail": { "bank": 12345, "branch": 1234, "account": 123456789012, "controlKey": 12, "currency":"XAF", "owner\":"NJIPENA Mouhamed" } }" ); Request request = new Request.Builder() .url("https://twsv03.adwapay.cm/transferWalletToBank") .method("POST", body) .addHeader("AUTH-API-TOKEN", "Bearer access_token") .addHeader("AUTH-API-SUBSCRIPTION", "Subscription key") .addHeader("Content-Type", "text/plain") .build(); Response response = client.newCall(request).execute();

                                        
                                            

                                                    

var https = require('follow-redirects').https; var fs = require('fs'); var options = { 'method': 'POST', 'hostname': 'twsv03.adwapay.cm', 'path': '/transferWalletToBank', 'headers': { 'AUTH-API-TOKEN': 'Bearer access_token', 'AUTH-API-SUBSCRIPTION': 'Subscription key', 'Content-Type': 'text/plain' }, 'maxRedirects': 20 }; var req = https.request(options, function (res) { var chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function (chunk) { var body = Buffer.concat(chunks); console.log(body.toString()); }); res.on("error", function (error) { console.error(error); }); }); var postData = "{\r\n \"meanCode\": \"MOBILE-MONEY\",\r\n \"paymentNumber\": \"650668282\",\r\n \"orderNumber\": \"DSJGDGDFFEFYTUFUYFUF346753\",\r\n \"amount\": 50,\r\n \"currency\": \"XAF\",\r\n \"feesAmount\": \"100\",\r\n \"bankDetail\": {\r\n\t\t\"bank\": 12345,\r\n\t\t\"branch\": 1234,\r\n\t\t\"account\": 123456789012,\r\n\t\t\"controlKey\": 12,\r\n \"currency\":\"XAF\",\r\n \"owner\":\"NJIPENA Mouhamed\"\r\n\t}\r\n}\r\n"; req.write(postData); req.end();

                                        
                                            

                                                    

CURL *curl; CURLcode res; curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST"); curl_easy_setopt(curl, CURLOPT_URL, "https://twsv03.adwapay.cm/transferWalletToBank"); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "AUTH-API-TOKEN: Bearer access_token"); headers = curl_slist_append(headers, "AUTH-API-SUBSCRIPTION: Subscription key"); headers = curl_slist_append(headers, "Content-Type: text/plain"); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); const char *data = "{\r\n \"meanCode\": \"MOBILE-MONEY\",\r\n \"paymentNumber\": \"650668282\",\r\n \"orderNumber\": \"DSJGDGDFFEFYTUFUYFUF346753\",\r\n \"amount\": 50,\r\n \"currency\": \"XAF\",\r\n \"feesAmount\": \"100\",\r\n \"bankDetail\": {\r\n \"bank\": 12345,\r\n \"branch\": 1234,\r\n \"account\": 123456789012,\r\n \"controlKey\": 12,\r\n \"currency\":\"XAF\",\r\n \"owner\":\"NJIPENA Mouhamed\"\r\n }\r\n}\r\n"; curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data); res = curl_easy_perform(curl); } curl_easy_cleanup(curl);

                                        

Sending money from a wallet account to a bank account

HTTP Requets

https://Link_API/transfertWalletToBank

Parameters

Parameters Default value Description Type Required Size
meanCode ORANGE-MONEY | MOBILE-MONEY | EXPRESS-UNION | YOOMEE-MONEY Payment method code Oui
paymentNumber 696961687 recipient's customer number Oui
orderNumber orderNumber Merchant order number Oui
payAmount 10000 Amount to be paid without commission Oui
currency XAF Device used Oui
feesAmount 100 Amount of the commission Oui
bankDetail { "bank": 12345, "branch": 1234, "account": 123456789012, "controlKey": 12, "currency":"XAF", "owner":"AHMADOU MOULEMA" } account information Oui
AUTH-API-TOKEN {auth-api-token} Bearer acces token Oui 100
AUTH-API-SUBSCRIPTION {auth-api-subscription} Merchant subscription key Oui 100

Return values

Parameters Default value Description Type Required Size
adpFootprint b06a60cafa235a... Unique Adwapay transaction identification Oui
orderNumber DSJGDGDF.36834476466D Merchant order number Oui
status G: En cours de traitement
E: En attente de validation
T : Terminé
O : Echec Opérateur
X : Expiré
C : Annulé
Status of the transaction
description Description of the transaction status
Transfer from a bank account to a wallet
                                            

                                                    

curl --location --request POST 'https://twsv03.adwapay.cm/transfertBankToWallet' \ --header 'AUTH-API-TOKEN: Bearer access_token' \ --header 'AUTH-API-SUBSCRIPTION: Subscription key' \ --header 'Content-Type: text/plain' \ --data-raw '{ "meanCode": "ORANGE-MONEY", "paymentNumber": "656155971", "orderNumber": "DSJGDGDFFEFYTUFUYFU5", "amount": 50, "currency": "XAF", "feesAmount": "100", "bankDetail": { "bank": 12345, "branch": 1234, "account": 123456789012, "controlKey": 12, "currency":"XAF", "owner":"NJIPENA Mouhamed" } }

                                        
                                            

                                                    

import requests url = "https://twsv03.adwapay.cm/transfertBankToWallet" payload = "{\r\n \"meanCode\": \"ORANGE-MONEY\",\r\n \"paymentNumber\": \"656155971\",\r\n \"orderNumber\": \"DSJGDGDFFEFYTUFUYFU5\",\r\n \"amount\": 50,\r\n \"currency\": \"XAF\",\r\n \"feesAmount\": \"100\",\r\n \"bankDetail\": {\r\n\t\t\"bank\": 12345,\r\n\t\t\"branch\": 1234,\r\n\t\t\"account\": 123456789012,\r\n\t\t\"controlKey\": 12,\r\n \"currency\":\"XAF\",\r\n \"owner\":\"NJIPENA Mouhamed\"\r\n\t}\r\n}\r\n" headers = { 'AUTH-API-TOKEN': 'Bearer access_token', 'AUTH-API-SUBSCRIPTION': 'Subscription key', 'Content-Type': 'text/plain' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)

                                        
                                            

                                                    

<?php require_once 'HTTP/Request2.php'; $request = new HTTP_Request2(); $request->setUrl('https://twsv03.adwapay.cm/transfertBankToWallet'); $request->setMethod(HTTP_Request2::METHOD_POST); $request->setConfig(array( 'follow_redirects' => TRUE )); $request->setHeader(array( 'AUTH-API-TOKEN' => 'Bearer access_token', 'AUTH-API-SUBSCRIPTION' => 'Subscription key', 'Content-Type' => 'text/plain' )); $request->setBody('{ \n "meanCode": "ORANGE-MONEY", \n "paymentNumber": "656155971", \n "orderNumber": "DSJGDGDFFEFYTUFUYFU5", \n "amount": 50, \n "currency": "XAF", \n "feesAmount": "100", \n "bankDetail": { \n "bank": 12345, \n "branch": 1234, \n "account": 123456789012, \n "controlKey": 12, \n "currency":"XAF", \n "owner":"NJIPENA Mouhamed" \n } \n} \n'); try { $response = $request->send(); if ($response->getStatus() == 200) { echo $response->getBody(); } else { echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' . $response->getReasonPhrase(); } } catch(HTTP_Request2_Exception $e) { echo 'Error: ' . $e->getMessage(); }

                                        
                                            

                                                    

var https = require('follow-redirects').https; var fs = require('fs'); var options = { 'method': 'POST', 'hostname': 'twsv03.adwapay.cm', 'path': '/transfertBankToWallet', 'headers': { 'AUTH-API-TOKEN': 'Bearer access_token', 'AUTH-API-SUBSCRIPTION': 'Subscription key', 'Content-Type': 'text/plain' }, 'maxRedirects': 20 }; var req = https.request(options, function (res) { var chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function (chunk) { var body = Buffer.concat(chunks); console.log(body.toString()); }); res.on("error", function (error) { console.error(error); }); }); var postData = "{\r\n \"meanCode\": \"ORANGE-MONEY\",\r\n \"paymentNumber\": \"656155971\",\r\n \"orderNumber\": \"DSJGDGDFFEFYTUFUYFU5\",\r\n \"amount\": 50,\r\n \"currency\": \"XAF\",\r\n \"feesAmount\": \"100\",\r\n \"bankDetail\": {\r\n\t\t\"bank\": 12345,\r\n\t\t\"branch\": 1234,\r\n\t\t\"account\": 123456789012,\r\n\t\t\"controlKey\": 12,\r\n \"currency\":\"XAF\",\r\n \"owner\":\"NJIPENA Mouhamed\"\r\n\t}\r\n}\r\n"; req.write(postData); req.end();

                                        
                                            

                                                    

OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse("text/plain"); RequestBody body = RequestBody.create(mediaType, "{ "meanCode": "MOBILE-MONEY", "paymentNumber": "650668282", "orderNumber": "DSJGDGDFFEFYTUFUYFUF346753", "amount": 50, "currency": "XAF", "feesAmount": "100", "bankDetail": { "bank": 12345, "branch": 1234, "account": 123456789012, "controlKey": 12, "currency":"XAF", "owner":"NJIPENA Mouhamed" } }" ); Request request = new Request.Builder() .url("https://twsv03.adwapay.cm/transfertBankToWallet") .method("POST", body) .addHeader("AUTH-API-TOKEN", "Bearer access_token") .addHeader("AUTH-API-SUBSCRIPTION", "Subscription key") .addHeader("Content-Type", "text/plain") .build(); Response response = client.newCall(request).execute();

                                        
                                            

                                                    

import Foundation #if canImport(FoundationNetworking) import FoundationNetworking #endif var semaphore = DispatchSemaphore (value: 0) let parameters = "{\r\n \"meanCode\": \"ORANGE-MONEY\",\r\n \"paymentNumber\": \"656155971\",\r\n \"orderNumber\": \"DSJGDGDFFEFYTUFUYFU5\",\r\n \"amount\": 50,\r\n \"currency\": \"XAF\",\r\n \"feesAmount\": \"100\",\r\n \"bankDetail\": {\r\n\t\t\"bank\": 12345,\r\n\t\t\"branch\": 1234,\r\n\t\t\"account\": 123456789012,\r\n\t\t\"controlKey\": 12,\r\n \"currency\":\"XAF\",\r\n \"owner\":\"NJIPENA Mouhamed\"\r\n\t}\r\n}\r\n" let postData = parameters.data(using: .utf8) var request = URLRequest(url: URL(string: "https://twsv03.adwapay.cm/transfertBankToWallet")!,timeoutInterval: Double.infinity) request.addValue("Bearer access_token", forHTTPHeaderField: "AUTH-API-TOKEN") request.addValue("Subscription key", forHTTPHeaderField: "AUTH-API-SUBSCRIPTION") request.addValue("text/plain", forHTTPHeaderField: "Content-Type") request.httpMethod = "POST" request.httpBody = postData let task = URLSession.shared.dataTask(with: request) { data, response, error in guard let data = data else { print(String(describing: error)) semaphore.signal() return } print(String(data: data, encoding: .utf8)!) semaphore.signal() } task.resume() semaphore.wait()

                                        
                                            

                                                    

CURL *curl; CURLcode res; curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST"); curl_easy_setopt(curl, CURLOPT_URL, "https://twsv03.adwapay.cm/transfertBankToWallet"); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "AUTH-API-TOKEN: Bearer access_token"); headers = curl_slist_append(headers, "AUTH-API-SUBSCRIPTION: Subscription key"); headers = curl_slist_append(headers, "Content-Type: text/plain"); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); const char *data = "{\r\n \"meanCode\": \"ORANGE-MONEY\",\r\n \"paymentNumber\": \"656155971\",\r\n \"orderNumber\": \"DSJGDGDFFEFYTUFUYFU5\",\r\n \"amount\": 50,\r\n \"currency\": \"XAF\",\r\n \"feesAmount\": \"100\",\r\n \"bankDetail\": {\r\n \"bank\": 12345,\r\n \"branch\": 1234,\r\n \"account\": 123456789012,\r\n \"controlKey\": 12,\r\n \"currency\":\"XAF\",\r\n \"owner\":\"NJIPENA Mouhamed\"\r\n }\r\n}\r\n"; curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data); res = curl_easy_perform(curl); } curl_easy_cleanup(curl);

                                        

Sending money from a bank account to a wallet account

HTTP Requets

https://Link_API/transfertBankToWallet

Parameters

Parameters Default value Description Type Required Size
meanCode ORANGE-MONEY | MOBILE-MONEY | EXPRESS-UNION | YOOMEE-MONEY Payment method code Oui
paymentNumber 696961687 recipient's customer number Oui
orderNumber Merchant order number Oui
payAmount 50 Amount to be paid without commission Oui
currency XAF Device used Oui
feesAmount 100 Amount of the commission Oui
bankDetail { "bank": 12345, "branch": 1234, "account": 123456789012, "controlKey": 12, "currency":"XAF", "owner":"AHMADOU MOULEMA" } account information Oui
AUTH-API-TOKEN {auth-api-token} Bearer acces token Oui 100
AUTH-API-SUBSCRIPTION {auth-api-subscription} Merchant subscription key Oui 100

Return values

Parameters Default value Description Type Required Size
adpFootprint b06a60cafa235a... Unique Adwapay transaction identification Oui
orderNumber DSJGDGDF.36834476466D Merchant order number Oui
status G: En cours de traitement
E: En attente de validation
T : Terminé
O : Echec Opérateur
X : Expiré
C : Annulé
Status of the transaction
description Description of the transaction status

Plugin

The merchant site must have an ioncube_loader installed

installation

​​Unzip the ADWAPAY_WOOCOMMERCE folder

Copy the following files at the root of your wordpress site

Copy the adwapay folder to your WordPress plugins directory (normally : /wp-content/plugins)

configuration

 ​​In WordPress adminstration

In the parameters woocommerce

In the settings of AdwaPay Standard

Errors Lists

Error Code Error Description Webservices
30015 Montant de la transaction incorrect requestToPay
20005 Exception générée requestToPay
30014 Paiement en mode CASH getFees
20001 Erreur lors de la sauvegarde des ventes getADPToken
NAV undefined
undefined
curl php nodejs java python swift c