=== CatCode Pay Later with Billink for WooCommerce ===
Contributors: catcodestudio
Tags: billink, achteraf betalen, pay later, buy now pay later, woocommerce
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Billink pay later (achteraf betalen) at the WooCommerce checkout for shoppers in the Netherlands, Belgium and Germany.

== Description ==

Adds Billink as a payment method to WooCommerce. The customer chooses "Pay later with Billink", is sent to the hosted Billink checkout page, confirms the order there and pays the invoice later. The plugin uses the current Billink API (sessions and signed v3 webhooks) with your own Billink merchant account.

* **Hosted Billink checkout** — a checkout session per order with the customer, the billing and delivery address and every order line (products, shipping, fees) with its VAT rate. The street, the house number and the extension are sent separately: they come from the house number fields of Dutch checkout plugins, or are read from the street address line.
* **Confirmed by Billink, not by the redirect** — the order is paid when Billink reports the session as completed: by the signed session webhook (HMAC-SHA256, deliveries older than 5 minutes are refused, every delivery is processed once), and by a check with Billink when the customer lands on the thank-you page.
* **Plain results** — a cancelled or expired Billink checkout cancels the waiting order; when Billink cannot create the order, it fails. A repeated webhook changes nothing. A refusal is shown to the customer as a neutral message, with the reason in the order notes.
* **Check status at Billink** — a button on the order screen asks Billink about the checkout and about the payment of the invoice.
* **Webhook set-up from the plugin** — paste your signing secret or let the plugin generate one, and register the webhook address at Billink with one click. "Check connection" tests the username and the API identifier without creating anything.
* Sandbox and production, the official Billink or "Achteraf betalen" badge from the Billink CDN, your logo on the Billink page, an order number prefix for several shops on one account.
* Works with the classic and the block checkout, HPOS. The API identifier and the signing secret are stored encrypted. Offered in euros, for billing addresses in NL, BE and DE.
* Translations included: English, Dutch.

= Pro =

The Pro version is sold on [catcode.com.ua](https://catcode.com.ua/modules/catcode-pay-later-with-billink-for-woocommerce/), with a 7-day trial that never starts by itself:

* **Business customers (B2B)** — orders with a company name go to Billink as business orders, with an optional Chamber of Commerce (KvK) field at the checkout.
* **Start the invoice** — by hand from the order screen, or automatically when the order gets a status you choose; the track & trace code (from an order field or WooCommerce Shipment Tracking) is registered at Billink first.
* **Refunds from WooCommerce** — a full or partial refund becomes a credit on the Billink invoice.
* **Hold, resume and disputes** — pause the reminders for up to 14 days, and open a dispute with Billink from the order screen.
* **Order webhook** — started, paid, credited, on hold and dispute events of the invoice as order notes.
* **Settlement invoices** — the list of Billink's settlement invoices with a date filter, and the ZIP with all their documents for reconciliation.
* **Journal** — the last calls to Billink and webhooks, with their results.
* **Limits** — the countries and the order totals (separately for private and business customers) the method is offered for.
* **Background check** — every hour, Billink is asked about checkouts whose webhook did not arrive.
* Updates from catcode.com.ua.

The licence runs for 1-5 years and includes updates and support for that term; a purchased licence keeps its Pro features after the term ends. One key covers two sites: the shop and its test copy.

Billink is a trademark of Billink B.V. This plugin is an independent integration made by CatCode; it is not an official plugin of Billink and is not affiliated with or endorsed by it. You need your own Billink merchant account with API access.

From 20 November 2026 buy now, pay later counts as regulated consumer credit in the Netherlands (CCD2). Dutch law requires the AFM credit warning "Let op! Geld lenen kost geld" in advertisements for credit. The method settings have an option to show the official AFM image (unchanged, as wide as the method's text, at the top) next to the payment method; it is off by default, because whether the warning is required at the payment method itself was not settled when this version was released. Check with Billink or the AFM which texts and warnings your shop has to show.

== External services ==

The plugin connects to the Billink API (Billink B.V., [billink.nl](https://www.billink.nl/), documentation at [docs.billink.nl](https://docs.billink.nl/)) at `api-staging.billink.nl` (sandbox) or `api.billink.nl` (production), and only after you enter your Billink username and API identifier. Every request carries the username and the API identifier.

* When the customer chooses Billink at the checkout: the customer's name, e-mail address, phone number, billing and delivery address, the order number, the order total and VAT, and every order line (name, product code, quantity, price, VAT rate), with the return addresses of your shop. The customer is then sent to the Billink checkout page (for example `pay.billink.nl`), where Billink collects the rest.
* When a customer returns to the thank-you page, when you press "Check status at Billink": the session ID or the order number.
* When you press "Check connection": a made-up order number, to test the credentials.
* When you register the webhooks: the webhook address of your shop; when you generate a secret: nothing else.
* Pro: the company name and the Chamber of Commerce number of business customers; the order number, the track & trace code and the carrier when the invoice starts; the order number and the amount of a credit; the Billink invoice number, the customer's name and e-mail address and your message of a dispute; the dates of the settlement invoice list. The list of carriers is read from Billink without credentials.

The badge at the checkout is loaded from the Billink CDN (`cdn.billink.nl`), as Billink asks.

[Billink privacy statement](https://www.billink.nl/privacy-statement) · [Billink terms](https://www.billink.nl/gebruikersvoorwaarden)

== Installation ==

1. Upload the plugin and activate it. WooCommerce must be active and the shop currency the euro.
2. In WooCommerce → **Billink** choose the environment, enter your Billink username and API identifier (UID), press "Check connection" and save.
3. Paste your webhook signing secret and save, or press "Generate a new secret and register". Then press "Register the webhook address". The site must use HTTPS.
4. WooCommerce → Settings → Payments: enable "Billink (pay later)". Place a test order in the sandbox with made-up data.

== Frequently Asked Questions ==

= Do I need a Billink account? =

Yes, a Billink merchant account with API access. Billink support sets up a sandbox account on request (support@billink.nl).

= Why is the order "pending payment" after the customer left for Billink? =

It waits for the customer to finish the Billink checkout. It becomes "processing" when Billink reports the order as created; a cancelled or expired checkout cancels it.

= The customer was refused. Why? =

Billink does not give the reason of a refusal through its API. The customer stays on the Billink page and can choose another way to pay there (when your account allows it) or go back to your shop.

= Which countries and currencies? =

Billing addresses in the Netherlands, Belgium and Germany, orders in euros.

== Changelog ==

= 1.0.0 =
* First release.
