=== Sigelith Delivery for WooCommerce ===
Contributors: sigelith
Tags: delivery, proof of delivery, pickup code, courier, shipping
Requires at least: 6.2
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

Proof of handover: the buyer shows a pickup code or confirms on the phone, and your shop receives timestamped evidence it checks itself.

== Description ==

"It never arrived." With Sigelith Delivery your shop has an answer that neither the carrier nor anyone else has to vouch for.

You print a small label for each parcel. The courier scans it with the free Sigelith Courier app. At the door, the buyer shows the pickup code from your e-mail — on a phone or on paper — or confirms on their own phone. The courier's app signs a record, stamps it in the public Sigelith log and sends the evidence straight to your shop, which checks every signature and stamp by arithmetic and marks the order.

* **Two modes** — *Pickup code* (default): the buyer shows 12 characters or a QR code, nothing to install. *Recipient's signature*: the buyer confirms with the key of their own phone (fingerprint, face); the e-mail also carries a fallback code.
* **Works with any carrier** — the code travels on the parcel. Your carrier's own label stays as it is.
* **Labels** — 100 × 150 mm for label printers, A4 sheets of four, or ZPL for Zebra printers. "Print again" gives the same label; "New label" (a parcel shipped again) gives a new code and the old one stops working. Several parcels per order, one code each.
* **The buyer's e-mail and order page** — the code, its QR code for the courier and a link that opens it on the phone. The QR code is drawn by your shop; nothing is loaded from elsewhere. The code and the link are also kept in two order fields for your own SMS plugin.
* **Evidence checked by your shop** — the label's signature, the courier's key, the buyer's confirmation or code, the courier's photos when there are any, and the stamps of the public log, including its two independent cosigners ("2 of 3"). Verdicts say what they prove: *confirmed by the recipient*, *confirmed with the recipient's code*, *attested by the courier*, *delivery attempt* — never more.
* **Documents** — the evidence file (.sigelith-delivery), an evidence package with the log's proofs, and a printable certificate that says what the evidence proves and what it does not.
* **Couriers at a glance** — per courier key, the share of handovers attested without the buyer and of attempts. A courier's archive can be imported: the plugin lists the differences against your evidence and imports what was lost.
* **Your key card, checked daily** — the plugin reads its own key card at the public address, as couriers' apps do, and warns you when a cache or a CDN answers in its place.
* **11 languages** — English, Polish, German, French, Spanish, Russian, Turkish, Japanese, Korean, Arabic and Chinese (simplified).

Free, no account, no API key. Your buyers' names, addresses and phone numbers never leave your shop.

The protocol, precisely enough to check it yourself: [sigelith.org/spec](https://sigelith.org/spec/).

== External services ==

This plugin connects to the Sigelith service at https://sigelith.org. Only SHA-256 digests (64 hexadecimal characters) are sent — never an order, a name, an address or the address of your site.

* **When you print a label** (only if "Stamp the label when printing" is on, the default), the digest of the signed label is sent to `https://sigelith.org/api/proof/stamp`. If the service cannot be reached, the plugin tries again hourly for seven days.
* **When evidence of a handover arrives**, and then daily for up to 35 days until the weekly seal of the log is anchored, the digests of the label, the buyer's confirmation and the courier's record are sent to `https://sigelith.org/api/proof/verify` and `https://sigelith.org/api/proof/cosign` to read the public log's proofs and its cosigners' signatures, which the plugin checks itself.
* **Your buyers** open links to `https://sigelith.org/delivery/` from the e-mail. The code and the label travel in the link's fragment (after "#"), which browsers never send to a server.

Inbound: couriers' apps (and buyers' phones) send evidence to your shop at `/wp-json/sigelith/v1/delivery`. The key card of your shop is published at `/.well-known/sigelith-merchant.json`.

Terms of use: https://sigelith.org/terms/ — Privacy policy: https://sigelith.org/privacy/

== Installation ==

1. Install and activate the plugin. WooCommerce must be active, the shop must run on HTTPS with pretty permalinks.
2. Go to WooCommerce → Settings → Sigelith Delivery, choose the mode and the label format.
3. In an order, click "Add a parcel and print its label". The buyer receives the code by e-mail.

PHP needs the openssl and sodium extensions (standard on almost every host). Evidence with the courier's photos can be up to 12 MB: set PHP's post_max_size to 16M or more.

== Frequently Asked Questions ==

= Does the buyer need an app? =

No. In the pickup-code mode the buyer shows the code from the e-mail, on any screen or on paper. In the recipient's-signature mode any current browser works; the Sigelith Delivery app for Android is optional.

= Does my carrier have to support this? =

No. The courier uses the free Sigelith Courier app next to the carrier's own tools, and the code travels on the parcel. Carriers with their own apps can build the open protocol in.

= What does the evidence prove? =

A pickup code proves that the courier's phone held the code your shop sent only to the buyer — not that the buyer stood at the door. A recipient's confirmation proves more: it is signed with the buyer's own key, after the courier's session at the door began. Neither proves the content or the condition of the parcel, nor delivery in any legal sense. The certificate says this in plain words.

= What happens to the data when I delete the plugin? =

Labels, evidence and the shop key stay unless you tick "Delete labels, evidence and keys when the plugin is deleted" in the settings.

== Screenshots ==

1. The order screen: each parcel with its label and its state; once handed over, the evidence — when, with the stamp's number in the public log, how the code reached the courier, the courier's key — and its documents.
2. The buyer's e-mail: the pickup code as text and as a QR code, and a link that opens it on the phone.
3. WooCommerce → Settings → Sigelith Delivery: the mode, the shop key and its card at the public address, the label and the e-mail.
4. A label for a label printer (100 × 150 mm); A4 sheets of four and ZPL for Zebra printers too.
5. The printable certificate of a handover: what the evidence proves and what it does not.
6. Sigelith Delivery → Couriers: how each courier key closed its handovers.

== Changelog ==

= 1.0.0 =
* First release.
