PHPackages                             xente/xentepayment-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. [API Development](/categories/api)
4. /
5. xente/xentepayment-php-sdk

ActiveLibrary[API Development](/categories/api)

xente/xentepayment-php-sdk
==========================

Official Xente Payment API wrapper for PHP

1.2(6y ago)06[2 PRs](https://github.com/jpetero/XentePaymentPHPSDK/pulls)MITPHP

Since Jan 10Pushed 3y ago1 watchersCompare

[ Source](https://github.com/jpetero/XentePaymentPHPSDK)[ Packagist](https://packagist.org/packages/xente/xentepayment-php-sdk)[ RSS](/packages/xente-xentepayment-php-sdk/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (1)Versions (6)Used By (0)

Xente Payment SDK for PHP
=========================

[](#xente-payment-sdk-for-php)

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

[](#installation)

You can install via Composer, run the following command:

```
composer require xente/xentepayment-php-sdk

```

Usage
-----

[](#usage)

To write an application using the SDK

- Register for a developer account and get your apikey at [Xente Developer Portal](http://sandbox.developers.xente.co/).
- After installing, you need to require Composer's autoloader

    ```
    require_once('vendor/autoload.php');

    ```
- Bring in XentePayment class from the XentePaymentSDK namespace

    ```
    use XentePaymentSDK\XentePayment;

    ```
- Create authentication credential, with parameters (apikey, password and mode).
- Create the authentication credential parameters

```
  $apikey = '6A19EA2A706041A599375CC95FF08809';
  $password = 'Demo123456';
  $mode = 'sandbox'; // 'production'

```

- Initialized XentePayment class with authentication credential above

```
  $xentePaymentGateway = new XentePayment($apikey, $password, $mode);

```

- Create transaction request associative array, metadata is optional parameter, customerReference is the phone number which transaction is initiated on

```
  $transactionRequest = [
                          'paymentProvider' => 'MTNMOBILEMONEYUG',
                          'amount' => '50000',
                          'message' => 'Web Development Ebook',
                          'customerId' => 'string',
                          'customerPhone' => '256757476805',
                          'customerEmail' => 'customer1@gmail.com',
                          'customerReference' => '256782872845',
                          'batchId' => 'batch001',
                          'requestId' => md5(time()),
                          'metadata' => 'Extra information about the transaction'
                        ];

```

- Create a transaction with the above transaction request

```
 $transactionProcessingResponse = $xentePaymentGateway
                                  ->transactions
                                  ->createTransaction($transactionRequest);

 print_r($transactionProcessingResponse);

```

- Get Transaction Details with a specific Transaction ID

```
$transactionId = '9F38AB020C394EA5BC642C25A5CB16BF-256784378515';

$transactionDetailsResponse = $xentePaymentGateway
                             ->transactions
                             ->getTransactionDetailsById($transactionId);
print_r($transactionDetailsResponse);

```

- Get Transaction Details using request ID

```
$transactionDetailsResponse2 = $xentePaymentGateway
                                ->transactions
                                ->getTransactionDetailsByRequestId("4a651febdb515cd6ba02b00ab3c6dd61");
print_r($transactionDetailsResponse2);

```

- Get Account Details by the Account ID

```
  $accountId = '256784378515';
  $accountDetailsResponse = xentePaymentGateway
                            ->accounts
                            ->getAcountDetailsById($accountId);

  print_r($accountDetailsResponse);

```

- List all Payment providers

```
$paymentProvidersResponse = $xentePaymentGateway
                            ->paymentProviders
                            ->getAllPaymentProviders();
print_r($paymentProvidersResponse);

```

Contributions
-------------

[](#contributions)

- If you would like to contribute, please fork the repo and send in a pull request.

### Refactory Team Xentes

[](#refactory-team-xentes)

> 1. Olive Nakiyemba
> 2. Kintu Declan Trevor
> 3. Oketayot Julius Peter

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity60

Established project with proven stability

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

Every ~0 days

Total

3

Last Release

2312d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a9e222d4b2b2d2cf3e6221a30cca07dcba62e4973c8b47ee00730c6f30ad0f71?d=identicon)[juliuspetero](/maintainers/juliuspetero)

---

Tags

apipaymenttransactionxente

### Embed Badge

![Health badge](/badges/xente-xentepayment-php-sdk/health.svg)

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

###  Alternatives

[checkout/checkout-sdk-php

Checkout.com SDK for PHP

553.3M7](/packages/checkout-checkout-sdk-php)[blocktrail/blocktrail-sdk

The BlockTrail PHP SDK, for integration of Bitcoin functionality through the BlockTrail API

4921.1k3](/packages/blocktrail-blocktrail-sdk)

PHPackages © 2026

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