=== PaySovra – Crypto & Stablecoin Payment Gateway for WooCommerce ===
Contributors: paysovra
Tags: crypto payments, stablecoin, bitcoin, usdc, woocommerce payment gateway
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 1.8.6
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accept crypto and stablecoin payments in WooCommerce. Funds settle directly to your own wallet — no processor holds your money.

== Description ==

PaySovra adds a crypto payment method to your WooCommerce checkout. Customers pay in Bitcoin, Ethereum, Solana, USDC, USDT and more across 10 networks; you receive funds directly in wallets you control.

**How it works**

* The customer picks "Pay with crypto" at checkout and a secure payment window opens over your checkout page — they never leave your site.
* They choose a coin and network, and send the payment. PaySovra monitors the chain and confirms it in real time.
* Your WooCommerce order updates automatically — paid, underpaid (on hold for review), or cancelled if the payment window lapses.
* Every payment also appears in your PaySovra dashboard: order details, transaction hash, amounts received, and a full customer view across all your sales channels.

**Why merchants choose PaySovra**

* **Direct settlement.** Payments go to your own wallet addresses. PaySovra never holds your funds.
* **Broad coverage.** BTC, LTC, ETH, SOL, BNB, POL, TRX, plus USDC and USDT on Ethereum, Polygon, BNB Chain, Arbitrum, Optimism, Base, Solana, and TRON.
* **Order sync you can trust.** Signed webhooks (HMAC-SHA256, replay-protected) with automatic retries update your Woo orders reliably — including underpayment and expiry outcomes, not just success.
* **A real payments dashboard.** Orders, analytics, customers, invoicing, and hosted product pages are included with your PaySovra account.

PaySovra is a hosted service; a free PaySovra account is required. Payment sessions are created via the PaySovra API and the payment window is served by PaySovra over your checkout page.

== Installation ==

The full step-by-step guide is at [paysovra.com/docs/woocommerce](https://paysovra.com/docs/woocommerce), and it
includes a troubleshooting section for when something doesn't work. Follow that
if anything here is unclear — it is the same seven steps in more detail.

1. Create a free [PaySovra account](https://paysovra.com) and add at least one
   wallet address. That is where your money lands, so nothing works without it.
2. Install and activate this plugin.
3. In PaySovra, open Integrations. Under **Integration keys**, create a key named
   "WooCommerce store" and leave management access switched OFF. Copy it — it
   starts with sk_live_ and is shown only once. (This is not your publishable
   key, which is a different, public value used by the checkout widget.)
4. On the same page, scroll to **Get told when you're paid** — this section is
   what other platforms call webhooks. Press **Create signing secret** and copy
   it. It starts with whsec_. Without it PaySovra sends your store nothing and
   orders never leave "Pending payment".
5. Still in that section, press **Add endpoint** and enter your store address
   followed by /?wc-api=paysovra — for example
   https://shop.example.com/?wc-api=paysovra. The exact address for your store
   is also printed at the bottom of the plugin's settings page.
6. In WooCommerce → Settings → Payments → PaySovra, paste the integration key
   into **Integration key** and the signing secret into **Signing secret**.
7. Tick "Enable PaySovra", press Save changes, then place one small test order
   and confirm it moves from "Pending payment" to "Processing".

== External services ==

This plugin connects to [PaySovra](https://paysovra.com), a hosted payment
service, to take crypto payments. It cannot work without it, and a free
PaySovra account is required.

**When data is sent**

* When a customer selects "Pay with crypto" and places an order, your site
  sends PaySovra the order total and currency, your WooCommerce order number,
  the item names, quantities and line totals, the customer's billing name and
  email address, your store's web address, and the addresses PaySovra should
  return the customer to and notify when the payment settles.
* While the checkout page is open, your site asks PaySovra which coins and
  networks your account accepts, so the customer can choose one.
* After a payment, PaySovra notifies your site so the order can be updated.
  These messages are signed and verified before they are acted on.

**What is NOT sent**

Your customer's postal address, phone number, payment card details and
WordPress passwords are never transmitted. PaySovra is non-custodial: crypto
goes directly from the customer to wallet addresses you control, and PaySovra
never holds your funds or moves them.

**Terms and privacy**

* [Terms of service](https://paysovra.com/terms)
* [Privacy policy](https://paysovra.com/privacy)
* [Acceptable use policy](https://paysovra.com/acceptable-use)

== Frequently Asked Questions ==

= Do I need a PaySovra account? =

Yes. The plugin is a connector to PaySovra's payment infrastructure — your account holds your wallet configuration, API key, and payment history. The Free plan works with this plugin.

= Where do the funds go? =

Directly to wallet addresses you configure in your PaySovra dashboard. PaySovra is non-custodial: it detects and confirms payments on-chain but never takes possession of your money.

= Which coins can my customers use? =

Whatever you enable in your PaySovra dashboard — the plugin's coin list follows your account settings automatically. The full universe spans 22 assets across 10 networks.

= What happens if a customer underpays or lets the payment expire? =

Underpaid orders move to "on hold" with a note showing exactly how much arrived, so you can decide. Expired sessions cancel the Woo order automatically — and if a payment arrives moments late, PaySovra's grace window still confirms it and marks the order paid.

= Does it support the block-based checkout? =

Yes — both the classic shortcode checkout and the Cart & Checkout Blocks experience, plus High-Performance Order Storage (HPOS).

== Changelog ==

= 1.8.2 =
* Overpayments are no longer flagged to the customer with an offer to return
  the difference. The amount paid is shown either way, so nothing is hidden,
  but crypto refunds are manual and a few cents of rounding shouldn't create
  work for the shop owner. The overpayment is still noted on the order.

= 1.8.1 =
* The order confirmation, the customer's account and WooCommerce's order
  emails now show what was actually paid — the amount, the coin and the
  network, plus the transaction. Previously only the order price appeared,
  and the crypto details were recorded where only the shop owner could see
  them.

= 1.8.0 =
* Reopening a checkout now picks up where the customer left off. Previously,
  someone who paid part of the total and closed the window was shown the coin
  picker again as though nothing had happened — which stranded what they had
  already sent and asked them to pay the full amount a second time. They now
  return to the same payment, showing what's still outstanding and the address
  to send it to.

= 1.7.8 =
* Cleared everything flagged by the official WordPress Plugin Check.

= 1.7.7 =
* Documents exactly what is sent to PaySovra, what isn't, and links to the
  terms, privacy and acceptable-use policies.

= 1.7.6 =
* Declares WooCommerce as a required plugin, so WordPress prompts for it
  instead of the gateway silently doing nothing.
* Compatibility updated for WordPress 7.0 and WooCommerce 11.

= 1.7.5 =
* FIX: after changing the discount rate, checkout advertised the new rate but
  the payment was still taken at the old one. WooCommerce reuses the same
  order across attempts, and the earlier discount was being left in place.

= 1.7.4 =
* FIX: the payment method description had disappeared from checkout.

= 1.7.3 =
* Restored the savings badge beside "Pay with crypto", shown whether or not
  it's selected, and the percentage for merchants who set one. The badge now
  also fills in the exact amount payable once the cart has loaded.

= 1.7.2 =
* FIX: the discounted price shown at checkout could differ by a cent from the
  amount actually requested. The figure was being calculated twice — once on
  the server, once in the browser — and the two rounded fractions of a cent
  differently. It is now calculated once, on the server, and the checkout
  simply displays it.

= 1.7.1 =
* The crypto option now shows what you'll actually pay, not just a percentage,
  and keeps it current as the cart changes.

= 1.7.0 =
* The saving is now shown next to "Pay with crypto" whether or not it's
  selected — a discount nobody sees until after choosing can't persuade
  anyone to choose.
* IMPORTANT FIX: the discount no longer alters the cart. Other gateways build
  their payment object from the cart total when they load — Stripe creates a
  PaymentIntent up front — so a total that moved underneath them caused
  refused payments and blocked checkouts. A 50c basket briefly discounted left
  Stripe holding 43c, under its minimum, and it stopped the sale. The cart
  total now never changes; the discount is applied to the order once crypto is
  actually chosen, which is also when the amount is authorised.

= 1.6.1 =
* FIX: the crypto discount could stay applied after switching to another
  payment method, and that gateway would then refuse the order because the
  total had changed under it. Selection is now read from the checkout itself
  rather than inferred, updates are serialised so a slow one can't land after
  a newer one, and any discount is stripped server-side from an order that
  isn't actually being paid with crypto.

= 1.6.0 =
* Optional crypto discount. Switch it on in the gateway settings and choose a
  percentage or a fixed amount. It applies only while crypto is the selected
  payment method and comes off if the customer switches back. Percentages are
  capped at 50% so a mistyped value cannot give an order away.

= 1.5.0 =
* Sends the order's line items so the payment record shows what was sold.
* The website taking payments is registered against your PaySovra account
  automatically — no setup step, and subdomains of a site you already
  registered don't count again.

= 1.4.4 =
* Events for payments that aren't WooCommerce orders (hosted pages, invoices,
  the API) no longer return an error and no longer retry.

= 1.4.3 =
* Clearer message when a customer closes the payment window.

= 1.4.2 =
* Updates from a superseded payment session are now ignored. Switching coins
  opens a new session, and an older one expiring could otherwise cancel an
  order while it was being paid.

= 1.4.1 =
* Fixed the Place Order button hanging after the payment window was closed —
  checkout waited on a signal the widget never sent, so the page had to be
  reloaded before you could try again.
* The customer's name is now recorded alongside their email.
* Orders link back to the matching order in your WordPress admin.

= 1.4.0 =
* The payment window now opens over your own checkout page. Customers pick
  their coin and pay without leaving your site, and are returned to your
  order-received page once it confirms.
* If the window can't open for any reason, checkout falls back to the hosted
  payment page — the customer can always pay.
* Closing the window leaves the order pending and keeps the customer on
  checkout, instead of sending them to a thank-you page for an unpaid order.

= 1.3.0 =
* The coin and network picker now appears. Previously the plugin chose an
  asset before the payment existed, so the customer never saw the choice —
  the receiving address had already been fixed.
* The order total is now authorised with PaySovra server-to-server before
  checkout opens. No price is sent from the browser, so it cannot be
  altered by the customer.
* Orders are never marked paid for less than they cost; a short payment is
  held for review instead of releasing goods.
* Removed the "Default Crypto Asset" setting — the customer picks, and a
  merchant-chosen default only suppressed that choice.
* Stores not selling in USD now hide PaySovra at checkout with an
  explanation, rather than converting the amount incorrectly.

= 1.2.1 =
* FIX: the default API address pointed at a host that does not exist, so a
  fresh install failed at checkout with "PaySovra connection failed" until
  the field was corrected by hand. Installs that already saved the bad value
  are repaired automatically on upgrade.

= 1.2.0 =
* Branded payment-method icon — PaySovra now shows its mark in the payment
  providers list and at checkout instead of a generic placeholder.
* Settings fields renamed to match the dashboard exactly: "Integration key"
  and "Signing secret". The old labels named things that existed nowhere.
* The webhook notice now says which dashboard section to paste the address
  into, so "webhook" and "Get told when you're paid" stop being two
  unconnected vocabularies.
* Installation instructions rewritten and now point at the full guide at
  https://paysovra.com/docs/woocommerce.

= 1.1.0 =
* Webhook signature verification aligned with PaySovra's timestamped HMAC scheme (replay-protected).
* Handles payment.underpaid and payment.expired events — orders sync on every outcome.
* Cart & Checkout Blocks support.
* High-Performance Order Storage (HPOS) compatibility declared.
* Coin list now loads live from your PaySovra account (with a full static fallback).
* Overpaid payments noted on the order; paid orders can never be regressed by a late event.

= 1.0.0 =
* Initial release: hosted payment redirect, payment.confirmed webhook, order sync.
