=== Qavera Crypto Payments ===
Contributors: qavera
Tags: crypto, usdt, usdc, woocommerce, payment gateway
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accept USDT and USDC in WooCommerce, Easy Digital Downloads or with a payment button. Non-custodial: payments settle straight to your own wallet.

== Description ==

Qavera lets customers anywhere in the world pay you in stablecoins. They choose the network and the coin they already hold, pay to an address made only for their order, and the money is forwarded on-chain to the payout wallet you set. Qavera never holds your funds, so there is no balance to withdraw and nothing to freeze.

**Works with**

* **WooCommerce**, classic and block checkout, with High-Performance Order Storage. Orders complete by themselves when the payment confirms.
* **Easy Digital Downloads**. Purchases complete and downloads unlock automatically.
* **Any WordPress site**, with the `[qavera_button]` shortcode in Gutenberg, Elementor, Divi or any theme. Fixed prices or an amount the visitor types, for donations and custom invoices.

**Features**

* USDT and USDC on BNB Smart Chain, Polygon and Arbitrum, with more EVM networks added over time.
* One deposit address per order, so a payment is never matched to the wrong order.
* Signed webhooks, plus a status check when the customer returns, so orders update even if a notice is delayed.
* Partial payments put the order on hold instead of completing it.
* Full sandbox: with a test key you can mark invoices as paid, partial or expired without touching a blockchain.
* Stores that price in another currency can set a USD exchange rate.

== Installation ==

1. Create an account at [qavera.top](https://qavera.top) and set a payout wallet for each network.
2. Install and activate this plugin.
3. Open **Qavera > Settings**, paste the API key and the webhook secret from the Developers page of your dashboard, and click **Check connection**. Start with a test key (`qv_test_`).
4. Turn it on where you sell:
   * WooCommerce: **WooCommerce > Settings > Payments > Qavera**.
   * Easy Digital Downloads: **Downloads > Settings > Payments**, tick Qavera.
   * Any page: `[qavera_button amount="49" title="Pro licence"]` or `[qavera_button amount="custom" min="5" label="Donate with crypto"]`.
5. Place a test order, mark it as paid on the sandbox payment page, then switch to a live key.

== Frequently Asked Questions ==

= Does Qavera hold my money? =

No. Each invoice address is a small contract that forwards the payment to your wallet in one transaction, together with the Qavera fee if your plan has one.

= My store does not use USD. =

Invoices are in USD. Set the USD exchange rate under Qavera > Settings, for example 1.08 if your store prices in EUR.

= Do I need to configure a webhook URL? =

No. The plugin sends its own address (`/wp-json/qavera/v1/webhook`) with every invoice. You only need the webhook secret so it can check that notices really come from Qavera.

= How do I react to a button payment in my own code? =

Use the `qavera_button_paid` action: `add_action('qavera_button_paid', function ($payment_id, $invoice) { ... }, 10, 2);`

== External services ==

This plugin connects to the Qavera API (https://qavera.top by default, or the gateway address you set) to create invoices and read their status when a customer checks out or returns. It sends the order amount in USD, an order reference, a short description containing your site name and order number, and the return and notification addresses of your site. No customer name, email or address is sent. Terms: https://qavera.top/terms. Privacy: https://qavera.top/privacy.

== Changelog ==

= 1.0.0 =
* One plugin for WooCommerce (classic and block checkout), Easy Digital Downloads and a payment button shortcode.
* Shared settings page with a connection check, USD exchange rate and payment time.
* Order status check when the customer returns to the store.
