Judge pass on the World is Flat submission assets found the deck's "who has
this problem" slide used "Indie API/tool builders" — violates the standing
portfolio rule against "indie"/"indie hacker" audience wording. Reworded to
"Solo founders & small API/tool teams" (matches the rule's target audience:
founders, small teams, developers). Re-exported PDF/PPTX from the fixed
markdown; re-rendered and visually checked the slide, no overflow/wrapping.
Everything else in the deck/video/packet checked clean this pass: all 4
raw GitHub asset URLs verified HTTP 200, ffprobe confirms 66.7s/1920x1080/
h264+aac, ebur128 confirms -14.4 LUFS integrated / -1.9 dBTP true peak
(matches claimed values), all 14 slides + ~20 video frames visually
reviewed with no blank/cut/illegible content, and every factual claim
(mainnet chain id 4663, $wif contract decimals/symbol, testnet tx status,
checkout HTTP 200, API down) re-verified live via direct RPC/curl.
The one real unresolved gap (not fixable without owner action): no real
mainnet $wif-moving transaction exists yet, which is worldisflat.fun's own
rule 3 and judge check txs_valid's pass condition — already correctly
flagged as the blocking gate in plans/submission-packets/worldisflat-settlekit.md.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Pitch deck: Marp markdown (docs/worldisflat/PITCH-DECK.md) exported to
.pptx and .pdf, 14 slides (problem, who has it, solution, live proof
screenshots, architecture, $wif integration + honest gap, rule-by-rule
fit mapping, honest $0-revenue traction, roadmap, team/links). Every
screenshot is a real frame pulled from the existing demo capture; every
live claim (checkout 200, API down, $wif mainnet chain id/symbol/decimals,
testnet tx success) re-verified live via curl/eth_call before writing.
Demo video: upgraded the existing silent 65s capture with real narration
(Deepgram Aura-2 TTS, round-trip QC'd word-for-word against its own
transcript) and burned-in top-band captions driven by the narration's
own word-level timings, muxed over the original real screen-capture
footage (no new/AI-generated visuals). Mastered to -14.4 LUFS
integrated / -1.9 dBTP true peak (ebur128-verified). 66.7s, 1920x1080.
No mainnet $wif tx run (owner-gated, unchanged); Render API still shown
as down, never as live.
robinhoodWif (18-decimal $wif) is a chain-registry/facilitator asset, not a
PaymentNetwork, so onchain-billing now skips non-PaymentNetwork chains and the
checkout EVM helpers carry the narrowed PaymentNetwork & EvmChainKey type.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Adds a 65s, 1920x1080, silent demo video built entirely from real capture
(headless-browser screenshots + a real macOS screencapture of a terminal
session, composed with ffmpeg only) — no AI-generated footage. Honestly
shows the live checkout, a real checkout-session error (Render DB outage),
the public repo's chain table, a real SIMULATE-mode $wif mainnet proof
(chain id, decimals, symbol, gas estimate), the already-proven testnet
settlement tx, and an explicit caption that no mainnet $wif send has been
executed. Surfaces a real gap found while building it: $wif is not yet
selectable in the hosted checkout UI's network picker (packages/common's
PaymentNetwork enum was never extended for it). Also fixes the SIMULATE
log line to print symbol=WIF, and adds scripts/wif-demo-addendum-capture.sh
for recording a real addendum clip once the owner runs the LIVE mainnet
proof.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
settlekit-checkout.onrender.com and settlekit-api.onrender.com both confirmed
timing out live (000, 20s and 90s+) due to the known DATABASE_URL issue --
README's own "Live deployment" table was still handing a judge that dead
checkout URL as the primary link. Lead with the working
settlekit-checkout.vercel.app instead, label both dead Render routes
"currently down" for transparency.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
World is Flat hackathon eligibility requires using $wif onchain on Robinhood
Chain; the existing integration only proved testnet Mock-USDC. Adds a real
robinhoodWif registry entry (18-decimal $wif, contract and chain id verified
live via eth_call), a Permit2 facilitator asset entry, and a ready-to-run
LIVE=1-gated mainnet settlement proof script (scripts/wif-mainnet-proof.ts)
with a safe default SIMULATE mode (no funds, no key) smoke-tested against
the live chain.
Also diagnoses and partially fixes settlekit-api.onrender.com timing out:
neither the migration client nor the app's DB connection set a
connect_timeout, so a stale DATABASE_URL hung boot indefinitely, and the
Dockerfile CMD's `&&` meant a migration failure blocked the server from even
starting. Adds a bounded default timeout and decouples server start from
migration success so failures are fast and visible instead of silent.
packages/chains + packages/x402-facilitator: 194/194 tests pass (registry
invariants updated for the two intentional exceptions: $wif=18 decimals,
robinhoodWif is mainnet-only).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
SUBMISSION.md had already been edited in place with the real confirmed tx
(0x54a46bc4...f0809, block 149738928, status success on Robinhood testnet)
but the edit was never committed, leaving the public repo without this
evidence. No content change — just persisting what was already verified.
Owner-authorized second carve-out to SettleKit's DISCONTINUED status
(2026-10-27), scoped to the World is Flat hackathon (worldisflat.fun/build,
10,000 USDG, Robinhood Chain). Robinhood Chain chain-config, EVM verifier,
and x402-facilitator wiring already existed from the 2026-09-29/30
multichain wave (015899f) and needed no architecture changes — confirmed by
running packages/chains + packages/x402-facilitator's 194 tests green.
Adds scripts/robinhood-testnet-e2e.ts: a real LIVE=1-gated script (same
pattern as operator-arc-e2e.ts / solana-devnet-e2e.ts) that sends a live
ERC-20 transfer on Robinhood Chain testnet (46630) and verifies it through
the actual createEvmVerifier. Smoke-tested against the live RPC: real
assertChainId() succeeds (confirms 46630), then fails cleanly needing a
funded PAYER_PRIVATE_KEY.
docs/worldisflat/SUBMISSION.md documents what's proven vs not: the official
testnet faucet is behind real bot-detection (Vercel checkpoint, confirmed
via both curl and a real headless-Chromium session) and third-party faucets
require a wallet-extension connect — both owner-only. The hackathon's own
submission form requires sign-in (Twitter/X or email), also owner-only.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The EVM and Zcash on-chain verifiers both enforce the session's declared
`payer` and `notBefore` bindings (packages/chains/src/evm-verifier.ts,
settlement.ts). The Solana verifier (packages/solana/src/x402-verifier.ts,
verify.ts) read neither field, even though payment-verification.ts's
sessionCheck() passes both to every network's verifier identically.
Concretely: a checkout session created with a declared payerAddress (the
pre-authorized-wallet / recurring on-chain-billing flow in
apps/api/src/routes/onchain-billing.ts) accepted a Solana payment of the
right amount to the right address from ANY wallet, not just the declared
payer - the exact binding EVM/Zcash already enforce.
Add payer + notBefore to VerifySplTransferParams/evaluateSplTransfer and
wire them through createSolanaPaymentVerifier, matching the EVM verifier's
semantics (fail closed, including when a tx has no on-chain block time).
The route-provider "routedFill" path (no Solana Pay reference) already has
its own independent notBefore check in
apps/api/src/config/verifier-registry.ts's verifyRoutedSolanaFill, which
bypasses this adapter and is unaffected.
28 solana-package tests pass (8 new), plus full chains (211) and api (231)
suites green; tsc --noEmit clean on both packages.
VerifyEntitlementResult.Granted had json tag "granted", but the real API
(apps/api/src/routes/entitlements.ts -> packages/entitlements's
EntitlementService.verify / ServiceVerifyResult) has only ever returned
"allowed". encoding/json leaves unmatched fields at their zero value, so
Granted silently decoded to false for every real response — any Go backend
gating paid access via this SDK denied every real, fully-paid customer, with
no error ever raised. Same bug shape as the already-fixed Python x402
verifier (a27d0051): an SDK's only production path silently rejecting
everything real.
Rename Granted -> Allowed (json:"allowed"), add the Entitlement and Value
fields the API actually returns, and give Raw a real UnmarshalJSON instead of
a json:"-" tag that silently excluded it from ever being populated despite the
doc comment's "preserved in Raw" claim. Add Email support to
VerifyEntitlementInput/ListEntitlementsOptions, matching the API's own
"check by the buyer's checkout email instead of a customer id" capability,
which the Go SDK had no way to express. Add the first regression tests for
this file (sdks/go had none): one that would not even compile against the old
field names, proving this isn't a cosmetic rename.
Also fix a second real blocker for any Go developer trying to use this SDK at
all: go.mod's module path (github.com/settlekit/settlekit-go) and every
README/docs reference to it pointed at a GitHub org that does not exist
(confirmed 404 on github.com and the Go module proxy) — `go get` of the
documented path fails for everyone. Changed the module path to this
repository's real path (github.com/caelum0x/settlekit/sdks/go) and updated
sdks/go/README.md, docs/WEBHOOKS.md, docs/RELEASING-SDKS.md to match.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The homepage/footer's GitHub link was hardcoded to
https://github.com/settlekit/settlekit, which 404s (that org/repo
doesn't exist). The real public repo is caelum0x/settlekit (confirmed
public via the API). Every visitor clicking "Open source · self-host
or use hosted cloud" has been hitting a 404 since this was added.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
First IndexNow coverage for this product -- no key existed before.
Submits against the real live settlekit-web.onrender.com domain (see
app/robots.ts's comment for why, and the prior commit for the
settlekit.dev domain-mismatch finding).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Both were a genuine 404 on the live site (checked via curl against
settlekit-web.onrender.com, the real current deployment) -- the Next app
had no app/robots.ts or app/sitemap.ts at all. Also found while checking
this: settlekit.dev (the domain hardcoded as metadataBase in layout.tsx,
and referenced in every og:image/canonical tag) is not actually serving
this app -- it 200s with a different, stale title ("SettleKit - Settlement
Engine for Payment Processors", Last-Modified Aug 28) on an account this
environment's Cloudflare token has no zone access to. That DNS/deployment
cutover is a real, confirmed owner-only blocker (same shape as the
previously-flagged Render env-var cutover in plans/settlekit.md), not
something fixed here.
Resolves SITE_URL from RENDER_EXTERNAL_URL (set automatically by Render)
so robots.txt/sitemap.xml are correct on the actual live onrender.com URL
right now, and will self-correct once settlekit.dev is cut over.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Render's free Postgres plan backing settlekit-api/checkout expires soon and
was buried in a one-line table note. Document the real impact (service
downtime, not data loss — only testnet demo rows exist today), the two
owner-only fixes (upgrade plan or move to Neon), and add scripts/migrate-db.sh
so moving the data over is a single command once a target DB exists.
X402Verifier("api") — the only production-safe x402 verification mode, since
"accept" trusts any proof blindly — POSTed to /v1/x402/verify. That route is
never mounted in apps/api (only /v1/paid and /v1/x402/{networks,research,...}
exist). Every call 404'd and was swallowed by `except SettleKitError: return
False`, so every real payment proof verified via the SDK's documented
production path was silently rejected, forever.
Rewire _verify_via_api to POST /v1/payments/observe, the endpoint that
actually does what the docstring promised: independently re-verify the
txHash on-chain (recipient, asset, amount) and record a confirmed payment
credited to the caller's org, idempotent on txHash.
Add the Python SDK's first tests (sdks/python/tests/ did not exist despite
pytest being declared as a dev dependency): one asserts the real endpoint and
body shape are used (fails against the pre-fix code), one asserts a non-2xx
response is treated as a failed verification.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The claimTxHash flow is designed so the worker's payment-confirm job can
finish confirming a payment even after the buyer closes the tab (an agent
that never polls hits the same path). But the job only flipped the payment
to "confirmed" and emitted the webhook — it never completed the checkout
session or created an entitlement, both of which only happened in the
buyer-driven confirmOnce/fulfillOnce flow and the API's /payments/:id/confirm
route.
Result: a payment the worker confirms settles on-chain and fires the
seller's webhook, but the session stays "open" forever, so the success/
receipt page 409s "not paid yet" indefinitely and no entitlement is ever
created — the GitHub/Discord retry jobs have nothing to retry since they
only act on entitlements that already exist.
Add WorkerStore.saveCheckoutSession (in-memory + Postgres) and complete the
session + grant a payment entitlement per line item right after the worker
confirms a payment, guarded against double-granting.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Hero, title and meta now name what merchants search for (accept USDC payments,
no card fees, no chargebacks) and the signup button says what it does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
payments.customer_id has an FK to customers; guest checkouts used a
synthetic cus_<session> id that was never inserted, so every live
on-chain confirmation failed with 23503 and the status route 502'd.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The rotation grace check used the wall clock while the job used ctx.now(),
so the retry test started failing once its fixed grace date passed.
The repo already declared MIT in package.json and contract SPDX headers;
add the LICENSE file so GitHub shows it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds DeployArcMainnet.s.sol and deploy-arc-mainnet.sh. The script checks the
chain id (5042) and USDC, simulates, prints the cost in USDC, asks for
confirmation, then verifies on Sourcify and Blockscout. Also adds the
bounty runbook. SettleKitCctpHook is excluded: it is not called by CCTP V2.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Unhandled errors echoed the driver message to the caller, including SQL and
bound parameters. In production the caller now gets a generic message and
the detail is logged server-side with the request id.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
prices.product_id is a foreign key in Postgres, so saving the price first
made POST /v1/merchant/products fail with a 500 on the live database. The
in-memory repositories never enforced the key; the new test does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Checkout fixtures are dated 2026-09-29 but expiry reads the wall clock, so
24 tests started failing once the real date passed the checkout window.
The schema test predated the x402_nonces table, which is keyed by the
claimed authorization instead of id.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- POST /v1/auth/register: a merchant always gets a fresh organization; a
caller-supplied organizationId let anyone join an existing seller's org and
receive a platform:admin key (tenant takeover, present on main too).
- Customer (portal) sessions carry the seller's org id; they are now refused
on the management API instead of being treated as the org owner.
- Fee statements: issuance is serialized per merchant+period in-process and a
duplicate raced in by another instance is voided before sending; a draft
left by an interrupted run is sent on the next run. Overlapping runs
previously issued (and emailed) several statements for one month.
- Invoices: SettleKit-owned metadata keys (pay token, session bindings,
settlement facts, fee-statement markers) are stripped from API input, and a
payment from another organization never settles an invoice.
- Scope map: /v1/merchant/refunds/* needs payments:write (was reports:write).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
packages/localization gains the hosted checkout catalog (English source,
complete Spanish), a q-weighted Accept-Language picker limited to en/es
and a placeholder formatter. The checkout app (now depending on
@settlekit/localization) localizes the checkout, payment link, invoice
and success pages plus the order summary, promo, tax and start
components; ?lang=en|es or an sk_lang cookie override the browser
language and <html lang> follows. English output is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GET /v1/analytics/metrics computes, from live sessions, payments,
subscriptions and catalog: checkout conversion, per-payment-link opened /
paid / conversion / revenue, repeat customers, average revenue per
customer, subscription churn, ARPU and an estimated lifetime value, with
exact bigint money. Checkout repositories gain listCreatedSince
(in-memory and Postgres). The dashboard Analytics page shows the new
cards and a payment-link table.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@settlekit/common, @settlekit/sdk and @settlekit/react move to 0.1.0 with
publish metadata (description, MIT licence, repository, public access,
LICENSE and README in the tarball; verified with npm pack --dry-run).
.github/workflows/release-sdks.yml publishes npm, PyPI (trusted
publishing) and crates.io on an sdk-v* tag or as a manual dry run.
docs/RELEASING-SDKS.md lists the owner-only registry setup. Nothing is
published from here. The Python, Go and Rust webhook verifiers already
accept rotated secrets (G8).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merchants can publish a store (slug, title, tagline, https logo, accent
colour, search description, optional custom domain) through settings or
the dashboard. The checkout app serves it at /store/<slug> with SEO and
Open Graph metadata, listing active products (invoice products hidden)
that each open their payment link, and a middleware rewrites '/' on a
merchant's custom domain to its store when CHECKOUT_PRIMARY_HOSTS is set.
Slugs and domains are unique; public data at /v1/public/stores. Carts of
several products stay out of scope because hosted checkout fulfils one
product per session.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GET /v1/merchant/offramp builds sell links for Transak, MoonPay (signed
server-side with the secret key) and Ramp with the amount, network and
the merchant's own receiving wallet prefilled. SettleKit takes no
custody; partners appear only once the owner configures their keys
(TRANSAK_API_KEY, MOONPAY_PUBLISHABLE_KEY/MOONPAY_SECRET_KEY,
RAMP_HOST_API_KEY). The dashboard Balances page gets a Cash out action per
mainnet network.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refunds no longer depend on a pasted hash alone. POST
/v1/merchant/payments/:id/refund/prepare creates a pending refund and
returns the exact transfer back to the buyer: ERC-20 transfer calldata,
token, chain id and an EIP-681 link on EVM networks, or a Solana Pay
transfer request with a unique reference. The destination is the wallet
that paid when known, else the merchant enters it (validated per chain).
POST /v1/merchant/refunds/:id/confirm verifies the signed transfer
onchain with the payment verifiers (destination, amount, time, Solana
reference, one refund per tx) and only then settles: access revoked,
payment refunded once fully refunded, refund.succeeded with source
wallet. Pending refunds can be canceled. Dashboard refund form gets a
'Send from my wallet' mode (browser wallet or mobile link, auto-verify).
apps/refund-protocol stays unwired.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Security fix plus team access. Before this change any valid API key,
including access keys the delivery system hands to BUYERS, authenticated
as the merchant on the whole management API, and GET /v1/api-keys listed
every organization's keys. Now only platform keys (issued at sign-up or
via POST /v1/api-keys/platform, marked with the platform product id) can
call the API, and each request needs its resource scope
(<resource>:read|write, write implies read; platform:admin or * for
full access), answered with 403 and details.requiredScope otherwise.
Keys cannot mint broader keys, customer keys cannot carry management
scopes, key listing is tenant-scoped and keys can be revoked by id.
Dashboard sessions get team roles (owner, admin, developer, support,
viewer) mapped to scopes. /v1/team manages members and email
invitations (packages/invitations, token hash only, 7-day expiry);
/v1/auth/invitations/accept joins the org and creates the account. The
last owner is protected and only owners grant owner. Dashboard: Team
page, invite accept page, and an API keys page that creates restricted
keys and shows the secret once.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every seller webhook delivery now keeps an attempt log (status code,
error, time, next retry) in the worker queue (Postgres) or in memory.
New routes: GET /v1/webhooks/deliveries(/:id), POST
/v1/webhooks/events/:id/resend, POST /v1/webhooks/endpoints/:id/test
(signed webhook.test event), rotate-secret with a 0-168h grace window
(both secrets sign as two v1 values, verified by @settlekit/webhooks, the
TS/Python/Go/Rust SDKs and the WooCommerce plugin), and disable/enable.
The worker retries on a 1m..6h exponential schedule instead of every tick,
signs with the live endpoint secret, skips disabled endpoints and
auto-disables one after 100 failed attempts in a row
(WEBHOOK_DISABLE_AFTER_FAILURES). Outbound requests get a 10s timeout.
The dashboard Webhooks page shows the event log with Resend and endpoint
actions.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
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>
apps/checkout/public/embed.js opens a payment link, checkout or invoice
from the same checkout origin in an overlay iframe on any site; links
marked data-settlekit-checkout bind automatically, SettleKit.open() is
available from code, and there is an open-in-new-tab fallback for
wallets that block iframes. The success page posts settlekit:success
only to a site the seller listed under Settings > Embedding
(org embedOrigins, validated https origins), and embed.js only accepts
messages from its checkout frame. Payment requests gain sendEmail and
successUrl so store plugins can redirect buyers and bring them back.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New tenant-scoped /v1/exports routes: payments, refunds, invoices and
payouts CSVs, a full USDC ledger, and bank statement files that Xero
(DD/MM/YYYY statement import) and QuickBooks Online (three-column bank
upload) import directly, with optional date ranges. packages/exports
gains a formula-injection guard (opt-in, admin unchanged) and the
accounting formatters. The dashboard Payments page links every export
through a session-authenticated download route.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sellers can turn on checkout tax in settings (label, own country and tax
ID, legal name, per-country rates, default rate, EU reverse charge).
Sessions add tax on top of the net price after any promo, so onchain
verification expects the tax-inclusive total. Buyers set billing country
and VAT ID via the API (billingCountry, vatId) or on the hosted checkout
until a payment is recorded; EU cross-border B2B with a VAT ID of the
right shape is zero-rated. Settled checkouts get a PDF receipt (pdfkit)
with the seller's tax ID, buyer country / VAT ID, tax rate and the
settlement transaction, linked from the success page, the receipt email
and the customer portal. packages/tax calculateTax is now used at
checkout.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Coupons now reach checkout. POST /v1/checkout-sessions takes an optional
couponCode, payment links accept ?promo=CODE (a refused code falls back to
full price with a notice), and the hosted checkout gets a promo field
while the session is open and unpaid. The discounted total becomes the
session amount before network bindings, so onchain verification expects
the discounted amount and a locked Zcash quote is re-priced. Codes are
tenant-scoped, product-scoped codes discount only their products, and
free-trial or 100% codes are refused. The redemption is counted once
after the payment confirms (API confirm and hosted checkout).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SettleKit's advertised per-payment fee was never collected because buyers
pay merchants' wallets directly. When PLATFORM_BILLING_ORG_ID is set, the
API now issues each merchant a monthly statement (confirmed payments x the
fee schedule) as an invoice from SettleKit's own org, paid through the
hosted checkout on the G2 payable-invoice path. Totals below the minimum
carry forward, test accounts are skipped, runs are idempotent and happen
automatically every six hours (or via POST /v1/billing/statements/run).
A statement unpaid past due + grace restricts new products to the free
plan limit from packages/pricing (402 with the pay link). Merchants see
accrued fees, statements and a Pay button on the Balances page.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>