=== Stripe Managed Payments for FluentCart ===
Tags: stripe, fluentcart, payments, subscriptions, merchant of record
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: fluent-cart
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Contributors: WPManageNinja

Sell digital products through Stripe Managed Payments in FluentCart, with hosted checkout, subscriptions, and refunds.

== Description ==

**THIRD-PARTY SERVICE NOTICE: This plugin connects to Stripe's external API (api.stripe.com) to process payments. See "Third-Party Service Disclosure" below for details.**

**Stripe Managed Payments for FluentCart** connects your store to Stripe's merchant of record solution for eligible digital products. Customers complete their purchases on Stripe-hosted checkout, where Stripe handles payment collection and applicable indirect taxes within its Managed Payments coverage.

Stripe handles transaction-level support and disputes through Link. You remain responsible for your products and product-related customer support.

This add-on requires FluentCart 2.3.4 or higher. It uses separate Stripe Managed Payments credentials from FluentCart's standard Stripe gateway.

= Key Features =

* **One-time Payments**: Sell eligible digital products through Stripe-hosted checkout.
* **Recurring Subscriptions**: Create subscriptions through checkout and synchronize renewals and subscription status with FluentCart.
* **Tax Handling**: Record Stripe-calculated tax on orders, with settings for product tax codes and tax-inclusive or tax-exclusive pricing.
* **Refunds**: Issue full and partial refunds from FluentCart.
* **Webhook Integration**: Receive checkout, subscription, and refund updates from Stripe.
* **Payment Method Updates**: Let signed-in customers open Stripe's customer portal from their FluentCart subscription page.
* **Test & Live Modes**: Use separate credentials for each mode, controlled by FluentCart's store mode setting.

= Requirements =

* WordPress 6.7 or higher
* PHP 7.4 or higher
* FluentCart 2.3.4 or higher
* An HTTPS website with a publicly accessible webhook endpoint
* An eligible Stripe account with Managed Payments activated
* Eligible digital products with an appropriate Stripe tax code

Update FluentCart to version 2.3.4 or higher before activating this add-on. If the installed FluentCart version is older, the add-on displays a dependency notice.

= Supported Products =

Managed Payments supports eligible digital products such as software, digital downloads, and automated online services. Physical goods and professional services are not supported. Account, country, and product eligibility are determined by Stripe.

See [Stripe Managed Payments eligibility](https://docs.stripe.com/payments/managed-payments/eligibility) for current requirements.

= Important: Third-Party Service Disclosure =

**This plugin relies on Stripe, a third-party payment service, to process payments.**

**External API Connections:**
The plugin connects to https://api.stripe.com to:
* Create and retrieve checkout sessions
* Create and update customer records, products, and prices
* Verify payments and retrieve transaction details
* Manage subscriptions and process refunds
* Create customer portal sessions for payment method updates
* Check API credentials and verify webhook events when needed

Customers are redirected to Stripe-hosted pages to enter payment details. Stripe and Link provide payment-related services, receipts, and customer account tools.

**Data Transmission:**
Data sent to Stripe includes customer names, email addresses, billing information, product descriptions, order references, amounts, currencies, tax codes, and subscription billing details. FluentCart stores customer, order, transaction, and subscription information needed to manage purchases.

**Plugin Updates:**
The plugin also contacts https://api.fluentcart.com/addons to check for updates. These requests include the site URL, installed plugin version, add-on identifier, and parent product identifier. Update checks do not read or send your FluentCart Pro license key or activation hash.

**Service Terms and Privacy:**
* [Stripe Services Agreement](https://stripe.com/legal/ssa)
* [Stripe Privacy Policy](https://stripe.com/privacy)
* [FluentCart Privacy Policy](https://fluentcart.com/privacy-policy/)

**Data Security:**
Payment details are entered on Stripe-hosted pages rather than collected by this add-on. API communication uses HTTPS, and saved API keys and webhook signing secrets are encrypted using FluentCart's credential storage.

**Service Availability:**
Payment processing depends on Stripe's availability. Include your use of Stripe and the associated data sharing in your website's privacy information.

== Installation ==

= Manual Installation =

1. Install and activate FluentCart 2.3.4 or higher on WordPress 6.7 or higher.
2. In WordPress, go to Plugins > Add New Plugin > Upload Plugin.
3. Upload the Stripe Managed Payments for FluentCart ZIP file and click Install Now.
4. Activate the plugin.

Alternatively, upload the extracted plugin folder to `/wp-content/plugins/stripe-managed-payments-for-fluent-cart/` and activate it through the Plugins menu.

= Configuration =

1. Activate Managed Payments in your [Stripe Dashboard](https://dashboard.stripe.com/settings/managed-payments).
2. Go to FluentCart > Settings > Payment Methods and open Stripe Managed Payments.
3. Enter your Stripe test and live secret keys in the corresponding fields.
4. Select an eligible Stripe tax code that describes your products.
5. Choose whether to use Stripe account settings or FluentCart settings for tax configuration. Stripe calculates and collects the tax in either case.
6. Copy the webhook URL displayed in the payment settings and create a webhook endpoint in Stripe for each mode you use.
7. Select the events listed in the payment settings. Copy each endpoint's signing secret into the matching test or live webhook signing secret field.
8. Save your settings and enable the payment method.
9. Set FluentCart's store mode to test and complete a test purchase. Verify that payment and subscription updates reach FluentCart before switching to live mode.

For customer payment method updates, configure Stripe's customer portal in the Stripe Dashboard.

== Frequently Asked Questions ==

= Do I need FluentCart Pro? =

No. FluentCart alone covers one-time payments and subscriptions.

= Is this the same as FluentCart's standard Stripe gateway? =

No. This is a separate gateway for Stripe Managed Payments. It requires Managed Payments activation in your Stripe account and uses its own saved credentials. Stripe Connect is not supported for Managed Payments.

= Why is the payment method missing at checkout? =

Check that the gateway is enabled, a valid tax code is selected, and the cart contains eligible digital products. The gateway is excluded for physical, service, or mixed products, restricted billing countries, and store-managed subscription mode. Existing orders, renewals, and upgrades may also restrict which gateway can be used.

= Does this support subscriptions? =

Yes. Stripe manages automatic recurring billing, and the add-on synchronizes subscription information with FluentCart. FluentCart's store-managed billing mode is not supported by this gateway.

= How do tax settings work? =

With Stripe account settings selected, tax codes edited on existing Stripe products are retained and Stripe determines whether prices include tax. With FluentCart settings selected, the configured tax code and FluentCart's tax-inclusive setting apply. FluentCart tax must be enabled before selecting that option.

The selected default tax code applies across products sent through this gateway. Choose a code appropriate for your catalog. Product changes are sent to Stripe at the product's next checkout.

= Can I test before going live? =

Yes. Save your test secret key and test webhook signing secret, then switch FluentCart's store mode to test. The credentials tab selects which keys you edit; it does not change the store mode.

= Can customers update their payment method? =

Eligible subscriptions show a payment method update link in the FluentCart customer portal. Signed-in customers use that link to open Stripe's customer portal. Customers can also manage their Managed Payments purchases through Link.

= Can I issue refunds from FluentCart? =

Yes. You can issue full or partial refunds from the order in FluentCart. Stripe processes the refund, and webhook notifications synchronize successful refunds initiated through Stripe.

= Who sends receipts and handles customer support? =

Stripe sends payment receipts and other transaction communications through Link. FluentCart can also send enabled order and subscription notifications. Stripe handles transaction-level support, while you handle questions about your products.

== Changelog ==

= 1.0.0 =
* Initial release
* Stripe Managed Payments hosted checkout for eligible digital products
* One-time payments and automatic recurring subscriptions
* Stripe tax reconciliation for orders
* Full and partial refund processing
* Webhook integration for checkout, subscription, and refund updates
* Customer portal links for payment method updates
* Separate test and live credentials

== Upgrade Notice ==

= 1.0.0 =
Initial release. Requires WordPress 6.7 or higher, FluentCart 2.3.4 or higher, and a Stripe account with Managed Payments activated.

== Support ==

* [FluentCart Support](https://fluentcart.com/support)
* [Stripe Managed Payments Documentation](https://docs.stripe.com/payments/managed-payments)
