=== BelievinTech B2B Pay Later Gateway for Billie ===
Contributors: believintech
Tags: woocommerce, payment, bnpl, stripe, billie
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accept Billie Buy Now, Pay Later B2B payments in EUR through Stripe Checkout for WooCommerce.

== Description ==

This plugin integrates the **Billie** payment method, a B2B Buy Now, Pay Later (BNPL) solution, into your WooCommerce store via Stripe Checkout.

The gateway is intended for WooCommerce stores that sell in **EUR (Euro)** and have Billie enabled on their Stripe account. Billie availability is determined by Stripe based on your Stripe account, currency, customer details, and payment method eligibility.

Payments are processed securely through Stripe's hosted Checkout page, so no sensitive card data ever touches your server.

This plugin is an independent Stripe Checkout integration. It is not the official Billie for WooCommerce plugin and is not affiliated with, endorsed by, or sponsored by Billie GmbH or Stripe.

= Features =

* Billie BNPL payments via Stripe Checkout
* Test and live mode with separate API keys
* Automatic refund processing from the WooCommerce admin
* Webhook support for reliable async payment confirmation
* HPOS (High-Performance Order Storage) compatible
* Debug logging to `wp-content/uploads/believintech-bnpl-logs/`

= Requirements =

* WordPress 5.8 or higher
* WooCommerce 6.0 or higher
* PHP 7.4 or higher
* A Stripe account with Billie enabled
* WooCommerce store currency set to **EUR (Euro)**

= Availability =

This plugin enforces **EUR (Euro)** as the WooCommerce store currency. It does not enforce a fixed country list in WooCommerce; Stripe decides whether Billie can be offered for each Checkout Session based on your Stripe account configuration, the customer, and Stripe's Billie eligibility rules.

= Third-Party Services =

This plugin connects to **Stripe** (https://stripe.com) to process payments.
By using this plugin you agree to Stripe's Terms of Service: https://stripe.com/legal
and Privacy Policy: https://stripe.com/privacy.

Stripe's Billie integration documentation: https://stripe.com/docs/payments/billie

Billie and Stripe names and marks are owned by their respective owners. This plugin uses those names only to describe the supported payment method and payment processor.

== Installation ==

1. Upload the `believintech-b2b-pay-later-gateway-for-billie` folder to `/wp-content/plugins/`.
2. Activate the plugin via the **Plugins** menu in WordPress.
3. Navigate to **WooCommerce → Settings → Payments → Pay Later via Stripe**.
4. Enter your Stripe API keys (test and/or live).
5. Set up a Stripe webhook endpoint (see FAQ).
6. Enable the gateway and save.

== Frequently Asked Questions ==

= Which currencies are supported? =

Pay Later via Stripe requires **EUR (Euro)**. Make sure your WooCommerce store currency is set to EUR before enabling this gateway.

= Which countries are supported? =

The plugin does not block checkout by country. Stripe controls whether Billie is available for each payment based on Stripe's Billie eligibility rules and your Stripe account configuration.

= Is this gateway for retail or business customers? =

Billie is a **B2B** payment method. Customers must be purchasing on behalf of a registered business to complete payment with Billie.

= How do I set up webhooks? =

In your Stripe Dashboard go to **Developers → Webhooks → Add endpoint**.

Set the endpoint URL to:
`https://yoursite.com/wc-api/believintech_bnpl_gateway`

Subscribe to the following events:
* `checkout.session.completed`
* `payment_intent.succeeded`
* `payment_intent.payment_failed`

Copy the **Signing secret** and paste it into the plugin's Webhook Secret field.

= Where are the log files stored? =

Debug logs are stored in `wp-content/uploads/believintech-bnpl-logs/` and are protected from public access by `.htaccess`.

== Screenshots ==

1. BNPL payment option displayed on the WooCommerce checkout page.
2. Stripe Checkout page with Billie selected.
3. Plugin settings page showing API keys.

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.

== Credits ==

This plugin uses the following third-party library (installed via Composer):

* **Stripe PHP SDK** (stripe/stripe-php) ^20.2
  Source: https://github.com/stripe/stripe-php
  License: MIT License - https://github.com/stripe/stripe-php/blob/master/LICENSE
