The Payfim non-merchant gateway lets Blesta clients pay one or several invoices with crypto through your own Payfim Gateway.
Before you start, install your Payfim Gateway and add your wallets (see Install the gateway and Add wallets). Compatibility: Blesta 5.x · PHP 7.4 – 8.4.
- Upload the gateway.
Unzip
payfim-blesta.zipand upload the contents ofupload/to your Blesta root. This createscomponents/gateways/nonmerchant/payfim/. - Install it.
In Blesta go to Settings → Company → Payment Gateways → Available and click Install next to Payfim Crypto Payments.
- Enter your gateway details.
Enter the Payfim Gateway URL and API Key (Payfim dashboard → Integrations), optionally change the button text and description, tick the currencies you accept and click Update Settings.
Tip: The connection to your gateway is tested when you save; a wrong URL or key shows an error and nothing is stored. Blesta keeps the API key encrypted.
- How payments are recorded.
Clients choose Pay with Crypto when paying. The Payfim invoice is created on the server for the selected invoices; after payment Payfim calls
/callback/gw/1/payfim/with a signed webhook. The gateway re-checks the payment and returns the transaction to Blesta with the blockchain transaction hash as its ID, so it is applied to the invoices exactly once. Underpaid payments are recorded as Pending transactions (not applied) for you to review.
Troubleshooting
- "Could not connect to your Payfim gateway" on save
- Check the URL and that the key starts with
pf_live_; Blesta must be able to reach the gateway. - Payfim is not listed under Available gateways
- The folder must be
components/gateways/nonmerchant/payfim/(lowercase). - Webhook never arrives / invoice stays unpaid
- Your billing site must be reachable from the Payfim gateway server over HTTPS. Check Webhooks in the Payfim dashboard for the delivery log and HTTP status; failed deliveries are retried automatically for 24 hours.
Get the Blesta Crypto Payment Gateway - the download includes an illustrated PDF version of this guide.
