Digitalpaye API
Digitalpaye API
  • Welcome 🥳
  • Introduction
  • API RĂ©fĂ©rences
    • v1
      • CrĂ©er un Token
      • Balance
      • Customers
        • CrĂ©er un client
        • Fetch data customer
        • Fetch all customers
      • Collecte
        • MTN Mobile Money
        • Moov Mobile Money
        • Orange Mobile Money
        • Wave Money
      • Disbursment (Transfert)
        • MTN Mobile Money
        • Moov Mobile Money
        • Orange Mobile Money
        • Wave Money
      • Get status transaction
      • Get all transactions
  • Change log
    • v1
  • SDK ET PLUGINS
    • SDK PHP
    • Flutter
  • Webhook
Propulsé par GitBook
Sur cette page

Cet article vous a-t-il été utile ?

  1. API Références
  2. v2
  3. Disbursment

Orange Money

L'API Disbursement Orange Money permet aux développeurs d'intégrer des fonctionnalités de transfert d'argent vers des comptes Orange Money dans leurs applications. Cette API offre une solution robuste pour automatiser les transferts financiers vers les utilisateurs de Orane 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 Orange 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/v2/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

Name
Value

Content-Type

application/json

Authorization

Bearer <AccessToken>

X-Environment

Production

Body

Name
Type
Description
Required

code_country

string

Code du pays Code pays disponible:

yes

currency

string

Devise de la transaction. Devise disponible :

yes

customer_id

string

Numéro du bénéficiaire. Longueur : 10

yes

name

string

Nom du bénéficiaire

yes

amount

integer

Montant de la transaction. Montant minimum : 100 XOF Montant Maximum : 1.000.000 XOF

yes

operator

string

ORANGE_MONEY

yes

transaction_id

string

Référence de la transaction. Cette référence est unique et taille maximale 20.

yes

Response

{
    "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
    }
}
{
    "code_status": 401,
    "status": "ERROR",
    "message": "TOKEN_EXPIRED"
}
{
    "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
    }
}
{
    "code_status": 412,
    "status": "ERROR",
    "message": "AMOUNT_INSUFFISANT"
}

<?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" : "0777101308",
    "name" : "GUEI HELIE",
    "amount" : 300,
    "operator" : "ORANGE_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;
<?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" : "0777101308",\n    "name" : "GUEI HELIE",\n    "amount" : 300,\n    "operator" : "ORANGE_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();
}
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\" : \"0777101308\",\n    \"name\" : \"GUEI HELIE\",\n    \"amount\" : 300,\n    \"operator\" : \"ORANGE_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();
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": "0777101308",
    "name": "GUEI HELIE",
    "amount": 300,
    "operator": "ORANGE_MONEY_CI",
    "transaction_id": "TICK-0110379110832"
  })

};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
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": "0777101308",
  "name": "GUEI HELIE",
  "amount": 300,
  "operator": "ORANGE_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 11 mois

Cet article vous a-t-il été utile ?