Repository navigation
fix(core): harden checkout and Stripe webhook payment integrity - #34
Merged
Merged
Conversation
- Enforce variant ownership on add-to-cart and checkout reprice; price lines with the validated variant. - Re-validate/re-resolve applied coupons on line changes and at checkout; re-quote shipping at checkout and 409 when totals drift. - Create hosted Checkout orders only when payment_status is paid; handle async_payment_succeeded. - Require PaymentIntent succeeded; reconcile amount_received vs cart total (on-hold + withhold download grants on mismatch). - Hosted sessions: send flat/table tax as a line item and apply merchant discounts via a one-time Stripe Coupon.
EmDash 0.37 guards request.text() after parsing into ctx.input. Cloning preserves the raw payload for signature verification. Also gitignore .secrets/ for local Stripe key files.
EmDash's product_variants sku uniqueIndex is a table-wide expression on _plugin_storage, so blank (and repeated catalog) sku values on order_items collided on the second paid order. Persist catalog SKUs as productSku and treat checkout.session.completed errors as idempotent when the PI order already exists.
Merged
cavewebs
added a commit
that referenced
this pull request
Oct 5, 2026
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @dashcommerce/core@0.2.1 ### Patch Changes - [#34](#34) [`55ca9fa`](55ca9fa) Thanks [@cavewebs](https://github.com/cavewebs)! - Harden checkout and Stripe webhook payment integrity: verify variant ownership, re-resolve coupon/shipping amounts at checkout, require paid payment status (incl. async success), and reconcile PaymentIntent amounts; fix hosted Checkout Session tax/discount line items. - [#26](#26) [`bcdad21`](bcdad21) Thanks [@cavewebs](https://github.com/cavewebs)! - Railway/reverse-proxy: use configured public site URL for Stripe success/cancel and portal return URLs instead of request.origin which can be localhost:PORT ## @dashcommerce/starter@0.3.2 ### Patch Changes - Updated dependencies [[`55ca9fa`](55ca9fa), [`bcdad21`](bcdad21)]: - @dashcommerce/core@0.2.1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Harden checkout and Stripe webhook payment integrity so cart totals and paid amounts stay consistent through checkout.
Changes
Test plan
bun testfocused suites (payment-integrity, coupons, cart-calculate, shipping-zones) — 42 pass@dashcommerce/core0.2.1)Release
Includes a patch changeset for
@dashcommerce/core. After merge, Version Packages PR #27 should pick this up for npm publish.Quiet PR — no public vulnerability detail.