=== KXCO Pay — Crypto Payments for WooCommerce ===
Contributors: buzztechjh
Tags: cryptocurrency, bitcoin, ethereum, payment-gateway, crypto
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accept Bitcoin, Ethereum, USDT and USDC straight to your own wallet. Non-custodial, zero commission, with a WooCommerce gateway and a shortcode.

== Description ==

**KXCO Pay** lets your store accept cryptocurrency payments that go **straight to your own wallet**. There is no middleman, no account to open, and KXCO Pay never touches your funds — it simply watches the blockchain and confirms when a payment arrives.

= Why KXCO Pay =

* **Non-custodial.** Customers pay your address directly. You keep 100% of every payment.
* **Zero commission.** No per-transaction fee from us, ever.
* **Bitcoin, Ethereum, USDT (ERC-20) and USDC (ERC-20)** out of the box.
* **WooCommerce gateway** — appears at checkout, settles the order automatically on confirmation.
* **Shortcode & block** — drop a "Pay with Crypto" button on any page for donations, invoices or simple sales, outside the WooCommerce checkout flow.
* **Live checkout widget** — QR code, one-tap copy, locked-rate countdown, and real-time status as the payment confirms.
* **Fiat pricing.** Price in USD/EUR/GBP; KXCO Pay converts to crypto at the live CoinGecko rate and locks it for the checkout window.

= How it works =

1. Enter your receiving wallet addresses in **KXCO Pay → Settings**.
2. A customer chooses a coin at checkout and is shown an exact amount + address + QR code.
3. KXCO Pay watches the chain (mempool.space / Blockstream for BTC, a public explorer for ETH & tokens) and marks the order paid once it reaches your required confirmations.

= Requirements =

WooCommerce must be installed and active. The PHP `bcmath` extension is recommended for exact crypto amounts; KXCO Pay degrades gracefully without it.

KXCO Pay is an independent plugin from KXCO. It is not affiliated with, endorsed by, or sponsored by Automattic Inc. or the WooCommerce project — see the Trademarks section below.

KXCO also sells a separate commercial add-on called KXCO Pay Pro. It is an independent product and is **not** required — every feature described above is included here and fully functional on its own. Details at [pay.kxco.io](https://pay.kxco.io).

== Installation ==

1. Upload the plugin to `/wp-content/plugins/kxco-pay` or install it from the Plugins screen.
2. Activate it.
3. Go to **KXCO Pay → Settings** and enter at least one receiving wallet address.
4. Enable **Crypto Payments (KXCO Pay)** under WooCommerce → Settings → Payments.
5. To take payments outside the checkout, add the shortcode `[kxco_pay amount="49.00" currency="USD"]` or the **Pay with Crypto** block to any page.

== Frequently Asked Questions ==

= Does KXCO Pay hold my money? =
No. It is fully non-custodial — payments go directly to the wallet addresses you configure. KXCO Pay only reads the blockchain to confirm them.

= Do I need an API key? =
No. Bitcoin works out of the box. For Ethereum and tokens you can optionally add a free Etherscan API key for higher reliability, otherwise a keyless public explorer is used.

= How are payments matched to orders? =
Each order is given a unique exact amount, so concurrent payments to the same address can be told apart by value.

= Does it support WooCommerce Blocks (the new checkout)? =
Yes — both the classic and block-based cart/checkout are supported, and it is HPOS-compatible.

= What happens to my data if I delete the plugin? =
Nothing is removed by default — your settings and payment history are kept. Tick **Delete data on uninstall** in KXCO Pay → Settings if you want everything purged when the plugin is deleted.

== External services ==

To verify payments on the blockchain and price orders in your currency, KXCO Pay
contacts the following third-party services. No personal data is sent — only public
blockchain addresses and coin/currency codes required to confirm a payment.

* **CoinGecko API** (`api.coingecko.com`) — fetches live exchange rates to convert your
  fiat prices to crypto. Sends: coin id + currency code. Terms: https://www.coingecko.com/en/terms — Privacy: https://www.coingecko.com/en/privacy
* **mempool.space** (`mempool.space`) or **Blockstream** (`blockstream.info`) — reads the
  Bitcoin blockchain to detect and confirm BTC payments. Sends: the receiving BTC address.
  Terms: https://mempool.space/about — https://blockstream.info
* **Etherscan** (`api.etherscan.io`, only if you enter an API key) or **Blockscout**
  (`eth.blockscout.com`, keyless default) — reads the Ethereum blockchain to confirm ETH,
  USDT and USDC payments. Sends: the receiving Ethereum address. Terms:
  https://etherscan.io/terms — https://www.blockscout.com

These calls happen only when a payment is in progress (or on a short background check).
You can change the Bitcoin and Ethereum data sources in the plugin settings.

== Trademarks ==

"KXCO" and "KXCO Pay" are the trademarks of KXCO, the brand under which this
plugin's developer, John Heffernan, publishes it. Both the plugin name and the
kxco.io domain it is distributed from belong to the developer, so the name is
used here by its owner.

KXCO Pay is **not** affiliated with, endorsed by, or sponsored by Automattic Inc.
or the WooCommerce project. "WooCommerce" and "WordPress" are the trademarks of
their respective owners and appear here only to describe the software this plugin
is built to work with, as permitted for that purpose.

== Screenshots ==

1. The live checkout widget with QR code, exact amount, and confirmation status.
2. WooCommerce coin picker on the order-pay screen.
3. Admin settings — wallets and confirmations.
4. Payments overview.

== Changelog ==

= 1.0.0 =
* Initial release.
* Bitcoin, Ethereum, USDT (ERC-20) and USDC (ERC-20) paid straight to your own wallet.
* WooCommerce gateway supporting the classic checkout, the Cart/Checkout Blocks, and HPOS.
* Shortcode and block for taking payments outside the WooCommerce checkout.
* Live checkout widget: QR code, one-tap copy, locked-rate countdown and real-time confirmation status.
* Fiat pricing via CoinGecko, with a locked rate for the checkout window.
* Zero-total orders (e.g. a 100% coupon) complete directly without the crypto step.

== Upgrade Notice ==

= 1.0.0 =
First release.
