=== SnapEX Pay for WooCommerce ===
Contributors: snapexpay
Tags: crypto, usdt, payment gateway, woocommerce, tron
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
WC requires at least: 8.2
WC tested up to: 11.2
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accept crypto in WooCommerce: USDT on TRON, Ethereum, BSC and other networks, or other coins converted to USDT.

== Description ==

The customer picks Crypto at checkout, pays on the SnapEX Pay page and the order is marked paid automatically.

* No wallets or nodes to run; funds arrive in your SnapEX Pay merchant balance.
* Checkout block and classic checkout, "Pay for order" links, HPOS compatible.
* Three independent ways an order gets marked paid: the signed webhook, the customer returning from the payment page and a check every 5 minutes. A lost webhook never leaves a paid order unpaid, and an order is never completed twice.
* Partial payments and payments arriving after an order was cancelled put the order On hold for review.
* Test mode with test invoices that confirm without real money, visible only to shop managers.

== External services ==

This plugin connects to the SnapEX Pay merchant API (https://snapex.pro/api/v1/merchant), run by SnapEX, to take crypto payments. It is required for the payment method to work.

* When a customer places an order with this payment method, the plugin creates a SnapEX Pay invoice. It sends the order amount in USD, the order ID, the shop name and order number as the invoice description, the return and cancel URLs of your shop, the payment window and the fee and test-mode settings, authenticated with your API key. No customer name, e-mail, address or IP address is sent. The customer is then redirected to the SnapEX Pay payment page.
* To settle orders, the plugin requests the status of those invoices: when the customer returns, when SnapEX Pay sends a webhook, and every 5 minutes for recent unpaid orders.
* SnapEX Pay sends signed webhooks to your shop (/wc-api/snapexpay_webhook/) if you configure the webhook in the SnapEX Pay merchant cabinet.

Terms of use: https://snapex.pro/p/soglashenie
Privacy policy: https://snapex.pro/p/privacy

== Installation ==

1. Upload and activate the plugin.
2. WooCommerce → Settings → Payments → SnapEX Pay (crypto).
3. Paste an API key from the SnapEX Pay merchant cabinet (scopes invoices.read and invoices.write).
4. Recommended: set the webhook URL shown under "Webhook secret" in the cabinet and paste the whsec_… secret.
5. If the store currency is not USD, set the USD rate (or convert with the snapexpay_wc_amount_usd filter).

== Frequently Asked Questions ==

= Which currencies can the store use? =

SnapEX Pay invoices are in USD. USD stores work as is; for other currencies set the rate in the settings or convert with the snapexpay_wc_amount_usd filter.

= Can I refund from WooCommerce? =

No. Refunds are made from the SnapEX Pay cabinet.

== Changelog ==

= 1.0.1 =
* Fix: a customer can get a new payment page after the previous one expired or the order total changed. Each SnapEX Pay invoice now gets its own external ID; invoices created by 1.0.0 are still settled.

= 1.0.0 =
* First release.
