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

ActiveLibrary[API Development](/categories/api)

pawpayments/sdk
===============

PHP SDK for PawPayments API v2

v2.0.0(3w ago)00MITPHPPHP ^7.4 || ^8.0

Since May 18Pushed 1w agoCompare

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

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

PawPayments — PHP SDK
=====================

[](#pawpayments--php-sdk)

Official PHP SDK for the [PawPayments](https://pawpayments.com) Native V2 API. Pure cURL, no framework dependencies. Requires PHP **7.4+** and the `curl` + `json` extensions.

Install
-------

[](#install)

```
composer require pawpayments/sdk
```

Quickstart
----------

[](#quickstart)

```
use PawPayments\Sdk\PawPaymentsClient;

$paw = new PawPaymentsClient(apiKey: $_ENV['PAW_API_KEY']);

$invoice = $paw->createInvoice([
    'amount'       => 25,
    'fiat_currency'=> 'USD',
    'billing_type' => 'STATIC',
    'asset'        => 'usdt_tron',
    'description'  => 'Pro plan, 1 month',
    'notify_url'   => 'https://example.com/paw/webhook',
]);

echo $invoice['payment_url'];
```

Methods
-------

[](#methods)

MethodDescription`listAssets()`List supported assets`getRates(array $params = [])`Current exchange rates (`base`, `assets`)`getBalance()`Merchant balance summary in USD`listLedger(array $params = [])`Unified income/payout/refund feed (paginated)`createInvoice(array $params)`Create a new invoice`getInvoice(string $orderId)`Get invoice by order ID`listInvoices(array $params = [])`List invoices (paginated)`notifyInvoice(string $orderId)`Resend the merchant webhook for an invoice`createPayout(array $params, ?string $uniqId = null)`Create a single payout`createPayoutBatch(array $items, ?string $uniqId = null)`Create up to 200 payouts at once`getPayout(string $payoutId)`Get payout by ID`listPayouts(array $params = [])`List payouts (paginated)`listNotifications(array $params = [])`List webhook delivery attempts (paginated)`testNotification(?string $url = null)`Send a test webhook`createPermanentAddress(array $params)`Get-or-create a permanent deposit address`getPermanentAddress(string $addressId)`Get permanent address by ID`listPermanentAddresses(array $params = [])`List permanent addresses`deactivatePermanentAddress(string $addressId)`Deactivate a permanent address`createPermanentAddress` accepts `user_id` (required) plus either `family` (`evm`, `bitcoin`, `litecoin`, `bitcoincash`, `tron`, `solana`, `xrp`, `ton`) or `asset` (e.g. `usdt_trc20`), and optional `notify_url` / `metadata`.

List methods (`listInvoices`, `listPayouts`, `listLedger`, `listNotifications`) return `['items' => [...], 'pagination' => ['page', 'per_page', 'total', 'pages']]`.

Payouts
-------

[](#payouts)

`createPayout` and `createPayoutBatch` send an `x-uniq-id` header (UUIDv4) for idempotency — one is generated automatically when you don't pass `$uniqId`. The same `uniqId` re-used within 2 hours yields a 409.

Each payout (and each batch item) accepts an optional `fee_bearer` of `merchant`or `client` to choose who covers the network fee — defaults to `merchant`:

```
$payout = $paw->createPayout([
    'address'       => 'T…',
    'amount'        => 50,
    'fiat_currency' => 'USD',
    'asset'         => 'usdt_tron',
    'fee_bearer'    => 'client',
]);

$batch = $paw->createPayoutBatch([
    ['address' => 'T…', 'amount' => 10, 'fiat_currency' => 'USD', 'asset' => 'usdt_tron'],
    ['address' => '0x…', 'amount' => 20, 'fiat_currency' => 'USD', 'asset' => 'usdt_erc20', 'fee_bearer' => 'client'],
]);
```

Webhook verification
--------------------

[](#webhook-verification)

```
use PawPayments\Sdk\Webhook;

$rawBody = file_get_contents('php://input');
$sig     = $_SERVER['HTTP_X_PAW_SIGNATURE'] ?? '';

if (!Webhook::verifyRawBody($rawBody, $sig, $_ENV['PAW_API_KEY'])) {
    http_response_code(401);
    exit;
}

$payload = Webhook::parsePayload($rawBody);
// …handle invoice update
```

`Webhook::verify($rawBody, $sig, $payload, $apiKey)` is also available as a documentation-compatible alias for `verifyRawBody`.

Errors
------

[](#errors)

All API errors (HTTP 4xx/5xx, network, invalid JSON) throw `PawPaymentsApiException`:

```
use PawPayments\Sdk\Exception\PawPaymentsApiException;

try {
    $paw->createInvoice([/* ... */]);
} catch (PawPaymentsApiException $e) {
    echo $e->getErrorCode();   // e.g. "INVALID_PARAMS"
    echo $e->getHttpStatus();  // e.g. 400
    echo $e->getMessage();
}
```

Testing
-------

[](#testing)

```
composer install
vendor/bin/phpunit --colors=always
```

License
-------

[](#license)

MIT

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance97

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

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

23d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/64b3a31a6895475dd917999753b66d623d5dbbca17177d48553072156a817e62?d=identicon)[pawpayments](/maintainers/pawpayments)

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[facebook/php-business-sdk

PHP SDK for Facebook Business

90923.5M35](/packages/facebook-php-business-sdk)[exsyst/swagger

A php library to manipulate Swagger specifications

35916.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[botman/driver-telegram

Telegram driver for BotMan

93452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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