=== Paydex for WooCommerce ===
Contributors: paydex
Tags: crypto, payments, usdt, usdc, stablecoin, woocommerce
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accept USDT and USDC on five networks. Non-custodial: payments settle straight to your own wallet, 99.6% yours with the 0.4% fee enforced on-chain.

== Description ==

Paydex is a non-custodial crypto payment processor. Your customer pays USDT or USDC on the network of their choice (Base, BNB Chain, Solana, Tron or Ethereum) to a one-time address created for their order. Within seconds of the funds arriving, an on-chain split sends 99.6% directly to your wallet and 0.4% to Paydex. Paydex never holds your money and there is no balance to withdraw.

What the plugin does:

* Adds a "Crypto (USDT / USDC)" payment method to your checkout (classic and block-based).
* On payment, creates a Paydex payment for the order and redirects the customer to the hosted checkout, where they pick the network and pay from any wallet or exchange.
* Receives signed Paydex webhooks and moves the order automatically: notes on detection, completion on settlement, on-hold on partial payment, and your choice of behavior on expiry.
* Sends the customer back to your order-received page after they pay.

Requirements:

* A Paydex merchant account (sign in with your wallet at paydex.io, no forms and no KYC).
* An API token from the Paydex dashboard (Settings, Integrations). The token can only create and read payments. It can never change where your money goes: payout addresses require a wallet signature.
* Store currency USD (stablecoin amounts map 1:1). Other currencies can be enabled with the paydex_wc_supported_currencies filter at your own exchange-rate risk.

== External services ==

This plugin is a connector for Paydex, a payment service operated by us. It cannot work without it.

The plugin talks to the Paydex API (by default https://api.paydex.io, configurable in the settings) in these moments:

* When a customer chooses the crypto payment method and places the order, the plugin creates a payment at Paydex. It sends: the order total and currency, an order reference derived from the order number, your store's name and URL, and the URL of your order-received page (so the customer can be sent back after paying). No customer personal data (no name, email, or address) is ever sent.
* When you press "Register webhook automatically" in the settings, the plugin registers your store's webhook URL with Paydex.
* When a returning customer re-opens checkout for an unpaid order, the plugin reads that payment's status from Paydex.

Customers who pay are redirected to the hosted Paydex checkout at https://paydex.io (configurable), where the payment itself happens on a public blockchain.

Paydex terms of service: https://paydex.io/terms
Paydex privacy policy: https://paydex.io/privacy

== Installation ==

1. Upload the plugin and activate it.
2. In the Paydex dashboard (Settings, Integrations) create an API token and copy it once.
3. In WooCommerce, Settings, Payments, Paydex: paste the token and save.
4. Press "Register webhook automatically". The signing secret is stored for you.
5. Enable the gateway. Place a small test order to see the full flow.

== Frequently Asked Questions ==

= Where does the money go? =

Straight to your own wallet on the network the customer paid on. Configure payout addresses in the Paydex dashboard; changing them always requires your wallet's signature, so a leaked API token or a compromised WordPress admin cannot redirect funds.

= What happens if a customer pays too little? =

The order goes on hold and the customer sees the exact remainder to send on the checkout page. You can also accept the shortfall from the Paydex dashboard, which settles what arrived and completes the order.

= What happens when the payment window expires? =

Your choice in the settings: mark the order failed, cancel it, or only add a note. A transfer that was already on its way is still detected for about two days and completes the order when it lands.

== Screenshots ==

1. Create a revocable API token for your store in the Paydex dashboard. It can only create and read payments, never move funds.
2. Your customer pays on the hosted checkout: they pick the network and pay from any wallet or exchange, with the order named on the page.
3. The receipt after settlement: the 0.4% fee itemized, the on-chain transaction linked, and a button returning the customer to your store.

== Changelog ==

= 1.0.0 =
* First release: hosted checkout redirect, signed webhooks, HPOS and Checkout Blocks support.
