PHPackages                             makstech/montonio-php-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. makstech/montonio-php-sdk

ActiveLibrary[Payment Processing](/categories/payments)

makstech/montonio-php-sdk
=========================

Montonio PHP Library

v1.3.0(1y ago)29.9k↓44.4%MITPHPPHP ^8.0

Since Apr 2Pushed 1y ago1 watchersCompare

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

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

PHP library for Montonio API
============================

[](#php-library-for-montonio-api)

[![Latest Version](https://camo.githubusercontent.com/0715bb1168319c55cca4dfb5e2d2a3e027a505eec58248d9cc55451fc1ac2213/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6d616b73746563682f6d6f6e746f6e696f2d7068702d73646b2e7376673f7374796c653d666c61742d737175617265)](https://github.com/makstech/montonio-php-sdk/releases)[![Total Downloads](https://camo.githubusercontent.com/8f01621158a42e05491369c0feafe6e488127e0cdd675b7dc0b86d8e0f75d25a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d616b73746563682f6d6f6e746f6e696f2d7068702d73646b3f7374796c653d666c61742d737175617265266c6162656c3d646f776e6c6f616473)](https://packagist.org/packages/makstech/montonio-php-sdk)[![Codecov](https://camo.githubusercontent.com/51326550699f5d112aaa47d756f7f93125615bc58d7e02c6edfdbced751308b3/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f6d616b73746563682f6d6f6e746f6e696f2d7068702d73646b3f7374796c653d666c61742d737175617265)](https://app.codecov.io/gh/makstech/montonio-php-sdk)

PHP SDK for Montonio Payments based on .

- Allows to fluently create requests with structures.
- Or a raw data can be passed to the structure object, to have it create all the child structures.
- Uses cURL to make requests.

Requirements
------------

[](#requirements)

PHP 8.0 or later.

Composer
--------

[](#composer)

You can install the SDK via Composer. Run the following command:

```
composer require makstech/montonio-php-sdk
```

Usage
-----

[](#usage)

You can find your API keys by going to your Montonio dashboard → [*Stores*](https://partnerv2.montonio.com/stores)→ Choose the store you are integrating → *Go to API keys*.

To use the SDK, start by initializing the `Montonio\MontonioClient` using your access and secret keys. And from there, you can fluently get the "sub-clients". For example, to get `OrdersClient` and create an order:

```
use Montonio\MontonioClient;

// Initialize the client
$client = new MontonioClient(
    $accessKey,
    $secretKey,
    MontonioClient::ENVIRONMENT_SANDBOX, // or MontonioClient::ENVIRONMENT_LIVE
);

// Get OrdersClient
$ordersClient = $client->orders();

// Create order structure

// This example shows only some setters and options. Check source
// structures for all options and check documentation for required fields.
// https://docs.montonio.com/api/stargate/guides/orders#complete-example

$address = (new \Montonio\Structs\Address([
        'firstName' => 'elon',
        'lastName' => 'musk',
    ]))
    // or
    ->setFirstName('jeff')
    ->setLastName('bezos')
    ...;

// This is same...
$orderData = new \Montonio\Structs\OrderData([
    'locale' => 'en',
    ...
    'billingAddress' => [
        'firstName' => 'jeff',
        ...
    ],
]);

// ... as this, but fluently
$orderData
    ->setLocale('en')
    ->setBillingAddress($address)
    ->setMerchantReference(uniqid())
    ->setReturnUrl('https://google.com?q=montonio+return+url')
    ->setNotificationUrl('https://google.com?q=montonio+notification')
    ->setGrandTotal(1337)
    ->setCurrency('EUR')
    ->setPayment(
        $payment = (new \Montonio\Structs\Payment())
            ->setCurrency('EUR')
            ->setAmount(1337)
            ->setMethod(Payment::METHOD_PAYMENT_INITIATION)
    )
    ->addLineItem(
        $item1 = (new \Montonio\Structs\LineItem())
            ->setName('elephant')
            ->setFinalPrice(668.5)
            ->setQuantity(2)
    )
    ->setShippingAddress($address)
;

// Send API request
$order = $ordersClient->createOrder($orderData);

// Get payment URL
$paymentUrl = $order['paymentUrl'];

// Redirect customer to that URL
header("Location: $paymentUrl");
```

You can find the documentation with the response data example, in the [official docs](https://docs.montonio.com/api/stargate/guides/orders#4-submitting-the-token).

License
-------

[](#license)

This library is made available under the MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87% 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 ~61 days

Total

4

Last Release

592d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/29b9792125b1fe697ab7de77b65ba4ffb79f9f1e9cb0d86433baf9f9d686ec47?d=identicon)[makstech](/maintainers/makstech)

---

Top Contributors

[![makstech](https://avatars.githubusercontent.com/u/25028046?v=4)](https://github.com/makstech "makstech (20 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")

---

Tags

paymentpaymentsmontonio

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/makstech-montonio-php-sdk/health.svg)

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

###  Alternatives

[amzn/amazon-pay-sdk-php

Amazon Pay SDK (PHP)

20512.1M3](/packages/amzn-amazon-pay-sdk-php)[cybersource/rest-client-php

Client SDK for CyberSource REST APIs

39881.3k6](/packages/cybersource-rest-client-php)[amzn/amazon-pay-api-sdk-php

Amazon Pay API SDK (PHP)

505.1M9](/packages/amzn-amazon-pay-api-sdk-php)[sylius/payment-bundle

Flexible payments system for Symfony e-commerce applications.

22268.0k5](/packages/sylius-payment-bundle)[sylius/payment

Flexible payments system for PHP e-commerce applications.

17324.0k7](/packages/sylius-payment)[sylius/payum-bundle

Payum integration for Symfony e-commerce applications.

11109.5k8](/packages/sylius-payum-bundle)

PHPackages © 2026

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