Payments
The storefront has no payment-provider switch. The payment step lists exactly what Magento returns for the cart (cart.available_payment_methods), so you decide which methods shoppers see in Stores > Configuration > Sales > Payment Methods. Stripe, Mollie, PayPal Express and Magento’s offline methods (check / money order, bank transfer, cash on delivery, purchase order, free) can all be enabled at once and appear side by side.
How checkout handles each method
Section titled “How checkout handles each method”Most methods need no storefront code: checkout calls setPaymentMethodOnCart with the method code, then the stock placeOrder. Three providers have code of their own, chosen by the method code at runtime:
| Method codes | Provider | How the shopper pays | Return route |
|---|---|---|---|
stripe_payments | Stripe | Stripe’s Payment Element inline on the payment step. 3-D Secure opens as a modal; redirect methods (iDEAL, EPS, Bancontact…) leave and come back. | /{locale}/order/stripe-return |
mollie_methods_* | Mollie | Mollie’s hosted payment page. Cards can be entered on the checkout page itself with Mollie Components. | /{locale}/order/mollie-return |
paypal_express | PayPal | Redirect to PayPal; the order is placed on return. | /{locale}/order/paypal-return |
| Everything else | Magento | Nothing to enter; the order is placed directly. | /{locale}/order/success |
Return URLs always carry the locale prefix. A locale-less return URL would be read as a locale and 404; old locale-less /order/* links are redirected to the default locale.
Each of the three is a payment adapter: a provider plugged into checkout through the adapter registry (checkout/_lib/payment-adapters), whose code loads only when one of its methods is used. The checkout page itself names no provider. A new provider is added the same way: one registry entry, plus its adapter code.
Stripe
Section titled “Stripe”Requires the official Stripe module for Magento (stripe/module-payments).
- The card is tokenised with Stripe.js before
setPaymentMethodOnCart.placeOrderreturns a PaymentIntent client secret that the storefront finishes withstripe.handleNextAction(). - The Payment Element is mounted off-screen from the shipping step onward, so the payment step never waits for Stripe to load.
- Subscriptions and AI-agent payments are covered by Stripe Subscriptions and Stripe Shared Payment Tokens.
Mollie
Section titled “Mollie”Requires Mollie Payments for Magento 2 (mollie/magento2), using its headless flow. Every Mollie method enabled in the Mollie module (iDEAL, Bancontact, credit card, bank transfer and the rest) works without extra storefront code.
- One row, many methods. When Magento offers two or more Mollie methods, checkout groups them under a single Mollie row that opens onto Mollie’s own list, the way Stripe’s methods sit behind its row. Each method shows Mollie’s own icon.
- Issuers. Methods with issuers (such as iDEAL banks) show an issuer picker. Leave it empty and Mollie’s page asks instead.
- Card fields on the page. With
payment.mollie.componentson, Mollie’s Credit Card method takes the card on the checkout page in Mollie-hosted fields (Mollie Components). 3-D Secure still opens Mollie’s page when the bank asks for it; a card that needs no 3-D Secure goes straight to the return route. Without a Mollie profile ID in Magento, card entry falls back to the hosted page by itself. - The return page confirms the payment with Magento:
- paid → the cart is cleared and the shopper sees the order confirmation;
- still open (for example the shopper pressed back on Mollie’s page) → it waits a few seconds for Mollie’s webhook to settle it;
- cancelled or failed → Mollie restores the cart and the shopper can go back to checkout.
Set up Mollie
Section titled “Set up Mollie”- Install and configure Mollie Payments for Magento 2: API keys, profile ID, and the methods to offer, in Stores > Configuration > Sales > Payment Methods > Mollie.
- In
magenx.config.ts, setpayment.mollie.enabledtotrue, andpayment.mollie.componentstotrueto take cards on the checkout page. - Route
/mollie/checkout/webhookto Magento in nginx, as the nginx config in magenxcommerce-docker does. - Rebuild the storefront.
PayPal Express
Section titled “PayPal Express”Uses Magento’s own PayPal module and its stock GraphQL (paypal_express); no extra Magento module or storefront switch is needed.
- Leaves from the payment step. PayPal is the one method that leaves the storefront before the review step: the row says so, and the button reads Continue to PayPal. The order comment and delivery date are saved before leaving.
- The order is placed on return.
/order/paypal-returnsets PayPal on the cart with the payer ID and token PayPal sent back, places the order, clears the cart and shows the confirmation. - Cancelling on PayPal’s page returns to checkout (or, without a payer ID, the return page says the payment was cancelled), so the shopper can pick another method.
- PayPal’s in-context Express button is not used (
express_button: false): the shopper always goes through the storefront checkout first.
Set up PayPal Express
Section titled “Set up PayPal Express”- In Stores > Configuration > Sales > Payment Methods, configure PayPal Express Checkout with your PayPal API credentials, and enable it.
- Use sandbox credentials to test: the storefront accepts redirects to
www.sandbox.paypal.comas well as live PayPal.
Storefront switches
Section titled “Storefront switches”payment in magenx.config.ts does not turn methods on or off; Magento admin does. The flags say whether the provider’s Magento module is installed, because Magento rejects a whole GraphQL document that asks for a field it doesn’t know:
| Flag | Set it to true when | What it controls |
|---|---|---|
payment.stripe.enabled | stripe/module-payments is installed. | Loading the Stripe configuration and warming Stripe.js during the shipping step. |
payment.mollie.enabled | mollie/magento2 is installed. | Every Mollie GraphQL call, and the Mollie checkout code, which loads only when needed. |
payment.mollie.components | You want card fields on the checkout page. | Mollie Components for the Credit Card method. |
PayPal Express needs no flag: its GraphQL is part of stock Magento. Stripe, Mollie and PayPal can all be on: checkout lists whatever Magento offers.
Security
Section titled “Security”- The Content Security Policy allows only the payment hosts checkout needs:
js.stripe.com,js.mollie.com, PayPal (www.paypal.com,checkout.paypal.com,www.paypalobjects.com) and Google Pay. Card fields from Stripe and Mollie run in their own iframes; card numbers never touch the storefront. - Before the shopper is sent off-site, the redirect URL is checked against the provider hosts checkout expects (
www.paypal.com,secure.paypal.com,www.sandbox.paypal.com,www.mollie.com); anything else is refused. - Provider webhooks (
/stripe/webhooks,/mollie/checkout/webhook) go straight to Magento. Stripe’s is limited to Stripe’s published IP ranges. - The Mollie GraphQL schema is vendored in
magento/schemas/, so CI catches a storefront query that the installed Mollie module would reject.