=== SoloPay for WooCommerce ===
Contributors: solopay
Tags: woocommerce, crypto, usdc, payment, stablecoin
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.1
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accept gasless, non-custodial USDC payments in WooCommerce with instant settlement, powered by SoloPay.

== Description ==

SoloPay is a Web3 payment gateway that lets WooCommerce merchants accept stablecoin payments directly to their own wallet, with no card networks or middlemen involved.

**Key benefits**

* **Gasless** - the network gas fee is sponsored by the SoloPay backend, so customers never pay gas.
* **Instant settlement** - payments settle immediately, with no fund lock-up or holding period.
* **Non-custodial** - funds go directly to your merchant wallet. SoloPay never holds your money.

**Who it's for**

SoloPay is built for WooCommerce merchants who sell to Web3-native customers and want to accept stablecoin payments without the complexity of running blockchain infrastructure themselves.

**How it works (3 simple steps)**

1. The customer chooses SoloPay at checkout and places the order.
2. They are taken to a secure payment page that loads the SoloPay widget (popup on desktop, redirect on mobile) and pay with USDC.
3. SoloPay confirms the payment on-chain and notifies your store via a signed webhook, which marks the order complete and emails the customer.

Learn more at [solonetwork.io](https://solonetwork.io).

== Installation ==

1. Download the plugin ZIP and go to **Plugins > Add New > Upload Plugin** in your WordPress admin, then upload the file. Alternatively, extract the `solopay-woocommerce` folder into `wp-content/plugins/`.
2. Click **Activate** on the SoloPay for WooCommerce plugin.
3. Go to **WooCommerce > Settings > Payments**, enable **SoloPay**, and click **Manage**.
4. Enter your **Public Key**, **Webhook Secret**, **Merchant API Key**, and **Token Address** (the ERC-20 contract you accept, e.g. USDC). These are available in your SoloPay Merchant Dashboard at [solonetwork.io](https://solonetwork.io). The Merchant API Key is required: the plugin uses it server-side to verify the paid amount before completing an order.
5. Save changes. The plugin runs against the SoloPay production (mainnet) environment; there is no test-mode toggle (see the FAQ on testing).

**Setting up the webhook**

1. In WordPress, open **WooCommerce > Settings > Payments > SoloPay > Manage** and copy the **Webhook URL** displayed there. Depending on your permalink settings it looks like `https://yourstore.com/wp-json/solopay/v1/webhook` (pretty permalinks) or `https://yourstore.com/?rest_route=/solopay/v1/webhook` (plain permalinks).
2. Open the SoloPay Merchant Dashboard, go to **Settings > Webhooks**, and paste that URL.
3. Copy the generated webhook secret into the plugin's **Webhook Secret** field and save.
4. Copy the **Merchant API Key** (x-api-key) from the dashboard into the plugin's **Merchant API Key** field and save. The plugin uses this key to confirm the paid amount before completing an order. Completion happens when the buyer returns to the success page, and also via the webhook (which covers buyers who do not return). For the webhook to fire, its endpoint must be reachable from SoloPay (use a public URL or a tunnel during local testing).

== Frequently Asked Questions ==

= What currencies are supported? =

Your store keeps its normal WooCommerce currency. At checkout the order total is sent to SoloPay together with that currency, and the customer pays in the ERC-20 token you configure in the plugin (USDC is the common choice). SoloPay converts the fiat amount to the token using its real-time price.

= Do customers need a crypto wallet? =

Yes. Customers pay with USDC from a compatible Web3 wallet. Gas fees are sponsored by SoloPay, so the only thing they need is the USDC balance.

= Are there transaction fees? =

There are no gas fees for your customers. Any service fees are defined by your SoloPay merchant agreement and shown in your dashboard.

= Which blockchain networks are supported? =

This release uses the single ERC-20 token contract you configure in the plugin settings (USDC is the common choice). Network and contract management is handled in your SoloPay Merchant Dashboard.

= Is there a test mode? =

The plugin runs against the SoloPay production (mainnet) environment and there is no test-mode setting, because SoloPay selects the environment by endpoint rather than by key prefix (both environments issue pk_live_ keys). Developers who need to test against a testnet (such as Polygon Amoy) change the SOLOPAY_WIDGET_URL and SOLOPAY_API_BASE_URL constants in solopay-woocommerce.php to the dev hosts, rebuild the plugin zip, and install that build. See the README for details.

= Is it safe? =

Yes. SoloPay is non-custodial, so funds settle directly to your wallet. Every webhook is signed with HMAC-SHA256 and verified by the plugin before any order is updated, with replay protection to prevent tampering.

== Screenshots ==

1. SoloPay at WooCommerce checkout.
2. Admin settings screen.
3. Payment widget popup.

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
