WP Manifestindependent plugin directory
manifest / ecommerce / kaspa-woocommerce-gateway

Kaspa Payment Gateway

Directly Pay with Kaspa in Your Wordpress / Woocommerce Shop!!! Safe & Fast

by KaspaBuy · github.com/hapince-code/kaspa-woocommerce-gateway · website

5stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/hapince-code/kaspa-woocommerce-gateway/archive/refs/heads/main.zip

Readme

KaspaPay

KaspaPay — WooCommerce Kaspa Gateway

Accept Kaspa (KAS) payments directly in your WooCommerce store.
Zero fees. Fully open source. No middleman.

Website WooCommerce PHP 7.4+ GPL v3 Version 2.3.5


Why KaspaPay?

0% Transaction Fees 100% Open Source Your Keys, Your Money
No subscription, no processing fee, no hidden cut. Payments go directly from customer to merchant — we never touch your funds. Every line of code is public and auditable. No obfuscation, no phone-home telemetry, no vendor lock-in. The plugin uses only your extended public key (kpub). Private keys never leave your wallet.


KaspaPay checkout experience


How It Works

flowchart LR
    A[Merchant Wallet<br/>kpub only] -->|HD Derive| B[Unique Address<br/>per Order]
    C[Customer Pays] -->|KAS Transfer| D[Kaspa Blockchain]
    D -->|REST API Poll| E[Plugin Verifies UTXO]
    E -->|Confirmed| F[WooCommerce<br/>Order Complete]
  1. Merchant configures an account-level kpub — a public-only key that can derive addresses but can never spend.
  2. At checkout, the plugin derives a fresh, unique Kaspa receive address from the kpub using BIP-44 HD derivation (m/44'/111111'/account'/0/index).
  3. Customer sends KAS to that address. The plugin polls the public Kaspa REST API and checks the order address UTXO set.
  4. When the required sompi amount arrives, WooCommerce marks the order as paid — automatically.

⚠️ Never enter a kprv, seed phrase, or regular address. The plugin is designed to work with public key material only.


Quick Start

Step Action
1 Upload the woocommerce-kaspa-gateway folder to wp-content/plugins/ and activate.
2 Go to WooCommerce → Settings → Payments → KaspaPay.
3 Ensure the PHP BCMath extension is enabled (see status indicator in settings).
4 Paste your account-level mainnet kpub (exported at m/44'/111111'/account').
5 Set a starting address index and enable the gateway.
6 If your store currency is not USD, enter the USD value of 1 unit of your currency.
7 Run a small test order end-to-end to confirm everything works.

Compatibility

Feature Status
Classic WooCommerce Checkout Full support
WooCommerce Checkout Block Full support
WooCommerce HPOS (Custom Order Tables) Compatible
PHP 7.4 – 8.x (BCMath required)
WordPress 6.0+
WooCommerce 7.4 – 10.x

Configuration Reference

Setting Description
kpub Your account-level Kaspa extended public key. Derived addresses use receive branch 0.
Starting index The first address index to use. Auto-increments — never lower it after addresses have been assigned.
USD value of 1 [currency] Conversion rate for non-USD stores (e.g., 0.14 when 1 CNY ≈ 0.14 USD).
Fallback KAS/USD price Optional. Used only when the Kaspa price API is temporarily down.
Payment check interval How often the plugin polls the blockchain (10–300 seconds, default 15).
Debug logging Writes API errors to WooCommerce → Status → Logs (kaspa-gateway source).

How Payments Work (Details)

  • Multiple transfers allowed — customers can pay in one or several transactions.
  • Overpayment is fine — only the required sompi amount is tracked; extra stays with the merchant.
  • UTXO-based verification — the plugin counts only confirmed transaction outputs sent to the order's unique address after the order was created.
  • Concurrency-safe — unique database indexes prevent duplicate address allocation during simultaneous checkouts.
  • Retry & fallback — the plugin retries failed API calls through verified IPv4 cURL and falls back to WordPress AJAX when WooCommerce AJAX is unavailable.

Hooks & Filters

Filter Purpose
kaspa_gateway_api_base Point the plugin to a self-hosted Kaspa REST API.
kaspa_gateway_qr_code_url Replace the default QR code service (api.qrserver.com).
kaspa_gateway_icon Customize the payment method icon shown at checkout.

Version History

Version Highlights
2.3.5 Viewport-centered payment modal; classic Kaspa teal branding; dual AJAX transport registration; cached nonce tolerance; verified IPv4 cURL retry for failed API responses.
2.3.4 Modal anchored to browser viewport for exact vertical centering; live required/paid KAS amounts.
2.3.3 Precise modal centering; Kaspa brand color on payment addresses; unified English UI copy.
2.3.2 WooCommerce AJAX priority; WordPress AJAX fallback; fixed modal positioning & long-address overflow.
2.3.1 Certificate-verified native cURL/IPv4 fallback; UTXO set verification fallback for address queries.
2.3.0 Expanded kpub database field; order index tracking. ⚠️ Back up your database before upgrading.

Security

  • kpub only — the plugin uses a public-only extended key. It cannot sign transactions or access funds.
  • No external services — payment verification reads directly from the Kaspa public REST API. No middleman holds or routes your payments.
  • No telemetry — the plugin does not phone home, collect analytics, or communicate with any server other than the Kaspa API and QR code service you configure.
  • Open source — every line is auditable. You can verify exactly what the code does.

License

This plugin is open source software, licensed under the GPL v3 or later. You are free to use, modify, and distribute it.


Built with ❤️ by KaspaBuy — because payments should be permissionless.

Read the full README on GitHub →