Sign inStart free
Crypto payment plugin

Blesta decentralized crypto payment gateway: accept USDT, USDC, ETH, Bitcoin, and SOL

For sellers · v1.0.0

Blokbay is a decentralized, non-custodial crypto payment gateway: payments are settled on the blockchain and reach your own wallet, never a Blokbay wallet. Accept crypto payments in Blesta with an open-source non-merchant gateway: your hosting, VPS, VPN and domain clients pay one or more invoices in USDT, USDC, ETH, BTC or SOL and the money goes from their wallet directly to yours.

Blesta

Supported versions
Blesta 5.x (non-merchant gateway)
Plugin version
1.0.0
File
blokbay-blesta-1.0.0.zip
License
MIT
Download from GitHub blokbay-blesta-1.0.0.zip

Tested with a simulated Blesta environment that reproduces the Blesta classes used by the gateway; a test on a live Blesta installation is in progress.

What the Blesta plugin does

The module adds "Pay with crypto" to your Blesta invoices. Your client opens an unpaid invoice, pays on a Blokbay payment page from any compatible wallet, then returns to the invoice.

The payment is added to the invoice when the signed webhook from Blokbay arrives, after the module has read the payment again from the Blokbay API and checked the amount and the currency. If the webhook is late, the same check runs when the client comes back, and the same payment is never recorded twice.

Coins and networks

Your customer chooses the coin on the payment page:

  • BTC on Bitcoin, from 100 USD: two exact transfers from the customer's wallet, one of them straight to your Bitcoin address
  • USDC on Ethereum, Polygon, BNB Chain, Base, Arbitrum, and Solana
  • USDT on Ethereum, Polygon, BNB Chain, Arbitrum, and Solana
  • ETH on Ethereum, Base, and Arbitrum
  • SOL on Solana

Funds go straight to your wallet

Blokbay never holds your money. With USDT, USDC and ETH (paid from a connected wallet) a public smart contract splits each payment in the same transaction: your share arrives in your own wallet and 1% goes to Blokbay. The contract has no owner, cannot be modified and never holds funds; its source code is published and verified on Etherscan and Sourcify. There is no balance on our side, so nothing can be blocked or frozen and there is no payout to wait for.

Gateway contract: 0xd4b637cC81D5B5115Cd0204A9ba6B60474F05e31 (Ethereum, Polygon, BNB Chain, Base, and Arbitrum)

Price

The plugin is free. Blokbay withholds 1% of each payment automatically and you receive 99%. No monthly fee, no setup fee, no fixed cost per transaction. Payments start from 1 USD, Bitcoin from 100 USD. The customer pays the network fee of their own transfer.

Store currencies

Your Blesta invoices can be in USD, EUR, GBP, CHF, JPY, CAD, AUD, SGD, HKD, and AED. The module sends the invoice amount in that currency and your client pays in crypto at the current public exchange rate, locked when they choose the coin.

Installation

Before you start, sign in to Blokbay with your email, add your wallet address in Settings and create your keys in Payments on your site. Then:

  1. Extract the zip into components/gateways/nonmerchant/ of your Blesta installation, then open Settings > Payment Gateways > Available and add Blokbay.
  2. Open Settings > Payment Gateways > Installed > Blokbay Crypto Payments and paste the secret key (sk_live_...) and the webhook signing secret (whsec_...) from your Blokbay dashboard.
  3. In the Blokbay dashboard, enter the webhook URL https://your-blesta/callback/gw/1/blokbay/ and send the test event.

How it works, technically

For developers and for whoever installs the plugin: what happens on the network and on your server during a payment.

The smart contract

Payments in USDT, USDC and ETH from a connected wallet go through LuxSplit, the public smart contract of the Blokbay gateway. The contract has the same address on every network and its source code is verified: you can read it on the block explorer and on Sourcify and compare it with the code running on the network.

NetworkChain IDContract addressCoinsVerified source code
Ethereum10xd4b637cC81D5B5115Cd0204A9ba6B60474F05e31USDC, USDT, ETHEtherscan · Sourcify
Polygon1370xd4b637cC81D5B5115Cd0204A9ba6B60474F05e31USDC, USDTPolygonscan · Sourcify
BNB Chain560xd4b637cC81D5B5115Cd0204A9ba6B60474F05e31USDT, USDCBscScan · Sourcify
Base84530xd4b637cC81D5B5115Cd0204A9ba6B60474F05e31USDC, ETHBasescan · Sourcify
Arbitrum421610xd4b637cC81D5B5115Cd0204A9ba6B60474F05e31USDC, USDT, ETHArbiscan · Sourcify

What the contract does in a transaction

  • It receives the payment reference, your wallet address and your amount, adds the fee (101 basis points of your amount, that is 1% of the price paid) and in the same transaction sends your amount to your wallet and the fee to the Blokbay address.
  • With USDT and USDC the tokens go directly from the customer's wallet to yours and to the fee address: the wallet first asks for an approval, then for the payment. With ETH the contract forwards the amount at once and rejects any amount that is not exact.
  • If either transfer fails, the whole transaction is reverted: a payment is never half done.
  • At the end it emits the Paid event with the payment reference, the customer, your wallet, the token, your amount and the fee.
  • It keeps no balance (plain transfers to it are rejected), has no owner and no admin function, and cannot be modified or paused. The fee and the fee address were fixed when the contract was created.

Blokbay does not hold your money

There is no Blokbay balance in your name: nothing to withdraw, no payout to wait for, no funds that can be blocked or frozen. The money is in your wallet as soon as the transaction is confirmed.

Opening an account takes your email and your wallet address, with no paperwork or documents. You remain responsible for your website and for your obligations, including taxes and invoices.

Fee

1% of each payment, withheld in the same transaction. No monthly fee and no setup fee. The customer pays the network fee of their own transaction.

Bitcoin: two exact transfers

Bitcoin has no smart contracts that can split a payment, so the customer makes two transfers with exact amounts from their wallet: the first, about 1% of the price, goes to the Blokbay address; the second, the rest, goes straight to your Bitcoin address. The last digits of the two amounts identify the payment. Bitcoin is available from 100 USD, and the payment is confirmed when both transfers have 2 confirmations.

Solana: one transaction, two transfers

USDC, USDT, and SOL on Solana are paid with one transaction that contains two transfers, one to your Solana address and one to the Blokbay address, which succeed or fail together; no smart contract is involved. The customer signs it in a Solana wallet or with a Solana Pay QR code. The payment counts as paid when the finalized transaction carries the payment reference and both transfers have the right amounts. Solana appears at checkout when you have added a Solana address in your settings.

Paying without connecting a wallet

The customer can also pay from an address or a QR code, from any wallet or exchange. The payment page then asks for two transfers with exact amounts, one to your wallet and one for the fee, and both are read on the network in the same way. On Base, from 10 USD, the page can instead show a single transfer to an address created only for that payment; a public contract then splits it between your wallet and the fee.

How the plugin knows an order is paid

Blokbay marks a payment paid only after reading on the network the Paid event of the contract with the right payment reference, wallet, token and amount (Bitcoin: both transfers with 2 confirmations).

Blokbay then sends payment.paid to the webhook URL of your store: a POST request signed with HMAC-SHA256 in the Blokbay-Signature header (t = timestamp, v1 = signature of "t.body"), computed with your own signing secret. The plugin checks the signature, then the amount and the currency of the payment, and only then marks the order paid.

If your server does not answer with a 2xx status within 10 seconds, Blokbay tries again after 1 min, 5 min, 30 min, 2 h, 6 h, 12 h, 24 h, and 24 h: 9 attempts in all. When the customer comes back to your store the plugin also asks the API for the status, so a late webhook does not leave the order waiting.

API and webhook reference

Open source

The Blesta plugin is open source: you can read on GitHub what it sends and receives before installing it. License: MIT. github.com/blokbay/blesta-crypto-payments

Questions about the Blesta plugin

How do I install the Blokbay gateway in Blesta?
Extract the zip into components/gateways/nonmerchant/, install Blokbay Crypto Payments in Settings > Payment Gateways > Available, paste your keys and select the accepted currencies. Then set the callback URL shown on the settings page, such as https://your-blesta/callback/gw/1/blokbay/, as webhook URL in your Blokbay dashboard.
Can a Blesta client pay several invoices at once?
Yes. The invoices chosen by the client travel with the payment and the amount is applied to each of them. If the list is too long for the payment reference, the payment is recorded as client credit and Blesta applies it according to your settings.
Has the Blesta gateway been tested on a live installation?
Not yet. Version 1.0.0 was tested with a simulated Blesta environment that reproduces the classes the gateway uses and the recording of transactions; a test on a live Blesta installation is in progress.
What is a decentralized crypto payment gateway?
It is a way to accept crypto payments without a company holding your money along the way. With Blokbay, on Ethereum, Polygon, Base, Arbitrum, and BNB Chain a public smart contract with no owner splits each payment on the blockchain: your share goes to your wallet and the fee (1% on your website, 3% in a Blokbay store) is withheld in the same operation. On Bitcoin your customer's wallet sends your share directly to you. Blokbay runs the payment page, the API and the plugins, but never holds your funds.
Does Blokbay hold the money paid in my Blesta store?
No. With USDT, USDC and ETH (paid from a connected wallet) the public contract sends your share to your wallet in the same transaction. With Bitcoin the customer makes two transfers, one of them directly to your address. Blokbay has no balance in your name.
How much does the Blesta plugin cost?
The plugin is free and there is no monthly fee. Blokbay withholds 1% of each payment automatically, so you receive 99% of the amount paid. The customer pays only the network fee of their transfer.
Is there a test mode?
Yes. In the dashboard, under Payments on your site, turn on Test mode: for 24 hours the payments of your store are test payments with a Simulate payment button, and the payment.paid webhook arrives with "test": true. No money moves, no fee is charged and the plugin needs no change. While it is on, real orders can also be marked as paid without payment, so turn it off before real sales. A real payment of 1 USD to your own wallet stays available. You can also turn it on from the connection page that opens with Connect again in the plugin settings; connecting alone never turns it on.
Can I check the smart contract before accepting payments?
Yes. The gateway contract has the address 0xd4b637cC81D5B5115Cd0204A9ba6B60474F05e31 on Ethereum, Polygon, BNB Chain, Base, and Arbitrum. Its verified source code is on Etherscan, Polygonscan, BscScan, Basescan, and Arbiscan and on Sourcify.
Can Blokbay block or freeze the money I receive?
No. Payments go from the customer's wallet to yours through a contract with no owner that keeps no balance. Blokbay has no balance in your name, so there is nothing it could block, freeze or hold back.
How does the plugin verify that an order is paid?
Blokbay reads the Paid event of the contract on the network, then sends the payment.paid webhook signed with HMAC-SHA256 in the Blokbay-Signature header. The plugin checks the signature, the amount and the currency before marking the order paid; if the webhook does not arrive, Blokbay tries again and the plugin asks the API when the customer comes back.
Why does Bitcoin need two transfers?
Bitcoin has no smart contracts that can split a payment. The customer sends two exact amounts: about 1% to Blokbay and the rest straight to your Bitcoin address. Both are read on the network before the order is marked paid.

You remain the seller: you are responsible for your store, your products and your obligations towards your customers, including taxes and invoices.

Open your store for free

0 per month and 3% on each sale, withheld automatically: you receive 97% of the price. No fixed costs. Your store is ready in two minutes.

No card required. Your store is ready in two minutes.

Plugins for other platforms