Blog

How to accept crypto payments in Blesta

CoinStackUpdated 9 min read
Integrations

To accept crypto payments in Blesta, install a non-merchant gateway that sends clients to a hosted checkout and records each payment against their invoices. With the CoinStack gateway that is 4 steps on Blesta 6 or newer: create an API key, copy the components folder into your Blesta root, install Crypto (CoinStack) under Settings > Payment Gateways > Available, then paste the key and choose your currencies. Each payment costs 0.8% and settles as USDC to a wallet you control.

What a crypto gateway does in Blesta

Blesta sorts payment gateways into 2 classes. Its integrations page says that "Merchant gateways charge cards on file automatically when invoices come due; non-merchant gateways hand off to a hosted checkout." Every crypto gateway is the second kind. That includes the 5 on Blesta's own list of 36 gateways (BitPay, BTCPay Server, Blockonomics, CoinGate and CoinPayments) and the CoinStack gateway described here.

Three things follow from that class. The client pays on CoinStack's hosted checkout and is returned to the client area afterwards. Blesta learns about the payment from a notification the gateway sends to your server, so your server has to be reachable from outside. And the client sends each payment from their own wallet, so every renewal invoice is paid through the hosted checkout, with Blesta sending the reminders.

Blesta's developer documentation says non-merchant gateways are placed in /installpath/components/gateways/nonmerchant/. That is why the download below contains a components folder and why you copy it into the Blesta root. If you are still choosing a provider, the fees and custody models of each are in Blesta crypto gateway options compared.

What you need before you start

  • Blesta 6 or newer. Blesta's release posts date version 6.0 to August 4, 2026 and the 6.0.5 patch to November 18, 2026.
  • The PHP cURL extension.
  • A Blesta address that starts with https:// and has a valid certificate.
  • A CoinStack account. Instant sign-up takes an email code or a Google account, and a wallet is created for the account at the same time. You can create one here.

The steps and behavior below follow the Blesta page of the CoinStack docs.

Install the gateway in 4 steps

  1. Open Developers in the CoinStack dashboard and generate an API key that has Read and write access.
  2. Download the gateway and unzip it. Copy its components folder into your Blesta root.
  3. In Blesta, go to Settings > Payment Gateways > Available and install Crypto (CoinStack).
  4. Paste the API key, choose the currencies to accept, and save.

CoinStack connects when you save. The gateway registers its own webhook, so there are no URLs or secrets to copy between the two systems. If it cannot connect, the settings are not saved and the page says why. The usual reasons are a key that was copied incompletely, a key created as read only, or a Blesta address that does not start with https://.

Two practical notes. Blesta's own gateway pages write the menu path as Settings > Company > Payment Gateways > Available, which is the same screen. And a CoinStack account can hold up to 10 API keys, so give Blesta a key of its own. If you ever need to revoke it, nothing else stops working.

Which currencies can your invoices be in?

CoinStack accepts invoices in 146 currencies, and in the gateway's settings you tick the ones it should be offered for. A client whose invoice is in a currency you left unticked does not see the crypto option.

The invoice amount is converted to US dollars when the checkout is created, and that dollar value does not change afterwards. A checkout has to be worth at least $1 and at most $1,000,000. Each token also has its own minimum, which is $1 on most networks and higher on Bitcoin and TRON, where the network cost is higher. Network cost and who covers it are explained in who pays the network fee on a crypto payment.

What your client sees on an invoice

A client who chooses crypto as the payment method gets a Pay with crypto button. It opens the CoinStack checkout page, where they pick a token and a network and are shown an address, the exact amount and a QR code. There is no wallet to connect. A phone wallet, a hardware wallet or an exchange's withdrawal page all work.

Once the client picks a token, the amount is locked: with no time limit for stablecoins, for 60 minutes for BTC and for 20 minutes for other tokens. When the checkout is completed, the payment is recorded in Blesta as a transaction and applied to the invoice. New orders and renewals then activate as they do with any other gateway. Completion usually takes seconds to a few minutes, depending on the network the client paid on.

If the client leaves and comes back to pay the same amount, the gateway sends them to the checkout they already have, as long as it is still open. A client who closes the tab halfway returns to the same checkout instead of opening a second one for the same invoices.

Paying several invoices with one checkout

A client can pay several invoices in one go. The gateway creates one checkout for the total, and when it completes the payment is applied to each invoice.

Take a client with 3 open invoices of $12, $12 and $36. Paid together they make one $60 checkout. The CoinStack fee is the same either way: 0.8% of $60 is $0.48, and 0.8% of each invoice adds up to the same $0.48. The saving is on the client's side. Kraken's withdrawal fee table charges 1 USDT to withdraw USDT on TRON, so 3 separate payments from that exchange cost the client $3 in withdrawal fees and one combined payment costs $1. On networks where the customer covers the network cost (Bitcoin and TRON by default), it is also added once and not 3 times.

The effect is largest on small services. A 1 USDT withdrawal fee is 8.3% of a $12 invoice and 1.7% of a combined $60 payment. Tell clients they can pay invoices together in your payment instructions, next to the advice in when customers pay straight from an exchange.

Pending transactions and partial payments

A payment passes through a short confirming stage before it completes. During that time the transaction shows as pending in Blesta. Nothing needs doing: it becomes an approved transaction on its own when the checkout completes.

Amounts are not always exact, because an exchange may deduct its fee from what the client sends. CoinStack handles a shortfall in 3 ways:

What arrivedWhat happens
Short by no more than your allowance (0.5% by default)The checkout completes and the invoice is paid. On $60 the default allowance is $0.30.
Short by more than the allowanceThe checkout stays open as partly paid. The client can send the rest to the same address.
Still short when the checkout expires, 24 hours after creation by defaultWhat arrived is recorded and applied to the invoices. The client can pay the rest from the client area.

You set the allowance in the CoinStack dashboard under Settings, then Underpayment. For an expired, partly paid checkout you have one more option: select Mark as resolved on the checkout in the dashboard, and the remainder is recorded and applied in Blesta as well. Use it when the balance left is not worth chasing. That is also the way out when the balance left is under $1, because a new checkout cannot be created for less than $1. The reasons shortfalls happen are covered in underpaid crypto payments.

Renewals, refunds and settlement

Renewals work the way Blesta's gateway class implies. Blesta raises the renewal invoice, the client pays it at the hosted checkout, and the service continues, with Blesta's reminder emails and billing terms handling timing, as described in how recurring billing really works in crypto.

You send refunds from your own wallet rather than from Blesta, on your own timing, because CoinStack never holds your funds. The steps are in how to refund a crypto payment.

Every payment settles as USDC, whatever the client paid with, on the network you choose and at the address you choose, so a $60 invoice paid in BTC leaves you 59.52 USDC after the fee, whatever Bitcoin does the next day. The account owner can withdraw from the dashboard to any supported token and network, for example USDT on TRON to pay an upstream provider, and the dashboard shows the network cost and the amount you will receive before a withdrawal is sent.

Before going live, raise a real invoice for a few dollars, pay it yourself and watch it get marked paid, following the routine in how to test a crypto checkout before launch.

An invoice was paid but Blesta still shows it unpaid

Work through these in order:

  1. Open your Blesta address in a browser and check that it starts with https:// and that the certificate is valid.
  2. Check that your firewall or security plugin allows POST requests from outside to callback/gw/. Payment updates arrive there.
  3. If you changed the address of your Blesta installation, save the gateway settings again so CoinStack sends payment updates to the new address.
  4. Read the gateway log under Tools > Logs > Gateway. Payments and errors are recorded there.

The log is the fastest way to see what Blesta was told. Compare it with the checkout's page in the CoinStack dashboard, which shows the status, the transaction hash and a link to a block explorer. If the dashboard shows the checkout completed and the log shows nothing, the notification did not reach Blesta, and steps 1 to 3 are where to look. If you write to [email protected], include your Blesta version, the invoice number and the related log entries.

Frequently asked questions

If a client pays 2 invoices together and underpays, which invoice gets the money?

If the checkout expires partly paid, the gateway records what arrived and applies it to the invoices in the order they were included, paying each in full before moving to the next. The last invoice is left partly paid or unpaid, and the client can pay the rest from the client area. Marking the checkout as resolved in the dashboard records the remainder instead.

Do I have to set up a webhook or callback URL by hand?

No. When you save the gateway settings with a read and write API key, the gateway registers its own webhook with CoinStack. There is no URL or secret to copy. The one case that needs action is a change of your Blesta address: save the gateway settings again so payment updates go to the new address.

How do crypto renewals work in Blesta?

Each renewal is a new invoice that the client pays through the hosted checkout. Blesta sends reminders ahead of the due date, and longer billing terms mean fewer invoices to pay.

Why does a crypto transaction show as pending in Blesta?

The payment has been detected and is still confirming on its network. The gateway records it as a pending transaction during that stage and it changes to approved by itself once the checkout completes. This usually takes seconds to a few minutes, depending on the network the client used. No manual approval is needed.

How do I test the Blesta gateway before going live?

Create an invoice for a small amount, at least $1, pay it with a low-cost option such as USDC on Base, and watch it get marked paid. To see the payment page your clients will get before you install anything, open the demo checkout.

More posts