Adyen
Hyvä POS is on the App Store
The free app is out for iPhone, iPad and Mac: install it from the App Store, connect your Magento store and sell. PRO, the Magento module with a license per terminal, follows shortly. News and pricing are at hyva.io/pos.
The app talks to Adyen through Adyen's cloud Terminal API with your own API key: the register sends the amount to Adyen, Adyen hands it to the terminal on the counter, and the register waits while the customer pays. No Magento in the payment path, so it works on the free tier with your own Adyen account.
What You Need at Adyen
- A merchant account for the shop. Adyen keeps one merchant account per country.
- In-person payments, the Terminal API and cloud connections switched on for the account. Adyen Support switches cloud connections on.
- At least one Adyen terminal, assigned to the shop and connected to the internet. When the merchant account has more than one shop, note the Adyen store ID of this shop (it starts with
ST). - An API credential for the registers with the Cloud Device API role, limited to the shop's merchant account or store. Generate its API key and copy it straight away: Adyen shows it once.
The Cloud Device API role is not offered on every account. If it is not in the list of roles, ask Adyen Support to enable it for your account.
Live and test are separate Customer Areas, ca-live.adyen.com and ca-test.adyen.com, each with its own merchant account, API credential, store and terminals.
Setting Up in the App
- In the app, go to Settings → Card Payments (in the Payments section of the menu) and switch the Mode to Adyen.
- Test Mode decides which fields follow: the Live merchant account and Live API Key with it off, the Test merchant account and Test API Key with it on.
- Tap Connect to Adyen. In live mode the register finds the live region of the account by itself and picks it under Live region.
- The store ID is optional. When the API key may read the stores, the register lists them to pick from; otherwise type the store ID. With a store ID, only that shop's terminals are listed.
- The register lists the terminals that are online now. Pick the one at this counter. Each register picks its own terminal. Refresh Terminals asks Adyen again.
- Send Test Payment checks the pairing with a payment of 0.10 in the store's currency.
A terminal that is off, asleep or without network is not listed. Wake it, check its connection, and tap Connect to Adyen again. Without cloud connections on the account the list stays empty.
Test Mode
With Test Mode on, the register uses the test merchant account and the test API key from ca-test.adyen.com, and a test terminal. Test terminals and the Adyen test card are ordered from the test Customer Area and work in test only. No money moves.
An Adyen test payment is made with the test card on the test terminal; there is no simulation page as with Mollie or PAY. The last digits of the amount choose a decline: an amount ending in 1.23, such as 11.23, is refused. Adyen's own testing documentation lists the other amounts that produce a decline.
The app shows a test-mode badge on the payment panel, so a test key does not go unnoticed at checkout.
Setting Up in Magento (PRO)
On PRO the same configuration lives centrally at Stores → Configuration → Hyvä POS → Payments → Card Payments. Set Mode to Adyen, then fill in the Adyen group:
- Live Account: Live Merchant Account, Live API Key, Live Region and Live Store.
- Test Account: Test Merchant Account, Test API Key and Test Store.
- Registers: Test Mode and Magento Payment Method (Adyen).
The API keys are stored encrypted, and the registers receive them. Live Region is the region of the live merchant account, which Adyen tells you when the account is set up. Live Store and Test Store are optional; left empty, the registers list every terminal of the merchant account. The Live Webhook HMAC Key and Test Webhook HMAC Key fields belong to the refund webhook.
A location can override the merchant accounts, keys, region, stores and test mode on its edit screen, and a terminal can override the test mode alone. Registers apply changes as they arrive through their heartbeat and list them under Applied by Magento; Sync from Magento on the Card Payments screen pulls on demand. With Lock Adyen Configuration on (Lock Settings → Payments), the Adyen fields show a lock and a Magento badge on the register and cannot be edited there. Lock Card Payment Mode does the same for the Mode.
The terminal itself is always picked on the register: a terminal pairs to a counter, not a store.
The Magento Payment Method
An Adyen-paid sale becomes a Magento order under the module's own method, Adyen Terminal (POS) (pos_adyen_terminal). It is an offline method: the register took the payment on the terminal, and Magento does not ask Adyen for anything. Adyen's PSP reference is stored on the order's payment, so you can find the payment in the Customer Area. The method is not offered in the storefront checkout. Its title, order status and sort order are under Stores → Configuration → Sales → Payment Methods → Adyen Terminal (POS).
A credit memo made in the Magento admin books the refund without moving money. A refund to the card is made at the register, or in the Customer Area.
A store that wants these sales under another method picks it under Card Payments → Adyen → Magento Payment Method (Adyen), or per location on the location's edit screen. With Lock Adyen Magento Payment Method on, every Adyen sale books under the method set for the store. The module applies the method when the order is saved.
Refunds
A refund of an Adyen sale goes back to the card the customer paid with, on the free tier and on PRO. The refund sheet's Refund Online channel and the Refund to original card tile on a return both send it to Adyen. The customer's card is not needed, and the refund does not have to go through the terminal that took the payment: any Adyen terminal of the account that is online will do. When none is online, the register says so; switch one on and retry.
The register books the credit memo when Adyen accepts the request, and shows Refund submitted. Adyen pays the money back to the card afterwards. The refund counts in the register's closing of the day it was made.
With the refund webhook set up on PRO, the register first waits up to ten seconds for Adyen's answer. A refund Adyen refuses in that time is not booked, and the cashier sees Adyen's reason.
A card payment without an order, such as one listed under Reports → Terminal Payments, is not refunded to the card from the register. Refund it in the Adyen Customer Area, then tap Refunded outside this device. The register asks whether the full amount was refunded and closes the payment on Yes, the full amount. It sends nothing to Adyen or to Magento. See refunded outside this device.
When a Refund Fails
Adyen can refuse a refund, or accept it and fail to pay it out later. That is rare. Where you see it:
- Always in the Adyen Customer Area, on the payment. Search it by the PSP reference on the order.
- With the refund webhook, also on the registers and on the order. A refund that fails or is reversed after Adyen accepted it shows on every register under Reports → Sync Issues as "Card refund of … was not paid out", with a comment on the order in Magento. Open Order opens the order. The row stays until a staff member whose role has Issue Refunds, and who works at the location of the refund, taps Mark as handled. Marking it on one register clears it on every register. A staff member who is not set up for that location sees "You are not set up to work at this location. Ask a staff member of this location to mark this as handled."
What to do: refund the customer another way. The credit memo in Magento stays as it is.
The Refund Webhook (PRO, Optional)
What It Does
Adyen reports the outcome of every refund to your store, and the module records it on the order. The register waits up to ten seconds for it. A refund Adyen refuses in that time is not booked, and the cashier sees Adyen's reason. A refund that fails or is reversed later shows on every register until a staff member marks it as handled.
What the HMAC Key Does
Adyen signs each report with the webhook's HMAC key. The module accepts a report only when the signature matches the live or the test key. The key stays in Magento; it is stored encrypted and never sent to a register.
When You Leave It Empty
Payments and refunds work. A refund is booked as soon as Adyen accepts the request, and the register does not wait. Reports from Adyen are rejected with a 401 and nothing is recorded. A failed refund is then only visible in the Adyen Customer Area.
Setting It Up
- In the Customer Area, go to Developers → Webhooks and add a Standard webhook.
- Enter the URL
https://<your store>/hyvapos/adyen/webhookand pick the method JSON. - Leave the default events on. The module uses
CANCEL_OR_REFUND,REFUND,REFUND_FAILEDandREFUNDED_REVERSED, and accepts and ignores the others. - Generate the HMAC key under Security → HMAC and paste it into Test Webhook HMAC Key or Live Webhook HMAC Key in Magento.
- Do this once in ca-test.adyen.com and once in ca-live.adyen.com.
A Store Behind Basic Authentication
When the store asks for a username and password, open the webhook's Security section and under Authentication method pick Basic authentication, then enter the store's Username and Password. Or exempt the webhook path on the web server. A store without it uses No authentication: the HMAC key is what the module checks.
Testing It
Use the test button on the webhook in the Customer Area. What the answer means:
| Answer | Meaning |
|---|---|
202 [accepted] |
The webhook works. |
| 401 with an empty body | The report reached Magento, and the HMAC key in Magento is missing or does not match. |
| 401 with an HTML page | The web server stopped the report before Magento. Check the authentication method. |
| 404 | The module on that store has no Adyen support. |
Opening the URL in a browser gives a 404, because the endpoint only takes POST.
A Key in Magento and No Working Webhook
The register only knows that a key is set in Magento, not that Adyen can reach the store. With a key set and no working webhook, the register waits ten seconds on every refund, and the order keeps a "Card refund of … submitted" notice. Test the webhook, or empty the key.
Receipts
The card slip of an Adyen payment is Adyen's own receipt, printed as Adyen sends it, and the terminal prints no copy of its own. A reprint from the order gives the same slip.