=== Stablora for WooCommerce ===
Contributors: stablora1
Tags: woocommerce, payment gateway, crypto, usdt, bitcoin
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 0.4.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accept USDT, USDC, Bitcoin and more in WooCommerce with Stablora's hosted crypto checkout, account connection and verified payment updates.

== Description ==

Add cryptocurrency payments to your WooCommerce store with Stablora. Keep your
store prices in USD and let customers pay with USDT, USDC, BTC, ETH, SOL, TRX
and other coins and networks supported by Stablora.

Customers select **Crypto (Stablora)** at checkout and complete their payment on
Stablora's hosted checkout. Each invoice gets its own deposit address, and the
coin amount is locked when the invoice is created. The plugin marks an order
paid only after a verified signed webhook and a server-side payment status check.

= Features =

* **Connect your account:** use Connect with Stablora to authorize your store and configure its API key, webhook secret and webhook URL.
* **Customer coin choice:** let customers choose a supported coin and network on the hosted checkout, or configure one fixed coin and network.
* **USD pricing:** Stablora converts the USD order total into the cryptocurrency amount for the invoice.
* **Classic checkout and Checkout Blocks:** offer Stablora in either WooCommerce checkout experience.
* **HPOS support:** works with WooCommerce High-Performance Order Storage.
* **Live and test modes:** use live keys for mainnet payments or test keys with free testnet coins.
* **Order visibility:** view the Stablora payment ID, coin and payment status in the WooCommerce order editor.
* **Payment follow-up:** customers can return to an unpaid order's payment page from My Account or the on-hold email.
* **Manual status checks:** use the Check payment status (Stablora) order action when needed.

= How it works =

1. Connect a Stablora account in WooCommerce > Settings > Payments > Stablora.
2. The customer chooses Stablora at your store's checkout.
3. Stablora opens a hosted checkout, where the customer selects a coin and pays.
4. The plugin verifies the payment notification and checks the payment status before updating the order.

= Requirements and service fees =

Requires WordPress 6.5 or later, PHP 7.4 or later, WooCommerce 8.2 or later,
a Stablora account and a store currency of USD.

The plugin is free to install. Stablora is an external payment service with
processing fees. See [Stablora pricing](https://stablora.xyz/pricing) for current
payment, conversion and payout fees.

Stablora is **custodial**: funds are held by Stablora and withdrawn from the
Stablora dashboard. Wallet private keys are not stored in WordPress. Refunds
are handled in the Stablora dashboard, not through the WooCommerce refund button.

[Setup guide](https://stablora.xyz/integrations/woocommerce) |
[Help center](https://stablora.xyz/help)

== External services ==

This plugin connects to [Stablora](https://stablora.xyz), a crypto payment
processor, to create checkout sessions and invoices and verify payment status.

* When an administrator starts Connect with Stablora, the store name, platform, selected mode, callback URL, webhook URL and connection security parameters are sent to Stablora. After approval, WordPress exchanges a one-time authorization code and its verifier for the store's API key and webhook secret.
* When a customer places an order, the plugin sends an order reference, USD total, order-number description and invoice expiration. For hosted coin choice, it also sends a checkout return URL; for a fixed coin, it sends the configured network and asset. The plugin does not send the customer's name, email or billing address to the Stablora API.
* When Stablora reports a payment, it calls the site's webhook URL. The plugin verifies the signature and fetches the payment status from the Stablora API. An administrator can also request a payment status check from the order editor.

Terms of service: https://stablora.xyz/terms
Privacy policy: https://stablora.xyz/privacy

== Installation ==

1. Install and activate WooCommerce 8.2 or later on WordPress 6.5 or later.
2. Install and activate Stablora for WooCommerce.
3. Set your store currency to USD in WooCommerce > Settings > General.
4. Open WooCommerce > Settings > Payments and select Stablora.
5. Click **Connect with Stablora** and approve the connection on Stablora. The plugin saves the credentials and enables the payment method.
6. Choose whether customers can select any supported coin or pay with one fixed coin and network, then save your settings.

To try the integration first, use **Connect a test account** and testnet coins.
For manual setup, enter your Stablora API key and webhook secret, then add the
webhook URL shown in the settings to your Stablora account. Use a network that
matches the key's live or test mode.

== Frequently Asked Questions ==

= Which cryptocurrencies can customers use? =

With customer coin choice enabled, customers choose from the coins and networks
currently supported on Stablora's hosted checkout, including USDT, USDC, BTC,
ETH, SOL and TRX. You can also configure one fixed coin and network.

= Can I use a store currency other than USD? =

No. This version requires USD store prices. The payment method is hidden at
checkout when the WooCommerce store currency is not USD.

= Does this work with Checkout Blocks and HPOS? =

Yes. The plugin includes an integration for WooCommerce Checkout Blocks and
declares compatibility with High-Performance Order Storage. Classic checkout
is also supported.

= Can I test without sending real funds? =

Yes. Connect a test account and use free testnet coins. Test keys begin with
qk_test_; live keys begin with qk_live_. Keep your key and network in the same
environment.

= What is the webhook URL? =

The format is https://YOUR-WORDPRESS-SITE/?wc-api=stablora. The settings page
shows the exact URL for your store. Connect with Stablora configures it for you.

= What happens to underpaid, overpaid or late payments? =

Payments that need review leave unpaid orders on hold with a review note.
These cases are not automatically fulfilled or refunded. Previously paid,
refunded or closed orders are not downgraded or reopened automatically.

= Can customers return to an unpaid payment? =

Yes. Where a payment link is available, the plugin adds Pay with crypto to
unpaid orders in My Account and includes the link in the on-hold email.

= Can I issue a refund from WooCommerce? =

No. Send refunds from the Stablora dashboard. This version does not process
cryptocurrency refunds through WooCommerce.

= What is removed on uninstall? =

The plugin removes its gateway settings, including the API key and webhook
secret. Order payment metadata and event receipts remain for audit purposes.

== Screenshots ==

1. Connect your Stablora account and configure the payment method in WooCommerce settings.
2. Crypto (Stablora) displayed in the classic WooCommerce checkout. Demo store and sample product.
3. Stablora in WooCommerce Checkout Blocks. Demo store and sample product.
4. Stablora payment details and the manual status-check action in the WooCommerce order editor. Sample order data.

== Changelog ==

= 0.4.0 =
* Prepared for the WordPress.org plugin directory: text domain stablora-for-woocommerce, stricter input sanitizing, safe redirect to the Stablora approval page.

= 0.3.1 =
* Thank-you page shows the payment status and the coin used, with a link back to the payment page.
* My Account > Orders: Pay with crypto for unpaid orders; the on-hold email includes the payment link.
* Order editor shows the Stablora payment ID, coin and status.

= 0.3.0 =
* The customer chooses any coin and network Stablora supports on the Stablora checkout. One fixed coin remains available.
* Stablora logo in the payment method list and at checkout.

= 0.2.0 =
* Live payments with qk_live_ keys on mainnets; test keys keep using testnets.
* Connect with Stablora: one-click setup of the key, webhook secret and webhook URL.
* A store only acts on payments and webhooks of its own key's environment.

= 0.1.0 =
* Initial sandbox/testnet gateway, signed callbacks, order action and tests.
