# Orange Mobile Money

<mark style="color:orange;">`POST`</mark> `https://api.digitalpaye.com/v1/transfer/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>recipient<mark style="color:red;">*</mark></td><td>String</td><td>Numéro de téléphone à créditer</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>ORANGE_MONEY_CI</strong></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": "XXV6H21R1N",
        "transactionId": "db5e8e4a-61a4-4f43-8514-b183b0a13ed5",
        "currency": "XOF",
        "amount": "100",
        "fees": "1.5",
        "amountReceive": "100",
        "amountTotal": "101.5",
        "phone": "0777101308",
        "status": "PENDING",
        "typeTransaction": "transfer",
        "operator": "ORANGE_MONEY_CI",
        "createdAt": "2025-03-28T07:38:11.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"
        }
    }
}
```

{% endtab %}

{% tab title="200: Payment Successful" %}

```json
{
    "statusCode": 200,
    "message": "Successful",
    "data": {
        "ref": "XXV6H21R1N",
        "transactionId": "db5e8e4a-61a4-4f43-8514-b183b0a13ed5",
        "currency": "XOF",
        "amount": "100",
        "fees": "1.5",
        "amountReceive": "100",
        "amountTotal": "101.5",
        "phone": "0777101308",
        "status": "SUCCESSFUL",
        "typeTransaction": "transfer",
        "operator": "ORANGE_MONEY_CI",
        "createdAt": "2025-03-28T07:38:11.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"
        }
    }
}
```

{% 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/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 =>'{
    "transactionId": "2214c041-5832-4821-b7b0-40c7bbdd30dd",
    "customer": {
        "lastName": "GUEI",
        "firstName": "HELIE",
        "phone": "0777101308",
        "address": {
            "countryCode": "CI",
            "city": "Abidjan",
            "streetAddress": "Yopougon, Carrefour Canal"
        }
    },
    "recipient": "0777101308",
    "amount": "100",
    "currency": "XOF",
    "operator": "ORANGE_MONEY_CI" 
}',
  CURLOPT_HTTPHEADER => array(
    'X-Environment: Production',
    'Content-Type: application/json',
    'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb21wYW55SWQiOiI4NDM3ZGQxMy04OWFjLTQ1ZTEtYTdhYS1jOGJhMDk1ZDFiMjciLCJpYXQiOjE3NDMxNDU4NjksImV4cCI6MTc0MzE0NjQ2OX0.jC9DCjwONFbjiGkSstuJPx0RMQuwISx20qj9MEE8gNA'
  ),
));

$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.eyJjb21wYW55SWQiOiI4NDM3ZGQxMy04OWFjLTQ1ZTEtYTdhYS1jOGJhMDk1ZDFiMjciLCJpYXQiOjE3NDMxNDU4NjksImV4cCI6MTc0MzE0NjQ2OX0.jC9DCjwONFbjiGkSstuJPx0RMQuwISx20qj9MEE8gNA'
];
$body = '{
  "transactionId": "2a11856f-44c8-472e-b7ad-a51d24249852",
  "customer": {
    "lastName": "GUEI",
    "firstName": "HELIE",
    "phone": "0777101308",
    "address": {
      "countryCode": "CI",
      "city": "Abidjan",
      "streetAddress": "Yopougon, Carrefour Canal"
    }
  },
  "recipient": "0777101308",
  "amount": "100",
  "currency": "XOF",
  "operator": "ORANGE_MONEY_CI"
}';
$request = new Request('POST', 'https://api.digitalpaye.com/v1/transfers/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\": \"96786728-26e4-436d-a2b6-46d77a002ced\",\n    \"customer\": {\n        \"lastName\": \"GUEI\",\n        \"firstName\": \"HELIE\",\n        \"phone\": \"0777101308\",\n        \"address\": {\n            \"countryCode\": \"CI\",\n            \"city\": \"Abidjan\",\n            \"streetAddress\": \"Yopougon, Carrefour Canal\"\n        }\n    },\n    \"recipient\": \"0777101308\",\n    \"amount\": \"100\",\n    \"currency\": \"XOF\",\n    \"operator\": \"ORANGE_MONEY_CI\" \n}");
Request request = new Request.Builder()
  .url("https://api.digitalpaye.com/v1/transfers/mobile-money")
  .method("POST", body)
  .addHeader("X-Environment", "Production")
  .addHeader("Content-Type", "application/json")
  .addHeader("Authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb21wYW55SWQiOiI4NDM3ZGQxMy04OWFjLTQ1ZTEtYTdhYS1jOGJhMDk1ZDFiMjciLCJpYXQiOjE3NDMxNDU4NjksImV4cCI6MTc0MzE0NjQ2OX0.jC9DCjwONFbjiGkSstuJPx0RMQuwISx20qj9MEE8gNA")
  .build();
Response response = client.newCall(request).execute();
```

{% endtab %}

{% tab title="Node JS" %}

```javascript
const axios = require('axios');
let data = JSON.stringify({
  "transactionId": "43739510-5bc0-44a9-a511-74a53ca63d62",
  "customer": {
    "lastName": "GUEI",
    "firstName": "HELIE",
    "phone": "0777101308",
    "address": {
      "countryCode": "CI",
      "city": "Abidjan",
      "streetAddress": "Yopougon, Carrefour Canal"
    }
  },
  "recipient": "0777101308",
  "amount": "100",
  "currency": "XOF",
  "operator": "ORANGE_MONEY_CI"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api.digitalpaye.com/v1/transfers/mobile-money',
  headers: { 
    'X-Environment': 'Production', 
    'Content-Type': 'application/json', 
    'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb21wYW55SWQiOiI4NDM3ZGQxMy04OWFjLTQ1ZTEtYTdhYS1jOGJhMDk1ZDFiMjciLCJpYXQiOjE3NDMxNDU4NjksImV4cCI6MTc0MzE0NjQ2OX0.jC9DCjwONFbjiGkSstuJPx0RMQuwISx20qj9MEE8gNA'
  },
  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.eyJjb21wYW55SWQiOiI4NDM3ZGQxMy04OWFjLTQ1ZTEtYTdhYS1jOGJhMDk1ZDFiMjciLCJpYXQiOjE3NDMxNDU4NjksImV4cCI6MTc0MzE0NjQ2OX0.jC9DCjwONFbjiGkSstuJPx0RMQuwISx20qj9MEE8gNA'
};
var request = http.Request('POST', Uri.parse('https://api.digitalpaye.com/v1/transfers/mobile-money'));
request.body = json.encode({
  "transactionId": "e39f634c-45be-4887-93be-157672e9772b",
  "customer": {
    "lastName": "GUEI",
    "firstName": "HELIE",
    "phone": "0777101308",
    "address": {
      "countryCode": "CI",
      "city": "Abidjan",
      "streetAddress": "Yopougon, Carrefour Canal"
    }
  },
  "recipient": "0777101308",
  "amount": "100",
  "currency": "XOF",
  "operator": "ORANGE_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
