Skip to content
Payfim - Secure. Simple. Yours.
Blesta · v3.0.0

Blesta Crypto Payment Gateway

Let your Blesta clients pay one invoice, several invoices or top up their account credit with Bitcoin, USDT, Ethereum, Monero and 12 more coins. Every payment lands in your own wallet and is recorded in Blesta against the right invoices, exactly once.

  • Lifetime license, 0% fees
  • Pays straight to your wallet
  • 16 coins incl. USDT TRC20/ERC20
  • Illustrated PDF guide

Compatibility: Blesta 5.x · PHP 7.4 - 8.4

Blesta and Payfim: the self-hosted gateway dashboard next to a USDT TRC20 checkout with QR code

Everything you need to accept crypto on Blesta

Non-merchant gateway

Installs under Settings > Company > Payment Gateways like any Blesta gateway.

Multi-invoice payments

One crypto payment can settle several invoices or add account credit.

Exactly-once posting

Each payment is keyed by the blockchain transaction hash.

Underpayment review

Short payments are held as pending for you to review.

Signed webhooks

HMAC-verified notifications re-checked with your gateway.

Connection check

Your gateway is tested when you save the settings.

Who the Blesta crypto gateway is for

Blesta describes itself as billing, provisioning and support for web hosts, freelancers and MSPs. Those businesses share a billing pattern: many small recurring invoices, clients spread across many countries, and a support desk that has to answer "did my payment arrive?" quickly.

The Payfim gateway plugs into that pattern without changing it. Blesta keeps doing what it already does - generating invoices, suspending and unsuspending services, sending reminders. Payfim adds one more way to pay those invoices: in crypto, confirmed on the blockchain, sent to your own wallet addresses. There is no processor account behind it, so there is nothing to apply for, no payout schedule and no percentage taken from your renewals.

If you run a hosting company on another billing system, see the WHMCS module or our guide to crypto payments for web hosting companies.

Pay several Blesta invoices with one crypto payment

Blesta lets a client tick more than one open invoice on the payment page and pay them together, or pay an amount toward account credit. Payfim is built as a Blesta non-merchant gateway, the same gateway type Blesta uses for off-site payment pages, so it receives that full selection.

Here is what that looks like for a typical client with a domain renewal of $10.00 and a hosting renewal of $49.90:

  1. The client selects both invoices in the client area and chooses Pay with Crypto.
  2. The gateway creates one Payfim invoice for $59.90 on the server, together with the list of Blesta invoices it covers.
  3. The client picks a coin on your checkout page and sends a single payment.
  4. Your gateway confirms it and Blesta records one approved transaction of $59.90 that is applied to both invoices.

One blockchain transfer, one fee paid by the client, two invoices closed. For clients paying in Bitcoin or Ethereum, that saves them a second network fee.

How payments are recorded in Blesta

Blesta stores gateway transactions with a transaction ID. Payfim uses the blockchain transaction hash as that ID and the Payfim invoice number as the reference. That matters in three situations:

  • Retried notifications. If your gateway delivers the same webhook twice, Blesta updates the existing transaction instead of adding a second one, so the payment is applied once.
  • Payments still confirming. While the transaction waits for confirmations, it is recorded as pending. When it reaches the confirmations you set, the same transaction becomes approved and is applied.
  • Reconciliation. Your accountant can take any transaction in Blesta and look up the hash on a block explorer.

If a client sends less than the invoice total (beyond the small 0.5% default tolerance), Blesta receives a pending transaction for the amount that arrived and it is not applied to any invoice. The invoice stays open, the gateway log shows "Only X of Y received", and you decide whether to ask for the difference or refund from your wallet. Our article on handling crypto underpayments and refunds covers the options.

Security checks on every Blesta callback

Payfim posts payment notifications to Blesta's standard gateway callback URL. Before anything is written, the gateway plugin checks that:

  • the X-Payfim-Signature header is a valid HMAC-SHA256 of the body, signed with your API key, and less than five minutes old;
  • the invoice still exists on your Payfim gateway when fetched directly, and its status and amount match the notification;
  • the Blesta invoices being paid belong to the paying client and use the same currency as the Payfim invoice.

Forged or replayed notifications are rejected. Blesta stores the API key encrypted, and the settings form tests the connection to your gateway when you save - a wrong URL or key shows an error and nothing is stored. Read more about the design on our security page.

Which coins can Blesta clients pay with?

Any of the 16 coins and networks your Payfim gateway supports: Bitcoin, Ethereum, USDT on TRON and on Ethereum, USDC, Litecoin, Solana, XRP, TRON, Dogecoin, Bitcoin Cash, Cardano, BNB, Chainlink, Hyperliquid HYPE and Monero. You switch each one on in the gateway, not in Blesta, so adding a coin later needs no Blesta change.

For hosting clients, dollar stablecoins are usually the most practical choice because the amount you receive does not move with the market. Start with USDT on TRON and Bitcoin, then add more from the supported coins list.

Most of the tuning happens in the Payfim gateway rather than in Blesta. For a hosting business billing monthly and yearly renewals, these settings work well as a starting point:

  • Run the cron job every minute. The gateway checks the blockchain on a schedule, so a one-minute cron keeps the time between "client paid" and "invoice paid in Blesta" short. See setting up the cron job.
  • Keep the default confirmations unless you have a reason to change them - for example 1 for Bitcoin, 2 for Litecoin and 6 for Ethereum tokens. Raise them for large invoices such as dedicated server contracts.
  • Leave the 30-minute rate lock on. The client sees a fixed crypto amount while they pay. Late payments after the quote expires are still detected, so you can review them instead of losing track.
  • Consider a crypto discount. A negative price adjustment, such as -5%, encourages clients to use a payment method with no chargebacks.

Requirements

Blesta5.x
PHP7.4 - 8.4 (as supported by your Blesta version)
Gateway typeNon-merchant (off-site checkout)
CurrenciesThe Blesta currencies you tick in the gateway settings
GatewayPayfim Gateway 3.0+ (included in your download)
NetworkHTTPS, and your Blesta site reachable from the gateway server

How to install the Blesta crypto payment gateway

  1. Install the Payfim gateway. Upload the payfim-gateway folder to your hosting (for example pay.yourhost.com), run the installer and add your wallet addresses. See installing the Payfim gateway.
  2. Upload the Blesta gateway. Unzip payfim-blesta.zip and upload the contents of upload/ to your Blesta root. This creates components/gateways/nonmerchant/payfim/.
  3. Install it. In Blesta go to Settings → Company → Payment Gateways → Available and click Install next to Payfim Crypto Payments.
  4. Connect. Enter your Payfim Gateway URL and the API key from Payfim dashboard → Integrations, tick the currencies you accept and click Update Settings. The connection is tested on save.
  5. Test. Create a small invoice for a test client and pay it from the client area with Pay with Crypto. The full walkthrough is in the Blesta docs.

Blesta crypto payments FAQ

Can a client pay several Blesta invoices at once in crypto?

Yes. The client selects the invoices on Blesta's payment page, sends one crypto payment for the total, and Blesta applies the approved transaction to each selected invoice.

Can clients add account credit with crypto?

Yes. When a client pays an amount toward credit instead of a specific invoice, the approved transaction is added to their Blesta account credit.

What happens if a client underpays a Blesta invoice?

The amount received is recorded as a pending transaction that is not applied to the invoice. The invoice stays unpaid until you review it.

Where do I find the blockchain transaction hash in Blesta?

It is the transaction ID of the payment in the client's transaction list, so you can search for it and verify it on any block explorer.

Is the Blesta gateway code encrypted?

No. It is plain PHP in components/gateways/nonmerchant/payfim/ that you or your developer can read and audit.

Does Payfim take a cut of Blesta renewals?

No. You pay once for the license (see pricing). Clients pay only the normal blockchain network fee, and coins go straight to your wallet.

Which currencies can Blesta invoices be in?

Any Blesta currency you tick in the gateway settings. The crypto invoice is created in the Blesta invoice currency and converted at the live rate when the client picks a coin.

Related integrations