PHPackages                             peyemapi/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. peyemapi/sdk

ActiveLibrary[Payment Processing](/categories/payments)

peyemapi/sdk
============

PHP SDK for PeyemAPI - Haitian payment gateway

00PHP

Since Mar 30Pushed 3mo agoCompare

[ Source](https://github.com/clarensromeus/peyemapi-php-sdk)[ Packagist](https://packagist.org/packages/peyemapi/sdk)[ RSS](/packages/peyemapi-sdk/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

PeyemAPI PHP SDK
================

[](#peyemapi-php-sdk)

A modern, PSR-4 compliant PHP SDK for integrating [PeyemAPI](https://peyem.app) payments.

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

[](#installation)

Install via Composer:

```
composer require peyemapi/sdk
```

*(Note: Ensure you have Guzzle installed or a compatible PSR-18 client.)*

Usage
-----

[](#usage)

### Initialize the Client

[](#initialize-the-client)

```
use Peyem\Sdk\Client;

$client = new Client('your_secret_key');

// Optional: Override API URL (can also be set via PEYEM_API_URL env var)
// $client = new Client('your_secret_key', 'https://custom-api.com');
```

### Create a Payment

[](#create-a-payment)

```
try {
    $response = $client->createPayment([
        'amount'      => 500, // HTG
        'referenceId' => 'ORDER-123',
        'returnUrl'   => 'https://example.com/return',
        'description' => 'Optional description'
    ]);

    if (!empty($response['payment_url'])) {
        header('Location: ' . $response['payment_url']);
        exit;
    }
} catch (\Peyem\Sdk\Exceptions\PeyemException $e) {
    echo "Error: " . $e->getMessage();
}
```

### Check Payment Status

[](#check-payment-status)

```
$status = $client->checkStatus('ORDER-123');
echo "Status: " . $status['status'];
```

### Get Account Balance

[](#get-account-balance)

```
$balance = $client->getBalance();
echo "Balance: " . $balance['balance'] . " " . $balance['currency'];
```

### Webhook Verification

[](#webhook-verification)

Verify incoming webhooks from PeyemAPI:

```
$payload = file_get_contents('php://input');
$signature = $_SERVER['HTTP_X_WEBHOOK_SIGNATURE'] ?? '';
$webhookSecret = 'whsec_...';

if (\Peyem\Sdk\Client::verifyWebhookSignature($payload, $signature, $webhookSecret)) {
    // Valid webhook
}
```

Running Tests
-------------

[](#running-tests)

To run the test suite:

```
composer install
vendor/bin/phpunit
```

License
-------

[](#license)

MIT

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance55

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/1923784501581df8b55ecc883796670b68fa72fd06b0954eb078f53dfb13e950?d=identicon)[romeusclarens](/maintainers/romeusclarens)

---

Top Contributors

[![clarensromeus](https://avatars.githubusercontent.com/u/108362048?v=4)](https://github.com/clarensromeus "clarensromeus (1 commits)")

### Embed Badge

![Health badge](/badges/peyemapi-sdk/health.svg)

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

###  Alternatives

[omnipay/coinbase

Coinbase driver for the Omnipay payment processing library

18570.2k1](/packages/omnipay-coinbase)

PHPackages © 2026

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