# Leanpay for WooCommerce

**Contributors:** Leanpay  
**Tags:** woocommerce, payment, payment-gateway, installment, leanpay
**Requires at least:** 5.0  
**Tested up to:** 6.9
**Requires PHP:** 7.4  
**WC requires at least:** 5.0  
**WC tested up to:** 10.6.2
**Stable tag:** 6.1.0  
**License:** GPLv2 or later  
**License URI:** https://www.gnu.org/licenses/gpl-2.0.html

Enable easy monthly installments with Leanpay. Integrate Leanpay payment gateway for flexible payment options in your WooCommerce store.

## Description

Leanpay for WooCommerce lets customers pay in monthly installments, integrating smoothly with WooCommerce for easy payments.

### Key Features

* **Easy Installment Payments** - Customers can split their purchases into affordable monthly payments
* **Multiple Market Support** - Available for Slovenia and Romania
* **Flexible Display Options** - Show installment information on catalog pages, product pages, and checkout
* **Customizable Design** - Customize colors, sizes, and styling to match your store's branding
* **Real-time Pricing** - Automatically calculates and displays installment amounts based on current pricing plans
* **Sandbox Mode** - Test the integration safely with sandbox mode before going live
* **WooCommerce Blocks Support** - Fully compatible with the new WooCommerce Blocks checkout
* **Webhook Integration** - Automatic order status updates via webhooks
* **Multi-currency Support** - Works with different currencies including EUR, HRK, RON, and HUF
* **Admin Dashboard** - Easy-to-use admin interface for managing settings and viewing order status

### How It Works

1. Install and activate the plugin
2. Configure your API credentials from your Leanpay merchant account
3. Customize the display settings and appearance
4. Customers will see installment payment options throughout your store
5. At checkout, customers can select Leanpay as their payment method
6. Orders are automatically processed and status is updated via webhooks

### Display Options

The plugin can display installment information in three locations:
- **Catalog Pages**: Show lowest monthly installment price next to products
- **Product Pages**: Interactive calculator showing all available installment plans
- **Checkout Page**: Display installment information in the payment method selection area

### Requirements

* WordPress 5.0 or higher
* WooCommerce 5.0 or higher
* PHP 7.4 or higher
* Valid Leanpay merchant account

## Installation

1. Upload the plugin files to `/wp-content/plugins/wc-leanpay` directory, or install the plugin through the WordPress plugins screen
2. Activate the plugin through the 'Plugins' screen in WordPress
3. Navigate to WooCommerce > Settings > Payments
4. Find "Leanpay - instalment purchases" and click "Set up"
5. Enter your API credentials from your Leanpay merchant account
6. Configure the settings according to your preferences
7. Save changes and start accepting installment payments!

## Frequently Asked Questions

### Where can I get my API credentials?

API credentials are provided by Leanpay when you register as a merchant. Contact Leanpay support or check your merchant dashboard.

### Can I test the integration before going live?

Yes, the plugin includes a sandbox mode that allows you to test the integration safely. Enable it in the plugin settings.

### Does this work with WooCommerce Blocks?

Yes, the plugin is fully compatible with WooCommerce Blocks checkout.

### Which countries are supported?

Currently, the plugin supports Slovenia and Romania.

### Can I customize the appearance?

Yes, you can customize colors, font sizes, and display options through the plugin settings in your WordPress admin.

## Screenshots

1. Plugin settings page
2. Installment display on product page
3. Checkout with Leanpay payment option
4. Admin order details with transaction status

## Changelog

See [CHANGELOG.md](CHANGELOG.md) for a complete list of changes.

## Support

For support, feature requests, or bug reports, please visit:
* Plugin support: https://www.leanpay.si/
* Documentation: Contact Leanpay support

## External services

This plugin relies on the **Leanpay** payment gateway service to process installment payments. Leanpay is a third-party external service. When you use this plugin, your store and your customers' data are sent to Leanpay's servers under the conditions described below.

### What the service is and what it is used for

Leanpay is a payment service that enables customers to pay for purchases in monthly installments. This plugin connects to the Leanpay API to:
- Retrieve available installment plan pricing
- Create payment tokens when customers choose Leanpay at checkout
- Redirect customers to the Leanpay hosted checkout page to complete payment
- Confirm order delivery and request verification documents

### What data is sent and when

- **Installment plans update** — When the store admin updates installment plans (scheduled or manual), the plugin sends the merchant API key to Leanpay to fetch current pricing. Endpoint: `/vendor/installment-plans`.
- **Payment token** — When a customer selects Leanpay at checkout, the plugin sends order details (order ID, amount, redirect URLs) and billing information (name, phone, address, postal code, city) to obtain a payment token. Endpoint: `/vendor/token`.
- **Checkout** — The customer's browser is redirected to Leanpay's hosted checkout page to complete the payment.
- **Delivery confirmation** — When the admin confirms delivery, the plugin sends the merchant API key and transaction ID to Leanpay. Endpoint: `/transaction/delivery`.
- **Verification** — The plugin may request customer verification status using the merchant API key and transaction ID. Endpoint: `/api/verification-document/get`.

### Service URLs

The plugin connects to Leanpay domains depending on the configured market (Slovenia or Romania) and mode (production or sandbox), for example: `app.leanpay.si`, `stage-app.leanpay.si`, `app.leanpay.ro`, `test-app.leanpay.ro`.

### Service provider and legal documents

This service is provided by **Leanpay d.o.o.** (Slovenia).

- Website: [https://www.leanpay.si](https://www.leanpay.si)
- **Terms of use:** [https://nbg1.your-objectstorage.com/leanpay/documents/Terms_and_conditions_08.07.2025.pdf?AWSAccessKeyId=YD5H3O5Y2IQQT0ZF0R8G&Signature=A8pHaBTlkuspM17fpHqzDt7TAM8%3D&Expires=1775662940](https://nbg1.your-objectstorage.com/leanpay/documents/Terms_and_conditions_08.07.2025.pdf?AWSAccessKeyId=YD5H3O5Y2IQQT0ZF0R8G&Signature=A8pHaBTlkuspM17fpHqzDt7TAM8%3D&Expires=1775662940)
- **Privacy policy:** [https://nbg1.your-objectstorage.com/leanpay/documents/Privacy_policy_20260209.pdf?AWSAccessKeyId=YD5H3O5Y2IQQT0ZF0R8G&Signature=tqxSlHJZNJVPFAG3XXBmrcaNRjg%3D&Expires=1775662940](https://nbg1.your-objectstorage.com/leanpay/documents/Privacy_policy_20260209.pdf?AWSAccessKeyId=YD5H3O5Y2IQQT0ZF0R8G&Signature=tqxSlHJZNJVPFAG3XXBmrcaNRjg%3D&Expires=1775662940)

## Credits

Developed by Leanpay team for the WooCommerce community.

