<

Introduction

Présentation

AdwaPay est une solution robuste et sécurisée permettant à ses utilisateurs (marchands, clients, …) de payer par mobile money ou carte bancaire. Grâce à notre contrat unique, vous avez accès à l'ensemble des moyens de paiement de nos partenaires financiers : banques et établissements de microfinance, opérateurs de téléphonie et autres émetteurs de monnaie électronique.

Ce document a pour but de fournir une description des services de Paiement ADWAPAY et de présenter leur intégration dans une application web ou mobile.

Prérequis

Pour accéder aux services web ADWAPAY, les préalables suivants doivent être respectés :

L’API permettant de remplir ces préalables est décrite dans un document séparé.

Sécurité & avertissement

Le système de sécurité mis en place sur la plateforme « ADWAPAY » est susceptible de conserver pendant un certain temps, l’ensemble des transactions réalisées par les utilisateurs du partenaire, aux fins de sécurité et d’amélioration de la qualité de ses services. En particulier, un système de surveillance monitore et manage au mieux les transactions effectuées par chaque plateforme du partenaire.

Conditions générales d’utilisation

L’acceptation explicite des conditions générales d’utilisation de la plateforme « ADWAPAY » et des conditions générales de vente des marchands présents sur ladite plateforme, est requie pour accéder au service de la plateforme.

Généralités

Les services web sont constitués des éléments-clés suivants :

Paramètres d’appel d’APIs

1      Description

Ils sont attendus au format JSON et éventuellement chiffrés avec un algorithme de chiffrement spécifique.

 

La quasi-totalité des services web requièrent les deux paramètres d’entrée suivants dans le header :

Pour garantir la sécurité, le jeton de transaction ne doit jamais être connu de l’utilisateur final. Il doit être ajouté en back-end par le système du partenaire, avant appel du service web.

2    Illustration

Retour d’appel d’un service Web

  Les retours d’appel des services web sont au format JSON et éventuellement chiffrés avec un algorithme spécifique.

Ils sont constitués de deux parties : l’information d’erreur et l’information propre.

 1      Description :

NB : il y a erreur lorsque la valeur « code » de « pesake » est non vide. Dans ce cas, vous trouverez le détail de l’erreur dans « detail » et sa criticité dans « level »

 2       Illustration

Autorisation

La première chose est que vous devrez vous authentifier pour utiliser notre site. Vous pouvez obtenir vos différentes clés API en vous connectant au portail des développeurs de ADWAPAYDOC.

Remarque !

Vous devez nous contacter avant d'être autorisé à utiliser notre environnement sandbox. Une fois que vous nous aurez contactés, vous serez également invité à participer à notre canal whatsapp/skype, où vous pourrez poser des questions sur notre API, auxquelles notre équipe d'ingénieurs répondra. Nous préférons que la communication technique passe par ce canal whatsapp/skype.

Jeton d’autorisation de transaction
                                            

                                                    

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);

                                        

Obtention du token

Requête HTTP

https://Lien_API/getADPToken

Paramètres

Paramètres Valeur par défaut Description Type Requis Taille
application XXXXXXXXXXXX code de l'application du partenaire Oui
AUTHORIZATION base64_encode (MERCHANDKEY+SUBSCRIPTION_KEY) Authentification basic contenant la clé marchande et la clé de souscription concaténées, le tout encodé en base64 Oui

Valeurs de retour

Paramètres Valeur par défaut Description Type Requis Taille
expiryTime 3600 Durée de validité du jeton (en seconde)
tokenCode d9325c60-d9325c60... Jeton généré

Collection

Consultez l'exemple d'encaissement pour vous faire une idée rapide de la manière dont vous pouvez collecter des fonds auprès de vos clients à l'aide de notre API.

Callback url

Un webhook est un callback qui permet à notre API de notifier à votre système de nouveaux événements concernant vos transactions.

Requête HTTP

https://Lien_API/callbackUrl

Paramètres

Paramètres Valeur par défaut Description Type Requis Taille
status T : Terminé
O : Echec Opérateur
X : Expiré
C : Annulé
STATUT Oui
footPrint dfgghrtzesdfqs........ Identification de la transaction unique Adwapay Oui
orderNumber 1234647895.PAT Numéro de commande du marchand Oui

Valeurs de retour

Paramètres Valeur par défaut Description Type Requis Taille
Commission applicable sur la 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);

                                        

Obtention des commissions en fonction du moyen de paiement choisi

Requête HTTP

https://Lien_API/getFees

Paramètres

Paramètres Valeur par défaut Description Type Requis Taille
amount 10000 Montant de la transaction dont on veut obtenir la commission Oui
currency XAF, USD, EUR Devise utilisée Oui
AUTH-API-TOKEN {auth-api-token} Bearer Token généré Oui 100
AUTH-API-SUBSCRIPTION {auth-api-subscription} Clé de souscription du marchand Oui 100

Valeurs de retour

Paramètres Valeur par défaut Description Type Requis Taille
meanCode ORANGE-MONEY | MOBILE-MONEY | EXPRESS-UNION | YOOMEE-MONEY Code du moyen de paiement 100
feesAmount 350 Commission pour le moyen de paiement
currency XAF Devise de la commission
hasFees True | False

True : moyen de paiement soumis à commission.

False : pas de frais applicable.

Paiement depuis un 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);

                                        

Requete pour payement

Requête HTTP

https://Lien_API/requestToPay

Paramètres

Paramètres Valeur par défaut Description Type Requis Taille
meanCode ORANGE-MONEY | MOBILE-MONEY | EXPRESS-UNION | YOOMEE-MONEY code du moyen de paiement Oui
paymentNumber 696961687 numéro du client payeur Oui
orderNumber Numéro unique de commande fourni par le système partenaire Oui
amount 50 Montant de la transaction dont on veut obtenir la commission Oui
currency XAF Devise utilisée Oui
feesAmount 100 Montant de la commission Oui
AUTH-API-TOKEN {auth-api-token} Bearer Token généré Oui 100
AUTH-API-SUBSCRIPTION {auth-api-subscription} Clé de souscription du marchand Oui 100

Valeurs de retour

Paramètres Valeur par défaut Description Type Requis Taille
adpFootprint b06a60cafa235a... Identification unique de la transaction Oui
orderNumber DSJGDGDF.36834476466D Numéro de commande du marchand Oui
status G: En cours de traitement
E: En attente de validation
T : Terminé
O : Echec Opérateur
X : Expiré
C : Annulé
Statut de la transaction
description Description du statut de la transaction
subQueries Détails des sous-transactions
Renvoie de la notification de paiement
                                            

                                                    

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);

                                        

Envoie d'une notification de paiement à un client

Requête HTTP

https://Lien_API/pushDialog

Paramètres

Paramètres Valeur par défaut Description Type Requis Taille
adpFootprint Identification de la transaction unique Adwapay Oui
meanCode Code du moyen de paiement utilisé Oui
AUTH-API-TOKEN {auth-api-token} Bearer Token généré Oui 100
AUTH-API-SUBSCRIPTION {auth-api-subscription} Clé de souscription du marchand Oui 100

Valeurs de retour

Paramètres Valeur par défaut Description Type Requis Taille
adpFootprint Identification de la transaction unique Adwapay Oui
orderNumber DSJGDGDF.36834476466D Numéro de commande du marchand Oui
paymentNumber 696961687 numéro du client Oui
status G: En cours de traitement
E: En attente de validation
T : Terminé
O : Echec Opérateur
X : Expiré
C : Annulé
Statut de la transaction
Statut d’une 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);

                                        

Obtention du statut d'une transaction

Requête HTTP

https://Lien_API/paymentStatus

Paramètres

Paramètres Valeur par défaut Description Type Requis Taille
meanCode ORANGE-MONEY | MOBILE-MONEY | EXPRESS-UNION | YOOMEE-MONEY code du moyen de paiement Oui
adpFootprint Identification de la transaction unique Adwapay Oui
AUTH-API-TOKEN {auth-api-token} Bearer Token généré Oui 100
AUTH-API-SUBSCRIPTION {auth-api-subscription} Clé de souscription du marchand Oui 100

Valeurs de retour

Paramètres Valeur par défaut Description Type Requis Taille
adpFootprint b06a60cafa235... Identification unique de la transaction Oui
orderNumber DSJGDGDF.36834476466D Numéro de commande envoyé par le marchand Oui
status G: En cours de traitement
E: En attente de validationé
T : Terminé
O : Echec Opérateur
X : Expiré
C : Annulé
Statut de la transaction
meanCode ORANGE-MONEY Code du momyen de paiement 100

Paiements

Consultez l'exemple de paiement pour vous faire une idée rapide de la manière dont vous pouvez envoyer des fonds à vos clients en utilisant notre API.

Versement dans un 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);

                                        

Paiement depuis un compte wallet

Requête HTTP

https://Lien_API/requestToDisburse

Paramètres

Paramètres Valeur par défaut Description Type Requis Taille
meanCode ORANGE-MONEY | MOBILE-MONEY | EXPRESS-UNION | YOOMEE-MONEY code du moyen de paiement Oui
paymentNumber 696961687 numéro client du destinataire Oui
orderNumber Numéro unique de commande fourni par le système partenaire Oui
amount 50 Montant de la transaction dont on veut obtenir la commission Oui
currency EUR Devise utilisée Oui
feesAmount 100 Montant de la commission Oui
AUTH-API-TOKEN {auth-api-token} Bearer Token généré Oui 100
AUTH-API-SUBSCRIPTION {auth-api-subscription} Clé de souscription du marchand Oui 100

Valeurs de retour

Paramètres Valeur par défaut Description Type Requis Taille
adpFootprint b06a60cafa235a... Identification unique de la transaction Oui
orderNumber DSJGDGDF.36834476466D Numéro de commande du marchand Oui
status G: En cours de traitement
E: En attente de validationé
T : Terminé
O : Echec Opérateur
X : Expiré
C : Annulé
Statut de la transaction
description Description du statut de la transaction
subQueries Détails des sous-transactions
Transfert d’un compte wallet vers un compte bancaire
                                            

                                                    

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);

                                        

Envoi d'argent d'un compte wallet vers un compte bancaire

Requête HTTP

https://Lien_API/transfertWalletToBank

Paramètres

Paramètres Valeur par défaut Description Type Requis Taille
meanCode ORANGE-MONEY | MOBILE-MONEY | EXPRESS-UNION | YOOMEE-MONEY code du moyen de paiement Oui
paymentNumber 696961687 numéro du client payeur Oui
orderNumber orderNumber Numéro unique de la commande fourni par le système du partenaire Oui
payAmount 10000 Montant à payer hors commission Oui
currency XAF Devise utilisée Oui
feesAmount 100 Montant de la commission Oui
bankDetail { "bank": 12345, "branch": 1234, "account": 123456789012, "controlKey": 12, "currency":"XAF", "owner":"AHMADOU MOULEMA" } information du compte Oui
AUTH-API-TOKEN {auth-api-token} Bearer Token généré Oui 100
AUTH-API-SUBSCRIPTION {auth-api-subscription} Clé de souscription du marchand Oui 100

Valeurs de retour

Paramètres Valeur par défaut Description Type Requis Taille
adpFootprint b06a60cafa235a... Identification unique de la transaction Oui
orderNumber DSJGDGDF.36834476466D Numéro de commande envoyé par le marchand Oui
status G: En cours de traitement
E: En attente de validation
T : Terminé
O : Echec Opérateur
X : Expiré
C : Annulé
Statut de la transaction
description Description du statut de la transaction
Transfert d’un compte bancaire vers un 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);

                                        

Envoi d'argent d'un compte bancaire vers un compte wallet

Requête HTTP

https://Lien_API/transfertBankToWallet

Paramètres

Paramètres Valeur par défaut Description Type Requis Taille
meanCode ORANGE-MONEY | MOBILE-MONEY | EXPRESS-UNION | YOOMEE-MONEY code du moyen de paiement Oui
paymentNumber 696961687 Numéro du client payeur Oui
orderNumber Numéro unique de la commande fournie par le système partenaire Oui
payAmount 50 Montant à payer hors commission Oui
currency XAF Devise utilisée Oui
feesAmount 100 Montant de la commission Oui
bankDetail { "bank": 12345, "branch": 1234, "account": 123456789012, "controlKey": 12, "currency":"XAF", "owner":"AHMADOU MOULEMA" } Information du compte Oui
AUTH-API-TOKEN {auth-api-token} Bearer Token généré Oui 100
AUTH-API-SUBSCRIPTION {auth-api-subscription} Clé de souscription du marchand Oui 100

Valeurs de retour

Paramètres Valeur par défaut Description Type Requis Taille
adpFootprint b06a60cafa235a... Identification unique de la transaction Oui
orderNumber DSJGDGDF.36834476466D Numéro de commande du marchand Oui
status G: En cours de traitement
E: En attente de validation
T : Terminé
O : Echec Opérateur
X : Expiré
C : Annulé
Statut de la transaction
description Description du statut de la transaction

Plugin

Le site marchand doit impérativement avoir un ioncube_loader installé

Installation

​​Decompresser le dossier ADWAPAY_WOOCOMMERCE

Copier les fichiers suivant à la racine de votre site wordpress

Copier le dossier adwapay dans votre répertoire de plugins WordPress (normalement : /wp-content/plugins)

Configuration

 ​​Dans L'adminstration de WordPress

Dans les paramètres woocommerce

Dans les paramètres de "AdwaPay Standard"

Listes des erreurs

Code erreur Description de l'erreur Webservices associés
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