# Orange Money

<mark style="color:orange;">`POST`</mark> `https://api.digitalpaye.com/v2/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><code>code_country</code><mark style="color:red;">*</mark></td><td>String</td><td>Code du pays<br>Code pays disponible: <a data-footnote-ref href="#user-content-fn-1"><strong>CI</strong></a></td></tr><tr><td><code>operator</code><mark style="color:red;">*</mark></td><td>String</td><td><strong>ORANGE_MONEY_CI</strong></td></tr><tr><td><code>currency</code><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-2"><strong>XOF</strong></a></td></tr><tr><td><code>customer_id</code><mark style="color:red;">*</mark></td><td>int</td><td>Numéro à débiter.<br>Longueur : 10</td></tr></tbody></table>

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

```json
{
    "code_status": 202,
    "status": "PENDING",
    "message": "PAYMENT_IS_PENDING",
    "data": {
        "linkpayment_id": null,
        "ref": "RCI-DIGITALP-7829",
        "operator_id": "cos-1nr8cr2b02282",
        "transaction_id": "TICK-9210009010219",
        "cardId": null,
        "number_user": "2250777101308",
        "name_user": "GUEI HELIE",
        "email_user": null,
        "country_user": "CI",
        "currency": "XOF",
        "amount": "310",
        "fees": "6.2",
        "amount_receive": "303.8",
        "amount_total": "310",
        "status": "PENDING",
        "type_transaction": "collecte",
        "type_payment": "ORANGE_MONEY_CI",
        "date": "2024-04-26 08:01:58",
        "date_update": null
    }
}
```

{% endtab %}

{% tab title="409" %}

```json
{
    "code_status": 409,
    "status": "ERROR",
    "message": "TRANSACTION_DUPLICATED"
}
```

{% endtab %}

{% tab title="200" %}

```json
{
    "code_status": 200,
    "status": "SUCCESSFULL",
    "message": "PAYMENT_IS_SUCCESSFULL",
    "data": {
        "linkpayment_id": null,
        "ref": "RCI-DIGITALP-7829",
        "operator_id": "cos-1nr8cr2b02282",
        "transaction_id": "TICK-9210009010219",
        "cardId": null,
        "number_user": "2250777101308",
        "name_user": "GUEI HELIE",
        "email_user": null,
        "country_user": "CI",
        "currency": "XOF",
        "amount": "310",
        "fees": "6.2",
        "amount_receive": "303.8",
        "amount_total": "310",
        "status": "SUCCESSFULL",
        "type_transaction": "collecte",
        "type_payment": "ORANGE_MONEY_CI",
        "date": "2024-04-26 08:01:58",
        "date_update": null
    }
}
```

{% endtab %}
{% endtabs %}

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

```url
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.digitalpaye.com/v2/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": "PAY-02190940",
    "codeCountry": "CI",
    "operator": "ORANGE_MONEY_CI",
    "customer": {
        "phone": "0777101308",
        "name": "GUEI HELIE",
        "email": "elieguei225@gmail.com"
    },
    "amount": 100,
    "currency": "XOF"
}',
  CURLOPT_HTTPHEADER => array(
    'X-Environment: Production',
    'Content-Type: application/json',
    'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjb21wYW55X2lkIjoiMSIsImlhdCI6MTcxOTQ5NjAxNSwiZXhwIjoxNzE5NDk2NjE1fQ.mj1Tv-CM33n6BIEn1LodxHSCQwsU6w8H4mN0z0uUHvk'
  ),
));

$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/v2/collecte/mobile-money');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'X-Environment' => 'Production',
  'Content-Type' => 'application/json',
  'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjb21wYW55X2lkIjoiMSIsImlhdCI6MTcxOTQ5NjAxNSwiZXhwIjoxNzE5NDk2NjE1fQ.mj1Tv-CM33n6BIEn1LodxHSCQwsU6w8H4mN0z0uUHvk'
));
$request->setBody('{\n    "transactionId": "PAY-02190940",\n    "codeCountry": "CI",\n    "operator": "ORANGE_MONEY_CI",\n    "customer": {\n        "phone": "0777101308",\n        "name": "GUEI HELIE",\n        "email": "elieguei225@gmail.com"\n    },\n    "amount": 100,\n    "currency": "XOF"\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    \"transactionId\": \"PAY-02190940\",\n    \"codeCountry\": \"CI\",\n    \"operator\": \"ORANGE_MONEY_CI\",\n    \"customer\": {\n        \"phone\": \"0777101308\",\n        \"name\": \"GUEI HELIE\",\n        \"email\": \"elieguei225@gmail.com\"\n    },\n    \"amount\": 100,\n    \"currency\": \"XOF\"\n}");
Request request = new Request.Builder()
  .url("https://api.digitalpaye.com/v2/collecte/mobile-money")
  .method("POST", body)
  .addHeader("X-Environment", "Production")
  .addHeader("Content-Type", "application/json")
  .addHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjb21wYW55X2lkIjoiMSIsImlhdCI6MTcxOTQ5NjAxNSwiZXhwIjoxNzE5NDk2NjE1fQ.mj1Tv-CM33n6BIEn1LodxHSCQwsU6w8H4mN0z0uUHvk")
  .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/v2/collecte/mobile-money',
  'headers': {
    'X-Environment': 'Production',
    'Content-Type': 'application/json',
    'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjb21wYW55X2lkIjoiMSIsImlhdCI6MTcxOTQ5NjAxNSwiZXhwIjoxNzE5NDk2NjE1fQ.mj1Tv-CM33n6BIEn1LodxHSCQwsU6w8H4mN0z0uUHvk'
  },
  body: JSON.stringify({
    "transactionId": "PAY-02190940",
    "codeCountry": "CI",
    "operator": "ORANGE_MONEY_CI",
    "customer": {
      "phone": "0777101308",
      "name": "GUEI HELIE",
      "email": "elieguei225@gmail.com"
    },
    "amount": 100,
    "currency": "XOF"
  })

};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
```

{% endtab %}

{% tab title="Dart" %}

```dart
var headers = {
  'X-Environment': 'Production',
  'Content-Type': 'application/json',
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjb21wYW55X2lkIjoiMSIsImlhdCI6MTcxOTQ5NjAxNSwiZXhwIjoxNzE5NDk2NjE1fQ.mj1Tv-CM33n6BIEn1LodxHSCQwsU6w8H4mN0z0uUHvk'
};
var request = http.Request('POST', Uri.parse('https://api.digitalpaye.com/v2/collecte/mobile-money'));
request.body = json.encode({
  "transactionId": "PAY-02190940",
  "codeCountry": "CI",
  "operator": "MTN_MONEY_CI",
  "customer": {
    "phone": "0777101308",
    "name": "GUEI HELIE",
    "email": "elieguei225@gmail.com"
  },
  "amount": 100,
  "currency": "XOF"
});
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/collecte/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.
