=== Jamesinvoicing Crypto Payments ===
Contributors: htsend, jamesinvoicing
Tags: bitcoin, crypto, woocommerce, payment gateway, invoices
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 2.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accept Bitcoin and crypto in WooCommerce with self-custodial, non-custodial invoices. Payments go straight to your own wallet.

== Description ==

Jamesinvoicing Crypto Payments connects WooCommerce to [Jamesinvoicing](https://www.jamesinvoicing.com), a self-custodial cryptocurrency payment and invoicing platform for merchants, freelancers and online stores.

Customers pay to an address derived from **your own** wallet (xPub) or an approved receiving address. Jamesinvoicing never holds your funds and the plugin never asks for private keys or seed phrases.

= Features =

* WooCommerce payment gateway, including the block-based Checkout and HPOS
* Unique receiving address for every order from your verified xPub
* Hosted payment page with QR code, live exchange rate and countdown timer
* Orders are marked paid only after real blockchain confirmations
* Signed webhooks (HMAC, timestamp and replay protection) plus a polling fallback
* Duplicate-invoice protection for retried and repeat orders
* Works with CartFlows, FunnelKit, LaunchFlows and WPFunnels when they create a standard WooCommerce order
* Shortcodes: `[jamesinvoicing_checkout amount="100" item="Consulting"]` and `[jamesinvoicing_invoice id="..."]`
* Integration and System Status screens that never display secrets

= Requirements =

* A free Jamesinvoicing account and API key: https://www.jamesinvoicing.com
* WooCommerce 6.0 or later for the checkout gateway
* HTTPS on your site

== External services ==

This plugin relies on third-party services to create invoices and confirm payments. No data is sent until you add an API key in the plugin settings.

**Jamesinvoicing API** (https://www.jamesinvoicing.com/api/public/v1)
Used to create invoices, check payment status, verify your xPub and register the webhook endpoint. Sent when an order is placed with this payment method, during status checks (every minute for pending orders) and when you save settings: order ID, order total and currency, customer name and email, your site URL and your API key.
Terms of Service: https://www.jamesinvoicing.com/terms
Privacy Policy: https://www.jamesinvoicing.com/privacy

**CoinGecko API** (https://api.coingecko.com)
Used to display the live USD/BTC exchange rate. Only a price request is sent; no customer or order data.
Terms: https://www.coingecko.com/en/terms
Privacy Policy: https://www.coingecko.com/en/privacy

**Blockchain explorers** (mempool.space, blockchair.com, etherscan.io, bscscan.com, tronscan.org, solscan.io, xmrchain.net)
Only linked from the order screen so you can view a transaction. Nothing is sent unless you click the link. Each site's own terms and privacy policy apply.

== Installation ==

1. In WordPress go to Plugins → Add New, search for "Jamesinvoicing Crypto Payments", then Install and Activate.
2. Go to Jamesinvoicing → Add API and paste your API key from your Jamesinvoicing dashboard.
3. Go to Jamesinvoicing → xPub Manager and add and verify your public xPub (or an approved receiving address).
4. Go to WooCommerce → Settings → Payments and enable "Pay with Bitcoin (Jamesinvoicing)".

== Frequently Asked Questions ==

= Is it custodial? =
No. Payments go directly to addresses derived from your own wallet. Jamesinvoicing never holds your funds.

= Do you store private keys? =
No. Only the public xPub is stored. Never enter a seed phrase or private key.

= When is an order marked paid? =
Only after the required number of blockchain confirmations (configurable). Browser-submitted status is never trusted.

= Does it work with the WooCommerce Checkout block? =
Yes, both the classic and block checkouts are supported.

= Is there a cost? =
The plugin is free. Jamesinvoicing offers a Free plan and optional paid plans on jamesinvoicing.com.

== Screenshots ==

1. Enable Jamesinvoicing Crypto Payments in WooCommerce > Settings > Payments.
2. Plugin settings: API key, webhook secret, confirmations, expiry and notifications.
3. Non-custodial wallets and xPub for BTC, ETH, USDT, LTC, SOL, DOGE and TRX.
4. Customers choose "Pay with Crypto" at checkout.
5. Hosted invoice with QR code, copyable address and countdown.
6. Buyers choose which cryptocurrency to pay with.
7. Order marked Completed after blockchain confirmation, with transaction link.
8. Merchant dashboard: invoices, payment links, webhooks, API keys, team and notifications.

== Changelog ==

= 2.0.2 =
* Repeat and retried orders reuse the existing invoice and always continue to the hosted payment page.
* Updated checkout description while keeping merchant-customized text.

= 2.0.1 =
* Added support for the WooCommerce block-based Checkout.

= 2.0.0 =
* Universal order API, funnel builder detection, signed webhooks, System Status screen.

== Upgrade Notice ==

= 2.0.2 =
Fixes redirect to the payment page for repeat orders. Recommended for all stores.

== Third-party libraries ==

* QRCode.js by davidshimjs — MIT License — https://github.com/davidshimjs/qrcodejs (bundled as assets/js/qrcode.min.js; source at the link above).
