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

ActiveLibrary

payhook/sdk
===========

Payhook PHP SDK library

v1.0.9(3y ago)087MITPHP

Since May 22Pushed 3y agoCompare

[ Source](https://github.com/payhook-org/sdk-php)[ Packagist](https://packagist.org/packages/payhook/sdk)[ RSS](/packages/payhook-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (2)Versions (11)Used By (0)

Payhook SDK PHP
===============

[](#payhook-sdk-php)

Payhook Software Development Kit for PHP.

[API Documentation](https://docs.payhook.org)

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

[](#installation)

Requirements:

- PHP 7.4 or higher

```
composer require payhook/sdk
```

Usage
-----

[](#usage)

```
use Payhook\Sdk\Payhook;

$payhook = new Payhook('your_api_key');

$payhook->createPayment([
    'title' => 'Test payment',
    'currency' => 'USD',
    'amount' => Payhook::moneyToNanos('12.34'),
]);
```

### Available Methods

[](#available-methods)

#### `createPayment(array $params): array`

[](#createpaymentarray-params-array)

Create a new payment.

#### `getPayment(int $id): array`

[](#getpaymentint-id-array)

Get payment by id.

#### `deletePayment(int $id): void`

[](#deletepaymentint-id-void)

Delete payment by id.

#### `isWebhookValid(string $id, string $event, string $signature): bool`

[](#iswebhookvalidstring-id-string-event-string-signature-bool)

Check whether webhook is not corrupted.

#### `generateSignature(string $id, string $event): string`

[](#generatesignaturestring-id-string-event-string)

Generate webhook signature.

### Additional functions

[](#additional-functions)

#### `Payhook::moneyToNanos(string $money): string`

[](#payhookmoneytonanosstring-money-string)

Convert money to nanos.

#### `Payhook::nanosToMoney(string $nanos): string`

[](#payhooknanostomoneystring-nanos-string)

Convert nanos to money.

Licence
-------

[](#licence)

Copyright 2022 Payhook

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~1 days

Total

10

Last Release

1449d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4d3f4af288b1ce188d4ffb9f89e415f47f84bf4ada50074447cf804245ef3c19?d=identicon)[expexes](/maintainers/expexes)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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