Digitalpaye API
Digitalpaye API
  • Welcome 🥳
  • Introduction
  • API Références
    • v1
      • Créer un Token
      • Balance
      • Customers
        • Créer un client
        • Fetch data customer
        • Fetch all customers
      • Collecte
        • MTN Mobile Money
        • Moov Mobile Money
        • Orange Mobile Money
        • Wave Money
      • Disbursment (Transfert)
        • MTN Mobile Money
        • Moov Mobile Money
        • Orange Mobile Money
        • Wave Money
      • Get status transaction
      • Get all transactions
  • Change log
    • v1
  • SDK ET PLUGINS
    • SDK PHP
    • Flutter
  • Webhook
Propulsé par GitBook
Sur cette page

Cet article vous a-t-il été utile ?

  1. API Références
  2. v2
  3. Collecte

Orange Money

Collecter de l'argent via Orange Money

POST https://api.digitalpaye.com/v2/collecte/mobile-money

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <AccessToken>

X-Environment

Production

Request Body

Name
Type
Description

code_country*

String

Code du pays Code pays disponible:

operator*

String

ORANGE_MONEY_CI

currency*

String

Devise de la transaction. Devise disponible :

customer_id*

int

Numéro à débiter. Longueur : 10

{
    "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
    }
}
{
    "code_status": 409,
    "status": "ERROR",
    "message": "TRANSACTION_DUPLICATED"
}
{
    "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
    }
}
<?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;
<?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();
}
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();
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);
});
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);
}

Dernière mise à jour il y a 10 mois

Cet article vous a-t-il été utile ?