PHPackages                             barkapay-sa/barkapay-php-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. barkapay-sa/barkapay-php-sdk

ActiveLibrary[Payment Processing](/categories/payments)

barkapay-sa/barkapay-php-sdk
============================

A PHP SDK for BarkaPay payment service.

v1.0.0(1y ago)04MITPHPPHP &gt;=7.4CI failing

Since Feb 17Pushed 1y agoCompare

[ Source](https://github.com/BarkaPay/barkapay-sdk-php)[ Packagist](https://packagist.org/packages/barkapay-sa/barkapay-php-sdk)[ RSS](/packages/barkapay-sa-barkapay-php-sdk/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (4)Versions (3)Used By (0)

BarkaPay PHP SDK
================

[](#barkapay-php-sdk)

Le **BarkaPay PHP SDK** permet aux marchands d'intégrer facilement les services de paiement de BarkaPay dans leurs applications, en offrant une large gamme d'options de paiements via l'API principale, ainsi que des options spécifiques pour des cas comme **Orange Money** et **Moov Money**.

Installation
------------

[](#installation)

1. Assurez-vous d'avoir installé Composer. Si ce n’est pas encore fait, suivez les instructions [ici](https://getcomposer.org/).
2. Installez le SDK dans votre projet via Composer :

```
composer require barkapay-sa/barkapay-php-sdk
```

ou

```
composer require barkapay-sa/barkapay-php-sdk:dev-main
```

Configuration
-------------

[](#configuration)

1. Créez un fichier `.env` à la racine de votre projet.
2. Ajoutez vos clés API dans le fichier `.env` :

```
BKP_API_KEY=your_api_key
BKP_API_SECRET=your_api_secret
BKP_SCI_KEY=your_sci_key
BKP_SCI_SECRET=your_sci_secret
```

Utilisation
-----------

[](#utilisation)

### 1. Paiements via APIBarkaPayPaymentService

[](#1-paiements-via-apibarkapaypaymentservice)

Le service `APIBarkaPayPaymentService` est le point d’entrée principal pour la plupart des types de paiements.

#### Exemple de paiement mobile standard :

[](#exemple-de-paiement-mobile-standard-)

```
require 'vendor/autoload.php';
use Services\APIBarkaPayPaymentService;

$paymentService = new APIBarkaPayPaymentService();
$paymentDetails = [
    'sender_phonenumber' => '770000000',
    'amount' => 5000,
    'order_id' => 'ORDER123'
];

$response = $paymentService->createMobilePayment($paymentDetails);
print_r($response);
```

### 2. Paiements via SCIBarkaPayPaymentService

[](#2-paiements-via-scibarkapaypaymentservice)

Le service `SCIBarkaPayPaymentService` est utilisé pour créer des liens de paiement et des intégrations spécifiques aux scénarios de **Service Client Interface**.

#### Exemple de création de lien de paiement :

[](#exemple-de-création-de-lien-de-paiement-)

```
require 'vendor/autoload.php';
use Services\SCIBarkaPayPaymentService;

$sciPaymentService = new SCIBarkaPayPaymentService();
$paymentLinkData = [
    'amount' => 5000,
    'order_id' => 'ORDER123',
    'callback_url' => 'https://example.com/callback'
];

$response = $sciPaymentService->createPaymentLink($paymentLinkData);
print_r($response);
```

### 3. Paiement spécifique : Orange Money

[](#3-paiement-spécifique--orange-money)

Cas d'utilisation spécifique pour les paiements **Orange Money** au Burkina Faso :

```
require 'vendor/autoload.php';
use Services\Specs\OrangeMoneyBFBarkaPayPaymentService;

$orangeMoneyService = new OrangeMoneyBFBarkaPayPaymentService();
$paymentDetails = [
    'sender_phonenumber' => '77921392',
    'amount' => 5000,
    'otp' => '123456',
    'order_id' => 'ORDER123',
];

$response = $orangeMoneyService->proceedPayment($paymentDetails);
print_r($response);
```

### 4. Paiement spécifique : Moov Money

[](#4-paiement-spécifique--moov-money)

Pour initier un paiement via **Moov Money** au Burkina Faso :

```
require 'vendor/autoload.php';
use Services\Specs\MoovMoneyBFBarkaPayPaymentService;

$moovMoneyService = new MoovMoneyBFBarkaPayPaymentService();
$paymentDetails = [
    'sender_phonenumber' => '62002208',
    'amount' => 100,
    'order_id' => 'ORDER123',
    'callback_url' => 'https://example.com/callback'
];

$response = $moovMoneyService->initMobilePayment($paymentDetails);
print_r($response);
```

### 5. Vérification du paiement

[](#5-vérification-du-paiement)

Vérifiez l’état d’un paiement avec son ID public :

```
$publicId = 'public_id_recu';
$verifyResponse = $moovMoneyService->verifyMobilePayment($publicId);
print_r($verifyResponse);
```

Fonctions disponibles
---------------------

[](#fonctions-disponibles)

- `createMobilePayment()` : Créer un paiement mobile standard via `APIBarkaPayPaymentService`.
- `createMobileTransfer()` : Créer un transfert mobile via `APIBarkaPayPaymentService`.
- `createPaymentLink()` : Créer un lien de paiement via `SCIBarkaPayPaymentService`.
- `proceedPayment()` : Effectuer un paiement **Orange Money**.
- `initMobilePayment()` : Initialiser un paiement **Moov Money**.
- `verifyMobilePayment()` : Vérifier l’état d’un paiement.
- `getPaymentDetails()` : Récupérer les détails d’un paiement spécifique.
- `getTransferDetails()` : Récupérer les détails d’un transfert spécifique.
- `verifyCredentials()` : Vérifie les informations d'authentification de l'API via `BaseBarkaPayPaymentService`.
- `getAvailableServices()` : Récupère les services disponibles via BarkaPay via `BaseBarkaPayPaymentService`.
- `getUserInfos()` : Récupère les informations de l'utilisateur via `BaseBarkaPayPaymentService`.
- `getAccountsBalances()` : Récupère les soldes des comptes associés via BarkaPay via `BaseBarkaPayPaymentService`.
- `getOperatorsInfos()` : Récupère les informations sur les opérateurs via `BaseBarkaPayPaymentService`.

Débogage
--------

[](#débogage)

Si les variables d'environnement ne sont pas chargées correctement, assurez-vous que le fichier `.env` est bien positionné et que la configuration est correcte :

```
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__);
$dotenv->load();
```

Assistance
----------

[](#assistance)

Pour toute question ou problème, veuillez contacter le support technique via :

- 📧
- 🌐

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance40

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 90% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

502d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/111927004?v=4)[ULTRA](/maintainers/Tobibf)[@Tobibf](https://github.com/Tobibf)

---

Top Contributors

[![Tobibf](https://avatars.githubusercontent.com/u/111927004?v=4)](https://github.com/Tobibf "Tobibf (9 commits)")[![Youmanly](https://avatars.githubusercontent.com/u/82038528?v=4)](https://github.com/Youmanly "Youmanly (1 commits)")

### Embed Badge

![Health badge](/badges/barkapay-sa-barkapay-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/barkapay-sa-barkapay-php-sdk/health.svg)](https://phpackages.com/packages/barkapay-sa-barkapay-php-sdk)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)[imdhemy/google-play-billing

Google Play Billing

491.5M5](/packages/imdhemy-google-play-billing)[lion/bundle

Lion-framework configuration and initialization package

122.3k4](/packages/lion-bundle)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1348.7k1](/packages/jasara-php-amzn-selling-partner-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
