Skip to content

fix: use zero-decimal-aware conversion for no-show fee acknowledgment text#28221

Closed
uma1100 wants to merge 1 commit intocalcom:mainfrom
flente:fix/no-show-fee-zero-decimal-currency
Closed

fix: use zero-decimal-aware conversion for no-show fee acknowledgment text#28221
uma1100 wants to merge 1 commit intocalcom:mainfrom
flente:fix/no-show-fee-zero-decimal-currency

Conversation

@uma1100
Copy link

@uma1100 uma1100 commented Mar 1, 2026

What does this PR do?

Fixes incorrect amount display in the no-show fee acknowledgment checkbox for zero-decimal currencies (e.g. JPY, KRW).

Bug

When a host sets a no-show fee in a zero-decimal currency like JPY (¥1,000), the HOLD payment acknowledgment text incorrectly showed ¥10 instead of ¥1,000.

Before: このイベントに出席しなかった場合、不参加費用として ¥10 が私のカードに請求されることに同意します。
After: このイベントに出席しなかった場合、不参加費用として ¥1,000 が私のカードに請求されることに同意します。

Root Cause

Payment.tsx hardcoded amount / 100 to convert from Stripe's smallest currency unit. For zero-decimal currencies (JPY, KRW, etc.), Stripe stores the amount already in the base unit, so dividing by 100 results in a 100x smaller value.

Fix

Replace props.payment.amount / 100 with the existing convertFromSmallestToPresentableCurrencyUnit utility from @calcom/lib/currencyConversions, which already correctly handles zero-decimal currencies.

- amount: props.payment.amount / 100,
+ amount: convertFromSmallestToPresentableCurrencyUnit(props.payment.amount, props.payment.currency),

How to reproduce

  1. Install a Stripe integration and set currency to JPY
  2. Create an event type with a no-show fee (e.g. ¥1,000) using HOLD payment
  3. Open the booking/payment page
  4. Observe the acknowledgment text shows ¥10 instead of ¥1,000

Checklist

  • yarn type-check:ci passes
  • No new dependencies added
  • Uses existing utility (convertFromSmallestToPresentableCurrencyUnit) for consistency

… text

Zero-decimal currencies (e.g. JPY, KRW) must not be divided by 100 when
converting from Stripe's smallest unit. The previous `amount / 100` caused
¥1,000 to display as ¥10 in the HOLD payment acknowledgment checkbox.

Replace the hardcoded division with the existing
`convertFromSmallestToPresentableCurrencyUnit` utility which already handles
zero-decimal currencies correctly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@uma1100 uma1100 marked this pull request as ready for review March 1, 2026 02:34
@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Mar 1, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

Copy link
Member

@sahitya-chandra sahitya-chandra left a comment

Choose a reason for hiding this comment

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

@uma1100 can you add a before and after image or video of the changes, so that we can verify it

Copy link
Contributor

@Ryukemeister Ryukemeister left a comment

Choose a reason for hiding this comment

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

I think there's already a PR for this, so this one's a duplicate. think we can close this.

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

Labels

community Created by Linear-GitHub Sync size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants