PHPackages                             inxy-payments/merchant-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. inxy-payments/merchant-sdk

ActiveLibrary[Payment Processing](/categories/payments)

inxy-payments/merchant-sdk
==========================

SDK for INXY Payments merchant api

v3.3.3(2mo ago)498.9k↓56.7%2[1 PRs](https://github.com/inxy-payments/merchant-sdk/pulls)MITPHPPHP ^7.4 || ^8.0CI passing

Since Sep 13Pushed 2mo ago3 watchersCompare

[ Source](https://github.com/inxy-payments/merchant-sdk)[ Packagist](https://packagist.org/packages/inxy-payments/merchant-sdk)[ RSS](/packages/inxy-payments-merchant-sdk/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (4)Dependencies (4)Versions (61)Used By (0)

Getting Started
===============

[](#getting-started)

Setup/Install
-------------

[](#setupinstall)

Install through Composer.

```
composer require inxy-payments/merchant-sdk

```

Example redirect to pay page
----------------------------

[](#example-redirect-to-pay-page)

```
$apiKey      = 'Your api key here';
$config      = new Config(Environment::Sandbox, $apiKey, ApiVersion::v1);
$merchantSDK = new MerchantSDK($config);

$orderAmountInUSD      = 20;
$orderName             = 'Order #1';
$customer              = new Customer('example@mail.com', 'John', 'Doe');
$sessionRequest        = new MultiCurrencySessionRequest($orderAmountInUSD, $orderName, FiatCurrencyCode::USD);
$defaultCryptocurrency = new Cryptocurrency(CurrencyCode::USDT, Blockchain::Ethereum, CoinType::ERC20);
$cryptocurrencies      = [];

$cryptocurrencies[] = $defaultCryptocurrency;
$cryptocurrencies[] = new Cryptocurrency(CurrencyCode::USDT, Blockchain::BinanceSmartChain, CoinType::BEP20);
$cryptocurrencies[] = new Cryptocurrency(CurrencyCode::BTC, Blockchain::Bitcoin, CoinType::Native);
$cryptocurrencies[] = new Cryptocurrency(CurrencyCode::ETH, Blockchain::Ethereum, CoinType::Native);
$cryptocurrencies[] = new Cryptocurrency(CurrencyCode::DOGE, Blockchain::Dogecoin, CoinType::Native);
$cryptocurrencies[] = new Cryptocurrency(CurrencyCode::USDC, Blockchain::Ethereum, CoinType::ERC20);

$sessionRequest->setCryptocurrencies($cryptocurrencies);
$sessionRequest->setDefaultCryptocurrency($defaultCryptocurrency);
$sessionRequest->setOrderId('order_123');
$sessionRequest->setPostbackUrl('https://example.com/postback');
$sessionRequest->setCancelUrl('https://example.com/cancel');
$sessionRequest->setSuccessUrl('https://example.com/success');
$sessionRequest->setCustomer($customer);

$sessionResponse = $merchantSDK->createMultiCurrencySession($sessionRequest);

header('Location: ' . $sessionResponse->getRedirectUri());
```

Example handle webhook
----------------------

[](#example-handle-webhook)

```
function handleWebhooks($request) {
    $secretKey  = 'Your secret key here';
    $validator  = new Validator($secretKey);
    $signedHash = $request->headers['X-INXY-Payments-Signature'];

    $payload = $request->getBody()->getContents(); // fetch json from your request

    if (!$validator->isValid($payload, $signedHash)) {
        throw new BadRequestException('No valid webhook');
    }

    $data = json_decode($payload, false);

    switch ($data->name) {
        case EventName::PaymentsInit:
            handlePaymentsInitWebhook($data);
            break;
        case EventName::PaymentsWaitingConfirmations:
            handlePaymentsWaitingConfirmationsWebhook($data);
            break;
        case EventName::PaymentsReceived:
            handlePaymentsReceivedWebhook($data);
            break;
        default:
            throw new InvalidArgumentException('Undefined webhook name');
    }
}

function handlePaymentsInitWebhook(stdClass $webhookData) {
    $webhook = PaymentsInitWebhookFactory::create($webhookData);

    if ($webhook->data->paymentIntent->status === PaymentIntentStatus::WaitingPayment) {
        /** Waiting first payment */
    }

    if ($webhook->data->paymentIntent->status === PaymentIntentStatus::WaitingPaymentPart) {
        /** Waiting part payment after partially paid */
    }

    /** Your code here */
}

function handlePaymentsWaitingConfirmationsWebhook(stdClass $webhookData) {
    $webhook = PaymentsWaitingConfirmationsWebhookFactory::create($webhookData);

    /** Your code here */
}

function handlePaymentsReceivedWebhook(stdClass $webhookData) {
    $webhook = PaymentsReceivedWebhookFactory::create($webhookData);

    if ($webhook->data->paymentIntent->status === PaymentIntentStatus::Paid) {
        /** Success payment code */
    }

    if ($webhook->data->paymentIntent->status === PaymentIntentStatus::PartiallyPaid) {
        /** Partially paid actions */
    }

    /** Your code here */
}
```

###  Health Score

54

—

FairBetter than 96% of packages

Maintenance83

Actively maintained with recent releases

Popularity37

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 84.5% 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 ~22 days

Recently: every ~0 days

Total

60

Last Release

88d ago

Major Versions

v2.3.1 → v3.3.12025-03-27

v1.3.2 → v2.3.22025-05-06

v2.3.2 → v3.3.22025-05-06

v1.3.3 → v2.x-dev2026-04-07

v2.3.3 → v3.3.32026-04-07

PHP version history (3 changes)v1.0.0PHP ^5.6

v2.0.1PHP ^7.0

v3.0.0PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/35b7365f7abd9d7ca48eba8295e08dec1b6316ae54cf300f5cc62091a566b42a?d=identicon)[inxy-payments](/maintainers/inxy-payments)

---

Top Contributors

[![apvalkov](https://avatars.githubusercontent.com/u/102719109?v=4)](https://github.com/apvalkov "apvalkov (131 commits)")[![AlexeyHrynko](https://avatars.githubusercontent.com/u/139231069?v=4)](https://github.com/AlexeyHrynko "AlexeyHrynko (23 commits)")[![inxy-payments](https://avatars.githubusercontent.com/u/113416743?v=4)](https://github.com/inxy-payments "inxy-payments (1 commits)")

---

Tags

cryptocrypto-payment-apicrypto-payment-gatewaycryptocurrencypaygatepayment-gatewaypayment-integration

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/inxy-payments-merchant-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/inxy-payments-merchant-sdk/health.svg)](https://phpackages.com/packages/inxy-payments-merchant-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.3M45](/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)
