# Your shopper wanted it, just not all at once: building the Float Payments module for Magento

**By Oleg Snegov.** Read time 8 minutes. Published Tuesday, April 21, 2026.

**Tags:** Float · Magento · Adobe Commerce · Payments · BNPL

---

A shopper is standing at your checkout with a full cart and one hesitation: not "do I want this," but "do I want this *this month*." That's the moment you lose. **Float** answers it by letting them split the purchase into interest-free monthly installments on the credit card already in their wallet, no application, no credit check, while you get paid in full upfront. We built the Magento module that puts that choice in your checkout, and this is the honest account of what it took, because the interesting parts of a payment integration are never the happy path.

## What your shopper actually gets

Float is card-linked installments. Your customer picks Float at checkout, verifies with a one-time pin, and the amount is split across interest-free, fee-free monthly installments against the available limit on their existing Visa or Mastercard. There's nothing to sign up for, no new credit line, and they keep earning their usual rewards points. It's their own credit, rearranged.

Your side of that trade: **you receive the full amount upfront**. You aren't financing anything and you aren't carrying the risk. A price that reads as "a lot right now" reads differently as a monthly number, and the cart that used to get abandoned at the total gets completed instead.

## The option has to appear before checkout, not at it

A shopper who reaches your checkout has already decided what they can afford. Telling them about installments at the payment step is too late to change what's in the cart. So the module puts a **payment plan preview** where the decision actually happens:

| Where | What your shopper sees | You control it with |
| --- | --- | --- |
| Product page | Instalment preview under the price | Show Payment Plan Preview on Product Page |
| Product cards | Float badge in listings and grids | Show Payment Plan Preview on Product Cards |
| Checkout | Float as a payment method | Enable Solution, plus min and max cart amount |

That preview isn't a hardcoded "up to 24 months" marketing number. The block reads your **own Float merchant configuration**, walks the terms in your rules, and renders the real maximum available to you. If your terms change on Float's side, your product pages follow. Both previews are independently switchable per store.

## The hard part: who creates the order, and when?

Here's the problem at the center of every redirect-based payment method. Your shopper leaves your site, does something on the provider's page, and comes back — or doesn't. Somewhere in that gap you have to decide when a Magento order exists.

The module was built the tidy way first (v1.0.2): create the order when the success webhook arrives. Only paid orders ever become orders, so your sales data stays clean. That was wrong.

Between the redirect and the webhook, the purchase exists nowhere in your system. Stock isn't reserved. The increment ID doesn't exist yet. If anything goes sideways, the customer's money moved and you have no order to attach it to.

**In v1.0.5 the flow was inverted**, at the request of the merchants' agency (November 2023): the Magento order is created *before* the redirect, in `pending_payment`, with the quote reserving its order ID up front. Now an attempt is a real record from the moment the shopper leaves, and the webhook's job shrinks to moving state on an order that already exists.

That inversion creates one new problem — abandoned pending orders — which is a much better problem to have. A cron sweeps them:

```php
$orderCollection->addFieldToFilter('state', ['in' => [Order::STATE_NEW, Order::STATE_PENDING_PAYMENT]]);
$orderCollection->addFieldToFilter('method', ['eq' => FloatHelper::METHOD_CODE]);
$orderCollection->addFieldToFilter('created_at', ['lteq' => $date]); // 24 hours ago
```

Float orders left unpaid for a day are canceled (not deleted), scoped strictly to this payment method. Canceled rather than deleted, because "this customer tried and didn't finish" is information worth keeping.

## Trusting a webhook you didn't send

The notify endpoint is the module's most dangerous surface. It's a public URL, it moves money, and anyone can POST to it. Four guardrails, in order:

- **It validates the response before acting on it.** If the payload doesn't check out against the order, the order gets canceled and the failure is logged.
- **It only accepts orders in a state that makes sense.** Anything not `pending_payment` or `new` is logged and ignored — making the endpoint idempotent for free. A provider retrying a webhook three times is not a reason to invoice a customer three times.
- **Emails wait for the invoice.** (Fixed in v1.0.6.) The confirmation only sends once payment succeeded and an invoice exists, guarded against double-sends. Your customer never gets a receipt for a payment that failed.
- **Everything lands in one log** at `var/log/float.log`, debug and error both, with debug switchable from the admin.

## Built with Magento's payment pattern, not around it

The module is a proper gateway integration on Magento's own payment framework: a facade virtualType, a command pool, a validator pool.

```xml
<virtualType name="FloatValidatorPool" type="Magento\Payment\Gateway\Validator\ValidatorPool">
    <arguments>
        <argument name="validators" xsi:type="array">
            <item name="currency" xsi:type="string">X2Y\FloatPayments\Gateway\Validator\Currency</item>
            <item name="country" xsi:type="string">X2Y\FloatPayments\Gateway\Validator\Country</item>
        </argument>
    </arguments>
</virtualType>
```

Country and currency eligibility are validators, so Float appears only where you've configured it to. Availability is an observer checking cart minimum and maximum. Config lives in the standard Payment Methods section, scoped per website. No custom admin screen to learn. Nothing clever enough to be fragile.

## The unglamorous work is the whole product

Scroll the changelog and there's no headline feature — just the specific ways a payment method can quietly fail one segment of your customers:

- **Guest checkout was broken** (v1.0.9). Guests carry a masked quote ID, not a real one, so the module now resolves it when there's no logged-in customer. Before that fix, a chunk of buyers hit a payment error and just left.
- **Multi-website support** (v1.0.4, hardened in v1.0.8) and per-store config scope. Different brands, different Float credentials, different terms.
- **PHP 8.3 and Magento 2.4.6 through 2.4.7** compatibility, so the payment module is never the reason you can't upgrade.
- **Order status is configurable**, because your fulfillment team's workflow is yours and not ours to dictate.
- **Auth tokens self-heal.** Credentials are exchanged through an SPI and cached; re-saving the payment config refreshes them. No expiry to babysit.
- **Unit tests on the paths that touch money**: the notify controller, order creation, the cancel cron, the login SPI, availability. So that the thing which breaks in a refactor is a test, not a customer's checkout.

None of that is exciting. All of it is why you can install this and then stop thinking about it — the only real compliment a payment module can receive.

## Your move

If you're running Magento or Adobe Commerce and want Float in your checkout, X2Y builds and maintains this module. If you're already running it and want the plan preview tuned, the flow adapted, or a stubborn edge case chased down, that's regular work too.

[Tell us about your site], or read more about how X2Y [builds payment and platform integrations].

---

**Keep reading:**
- Building a buy now, pay later payment module for Magento 2 from scratch (6 min read)
- Magento Proxy Pay gateway module: what ProxyPay is and how to set it up (7 min read)
- When to switch from Authorize.Net to Stripe on Adobe Commerce (13 min read)
