Skip to content

fix(payment): round currency precision - #12803

Merged
olivermrbl merged 3 commits into
developfrom
fix/currency-decimal-precision
Jun 24, 2025
Merged

fix(payment): round currency precision#12803
olivermrbl merged 3 commits into
developfrom
fix/currency-decimal-precision

Conversation

@carlos-r-l-rodrigues

@carlos-r-l-rodrigues carlos-r-l-rodrigues commented Jun 23, 2025

Copy link
Copy Markdown
Contributor

What:

  • Payment Authorization and Capture are rounded by payment providers. The Payment module must consider the currency precision to manage payment statuses correctly.

FIXES: #12789

@changeset-bot

changeset-bot Bot commented Jun 23, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 84f0c4a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 69 packages
Name Type
@medusajs/payment Patch
@medusajs/utils Patch
@medusajs/medusa Patch
@medusajs/framework Patch
@medusajs/modules-sdk Patch
@medusajs/orchestration Patch
@medusajs/workflows-sdk Patch
@medusajs/cli Patch
@medusajs/medusa-oas-cli Patch
integration-tests-http Patch
@medusajs/test-utils Patch
@medusajs/analytics Patch
@medusajs/api-key Patch
@medusajs/auth Patch
@medusajs/cache-inmemory Patch
@medusajs/cache-redis Patch
@medusajs/cart Patch
@medusajs/currency Patch
@medusajs/customer Patch
@medusajs/event-bus-local Patch
@medusajs/event-bus-redis Patch
@medusajs/file Patch
@medusajs/fulfillment Patch
@medusajs/index Patch
@medusajs/inventory Patch
@medusajs/link-modules Patch
@medusajs/locking Patch
@medusajs/notification Patch
@medusajs/order Patch
@medusajs/pricing Patch
@medusajs/product Patch
@medusajs/promotion Patch
@medusajs/region Patch
@medusajs/sales-channel Patch
@medusajs/stock-location Patch
@medusajs/store Patch
@medusajs/tax Patch
@medusajs/user Patch
@medusajs/workflow-engine-inmemory Patch
@medusajs/workflow-engine-redis Patch
@medusajs/analytics-local Patch
@medusajs/analytics-posthog Patch
@medusajs/auth-emailpass Patch
@medusajs/auth-github Patch
@medusajs/auth-google Patch
@medusajs/file-local Patch
@medusajs/file-s3 Patch
@medusajs/fulfillment-manual Patch
@medusajs/locking-postgres Patch
@medusajs/locking-redis Patch
@medusajs/notification-local Patch
@medusajs/notification-sendgrid Patch
@medusajs/payment-stripe Patch
@medusajs/core-flows Patch
@medusajs/oas-github-ci Patch
@medusajs/js-sdk Patch
@medusajs/types Patch
@medusajs/telemetry Patch
@medusajs/admin-bundler Patch
@medusajs/admin-sdk Patch
@medusajs/admin-shared Patch
@medusajs/admin-vite-plugin Patch
@medusajs/dashboard Patch
@medusajs/icons Patch
@medusajs/toolbox Patch
@medusajs/ui-preset Patch
create-medusa-app Patch
medusa-dev-cli Patch
@medusajs/ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Jun 23, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api-reference 🔄 Building (Inspect) Visit Preview 💬 Add feedback Jun 24, 2025 4:31pm
medusa-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 24, 2025 4:31pm
7 Skipped Deployments
Name Status Preview Comments Updated (UTC)
api-reference-v2 ⬜️ Ignored (Inspect) Visit Preview Jun 24, 2025 4:31pm
cloud-docs ⬜️ Ignored (Inspect) Visit Preview Jun 24, 2025 4:31pm
docs-ui ⬜️ Ignored (Inspect) Visit Preview Jun 24, 2025 4:31pm
docs-v2 ⬜️ Ignored (Inspect) Visit Preview Jun 24, 2025 4:31pm
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Jun 24, 2025 4:31pm
resources-docs ⬜️ Ignored (Inspect) Visit Preview Jun 24, 2025 4:31pm
user-guide ⬜️ Ignored (Inspect) Visit Preview Jun 24, 2025 4:31pm

@olivermrbl olivermrbl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

I wonder if it would make sense to add this field to the big number class as well at some point?

E.g. rounded_amount

@olivermrbl
olivermrbl merged commit ba1e659 into develop Jun 24, 2025
26 checks passed
@olivermrbl
olivermrbl deleted the fix/currency-decimal-precision branch June 24, 2025 16:41
@github-actions github-actions Bot mentioned this pull request Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Rounding Issue when capturing payment from stripe webhook

2 participants