L'API Disbursement MTN Mobile Money permet aux développeurs d'intégrer des fonctionnalités de transfert d'argent vers des comptes MTN Mobile Money dans leurs applications. Cette API offre une solution robuste pour automatiser les transferts financiers vers les utilisateurs de MTN Mobile Money, facilitant ainsi les transactions de paiement et de distribution.
Fonctionnalités Principales
Transfert d'Argent Instantané : Permet de transférer des fonds directement vers les comptes MTN Mobile Money des utilisateurs.
Intégration Simplifiée : Offre une intégration simple et sécurisée via des appels API RESTful.
Notifications de Statut : Fournit des notifications de statut en temps réel pour les transactions effectuées.
Gestion des Erreurs : Gère efficacement les erreurs et les cas d'échec de transaction, avec des mécanismes de récupération appropriés.
POST
https://api.digitalpaye.com/v1/transfers/mobile-money
Cet endpoint permet d'effectuer un transfert d'argent vers un compte MTN Mobile Money en utilisant l'API DigitalPaye. L'API gère le processus de transfert de manière sécurisée et transparente, facilitant ainsi les transactions financières entre différentes plateformes.
Headers
Body
Response
200 401 504 412
Copier {
"code_status" : 200 ,
"status" : "SUCCESSFUL" ,
"message" : "PAYMENT_IS_SUCCESSFUL" ,
"data" : {
"linkpayment_id" : null ,
"ref" : "RCI-DIGITALP-7698" ,
"operator_id" : null ,
"transaction_id" : "TICK-1111379110832" ,
"cardId" : null ,
"number_user" : "+2250546573332" ,
"name_user" : "GUEI HELIE" ,
"email_user" : null ,
"country_user" : "CI" ,
"currency" : "XOF" ,
"amount" : "100" ,
"fees" : "1" ,
"amount_receive" : "100" ,
"amount_total" : "101" ,
"status" : "SUCCESSFUL" ,
"type_transaction" : "transfert" ,
"type_payment" : "MTN_MONEY_CI" ,
"date" : "2024-04-08 20:35:53" ,
"date_update" : null
}
}
Copier {
"code_status" : 401 ,
"status" : "ERROR" ,
"message" : "TOKEN_EXPIRED"
}
Copier {
"code_status" : 504 ,
"status" : "ERROR" ,
"message" : "PAYMENT_FAILED_TRY_AGAINST" ,
"data" : {
"ref" : "RCI-DIGITALP-7698" ,
"operator_id" : null ,
"transaction_id" : "TICK-1111379110832" ,
"number_user" : "+2250546573332" ,
"name_user" : "GUEI HELIE" ,
"email_user" : null ,
"country_user" : "CI" ,
"currency" : "XOF" ,
"amount" : "100" ,
"fees" : "1" ,
"amount_receive" : "100" ,
"amount_total" : "101" ,
"status" : "FAILED" ,
"type_transaction" : "transfert" ,
"type_payment" : "MTN_MONEY_CI" ,
"date" : "2024-04-08 20:35:53" ,
"date_update" : null
}
}
Copier {
"code_status" : 412 ,
"status" : "ERROR" ,
"message" : "AMOUNT_INSUFFISANT"
}
Curl PHP Java Node Js Dart
Copier <?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.digitalpaye.com/v1/transfers/mobile-money',
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 =>'{
"code_country" : "CI",
"currency" : "XOF",
"customer_id" : "0546573332",
"name" : "GUEI HELIE",
"amount" : 300,
"operator" : "MTN_MONEY_CI",
"transaction_id" : "TICK-0110379110832"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjb21wYW55X2lkIjoiMSIsImlhdCI6MTcxMjYwODUxMywiZXhwIjoxNzEyNjA5MTEzfQ.fui_sVqSoQs_OtCqCm7vkH0pFlcQud5tKsyCZI64NnU'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Copier <? php
require_once 'HTTP/Request2.php' ;
$request = new HTTP_Request2 ();
$request -> setUrl ( 'https://api.digitalpaye.com/v1/transfers/mobile-money' ) ;
$request -> setMethod ( HTTP_Request2 :: METHOD_POST ) ;
$request -> setConfig ( array (
'follow_redirects' => TRUE
) ) ;
$request -> setHeader ( array (
'Content-Type' => 'application/json' ,
'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjb21wYW55X2lkIjoiMSIsImlhdCI6MTcxMjYwODUxMywiZXhwIjoxNzEyNjA5MTEzfQ.fui_sVqSoQs_OtCqCm7vkH0pFlcQud5tKsyCZI64NnU'
) ) ;
$request->setBody('{\n "code_country" : "CI",\n "currency" : "XOF",\n "customer_id" : "0546573332",\n "name" : "GUEI HELIE",\n "amount" : 300,\n "operator" : "MTN_MONEY_CI",\n "transaction_id" : "TICK-0110379110832"\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 () ;
}
Copier OkHttpClient client = new OkHttpClient() . newBuilder ()
. build ();
MediaType mediaType = MediaType . parse ( "application/json" );
RequestBody body = RequestBody.create(mediaType, "{\n \"code_country\" : \"CI\",\n \"currency\" : \"XOF\",\n \"customer_id\" : \"0546573332\",\n \"name\" : \"GUEI HELIE\",\n \"amount\" : 300,\n \"operator\" : \"MTN_MONEY_CI\",\n \"transaction_id\" : \"TICK-0110379110832\"\n}");
Request request = new Request . Builder ()
. url ( "https://api.digitalpaye.com/v1/transfers/mobile-money" )
. method ( "POST" , body)
. addHeader ( "Content-Type" , "application/json" )
.addHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjb21wYW55X2lkIjoiMSIsImlhdCI6MTcxMjYwODUxMywiZXhwIjoxNzEyNjA5MTEzfQ.fui_sVqSoQs_OtCqCm7vkH0pFlcQud5tKsyCZI64NnU")
. build ();
Response response = client . newCall (request) . execute ();
Copier var request = require ( 'request' );
var options = {
'method' : 'POST' ,
'url' : 'https://api.digitalpaye.com/v1/transfers/mobile-money' ,
'headers' : {
'Content-Type' : 'application/json' ,
'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjb21wYW55X2lkIjoiMSIsImlhdCI6MTcxMjYwODUxMywiZXhwIjoxNzEyNjA5MTEzfQ.fui_sVqSoQs_OtCqCm7vkH0pFlcQud5tKsyCZI64NnU'
} ,
body : JSON .stringify ({
"code_country" : "CI" ,
"currency" : "XOF" ,
"customer_id" : "0546573332" ,
"name" : "GUEI HELIE" ,
"amount" : 300 ,
"operator" : "MTN_MONEY_CI" ,
"transaction_id" : "TICK-0110379110832"
})
};
request (options , function (error , response) {
if (error) throw new Error (error);
console .log ( response .body);
});
Copier var headers = {
'Content-Type' : 'application/json' ,
'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjb21wYW55X2lkIjoiMSIsImlhdCI6MTcxMjYwODUxMywiZXhwIjoxNzEyNjA5MTEzfQ.fui_sVqSoQs_OtCqCm7vkH0pFlcQud5tKsyCZI64NnU'
};
var request = http. Request ( 'POST' , Uri . parse ( 'https://api.digitalpaye.com/v1/transfers/mobile-money' ));
request.body = json. encode ({
"code_country" : "CI" ,
"currency" : "XOF" ,
"customer_id" : "0546573332" ,
"name" : "GUEI HELIE" ,
"amount" : 300 ,
"operator" : "MTN_MONEY_CI" ,
"transaction_id" : "TICK-0110379110832"
});
request.headers. addAll (headers);
http. StreamedResponse response = await request. send ();
if (response.statusCode == 200 ) {
print ( await response.stream. bytesToString ());
}
else {
print (response.reasonPhrase);
}
Dernière mise à jour il y a 2 jours