README.md
TEXT FILE731 B · Public source code for developers, search crawlers and AI agents
1# How to Restore a Bitcoin Website Checkout Session
2
3A checkout must survive browser refreshes and application restarts without issuing a new invoice on every visit. Store the internal watch ID and bind it to the authenticated customer and order.
4
5The WAB WATCH CREATE endpoint accepts expected_sat and ttl_sec and returns a watch_id. Store that identifier after successful creation. This SQLite example restores local metadata only, not engine state. An ambiguous creation timeout requires reconciliation rather than blind retries. Use a persistent database path in deployment and never treat expiry as proof that funds did not arrive.
6
7Run `python3 stage22-checkout-recovery.py` for offline assertions. No live integration test.Read-only source · Select a line number to link directly · Raw download above
