The Link Invoice Payment plugin is a powerful and free extension for WordPress, designed to simplify online billing — whether for one-time or recurring invoices.
The Link Invoice Payment plugin is a powerful and free extension for WooCommerce, designed to simplify online billing — whether for one-time or recurring invoices. With Link Invoice Payment plugin for WooCommerce, you can easily generate both one-time and recurring invoices and send them to your customers via email, WhatsApp, or social networks — complete with a secure payment link. One of its biggest advantages is the ability to offer multiple payment options to settle the invoice.
Now enhanced with even more advanced features, Link Invoice Payment is the perfect tool for flexible and professional invoicing in your WooCommerce store.
- Recurring Invoices – Automate billing for subscriptions or regular payments
- Subscription-type Products – Easily manage recurring billing cycles
- PDF Invoices – Generate professional downloadable and printable invoice documents
- Payment Links – Instantly share payment URLs for quick customer access
- Multi-currency Invoices – Issue invoices in different currencies based on customer location
- Due Date Management – Set custom due dates for each invoice
- Multiple or Specific Payment Methods – Choose which payment gateways appear per invoice
- Multi-language Support – Display invoices in the language preferred by your customer
- Partial Order Payments in WooCommerce – Allow customers to pay part of an order upfront using multiple payment methods
And much more!
Plugin at WordPress marketplace: https://wordpress.org/plugins/lkn-wc-gateway-cielo/
Invoice Payment for WooCommerce plugin is dependent on WooCommerce plugin, please make sure WooCommerce is installed and properly configured before starting Invoice Payment for WooCommerce installation.
-
Look in the sidebar for the WordPress plugins area;
-
In installed plugins look for the 'add new' option in the header;
-
Click on the 'submit plugin' option in the page title and upload the lkn-wc-invoice-payment.zip plugin;
-
Click on the 'install now' button and then activate the installed plugin;
The Invoice Payment for WooCommerce plugin is now live and working.
- Within the product editing or creating page, enable the subscription option to configure recurring invoices.
- Specify the frequency of invoice generation according to your preferences.
- In the WordPress sidebar, find and click on "Invoices".
- Configure default settings such as PDF template, logo URL, footer, sender details, and text preceding the payment link.
- To manually add an invoice, visit the "Add Invoice" page, where both standard and recurring invoices can be created.
- Visit the "Add Invoice" page to manually create invoices.
- Choose between standard or recurring invoices, input necessary details, and save.
- To list subscriptions click on "Subscriptions" in the WordPress sidebar.
- To list invoices click on "Invoices" in the WordPress sidebar.
HTML to PDF lib: https://github.com/dompdf/dompdf
Setup a WYSIWYG editor in a textarea: https://codex.wordpress.org/Javascript_Reference/wp.editor
QR Code lib: https://phpqrcode.sourceforge.net/#home
This document explains how to use the lkn_process_subscription_{paymentMethod}
filter to process subscriptions in your system.
The filter name should include the payment method ID. For example, if the payment method is creditCard
, the filter should be named lkn_process_subscription_creditCard
.
The lkn_process_subscription_{paymentMethod}
filter receives three parameters:
- New Subscription Invoice ID (
$newOrderId
): This is the ID of the new invoice generated for the subscription. - Customer ID (
$customerId
): This is the ID of the customer associated with the subscription and invoice. - Retry (
$retry
): This parameter is a boolean that indicates whether the current call is a retry.
The lkn_process_subscription_{paymentMethod}
filter should return an associative array with the following elements:
- status: A boolean value indicating whether the subscription processing was successful. If
true
, the system understands that the payment was completed and calls thepayment_complete()
method to finalize the process. - makeRetry: A boolean value that signals whether a new attempt to process the subscription should be made. This parameter is used when the processing was not successful, but the application logic allows for a retry.
- nextCronHours: A numeric value (integer) that defines the interval, in hours, for the next processing attempt. If
makeRetry
istrue
andnextCronHours
is greater than 0, the system will schedule a new execution of the filter after this interval using thewp_schedule_single_event
function.
add_filter('lkn_process_subscription_genericPayment', 'process_subscription_generic_payment', 10, 3);
function process_subscription_generic_payment($newOrderId, $customerId, $retry) {
// Get the subscription order
$order = wc_get_order($newOrderId);
if (!$order) {
return [
'status' => false,
'makeRetry' => false,
'nextCronHours' => 0
];
}
// Simulate the call to the payment gateway API
$paymentResponse = process_payment_with_gateway($order);
if ($paymentResponse['success']) {
return [
'status' => true, // Successful payment
'makeRetry' => false,
'nextCronHours' => 0
];
} else {
return [
'status' => false, // Payment failed
'makeRetry' => true, // Retry
'nextCronHours' => 6 // Try again in 6 hours
];
}
}
The subscription status is automatically updated only if the success status ($status
) is true
and it is not a retry. If it is a retry, the method itself must change the status.