# Wave Money

<mark style="color:orange;">`POST`</mark>[ `https://api.digitalpaye.com/v1/collecte/mobile-money`](https://api.digitalpaye.com/v1/collecte/mobile-money)

#### Headers

| Name          | Value                        |
| ------------- | ---------------------------- |
| Content-Type  | `application/json`           |
| Authorization | `Bearer <`**AccessToken**`>` |
| X-Environment | `Production`                 |

#### Request Body

<table><thead><tr><th width="228">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>transactionId<mark style="color:red;">*</mark></td><td>String</td><td>ID de la transaction</td></tr><tr><td>customer<mark style="color:red;">*</mark></td><td>Object</td><td>Le client</td></tr><tr><td>payer<mark style="color:red;">*</mark></td><td>String</td><td>Numéro de téléphone à débiter</td></tr><tr><td>currency<mark style="color:red;">*</mark></td><td>String</td><td>Devise de la transaction.<br>Devise disponible : <a data-footnote-ref href="#user-content-fn-1"><strong>XOF</strong></a></td></tr><tr><td>amount<mark style="color:red;">*</mark></td><td>String</td><td>Montant de la transaction.<br><strong>Montant minimum : 100 XOF</strong><br><strong>Montant Maximum : 1.000.000 XOF</strong></td></tr><tr><td>operator<mark style="color:red;">*</mark></td><td>String</td><td><strong>WAVE_MONEY_CI</strong></td></tr><tr><td>urlSuccess</td><td>String</td><td>Url success</td></tr><tr><td>errorUrl</td><td>String</td><td>Url error or return</td></tr></tbody></table>

#### `Customer Data`

| Name                                          | Type   | Description         |
| --------------------------------------------- | ------ | ------------------- |
| lastName<mark style="color:orange;">\*</mark> | String | Nom du client       |
| firstName<mark style="color:red;">\*</mark>   | String | Prénom du client    |
| phone<mark style="color:red;">\*</mark>       | String | Téléphone du client |
| email\*                                       | String | Email du client     |
| address<mark style="color:red;">\*</mark>     | Object | Adresses            |

#### `Address Customer`

|                                               |        |                                                       |
| --------------------------------------------- | ------ | ----------------------------------------------------- |
| countryCode<mark style="color:red;">\*</mark> | String | <p>Code du pays du client <br><strong>CI</strong></p> |
| city                                          | String | Ville du client                                       |
| streetAddress                                 | String | Adresse du client                                     |

{% tabs %}
{% tab title="202: Payment pending" %}

```json
{
    "statusCode": 202,
    "message": "Successful",
    "data": {
        "ref": "Y9BQ3LBBMX",
        "transactionId": "DIGITAL-23018182000",
        "currency": "XOF",
        "amount": "100",
        "fees": "1.5",
        "amountReceive": "98.5",
        "amountTotal": "100",
        "phone": "0777101308",
        "status": "PENDING",
        "typeTransaction": "collecte",
        "operator": "WAVE_MONEY_CI",
        "createdAt": "2024-10-11T09:34:30.000Z",
        "customer": {
            "id": "26b35534-3165-4143-8fff-ec2f70bb430c",
            "lastName": "GUEI",
            "firstName": "HELIE",
            "email": "elieguei225@gmail.com",
            "phoneNumber": "0777101308",
            "address": {
                "countryCode": "CI",
                "city": "Abidjan",
                "streetAddress": "Plateau Cocody"
            },
            "createdAt": "2024-10-11T07:07:59.000Z"
        },
        "waveLaunchUrl": "https://pay.wave.com/c/cos-1s4ed9jx022am?a=100&c=XOF&m=Digitalpaye%20%2A%20Digi"
    }
}
```

{% endtab %}

{% tab title="400: Bad Request" %}

```json
{
    "statusCode": 400,
    "message": "BadRequestError",
    "reason": "Des champs requis sont manquants."
}
```

{% endtab %}

{% tab title="409: Conflict" %}

```json
{
    "statusCode": 409,
    "message": "ConflictError",
    "reason": "La référence de la transaction existe déjà."
}
```

{% endtab %}

{% tab title="401: Unauthorized" %}

```json
{
    "statusCode": 401,
    "message": "UnauthorizedError",
    "reason": "Token d'accès invalide. Veuillez vous reconnecter."
}
```

{% endtab %}

{% tab title="403: Forbidden" %}

```json
{
    "statusCode": 403,
    "message": "ForbiddenError",
    "reason": "Le montant doit être compris entre 100 et 1000000 XOF."
}
```

{% endtab %}

{% tab title="500:  Internal Server Error" %}

```json
{
    "statusCode": 500,
    "message": "InternalServerError",
    "reason": "Une erreur est survenue. Veuillez réessayer"
}
```

{% endtab %}
{% endtabs %}

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

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.digitalpaye.com/v1/collecte/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 =>'{
    "transactionId": "DIGITAL-23018182000",
    "customer": {
        "lastName": "GUEI",
        "firstName": "HELIE",
        "phone": "0777101308",
        "email": "elieguei225@gmail.com",
        "address": {
            "countryCode": "CI",
            "city": "Abidjan",
            "streetAddress": "Plateau Cocody"
        }
    },
    "payer": "0777101308",
    "amount": "100",
    "currency": "XOF",
    "errorUrl": "https://digitalpaye.com",
    "successUrl": "https://digitalpaye.com",
    "operator": "WAVE_MONEY_CI"
}',
  CURLOPT_HTTPHEADER => array(
    'X-Environment: Production',
    'Content-Type: application/json',
    'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb21wYW55SWQiOiI4NDM3ZGQxMy04OWFjLTQ1ZTEtYTdhYS1jOGJhMDk1ZDFiMjciLCJpYXQiOjE3Mjg2MzkxODMsImV4cCI6MTcyODYzOTc4M30.YB1TekRqMCub5soB0GAzWtt76AEPmhfh5-Xw3KFdLW0'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
$client = new Client();
$headers = [
  'X-Environment' => 'Production',
  'Content-Type' => 'application/json',
  'Authorization' => 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb21wYW55SWQiOiI4NDM3ZGQxMy04OWFjLTQ1ZTEtYTdhYS1jOGJhMDk1ZDFiMjciLCJpYXQiOjE3Mjg2MzkxODMsImV4cCI6MTcyODYzOTc4M30.YB1TekRqMCub5soB0GAzWtt76AEPmhfh5-Xw3KFdLW0'
];
$body = '{
  "transactionId": "DIGITAL-23018182000",
  "customer": {
    "lastName": "GUEI",
    "firstName": "HELIE",
    "phone": "0777101308",
    "email": "elieguei225@gmail.com",
    "address": {
      "countryCode": "CI",
      "city": "Abidjan",
      "streetAddress": "Plateau Cocody"
    }
  },
  "payer": "0777101308",
  "amount": "100",
  "currency": "XOF",
  "errorUrl": "https://digitalpaye.com",
  "successUrl": "https://digitalpaye.com",
  "operator": "WAVE_MONEY_CI"
}';
$request = new Request('POST', 'https://api.digitalpaye.com/v1/collecte/mobile-money', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
```

{% endtab %}

{% tab title="Java" %}

```java
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n    \"transactionId\": \"DIGITAL-23018182000\",\n    \"customer\": {\n        \"lastName\": \"GUEI\",\n        \"firstName\": \"HELIE\",\n        \"phone\": \"0777101308\",\n        \"email\": \"elieguei225@gmail.com\",\n        \"address\": {\n            \"countryCode\": \"CI\",\n            \"city\": \"Abidjan\",\n            \"streetAddress\": \"Plateau Cocody\"\n        }\n    },\n    \"payer\": \"0777101308\",\n    \"amount\": \"100\",\n    \"currency\": \"XOF\",\n    \"errorUrl\": \"https://digitalpaye.com\",\n    \"successUrl\": \"https://digitalpaye.com\",\n    \"operator\": \"WAVE_MONEY_CI\"\n}");
Request request = new Request.Builder()
  .url("https://api.digitalpaye.com/v1/collecte/mobile-money")
  .method("POST", body)
  .addHeader("X-Environment", "Production")
  .addHeader("Content-Type", "application/json")
  .addHeader("Authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb21wYW55SWQiOiI4NDM3ZGQxMy04OWFjLTQ1ZTEtYTdhYS1jOGJhMDk1ZDFiMjciLCJpYXQiOjE3Mjg2MzkxODMsImV4cCI6MTcyODYzOTc4M30.YB1TekRqMCub5soB0GAzWtt76AEPmhfh5-Xw3KFdLW0")
  .build();
Response response = client.newCall(request).execute();
```

{% endtab %}

{% tab title="Node JS" %}

```javascript
const axios = require('axios');
let data = JSON.stringify({
  "transactionId": "DIGITAL-23018182000",
  "customer": {
    "lastName": "GUEI",
    "firstName": "HELIE",
    "phone": "0777101308",
    "email": "elieguei225@gmail.com",
    "address": {
      "countryCode": "CI",
      "city": "Abidjan",
      "streetAddress": "Plateau Cocody"
    }
  },
  "payer": "0777101308",
  "amount": "100",
  "currency": "XOF",
  "errorUrl": "https://digitalpaye.com",
  "successUrl": "https://digitalpaye.com",
  "operator": "WAVE_MONEY_CI"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api.digitalpaye.com/v1/collecte/mobile-money',
  headers: { 
    'X-Environment': 'Production', 
    'Content-Type': 'application/json', 
    'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb21wYW55SWQiOiI4NDM3ZGQxMy04OWFjLTQ1ZTEtYTdhYS1jOGJhMDk1ZDFiMjciLCJpYXQiOjE3Mjg2MzkxODMsImV4cCI6MTcyODYzOTc4M30.YB1TekRqMCub5soB0GAzWtt76AEPmhfh5-Xw3KFdLW0'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

{% endtab %}

{% tab title="Dart" %}

```dart
var headers = {
  'X-Environment': 'Production',
  'Content-Type': 'application/json',
  'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb21wYW55SWQiOiI4NDM3ZGQxMy04OWFjLTQ1ZTEtYTdhYS1jOGJhMDk1ZDFiMjciLCJpYXQiOjE3Mjg2MzkxODMsImV4cCI6MTcyODYzOTc4M30.YB1TekRqMCub5soB0GAzWtt76AEPmhfh5-Xw3KFdLW0'
};
var request = http.Request('POST', Uri.parse('https://api.digitalpaye.com/v1/collecte/mobile-money'));
request.body = json.encode({
  "transactionId": "DIGITAL-23018182000",
  "customer": {
    "lastName": "GUEI",
    "firstName": "HELIE",
    "phone": "0777101308",
    "email": "elieguei225@gmail.com",
    "address": {
      "countryCode": "CI",
      "city": "Abidjan",
      "streetAddress": "Plateau Cocody"
    }
  },
  "payer": "0777101308",
  "amount": "100",
  "currency": "XOF",
  "errorUrl": "https://digitalpaye.com",
  "successUrl": "https://digitalpaye.com",
  "operator": "WAVE_MONEY_CI"
});
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]: 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/v1/collecte/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.
