=== EnterPay for WooCommerce ===
Contributors: enterpay
Tags: crypto payments, cryptocurrency, payment gateway, woocommerce, bitcoin
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
WC requires at least: 9.0
WC tested up to: 11.2
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accept cryptocurrency payments in WooCommerce through EnterPay hosted checkout. Prices stay in your store currency.

== Description ==

EnterPay for WooCommerce adds "Pay with Crypto" to your checkout. The customer is redirected to EnterPay's hosted checkout, chooses a cryptocurrency and pays. The order updates automatically when EnterPay reports the payment.

* Setup with one API key from your EnterPay merchant dashboard. No account linking or OAuth.
* Works with classic checkout and the Cart and Checkout blocks.
* Compatible with High-Performance Order Storage (HPOS).
* An order is marked paid only when EnterPay reports the payment as complete, and only after the amount and currency are checked against the order.
* Underpaid, manual-review, failed and expired payments never trigger fulfilment. They place the order on hold or mark it failed, with an order note.
* Webhooks are verified with EnterPay's signature (HMAC-SHA256). Scheduled status checks recover orders when a webhook is missed.
* An "EnterPay" box on each order shows the session, transaction and status, with a "Check EnterPay Status" button.

Supported store currencies: USD, EUR, GBP, AUD, CAD, CHF, JPY and ZAR. The list is read from EnterPay; the payment method is hidden when the store currency is not supported.

== Installation ==

1. Sign up your business at [pos.enterpay.io/dashboard](https://pos.enterpay.io/dashboard/) and complete the KYB and KYC verification. EnterPay cannot create payments until your account is approved.
2. Install and activate the plugin. WooCommerce 9.0 or later is required.
3. Go to WooCommerce → Settings → Payments → EnterPay. The setup guide at the top of the page lists the remaining steps.
4. In the EnterPay merchant dashboard, create an API key. Paste it into "API Key" and click "Test API Key".
5. In the merchant dashboard, add a webhook with the URL shown on the settings page (use the Copy button). Paste the webhook's signing secret (whsec_…) into "Webhook signing secret".
6. Tick "Enable EnterPay" and save.

== Frequently Asked Questions ==

= Where do I get the API key and webhook signing secret? =
Both come from the EnterPay merchant dashboard at [pos.enterpay.io/dashboard](https://pos.enterpay.io/dashboard/), after your account's KYB and KYC verification is approved. The signing secret is shown once, when you create or rotate the webhook.

= Can I refund from WooCommerce? =
Crypto payments cannot be reversed and EnterPay does not issue refunds. Settle a refund with the customer directly (for example a bank transfer or store credit), then record it in WooCommerce with "Refund manually" so stock and totals stay correct.

= Why is EnterPay not shown at checkout? =
EnterPay is hidden when no valid API key is saved, when EnterPay rejected the key, or when your store currency is not supported. "Test API Key" on the settings page tells you which. If checkout reports that the account needs KYB approval, complete it in the merchant dashboard; checkout resumes by itself within 15 minutes of approval.

= When is an order marked as paid? =
When EnterPay reports the payment as complete and the session amount and currency match the order. A payment that is detected or confirmed on-chain but not yet complete puts the order on hold with a "do not fulfil" note.

= What happens if a webhook is missed? =
The plugin checks the payment status with EnterPay on a schedule (5 minutes to 2 hours apart, for 24 hours) and when the customer returns to the order confirmation page. You can also click "Check EnterPay Status" on the order.

== External services ==

This plugin connects to the EnterPay Payments API (https://api.enterpay.io), operated by EnterPay, to create and check crypto payments. A payment cannot be taken without it.

Data sent to EnterPay, and when:

* When a customer places an order with "Pay with Crypto": the order total and currency, the WooCommerce order ID and order number, the payment attempt number, the plugin version, the customer's billing email address, and the store's order-received and order-payment URLs. EnterPay returns a checkout URL and the customer's browser is redirected to EnterPay's hosted checkout (pos.enterpay.io), where the customer chooses a cryptocurrency and pays.
* When a payment's status is checked (after an EnterPay webhook, on the scheduled checks, when the customer returns to the store, or when the merchant clicks "Check EnterPay Status"): the EnterPay checkout session ID and transaction ID.
* When an unpaid order is cancelled, the customer cancels on EnterPay's page, or a new payment attempt replaces an old one: the EnterPay checkout session ID, to expire that session.
* When the settings page or checkout needs the list of supported currencies (cached for 12 hours), and when the merchant clicks "Test API Key": no order or customer data.

Every request is authenticated with the merchant's EnterPay API key. EnterPay sends payment updates to the store's webhook URL (/wp-json/enterpay/v1/webhook); the plugin accepts them only with a valid EnterPay signature.

EnterPay's legal pages:

* Terms of service: https://www.enterpay.com/terms
* Merchant terms: https://www.enterpay.com/merchant-terms
* Privacy policy: https://www.enterpay.com/privacy
* AML policy: https://www.enterpay.com/aml
* Imprint: https://www.enterpay.com/imprint

== Privacy ==

The plugin stores EnterPay session and transaction identifiers, payment status and checkout URLs as order data. It sends the customer's billing email address to EnterPay with each payment (see External services). Suggested text for your privacy policy is added under Settings → Privacy → Policy Guide.

== Changelog ==

= 1.0.0 =
* Initial release.
