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. [Payment Processing](/categories/payments)
4. /
5. payhook/sdk

ActiveLibrary[Payment Processing](/categories/payments)

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

Payhook PHP SDK library

v1.0.9(4y ago)088MITPHP

Since May 22Pushed 4y agoCompare

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

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 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity55

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

1495d 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

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[chargebee/chargebee-php

ChargeBee API client implementation for PHP

758.5M9](/packages/chargebee-chargebee-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[imdhemy/google-play-billing

Google Play Billing

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

PHPackages © 2026

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