Linework — checkout and webhook

Linework — checkout and webhook A sequence diagram generated by Archify. POST /create (builder form) honeypot, server validation, 5 events peremail per hour INSERT events (status draft, owner_token) INSERT orders (awaiting_payment) 303 /dashboard/{token}/pay GET /dashboard/{token}/pay create Checkout Session price_data from the order · metadataorder_id, event_id · success/cancel URLs ·idempotency key checkout_{order_id} session id + url UPDATE orders stripe_checkout_session_id 303 to Stripe Checkout pays on Stripe Checkout Stripe holds the card data; the Workernever sees it redirect to /dashboard/{token}/success GET /dashboard/{token}/success "confirming…" page (never marks paid) POST /webhooks/stripe (stripe-signature) constructEventAsync verifies the signature;400 when invalid INSERT OR IGNORE stripe_events (event.id) already seen → 200 {duplicate} UPDATE orders awaiting_payment → paid payment_provider stripe, payment_intent id,paid_at UPDATE events draft → live (package 1) UPDATE stripe_events processed_at 200 {received} Create the invitation Checkout Session Payment and redirect Webhook: the only source of payment truth Couple browser · phone, WhatsApp browser · Sequence participant Couple browser phone, WhatsApp browser Worker · miro-invites (Hono) · Sequence participant Worker miro-invites (Hono) D1 · events · orders · stripe_events · Sequence participant D1 events · orders · stripe_events Stripe · Checkout + webhooks · Sequence participant Stripe Checkout + webhooks Legend main request return security async trace message