# Wave Money

L'API Disbursement Wave Money fournit une solution pour transférer des fonds vers des comptes Wave Money à partir d'une source externe, telle qu'une application mobile ou une plateforme en ligne. Cette API permet d'automatiser et de sécuriser le processus de transfert d'argent vers des comptes Wave Money, offrant ainsi une alternative efficace aux méthodes de transfert traditionnelles.

#### Principales fonctionnalités de l'API :

* **Transferts monétaires automatisés :** Permet d'automatiser le processus de transfert d'argent vers des comptes Wave Money en utilisant des requêtes API sécurisées.
* **Intégration transparente :** Facilite l'intégration de la fonctionnalité de transfert d'argent Wave Money dans des applications tierces, telles que des plateformes de commerce électronique ou des applications bancaires.
* **Sécurité et authentification :** Utilise des méthodes d'authentification sécurisées, telles que les clés API et les jetons d'accès, pour garantir l'intégrité et la confidentialité des transactions.
* **Gestion des erreurs :** Fournit des mécanismes de gestion des erreurs pour gérer les cas où un transfert échoue ou rencontre des problèmes.

<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 Wave 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  | **WAVE\_CI**                                                                                                                        | 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": "+2250777101308",
        "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": "WAVE_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": "+2250777101308",
        "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": "WAVE_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" : "0546573332",
    "name" : "GUEI HELIE",
    "amount" : 300,
    "operator" : "WAVE_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" : "0546573332",\n    "name" : "GUEI HELIE",\n    "amount" : 300,\n    "operator" : "WAVE_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\" : \"0546573332\",\n    \"name\" : \"GUEI HELIE\",\n    \"amount\" : 300,\n    \"operator\" : \"WAVE_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": "0546573332",
    "name": "GUEI HELIE",
    "amount": 300,
    "operator": "WAVE_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": "0546573332",
  "name": "GUEI HELIE",
  "amount": 300,
  "operator": "WAVE_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/wave-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.
