Magento Updated

Magento Payment Gateway Integration: Best Practices

Jane Vyshnova

Jane Vyshnova

CEO

Author

Magento Payment Gateway Integration: Best Practices

Time to read: 11 minutes

Content

  1. Payment Gateway Scorecard for Magento
  2. What is a Payment Gateway?
  3. How Payment Gateways Work
  4. How Payment Gateways Facilitate Your Business
  5. Best Payment Gateways For Magento
  6. Conclusion
Bookmark

Short answer: choose a payment gateway for Magento by four things, in this order: the payment methods your customers use in each market; how the gateway collects card data (its own hosted page or fields, or your server), which affects your PCI DSS work; how it is connected to Magento (bundled with Magento, a Marketplace extension or a custom module) and who maintains that connection through upgrades; and whether it supports the flows your operations need, such as separate authorisation and capture, partial refunds and strong customer authentication in Europe. Magento 2.4 includes PayPal and Braintree integrations, and Adobe Commerce includes Adobe's Payment Services from version 2.4.7. Authorize.Net, Worldpay, eWay and CyberSource were removed from the core in 2.4.0 and are now connected through Marketplace extensions. The scorecard below turns these points into questions for each provider.

Most likely you are mistaken if you think that payment gateways just let shoppers pay online. A Magento payment gateway integration serves wider business goals: conversion at checkout, fewer manual refunds, entry to new markets and less exposure of card data. Product names and Magento facts in this article were checked against Adobe's documentation on 18 November 2026.

Payment Gateway Scorecard for Magento

Use this scorecard with your ecommerce lead, CTO and finance owner. Ask every shortlisted provider the same questions and write down the answers.

CriterionQuestion to ask the providerWhy it matters in Magento
Payment methods per marketWhich cards, wallets, bank payments and local methods do you support in each of our countries and currencies?Missing local methods lose checkouts in that market
Card data collectionDo card details go to your hosted page or hosted fields, or to our server?Decides whether card data ever touches your Magento servers
PCI DSSWhich validation documents will our acquirer expect from us with your integration?Your acquirer and the payment brands set what you must submit
Strong customer authenticationHow does your Magento module handle SCA under PSD2, and which 3-D Secure version does it support?PSD2 rules on strong customer authentication apply to payment service providers in the EEA; the module must support your provider's flow
Magento connectionIs the module bundled with Magento, on the Adobe Commerce Marketplace or custom? Who maintains it?Every Magento upgrade needs a compatible module
Version supportWhich Magento and PHP versions does the current module support?Prevents a payment module from blocking an upgrade
Payment actionsDo you support authorise-only with later capture, partial capture, void and partial refund from the Magento Admin?Lets your team capture on shipment and refund without the provider's dashboard
Status updatesHow do asynchronous results (webhooks, delayed bank payments) update the Magento order?Prevents paid orders stuck as pending, or unpaid orders shipped
Saved payment methodsCan returning customers store a card with you (tokenisation), not in Magento?Faster repeat checkout without storing card data
TestingDo you offer a sandbox with test cards and failure scenarios?You need to test declines and refunds before launch
Fees and contractWhat are the fees for our volume, countries and methods, and the payout schedule?Take fees from the provider's current price list or contract, not from articles
Where Magento sits in a card payment 1: at checkout, the customer enters card details in the gateway's hosted page or fields, so card data goes to the gateway, not to Magento. 2: the gateway sends the authorisation request through the acquirer and card network to the card issuer. 3: in the EEA, the issuer may require strong customer authentication. 4: the result returns through the gateway, and Magento updates the order status, storing a transaction ID or token, not the card number. 5: later, capture on invoice and refunds through a credit memo are sent from the Magento Admin through the gateway. Magento checkout customer places order; card entered in gateway's hosted page or fields Payment gateway receives card data, fraud screening, returns token and result Acquirer and card network route the request to the issuer Card issuer approves or declines; in the EEA may require strong authentication Magento order status updated; stores transaction ID or token, never the card number Later, from the Magento Admin invoice → capture of the authorised amount credit memo → full or partial refund both sent through the gateway 1 Authorise 2 3 SCA if required 4 4 Result 5 Capture, refund
Where Magento sits in a card payment: card data goes to the gateway; Magento keeps order status, transaction IDs and tokens, and sends capture and refund requests.

Dinarys has built payment integrations both for a payment provider (ConnectPay) and for merchants (Prostor). For ConnectPay, a Lithuanian e-money institution, Dinarys built modules for Magento and Shopware that let stores collect payments from customer bank accounts in the Netherlands, Germany, Finland and Lithuania. The modules include admin settings, a new payment method at checkout, an authorisation flow after the order is placed and payment status updates through the provider's API. For Prostor, an omnichannel drugstore chain, the Magento 2 checkout work included OTP and card tokenisation.

What is a Payment Gateway?

A payment gateway, such as PayPal or Braintree, is an online service that uses secure connections to prepare, coordinate and execute online payments between customers and merchants. To protect data on its way from shoppers to a Magento store and on to the banks, payment gateways encrypt confidential data such as card details.

Since online stores work over networks, payment gateway providers have to use strong encryption. Otherwise, they can hardly guarantee the integrity of the information that circulates between gateways, end-user devices and banking systems. This equally concerns both the integrations bundled with Magento and third-party ones.

That's why payment gateways are an essential part of every Magento project in which money changes hands.

How Payment Gateways Work

Payment gateways provide data exchange between your store (a website or an app) and the payment processing system of the banks. For a card payment, the process usually runs as follows:

  1. The customer clicks a button such as "Pay now" or "Place order".
  2. The card details are sent over an encrypted (HTTPS) connection, ideally straight to the gateway's hosted page or fields.
  3. The gateway passes the authorisation request to the acquirer, the bank that maintains the merchant's account, which routes it through the card network (for example Mastercard or Visa) to the card-issuing bank.
  4. The issuing bank checks the request and, where required, asks the customer to authenticate.
  5. The bank responds with a code that approves or declines the transaction; for declines, the code shows the reason (insufficient funds and so on).
  6. The gateway returns the result to the store and to the customer, and Magento updates the order.
  7. The authorised amount is captured, immediately or later, and the money is settled to the merchant's account.

In Magento, a payment method can be configured to authorise only or to authorise and capture at once. With authorise only, the capture usually happens when you invoice the order, and refunds go back through the gateway when you create a credit memo, if the module supports online refunds. If you need a custom module for your own payment service, see our guide on how to create a Magento 2 payment module.

How Payment Gateways Facilitate Your Business

Payment fraud and data theft are, unfortunately, part of everyday ecommerce. Payment gateways address the problem to a large extent: card data is handled by a specialised provider, and customers recognise familiar payment brands at checkout.

Card processing and online payments go smoothly for merchants who integrate a gateway properly into their Magento store. The following factors can add some extra motivation.

Improving Data Check

To protect their business from fraud, some store owners make their checks too complicated. That works for security, but customers get frustrated by excessive authentication steps, and some abandon their carts.

Many gateways offer fraud screening that scores each transaction, so you can block risky orders without adding steps for everyone. In the EEA, the SCA rules also let payment service providers skip strong customer authentication for remote payments that their transaction monitoring rates as low risk, within the limits of the rules. Ask your provider when it applies such exemptions.

Simplifying PCI DSS

The Payment Card Industry Data Security Standard (PCI DSS) applies to entities that store, process or transmit cardholder data or sensitive authentication data. Meeting its requirements takes extra time and money for many Magento store owners.

The design of the integration matters. Adobe's developer documentation is direct: "To keep PCI compliance, you must not store sensitive credit card information." Gateways that collect card details in their own hosted page or hosted fields keep card numbers off your Magento servers. This does not remove PCI DSS from your business: according to the PCI Security Standards Council, which validation a merchant needs is "determined by the individual payment brands", and "merchants should contact their acquirer (merchant bank)". Ask your acquirer which validation applies before you choose the integration type.

Managing Refunds

A good gateway integration makes refunds part of the normal Magento workflow: you create a credit memo in the Admin, and the refund is sent to the gateway. Check that the module supports partial refunds and partial capture if you ship orders in parts. Otherwise, your team will process refunds manually in the provider's dashboard and reconcile them afterwards.

Going Global

Customers in different countries depend on local payment methods. To address this, merchants use payment providers that cover the methods of each market, or add local methods next to their main gateway. The ConnectPay modules described above are an example of adding local bank payments in four countries.

Check payment methods market by market, together with currencies, payouts and the languages of the payment pages.

Enhancing Security of Online Payments

Security of payments in your Magento store is crucial for gaining your customers' trust. These technical features make a gateway integration safer:

Best Payment Gateways For Magento

Magento 2.4 comes with some payment integrations, and many more providers connect through Marketplace extensions or custom modules. The providers below are the ones this article has covered since its first version, plus Adobe's own Payment Services. The list is not a ranking. Fees, country coverage and plans change, so take them from each provider's current pages.

Adobe Payment Services

Adobe's own payment solution is described as a "turnkey self-service solution" for Adobe Commerce and Magento Open Source, built into Adobe Commerce from version 2.4.7. It offers card fields, digital wallets and PayPal products, and card vaulting for faster checkout. Adobe notes that some features may not yet be available in every market, so check its compatibility page for your country.

Magento platform integration with Payment System PayPal Payments Pro

PayPal is integrated with Magento out of the box. Adobe's payments overview lists PayPal Express Checkout among the recommended online methods, as well as PayPal Payments Advanced, Payments Pro and Payments Standard, and the PayPal Payflow Pro and Payflow Link gateways. Which PayPal product you can use depends on your country and your PayPal account, so confirm availability with PayPal before you configure it.

Magento platform integration with Payment System Braintree

Braintree is the other recommended online method in Adobe's payments overview. It is included in Magento 2.4 for self-hosted and cloud infrastructure projects (Adobe marks it "PaaS only"), and it is configured in the Magento Admin. As noted above, the included Braintree module handles the PSD2 requirements.

Magento platform integration with Payment System Authorize.Net

Authorize.Net used to be one of Magento's built-in gateways. With Magento 2.4.0, "the Authorize.Net, eWay, CyberSource, and Worldpay payment method integrations have been removed from core code", and Adobe advises merchants to migrate to official extensions on the Commerce Marketplace. If you use Authorize.Net, choose a Marketplace extension that supports your Magento version and check who maintains it.

Magento platform integration with Payment System Stripe

Stripe offers two plugins for Adobe Commerce and Magento Open Source: one for Stripe Payments, Billing and Tax, which accepts payments through a range of payment methods and can automate tax calculation, and a Stripe Tax plugin for merchants who use another payment provider. Stripe's own APIs are also available if you need a custom integration.

Magento platform integration with Payment System WorldPay

Worldpay was also removed from the Magento core in 2.4.0. Integration now goes through an extension from the Adobe Commerce Marketplace or a custom module. Ask Worldpay which extension it supports for your Magento version and region. Magento platform integration with Payment System WorldPay should be entrusted to specialists.

Magento platform integration with Payment System Viveum

Viveum is a payment service provider. Its website lists "more than 30 modules for common shop systems", with Magento among them. Check with Viveum which Magento versions its module supports.

Some payment flows are not covered by any ready-made module. For Mon Tresor Bebe, a French children's wear wholesale store moved to Magento 2, Dinarys implemented payment in instalments together with order and invoice editing. For a European crypto ecosystem, Dinarys developed a crypto payment plugin for platforms including Magento and WooCommerce, with documentation detailed enough for merchants to install and configure it themselves.

Conclusion

It is safe to say that payment gateways are no longer optional for merchants: they are a must-have for any Magento project that takes payments online. The right choice depends on your markets, your card-data and PCI approach, the Magento module and its maintenance, and the payment flows your operations need.

The brief reviews given above cannot cover the issue completely, of course. But that's not a big deal when ecommerce professionals are here to help. Dinarys carries out Magento payment gateway integrations, including custom ones: configuration of payment modules and methods, payment method facades, admin settings, gateway commands and everything else the integration needs.

Contact us today to select and install the most appropriate payment gateway for your Magento project, or learn more about our Magento extension development and Magento integration services.

Let professionals meet your challenge

Our certified specialists will find the most optimal solution for your business.

Please enter valid name
Please enter valid company
Please enter a valid phone
Please enter valid E-mail
Message is too short

    Your message has been successfully sent. We will be in touch shortly! Success icon