=== WPInterface Checkout with Paddle for WooCommerce ===
Contributors: wpinterface
Tags: paddle, woocommerce, payment gateway, merchant of record, vat
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Take WooCommerce payments with Paddle as your merchant of record. Paddle handles payments, sales tax/VAT and invoices.

== Description ==

Paddle is a merchant of record: it sells your products on your behalf and takes care of payments, sales tax and VAT, invoices and compliance in every country. This plugin adds Paddle as a payment method to WooCommerce, so buyers pay in a Paddle popup on your own checkout page.

**Works with both Paddle accounts**

* Paddle Billing (accounts created after August 2023): API key and client-side token.
* Paddle Classic (older accounts): Vendor ID, API Auth Code and public key.

**Checkout**

* Works with the Checkout block and the classic (shortcode) checkout, and on the "Pay for order" page.
* Paddle's secure checkout opens as an overlay on your checkout page. Buyers never leave your site.
* Cards, PayPal, Apple Pay and Google Pay, as enabled in your Paddle account.
* No product setup in Paddle: every order is sent with its own lines and prices, so coupons, fees, shipping, variations and multi-item carts just work.
* Light or dark theme, checkout language (automatic or fixed), optional payment icons, your own title and description.

**Reliable and safe**

* Every webhook is signature-verified; nothing else can mark an order paid.
* One click sets up the webhook in Paddle Billing and stores its secret.
* Duplicate and simultaneous webhooks are handled, so an order is never paid or refunded twice.
* Several stores can share one Paddle account; each store only acts on its own orders.
* Payments are confirmed directly with Paddle while the buyer waits (Billing), so a slow webhook doesn't hold anyone up.
* Underpaid, wrong-currency or outdated-checkout payments are flagged instead of marking the order paid.
* Compatible with High-Performance Order Storage (HPOS).
* Test connection button, clear admin warnings and logging to the WooCommerce logs.

**Refunds**

* Refunds made in Paddle (full or partial, down to the order line on Billing) are recorded in WooCommerce automatically.
* A refund recorded in WooCommerce first ("Refund manually") is matched to the Paddle refund that follows, so it is never recorded twice.
* Chargebacks and disputes put the order on hold automatically, so you can review it.

**Order screen**

* A Paddle box on every Paddle order: the transaction and customer (linked to your Paddle dashboard), the Paddle total, tax and your earnings, and the Paddle receipt (Classic).
* A "Check payment with Paddle" button for unpaid orders.

**No limits.** There are no order, revenue or product limits.

= Pro =

[WPInterface Checkout with Paddle for WooCommerce Pro](https://wpinterface.com/plugins/checkout-with-paddle-for-woocommerce/) adds:

* Subscriptions with WooCommerce Subscriptions: free trials, sign-up fees, renewals, failed payments and cancellations kept in sync with Paddle.
* Refunds from the WooCommerce order screen sent to Paddle, down to a single product.
* Inline checkout embedded in your checkout page.
* Paddle invoices for customers on order pages, in My Account and in order emails.
* Priority support.

== Installation ==

1. Install and activate the plugin. WooCommerce 8.0 or newer is required.
2. Go to **WooCommerce → Settings → Payments → Paddle**.
3. Choose your Paddle account type (Billing or Classic) and paste your credentials. Leave **Sandbox** ticked and use your sandbox credentials while testing.
4. **Paddle Billing:** save, then click **Set up webhook**. In Paddle, add your domain under Checkout → Website approval and set your checkout page as the Default payment link (Checkout → Checkout settings).
5. **Paddle Classic:** paste the webhook URL shown in the settings into Paddle → Developer Tools → Alerts / Webhooks and enable Payment Refunded and Payment Dispute Created.
6. Tick **Enable Paddle**, save, and click **Test connection**.
7. Make a test purchase with Paddle's test card, then untick **Sandbox** and enter your live credentials.

**WooCommerce → Paddle** shows a setup checklist and the support options.

Paddle cannot send webhooks to local sites (such as `*.local` or `localhost`). For local testing, run a tunnel and point webhooks at it with the `wpinterface_paddle_woo_webhook_base_url` filter.

== Frequently Asked Questions ==

= Do I need to create products in Paddle? =

No. Each order is sent to Paddle with its own lines and prices from WooCommerce.

= Should I turn off WooCommerce taxes? =

Yes. Paddle is the merchant of record and adds sales tax/VAT itself, so WooCommerce taxes would charge buyers twice.

= Can I sell physical products? =

Paddle is built for digital products, software and SaaS. Check Paddle's acceptable use policy before selling anything else; shipping costs are charged as a separate line.

= Can I sell subscriptions? =

Not with this plugin: it takes one-time payments. When WooCommerce Subscriptions is active, Paddle is not offered for carts with a subscription. The Pro version bills subscriptions through Paddle.

= How do refunds work? =

Refund the payment in your Paddle dashboard; WooCommerce is updated automatically once Paddle approves the refund. If you record a refund in WooCommerce first ("Refund manually"), refund the same amount in Paddle afterwards; the plugin matches the two, so the refund is not recorded twice. The Pro version sends refunds from the WooCommerce order screen to Paddle.

= Which currencies are supported? =

All currencies Paddle supports. Paddle is hidden at checkout if your store currency is not supported.

= The buyer closed the Paddle popup. What happens to the order? =

It stays "Pending payment" and the buyer can place it again. WooCommerce cancels unpaid orders after its "Hold stock" time, like with any other gateway.

= What happens when I upgrade to Pro? =

Pro uses the same settings, order data and webhook URL as this plugin, so your credentials and existing orders carry over. Activating Pro deactivates this plugin; nothing needs to be set up again.

= Is my data sent anywhere? =

Only to Paddle, which processes the payment. See "External services" below.

== External services ==

This plugin connects to Paddle (paddle.com), the payment provider and merchant of record, to take payments. Nothing is sent until you configure the plugin and enable the payment method.

* **Paddle.js** is loaded from `cdn.paddle.com` on the checkout and "Pay for order" pages so the buyer can pay in Paddle's secure checkout. Paddle receives the buyer's payment details and email address directly.
* **Paddle API** (`api.paddle.com` and `sandbox-api.paddle.com` for Paddle Billing; `vendors.paddle.com` and `sandbox-vendors.paddle.com` for Paddle Classic) is called from your server when an order is placed (order lines, prices, currency, buyer email and billing country, the WooCommerce order number and a site identifier), when the payment is confirmed, and when you click Test connection or Set up webhook (your webhook URL).
* **Webhooks** are sent by Paddle to your site to report payments and refunds.

Paddle's [Terms](https://www.paddle.com/legal/terms) and [Privacy Policy](https://www.paddle.com/legal/privacy).

== Screenshots ==

1. Paddle settings: account type, credentials and webhook setup.
2. Paddle's overlay checkout on the WooCommerce Checkout block.
3. The Paddle box on the WooCommerce order screen: transaction, customer, Paddle total, tax and your earnings.
4. WooCommerce → Paddle: setup checklist, last 30 days of Paddle sales and quick links.
5. WooCommerce → Paddle → Help & support: documentation, FAQ and copyable system info.

== Changelog ==

= 1.0.1 =
* New: chargebacks and disputes put the order on hold automatically.
* New: the Paddle box on the order screen shows the Paddle total, tax, your earnings and the Paddle receipt (Classic), with a "Check payment with Paddle" button for unpaid orders.
* Improved: setup warnings show only on the payment settings and the WooCommerce → Paddle page, and clear themselves once resolved.

= 1.0.0 =
* First release: Paddle Billing and Paddle Classic one-time payments with overlay checkout on the Checkout block, the classic checkout and the "Pay for order" page; signature-verified webhooks, one-click webhook setup (Billing), payment confirmation while the buyer waits, refunds made in Paddle recorded in WooCommerce, HPOS support, and the WooCommerce → Paddle page with setup checklist, sales summary, Lite vs Pro comparison and support.
