

Blesta
Cryptonly lets your Blesta company accept Bitcoin, stablecoins, and other cryptocurrencies through Cryptonly’s secure hosted checkout. Customers pay on the Cryptonly payment page. Blesta applies the settled amount only after a signed webhook.
Requirements
Section titled “Requirements”| Requirement | Details |
|---|---|
| Blesta | 6.0 or newer (tested on 6.0.0 and 6.0.3) |
| PHP | 8.2, 8.3, or 8.4 |
| Cryptonly account | cryptonly.net merchant account |
| Credentials | API key and webhook signing key from the account’s Accounts → Settings → Security page |
| Public HTTPS URL | Required so Cryptonly can deliver webhooks. Cryptonly does not follow redirects |
Before you install — Cryptonly account
Section titled “Before you install — Cryptonly account”- Sign up at cryptonly.net (or sandbox-merchant.cryptonly.net for testing).
- Open Accounts, select the account, then Settings → Security. Create an API key. The key selects that account.
- On the same page, under Webhook signing key, click Rotate key and copy the secret when it is shown. It appears only once, and the previous key stops working immediately.
Install the gateway
Section titled “Install the gateway”-
Download the Cryptonly gateway from the Blesta Marketplace.
-
Extract the archive in your Blesta root (FTP, SFTP, or your hosting file manager). The zip already contains the
components/folder, so it merges with the existing one.After extraction, this file should exist:
components/gateways/nonmerchant/cryptonly/cryptonly.php -
In the Blesta staff area, open Settings → Company → Payment Gateways → Available and install Cryptonly.
-
Enable Cryptonly on the order form under Packages → Order Forms. Clients can also pay an open invoice from the client area.
Configure the gateway
Section titled “Configure the gateway”Open Settings → Company → Payment Gateways → Installed, choose Manage next to Cryptonly, and fill in the fields:
| Blesta field | What to enter |
|---|---|
| API Key | Cryptonly API key. The key selects the account. See required scopes |
| Webhook Signing Key | Required. Payments are confirmed only via webhooks |
| Sandbox Mode | Enable to use the Cryptonly sandbox API for testing |
| Order ID Prefix | Optional. Default BLESTA produces BLESTA-12, then BLESTA-12-2 on a later attempt. Several invoices paid together use BLESTA-12x34 |
| Debug Log | Optional. Writes entries to Tools → Logs → Gateway |
The settings page shows the Webhook URL. The gateway also sends that URL with each invoice, so you do not paste it into the Cryptonly dashboard.
Leave the API key or signing key blank on a later save to keep the stored value.
API key scopes
Section titled “API key scopes”Create the key on the account’s Accounts → Settings → Security page and enable only these scopes:
| Scope | Used for |
|---|---|
currencies.list | Confirm the API key when saving the gateway (GET /currencies) and list the fiat currencies this gateway can be enabled for (GET /currencies/fiat) |
invoices.list | Reuse a payable invoice or choose the next orderId, and load the invoice when create returns a duplicate (GET /invoice) |
invoices.create | Create the invoice at checkout (POST /invoice) |
Click Update Settings. The gateway validates the API key with Cryptonly GET /currencies.
Test in sandbox
Section titled “Test in sandbox”- Enable Sandbox Mode and enter credentials from sandbox-merchant.cryptonly.net.
- Confirm the Blesta URL Cryptonly will call is public HTTPS.
- Create a test Blesta invoice and choose Pay with Cryptonly.
- Complete payment on the Cryptonly hosted page (testnet only in sandbox), or use Simulate payment on the invoice in Cryptonly Accounts → History to settle it without sending testnet funds. See Testing your integration.
- Verify Blesta applied the payment and entries appear under Tools → Logs → Gateway.
- Optional: in Cryptonly admin, use Settings → Integration → Test webhooks against your callback URL. See Testing your integration.
See the Sandbox environment guide for supported test networks and safety notes.
How Blesta invoices are updated
Section titled “How Blesta invoices are updated”The gateway listens for invoice.statusChanged webhooks and applies payments only on settled amounts. Returning from the hosted page does not mark the invoice paid.
| Cryptonly invoice status | Blesta behavior |
|---|---|
created, processing | No payment recorded. The customer may still pay on the hosted page |
suspended | A pending transaction is recorded. No funds are applied |
paid, overpaid | The amount still due is applied. An overpay is not added as client credit |
partially_paid | settlement.amountPaid is applied and the invoice stays open. The next checkout starts a new Cryptonly invoice for the remainder |
expired, failed, cancelled | No payment recorded. A later paid after expired can still be applied |
Cryptonly invoice expiry follows the Blesta due date, from 15 minutes up to 30 days.
The gateway does not send refunds or voids to Cryptonly. Record those in Blesta separately.
Go live checklist
Section titled “Go live checklist”Before accepting real payments:
- Disable Sandbox Mode
- Enter production API Key and Webhook Signing Key
- Confirm the Blesta site URL is public HTTPS
- Place a small real test payment and confirm the invoice is paid
Related documentation
Section titled “Related documentation”Support
Section titled “Support”For help with your Cryptonly merchant account, credentials, or payment questions, visit Cryptonly or write to [email protected].