Skip to content

Convert Apple Pay amounts using the currency's exponent - #978

Closed
Max Harrison (maxharrison) wants to merge 1 commit into
google-pay-currency-exponentfrom
apple-pay-currency-exponent
Closed

Convert Apple Pay amounts using the currency's exponent#978
Max Harrison (maxharrison) wants to merge 1 commit into
google-pay-currency-exponentfrom
apple-pay-currency-exponent

Conversation

@maxharrison

@maxharrison Max Harrison (maxharrison) commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Apple Pay request builders always divided minor-unit amounts by 100, so zero-decimal currencies rendered at one hundredth of their value and three-decimal currencies at ten times their value. They now use formatTransactionAmount for payment and recurring totals, line items, shipping options, payment-method updates, and disbursement line items, using the currency exponent supplied by Intl.NumberFormat. This corrects the documented minor-unit contract, but merchants that compensated for the old formatting must remove that workaround, so this change is held for the next major @evervault/browser release.

Note: This PR is stacked on #977.

@changeset-bot

changeset-bot Bot commented Aug 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 81ecdb0

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

This PR includes changesets to release 7 packages
Name Type
@evervault/browser Patch
@evervault/inputs Patch
example-apple-pay Patch
example-react-google-wallet Patch
@evervault/browser-e2e-tests Patch
e2e-tests-ui-components-vanilla-server Patch
@evervault/inputs-e2e-tests 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

total: {
label: tx.priceLabel ?? merchant.name,
amount: {
value: calculatedTotal.toString(),

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.

Should we also apply the format here?

@ana-maksimovskikh

Copy link
Copy Markdown
Contributor

We might have an issue with Google rejecting formatted string on their side - worth doublechecking

https://developers.google.com/pay/api/web/reference/request-objects#TransactionInfo

@maxharrison

Copy link
Copy Markdown
Contributor Author

Closing this draft. We will keep the Apple Pay correction separate from the Google Pay major-release work.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants