# 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.

<mark style="color:orange;">`POST`</mark> **`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  | <p>Code du pays<br>Code pays disponible: <a data-footnote-ref href="#user-content-fn-1"><strong>CI</strong></a></p>                 | yes      |
| `currency`       | string  | <p>Devise de la transaction.<br>Devise disponible : <a data-footnote-ref href="#user-content-fn-2"><strong>XOF</strong></a></p>     | yes      |
| `customer_id`    | string  | <p>Numéro du bénéficiaire.<br>Longueur : 10</p>                                                                                     | yes      |
| `name`           | string  | Nom du bénéficiaire                                                                                                                 | yes      |
| `amount`         | integer | <p>Montant de la transaction.<br><strong>Montant minimum : 100 XOF</strong><br><strong>Montant Maximum : 1.000.000 XOF</strong></p> | yes      |
| `operator`       | string  | **ORANGE\_MONEY**                                                                                                                   | yes      |
| `transaction_id` | string  | <p>Référence de la transaction.<br>Cette référence est unique et taille maximale 20.</p>                                            | yes      |

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
    "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
    }
}
```

{% endtab %}

{% tab title="401" %}

```json
{
    "code_status": 401,
    "status": "ERROR",
    "message": "TOKEN_EXPIRED"
}
```

{% endtab %}

{% tab title="504" %}

```json
{
    "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
    }
}
```

{% endtab %}

{% tab title="412" %}

```json
{
    "code_status": 412,
    "status": "ERROR",
    "message": "AMOUNT_INSUFFISANT"
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Curl" %}

```url
<?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;

```

{% endtab %}

{% tab title="PHP" %}

```php
<?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();
}
```

{% endtab %}

{% tab title="Java" %}

```java
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();
```

{% endtab %}

{% tab title="Node Js" %}

```javascript
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);
});

```

{% endtab %}

{% tab title="Dart" %}

```dart
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);
}

```

{% endtab %}
{% endtabs %}

[^1]: **CI : Côte d'Ivoire**

[^2]: XOF: Franc CFA


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digitalpaye.com/api-references/v2/disbursment/orange-money.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
