Magento payment settings: bank transfer, PayPal, Stripe and Klarna
Where payments live in Magento 2.4.9, how to set up bank transfer with your bank details, where the PayPal, Stripe and Klarna API credentials go and where you get them, how to install Stripe and Klarna with Composer, and a real test order paid by bank transfer.
Downloads
The bank details are examples (Example Bank, a placeholder IBAN). Put in your own before you run the script. No PayPal, Stripe or Klarna keys are in these files: those belong in the admin, entered by you.
The Payment Methods page
Stores › Configuration › Sales › Payment Methods. There are three kinds of payment methods:
| Kind | Methods | Comes with |
|---|---|---|
| Offline | Bank Transfer, Check / Money order, Cash On Delivery, Purchase Order, Zero Subtotal Checkout | Magento |
| PayPal | PayPal Express Checkout and the other PayPal solutions, Braintree | Magento |
| Stripe, Klarna | Cards, wallets, pay later | Extensions, installed with Composer |
| Section | What is in it |
|---|---|
| Merchant Location | Merchant Country: decides which payment solutions the page offers. Empty = the Default Country from General › General. |
| Featured Adobe Payment Solution | Adobe Payment Services (a separate sign-up). |
| Additional payment solutions | Stripe, Braintree, PayPal Express Checkout, PayPal All-in-One. |
| Other Payment Methods | Klarna, Zero Subtotal Checkout, Check / Money Order, Bank Transfer Payment, Cash On Delivery Payment, Purchase Order. |
Bank transfer
Other Payment Methods › Bank Transfer Payment:
| Field | Value in the video | Note |
|---|---|---|
| Enabled | Yes | |
| Title | Bank Transfer Payment | The name customers see at checkout. |
| New Order Status | Pending | The order waits until the money arrives. |
| Payment from Applicable Countries | Specific Countries | |
| Payment from Specific Countries | United Kingdom, Germany | Ctrl/Cmd-click to pick several. |
| Instructions | Example Bank · IBAN GB00 EXMP 0000 0000 0000 00 · BIC EXMPGB2L · Reference: your order number | Shown at checkout and in the order email. Ask for the order number as the payment reference. |
| Minimum / Maximum Order Total | empty | Optional limits. |
#!/bin/bash
# MageBooster lesson 5: Bank Transfer Payment as in the video. Put in your own bank details first.
set -e
cd /var/www/magento
m() { sudo -u magento bin/magento "$@"; }
m config:set payment/banktransfer/active 1
m config:set payment/banktransfer/title "Bank Transfer Payment"
m config:set payment/banktransfer/order_status pending
m config:set payment/banktransfer/allowspecific 1
m config:set payment/banktransfer/specificcountry GB,DE
m config:set payment/banktransfer/instructions "Example Bank · IBAN GB00 EXMP 0000 0000 0000 00 · BIC EXMPGB2L · Reference: your order number"
m cache:flush
Installing Stripe and Klarna
Both are Composer packages: stripe/stripe-payments (module version 4.7 in the video) and klarna/m2-klarna (4.15). The old klarna/m2-payments package does not install on PHP 8.5.
#!/bin/bash
# MageBooster lesson 5: install the Stripe and Klarna extensions (Magento 2.4.9, production mode).
# Composer asks for your repo.magento.com keys (auth.json) if they are not set yet.
set -e
cd /var/www/magento
m() { sudo -u magento bin/magento "$@"; }
m maintenance:enable
sudo -u magento composer require stripe/stripe-payments klarna/m2-klarna
m setup:upgrade
m setup:di:compile
m setup:static-content:deploy -f
m maintenance:disable
m cache:flush
# production mode: OPcache keeps the old code until PHP-FPM reloads
sudo systemctl reload php8.5-fpm
setup:di:compile. Without it OPcache keeps the old code, and the shop shows an error like “Plugin class … doesn’t exist”.PayPal
Additional payment solutions › PayPal Express Checkout › Configure:
| Field | What to enter |
|---|---|
| API Authentication Methods | API Signature |
| API Username, API Password, API Signature | Your PayPal API credentials |
| Sandbox Mode | Yes while testing, No with live credentials |
| Enable this Solution | Yes, then Save Config |
Where to get them: the Get Credentials from PayPal and Sandbox Credentials buttons open PayPal. Or log in at developer.paypal.com › Apps & Credentials, Sandbox for test credentials, Live for the real ones.
Stripe
Additional payment solutions › Stripe › Configure › General settings:
| Field | What to enter |
|---|---|
| Mode | Test while testing, Live at go-live |
| Test publishable API key | pk_test_… |
| Test secret API key | sk_test_… |
| Live keys | pk_live_… and sk_live_… |
Where to get them: Stripe Dashboard › Developers › API keys. The secret key belongs on your server only: never send it by email or chat. Under Payments you choose the card form layout and which methods Stripe offers.
Klarna
Other Payment Methods › Klarna › Configure › Activation:
| Field | What to enter |
|---|---|
| Region | Europe (or your region) |
| API credentials for Europe › API Mode | Playground for testing, Production at go-live |
| API username, API password, Client Identifier | From Klarna |
| Save credentials | Continue: checks the credentials |
| Klarna Payments | Enable after the credentials are saved |
Where to get them: Klarna Merchant Portal › Settings › Klarna API credentials. Test (Playground) credentials come from the playground portal.
A test order by bank transfer
On the storefront: add a product, check out as a guest, choose a shipping method, then Bank Transfer Payment. The instructions show under the method. After Place Order the success page shows the order number, and the bank details go out in the order confirmation email.
In the admin, Sales › Orders: the order is Pending, and Payment Information shows Bank Transfer Payment with your instructions. When the money is in your account, create the invoice: the order moves to Processing.
Troubleshooting
| Symptom | Cause and fix |
|---|---|
| Storefront error “Plugin class StripeIntegration… doesn’t exist” after the install | OPcache still has the old code: sudo systemctl reload php8.5-fpm, then bin/magento cache:flush. |
| Admin error “Klarna\Logger\Model\Logger … ($handlers) must be of type array, null given” | The generated DI configuration is incomplete. Run bin/magento setup:di:compile again (outside the maintenance chain), then reload PHP-FPM. Check that generated/metadata/ has webapi_rest.php and webapi_soap.php. |
| “Cannot instantiate interface StripeIntegration\Payments\Api\ServiceInterface” | Same cause: re-run setup:di:compile and reload PHP-FPM. |
composer require klarna/m2-payments fails | That package needs PHP 7. Use klarna/m2-klarna. |
| Bank transfer is missing at checkout | Check Enabled, the specific countries (the billing country must be in the list) and the minimum / maximum order total; then flush the cache. |
See what is set:
cd /var/www/magento # what is set for bank transfer sudo -u magento bin/magento config:show payment/banktransfer # are the extensions installed and enabled? sudo -u magento bin/magento module:status | grep -E 'StripeIntegration|Klarna'
Next lesson
SMTP with the free Mageplaza SMTP extension: install it, set up SMTP, and send a test email.
▶ Watch every MageBooster lesson on YouTube: all lessons in order · subscribe to the channel

