PHPackages                             multisafepay/magento2-graphql - 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. multisafepay/magento2-graphql

ActiveMagento2-module[API Development](/categories/api)

multisafepay/magento2-graphql
=============================

MultiSafepay module for Magento 2 GraphQl support

4.2.0(10mo ago)750.6k↓42.2%3[2 issues](https://github.com/MultiSafepay/magento2-graphql/issues)OSL-3.0PHPPHP &gt;=7.2CI failing

Since Feb 16Pushed 10mo ago4 watchersCompare

[ Source](https://github.com/MultiSafepay/magento2-graphql)[ Packagist](https://packagist.org/packages/multisafepay/magento2-graphql)[ RSS](/packages/multisafepay-magento2-graphql/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (16)Used By (0)

 [![](https://camo.githubusercontent.com/a5deed572977f4f752ef847c5927675417eedeedd7d0661ce5ba76d6ec38af7c/68747470733a2f2f7777772e6d756c7469736166657061792e636f6d2f66696c6561646d696e2f74656d706c6174652f696d672f6d756c7469736166657061792d6c6f676f2e737667)](https://camo.githubusercontent.com/a5deed572977f4f752ef847c5927675417eedeedd7d0661ce5ba76d6ec38af7c/68747470733a2f2f7777772e6d756c7469736166657061792e636f6d2f66696c6561646d696e2f74656d706c6174652f696d672f6d756c7469736166657061792d6c6f676f2e737667)

MultiSafepay plugin for Magento 2 (GraphQL module)
==================================================

[](#multisafepay-plugin-for-magento-2-graphql-module)

This module provides GraphQL support for MultiSafepay payments. For a complete installation of all our features, please check out our [meta package](https://github.com/MultiSafepay/magento2/).

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

[](#installation)

This module can be installed via composer:

```
composer require multisafepay/magento2-graphql
```

Next, enable the module:

```
bin/magento module:enable MultiSafepay_ConnectCore MultiSafepay_ConnectFrontend MultiSafepay_ConnectAdminhtml MultiSafepay_ConnectGraphQl
```

Next, run the following commands:

```
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
```

**Please keep in mind that after installing this module, you will only have graphql compatability and core functionalities.**

For a quick installation of all the modules, we recommend using [the meta package](https://github.com/MultiSafepay/magento2) instead.

Usage
-----

[](#usage)

To create an order using GraphQL, please take a look at the [Magento manual](https://devdocs.magento.com/guides/v2.4/graphql/tutorials/checkout/index.html)

### Example requests

[](#example-requests)

- Get the issuers and additional data for selected MultiSafepay payment:

```
query {
    cart(cart_id: "{ CART_ID }") {
        selected_payment_method {
            code
            multisafepay_additional_data {
                image
                instructions
                is_preselected
            }
            multisafepay_available_issuers {
                code
                description
            }
        }
    }
}
```

- Get the available payments methods with issuers and additional data for MultiSafepay gateways:

```
query {
    cart(cart_id: "{ CART_ID }") {
        available_payment_methods {
            code
            title
            multisafepay_available_issuers {
                code
                description
            }
            multisafepay_additional_data {
                image
                instructions
                is_preselected
            }
        }
    }
}
```

- setPaymentMethodOnCart query with issuers example:

```
mutation {
    setPaymentMethodOnCart(input: {
        cart_id: "{ CART_ID }"
        payment_method: {
            code: "multisafepay_mybank"
            multisafepay_mybank: {
                issuer_id: "CT000003-it-1"
            }
        }
    }) {
        cart {
            selected_payment_method {
                code
                multisafepay_additional_data {
                    image
                    is_preselected
                }
            }
        }
    }
}
```

- To retrieve MultiSafepay request data which includes information about Payment Component, Apple Pay or/and Google Pay, you can use the following query:

```
query MultisafepayPaymentRequestData {
    multisafepayPaymentRequestData(cart_id: { CART_ID }) {
        apiToken
        apiTokenLifeTime
        cartTotal
        currency
        environment
        locale
        paymentComponentContainerId
        payment_component_template_id
        storeId
        applePayButton {
            applePayButtonId
            getMerchantSessionUrl
            isActive
            additionalTotalItems {
                amount
                label
            }
            cartItems {
                label
                price
            }
        }
        googlePayButton {
            accountId
            googlePayButtonId
            isActive
            mode
            merchantInfo {
                merchantId
                merchantName
            }
        }
        paymentComponentConfig {
            gatewayCode
            paymentMethod
            paymentType
            additionalInfo {
                image
                is_preselected
                vaultCode
            }
            tokens {
                bin
                code
                display
                expired
                expiry_date
                last4
                model
                name_holder
                token
            }
        }
    }
}
```

- setPaymentMethodOnCart query with payment component payload example: (for more information on how to retrieve the payload, see the [MultiSafepay documentation](https://docs.multisafepay.com/docs/payment-component-single/))

```
mutation {
    setPaymentMethodOnCart(input: {
        cart_id: "{ CART_ID }"
        payment_method: {
            code: "multisafepay_creditcard"
            multisafepay_creditcard: {
                payload: "xxxx"
                tokenize: true
            }
        }
    }) {
        cart {
            selected_payment_method {
                code
                multisafepay_additional_data {
                    image
                    is_preselected
                }
            }
        }
    }
}
```

- Place order request example. After placing the order, you will receive the `multisafepay_payment_url` on which the customer should be redirected to for placing a transaction:

```
mutation {
    placeOrder(input: {cart_id: "{ CART_ID }"}) {
        order {
            order_number
            multisafepay_payment_url {
                payment_url
                error
            }
        }
    }
}
```

- Request example of a new mutation of `restoreQuote` for restoring the quote by Cart ID after, for example, an unsuccessfull payment:

```
mutation {
    restoreQuote(input: {
        cart_id: "{ CART_ID }"
        }
    )
```

- Get MultiSafepay payment url from a placed order:

```
query {
    customer {
        orders(
            pageSize: 10
        ) {
            total_count
            items {
                id
                increment_id
                multisafepay_payment_url
            }
        }
    }
}
```

Support
-------

[](#support)

You can create issues on our repository. If you need any additional help or support, please contact [](mailto:integration@multisafepay.com)

We are also available on our Magento Slack channel [\#multisafepay-payments](https://magentocommeng.slack.com/messages/multisafepay-payments/). Feel free to start a conversation or provide suggestions as to how we can refine our Magento 2 plugin.

A gift for your contribution
----------------------------

[](#a-gift-for-your-contribution)

We look forward to receiving your input. Have you seen an opportunity to change things for better? We would like to invite you to create a pull request on GitHub. Are you missing something and would like us to fix it? Suggest an improvement by sending us an [email](mailto:integration@multisafepay.com) or by creating an issue.

What will you get in return? A brand new designed MultiSafepay t-shirt which will make you part of the team!

License
-------

[](#license)

[Open Software License (OSL 3.0)](https://github.com/MultiSafepay/Magento2Msp/blob/master/LICENSE.md)

Want to be part of the team?
----------------------------

[](#want-to-be-part-of-the-team)

Are you a developer interested in working at MultiSafepay? [View](https://www.multisafepay.com/careers/#jobopenings) our job openings and feel free to get in touch with us.

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance48

Moderate activity, may be stable

Popularity36

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~114 days

Recently: every ~104 days

Total

15

Last Release

314d ago

Major Versions

1.2.0 → 2.0.02022-05-04

2.0.0 → 3.0.02022-08-23

3.4.0 → 4.0.02024-08-31

PHP version history (2 changes)1.0.0PHP &gt;=7.1

3.4.0PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/2191df32ae1d7f2d5559e91e73bf29e8b003b368917a0985afcb3c4e23de8587?d=identicon)[MSP](/maintainers/MSP)

---

Top Contributors

[![Stanislau-MultiSafepay](https://avatars.githubusercontent.com/u/78361324?v=4)](https://github.com/Stanislau-MultiSafepay "Stanislau-MultiSafepay (41 commits)")[![vinodsowdagar](https://avatars.githubusercontent.com/u/53818758?v=4)](https://github.com/vinodsowdagar "vinodsowdagar (36 commits)")[![danielcivit](https://avatars.githubusercontent.com/u/64795062?v=4)](https://github.com/danielcivit "danielcivit (12 commits)")[![smartautobrains](https://avatars.githubusercontent.com/u/98700158?v=4)](https://github.com/smartautobrains "smartautobrains (3 commits)")

### Embed Badge

![Health badge](/badges/multisafepay-magento2-graphql/health.svg)

```
[![Health](https://phpackages.com/badges/multisafepay-magento2-graphql/health.svg)](https://phpackages.com/packages/multisafepay-magento2-graphql)
```

###  Alternatives

[mollie/magento2

Mollie Payment Module for Magento 2

1121.6M10](/packages/mollie-magento2)[dotdigital/dotdigital-magento2-extension

Dotdigital for Magento 2

50374.2k18](/packages/dotdigital-dotdigital-magento2-extension)[subscribepro/subscribepro-magento2-ext

Subscribe Pro Magento 2 Integration Extension

24157.3k](/packages/subscribepro-subscribepro-magento2-ext)[xcoreplatform/xcore-magento2

This module extends the rest api of Magento2 and is needed for the usage of the xCore.

1330.0k2](/packages/xcoreplatform-xcore-magento2)

PHPackages © 2026

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