Hyvä Checkout with Bulgarian couriers, payments and invoices: what sits behind a fast checkout

Hyvä Checkout is the checkout built by the team behind the Hyvä theme for Magento 2: a single page, without the heavy JavaScript of the standard checkout. Out of the box it knows nothing about Speedy and Econt offices, BOX NOW lockers, BORICA card payments or an invoice with a Bulgarian company ID. This article shows how our modules for couriers, payments and invoices work inside Hyvä Checkout, what we did to make them reliable, and what a store selling in Bulgaria gains from it.
Our clients' stores have been taking orders through Hyvä Checkout for more than a year and a half. What follows comes from those orders, not from a demo.
In short
- Modules written for the standard checkout do not run in Hyvä Checkout. Every integration needs its own layer, written for it.
- We have that layer for couriers, store pickup, the address and invoice fields, leasing and store credit. Card payments through BORICA, DSK Bank, Fibank and UBB work without an extra module, and IrisPay covers payment from a bank account.
- Pricing, offices and order data stay in the base modules, so an order looks the same in the admin whichever checkout you run.
- We test the checkout with browser tests that place a real order and read what was stored on it.
Why a module for the standard checkout does not work in Hyvä Checkout
The standard Magento checkout is an application that runs in the browser, written with Knockout and RequireJS. Courier and payment modules plug into it with their own JavaScript components. Hyvä removes exactly those two libraries to make the store fast, and the components go with them.
Hyvä Checkout works the other way round. The form is rendered on the server with Magewire, and the browser keeps a little Alpine.js for field behaviour. When the shopper changes something, a short request goes to the server and only the changed part of the page comes back. For a module this means a new layer: fields declared for the Hyvä Checkout form, rules that run on the server on every change, and templates in the style of the theme.
So a move to Hyvä Checkout is also a question to every module in your checkout: does it have that layer, and who maintains it.

One core, a thin layer for each checkout
We do not write our modules a second time for Hyvä. Shipping prices, the list of cities and offices, waybills, invoice data and payments live in the base modules. For Hyvä Checkout there is a separate small module that only renders this data in the form and passes the shopper's choice back. The same goes for FireCheckout and Amasty One Step Checkout.
For the store this has three practical consequences:
- Changing the checkout does not change how your team works. The order carries the same office, the same delivery type and the same invoice data, and the waybill is created from the same place.
- A fix in the pricing rules or in payment reconciliation reaches every checkout at once.
- One installation can run a store view with the standard checkout and another with Hyvä Checkout without them getting in each other's way. That is a common picture during a move to Hyvä.
The address: city, delivery type and office
Most of the work in a Bulgarian checkout is in the address. Couriers work with their own lists of towns, villages and offices, not with free text. If the shopper types the city their own way, someone has to decipher it by hand later. So in Hyvä Checkout we add three fields that are backed by the couriers' own data.
We support Speedy, Econt, BOX NOW, Pigeon Express, Evropat and PostOne. The Hyvä layer holds nothing written for one courier in particular, so the fields below are the same for all of them.

City. The shopper types a few letters and picks the place, shown with its postcode and region. A city and a village with a similar name cannot be confused, and the postcode fills in by itself.
Shipping type. After the city, only the delivery types available there are shown: to an address, to a courier office, to a parcel locker, and pickup from your own store if you have one. When you work with several couriers, you decide how the shopper reaches theirs: from one shared office list, with separate courier buttons, or right in the shipping type choice, with a logo next to each option.
Office or locker. The list shows the name, the address and the courier's logo. It loads in pages as the shopper scrolls, so it stays fast in a city with hundreds of pickup points. The chosen office goes into the order address under a readable name, which then shows in the customer email and in the admin.
A registered customer keeps the office in their address book and picks it with one click on the next order.
What happens on every choice
In Hyvä Checkout the form saves itself while the shopper types. Every change goes through the server, where our rules decide which fields and methods remain, and the form is rendered again.

This keeps the rules in one place, where the shopper cannot bypass them from the browser. The price is that the form is redrawn all the time and every richer field has to survive that. This is where the real work of an integration is. Three examples from ours:
- A response that arrives late. The shopper fills in their name and picks a city straight away. The save of the name comes back from the server a second later, carrying a form that has no city yet. Unprotected, the field empties in front of the shopper. In our layer a choice the server has not seen yet wins over the late response.
- Browser autofill. The browser fills in name, phone and street, but knows nothing about the courier city field. We detect the filled-in city and select it when there is exactly one match. Otherwise we open the list with what was found.
- “To office” without an office. A shopper who chose delivery to an office but did not say which one gets a message next to that field, not a generic error at the bottom of the page.
None of the three shows up in a demo. They show up with real shoppers, on a slow connection and on a phone.
Strict CSP. Since Magento 2.4.7 the payment page runs with a strict Content Security Policy: the browser runs only the scripts the store has explicitly allowed. This is how Magento covers the PCI DSS 4.0 requirement to control the scripts on the payment page. For Hyvä it means the CSP build of Alpine.js: no expressions in the HTML, logic in registered components, no inline styles, and every inline script allowed one by one. A module written without this works in a demo with a relaxed policy and fails silently under the real one: the field does not react, the button does nothing. Our Hyvä Checkout modules are written for the strict CSP.
Shipping methods follow the address, on a phone too
The method list shows a price for each courier and delivery type, with its logo. The price comes from the courier or from your own rate table, as you configured it. Once the shopper picks an office, only the methods of the courier that owns the office remain. An order “to an Econt office, shipped with Speedy” cannot happen.

Payments: card, leasing and store credit
Card. Card payment happens on the bank's page. Our modules for BORICA, DSK Bank, Fibank and UBB expose the redirect address the standard Magento way and Hyvä Checkout follows it by itself. No separate Hyvä module is installed for them. The order email goes out after the bank confirms the payment.
Bank account. For shoppers who prefer to pay straight from their bank account, IrisPay works in Hyvä Checkout as well.
Leasing. The instalment calculator is part of the payment step. The shopper picks the number of instalments and sees the monthly amount without leaving the checkout. One component serves every lender you have enabled. The instalment stored on the order is calculated again on the server, not taken from the browser.
Store credit. If your store gives customers a balance for later purchases, there is a “Use my store credit” switch under the payment methods. The amount appears as a separate line in the summary. When the balance covers the whole order, no other payment method is asked for.
Invoice and company details
With the “I want an invoice” checkbox the shopper opens the fields for customer type, company ID (EIK) or personal ID, and the invoice address. The data comes from our address and invoice module, the same one as in the standard checkout. When the shopper enters the ID of a VAT-registered company, we check the number in VIES and fill in the company name and the empty address fields for them.


In Hyvä Checkout we took care of two places where the stored data can drift from what the shopper sees:
- Changing the payment method does not wipe the invoice details already entered.
- When the shopper switches from “Company” to “Private person”, the company ID already entered is removed. An order from a private person with a company ID is exactly what blocks the invoice later.
The phone number is validated against the country of the address and stored in one format, so the courier can use it.
How we check that the order is right
The most expensive checkout bug is the silent one: the shopper sees “Thank you for your order” and the warehouse receives an office delivery with no office. So our automated tests for Hyvä Checkout do not stop at the success page.

The test opens a real browser, fills in the address like a shopper and places an order to an address and to a locker. Then it reads the stored order and compares the delivery type, the city and the office. Separate scenarios cover the courier choice and the late response from the example above. The tests run on every change to the module, on a clean installation.
The modules support PHP 8.3 to 8.5 and Magento and Mage-OS 2.4.7 to 2.4.9.
What the store gets
| In the checkout | What the shopper sees | What you gain |
|---|---|---|
| City and office | A choice from a list, with the address and the courier's logo | No addresses to decipher by hand |
| Shipping methods | A price per courier, only for the possible delivery types | No orders with a mismatched office and method |
| Store pickup | A store to pick instead of an address | One checkout for delivery and for pickup |
| Card | Payment on the bank's page | No extra module for Hyvä |
| Leasing | An instalment calculator in the payment step | The shopper does not leave the checkout to do the maths |
| Invoice | “I want an invoice” with customer type and company ID | Data the invoice can actually be issued from |
| Product safety | GPSR warnings before “Place order” | The requirement is covered in the checkout too |
Who this is for
If your store is already on Hyvä or about to move, and you sell in Bulgaria, the checkout is where the move most often stalls: the theme is ready, the couriers and payments are not. With a ready layer for Hyvä Checkout that part is installation and configuration, not development. At INDIGO, a fashion retailer we work with, Speedy runs in Hyvä Checkout next to pickup from a physical store.
What happens to the parcel after the checkout, from the waybill to the paid-out cash on delivery, is described in our article on the courier modules. For the move itself see Hyvä for Magento 2, and the modules are listed under shipping methods and payment methods.
Considering Hyvä Checkout? Send us the couriers, payments and modules in your checkout today and we will tell you what is ready and what needs work.