3 Commits

Author SHA1 Message Date
330d111510 feat: fiat pricing with live ECB rates locked per checkout (G7)
Prices can now be set in EUR, GBP and other ECB reference currencies
(displayCurrency + displayAmount, or currency on quick products). Each
checkout converts them to USDC at the live rate from a frankfurter
service (MIT, FX_RATES_URL), rounded half-up to the cent with exact
bigint math, and locks the quote on the session (fxQuote) until it
expires, so onchain verification expects exactly the quoted USDC. Promo,
tax, receipts and the hosted checkout lines use the locked rate; the
payment link page shows the fiat price and today's USDC amount. Missing
or implausible rates fail closed (503); fiat subscriptions and mixed
fiat currencies are refused. Dashboard product form gets a currency
picker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 05:13:37 +03:00
91c637a470 feat: WooCommerce gateway ported from the BTCPay Greenfield plugin (G6, part 2)
plugins/woocommerce/settlekit-for-woocommerce charges WooCommerce orders
in USDC: checkout creates a SettleKit payment request for the order total
(no email, return to the order received page) and redirects to the hosted
pay page, reusing an open payment when the buyer comes back. The signed
invoice.paid webhook (?wc-api=settlekit) completes the order after
checking invoice id and amount, and the thank-you page double-checks the
status. Structure ported from btcpayserver/woocommerce-greenfield-plugin
(MIT, 371ebfc) with LICENSE and NOTICE kept. A standalone PHP suite runs
under plain PHP CLI and from vitest, including a cross-check of the PHP
signature verifier against @settlekit/webhooks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 04:55:31 +03:00
466c662ac3 feat: payable invoices and payment requests (G2)
Invoices can now be paid onchain. POST /v1/invoices/:id/send issues the
invoice, binds a public pay page (/i/<token> on the hosted checkout),
opens a checkout session for the invoice total on the merchant's
networks and emails the link. POST /v1/invoices/requests sends an
ad-hoc amount + memo to an email. The invoice turns paid only when a
confirmed onchain payment exists for one of its sessions (on read in the
API and in the new worker invoice-settle job) and emits invoice.paid.
Invoice and receipt PDFs render with pdfkit (MIT). Voiding cancels open
sessions. Dashboard gets a request-a-payment form, send buttons, pay
links and PDF downloads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 03:35:06 +03:00