Skip to content

feat(stripe): automatically record Tempo session settlements - #892

Draft
ksn-stripe wants to merge 1 commit into
wevm:mainfrom
ksn-stripe:ksn-stripe/stripe-session-paymentintents
Draft

feat(stripe): automatically record Tempo session settlements#892
ksn-stripe wants to merge 1 commit into
wevm:mainfrom
ksn-stripe:ksn-stripe/stripe-session-paymentintents

Conversation

@ksn-stripe

Copy link
Copy Markdown
Contributor

Stripe Tempo sessions currently require merchants to create transaction-verification PaymentIntents in onSessionSettlement. This wires confirmed settlement deltas into the same payment-success handler used by Stripe one-time Tempo charges, so the SDK records them automatically.

Each transaction is recorded for its newly settled amount, rounded down to whole cents. Zero/sub-cent deltas are skipped. Both tempo.session() and defaultMethods().additional() inherit the change, including existing metadata, Connect mapping, transaction-hash idempotency, optional-field fallback, and logged Stripe-error behavior. Optional merchant callbacks still run after the recording attempt; existing callbacks should remove manual PI creation.

Validation: 126 Stripe tests passed, 7 skipped (VITE_TEMPO_NETWORK=none); TypeScript, scoped lint/format checks, and git diff --check passed. New tests cover settlement triggers, delta rounding, repeated notifications, callback composition, and Stripe failures. No live payment or on-chain settlement was executed.

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
@pkg-pr-new

pkg-pr-new Bot commented Sep 11, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/mppx@892

commit: 06c537f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant