참고 자료 · 94

통화, 금액과 반올림

금액에는 명확한 통화, 자릿수와 계산 규칙이 필요합니다.

업데이트됨 · 15 min

황동 블록 세 개, 표시 없는 다이얼, 종이와 버건디 서류철이 있는 가상의 무인 분석실 AI로 생성한 편집용 일러스트

이 가이드가 달성하는 목표

  • 통화와 단위 저장
  • 두 규칙 시험
  • 반올림 정의

빠른 확인

  • 부분 환불 사례로 할인, 세금, 최소 단위와 합계를 대사하세요.
  • 부동소수점 계산이 차이를 만들 수 있습니다.

단계별 방법

  1. 1

    통화와 단위 저장

    금액과 함께 통화와 단위를 저장합니다. API 계약이 표현을 정하며 모든 통화를 100배하지 않습니다.

    버전이 있는 금액 계약.

  2. 2

    두 규칙 시험

    Stripe 최소 단위의 가상 예: 1234는 12.34 EUR와 1234 JPY를 나타냅니다. 표시 형식은 저장값을 바꾸지 않습니다.

    왕복 변환 시험.

  3. 3

    반올림 정의

    정밀도, 규칙과 반올림 시점을 정합니다. 항목 합과 총액을 비교하고 차이를 조용히 수정하지 않고 기록합니다.

    규칙과 재현 가능한 차이.

재현 가능한 수락 사례

가상 예시입니다. 고객이나 실제 관측 결과를 나타내지 않습니다.

사례 입력 보기
{
    "currency": "JPY",
    "display_amount": 1000,
    "stripe_amount": 1000,
    "incorrect_times_100": 100000
}

예상 판단

1000 JPY의 Stripe 금액은 1000입니다. 모든 통화에 100을 곱하지 않습니다.

검증 절차

  1. 통화와 공급자 요구 단위를 기록합니다.
  2. JPY와 소수 두 자리 통화를 시험합니다.
  3. 저장, 표시 및 반올림 금액을 보존합니다.

Stripe — Currency amounts

가상 예시

예시 상황

부분 환불 사례로 할인, 세금, 최소 단위와 합계를 대사하세요.

결정 및 예상 증거

아닙니다. 표시 형식을 정할 뿐이며 통화, 단위, 제한과 계산을 따로 확인합니다.

관리 지표

지표측정 대상첫 번째 조치
총액 차이Σ 항목 − 총액반올림과 조정 설명
알 수 없는 단위단위 계약 없는 금액자동 해석 차단

일반적인 실수

  • 부동소수점 계산이 차이를 만들 수 있습니다.

자주 묻는 질문

Intl.NumberFormat이 청구를 검증하나요?

아닙니다. 표시 형식을 정할 뿐이며 통화, 단위, 제한과 계산을 따로 확인합니다.

API 금액 정밀도와 정확한 단위

이 언어판의 상세 참고 설명은 영어로 제공됩니다.

A displayed value, a calculation amount and an API integer have different roles. This addition makes decimal scale, multiplier and required step explicit. The reader checks an exact representation before multiplying by quantity; it never silently rounds excess precision.

Adyen and Stripe documentation reviewed on 6 November 2026. Nine limited profiles explain unit contracts; this is neither a complete currency directory nor a list of available payment methods. Amounts and scenarios are fictional CIE examples.

Nine profiles: currency, operation and unit together

Nine profiles: currency, operation and unit together
ProfileDocumentary scopeRepresentation decimals eMultiplier 10ᵉRequired integer stepFictional example
Adyen · EURMinor-unit APIs, excluding Terminal API2100110.99 → 1099
Adyen · JPYMinor-unit APIs, excluding Terminal API011500 → 500
Adyen · KWDMinor-unit APIs, excluding Terminal API3100010.123 → 123
Stripe · ISKISK amount representation; fractional ISK not permitted21001005 → 500; 5.25 rejected
Stripe · UGXUGX charges; fractional UGX not permitted21001005 → 500; 5.25 refused
Stripe · HUF · chargeHUF charges2100110.45 → 1045
Stripe · HUF · payoutManual HUF payouts; whole currency amounts required210010010 → 1000; 10.45 refused
Stripe · TWD · chargeTWD charges21001800.45 → 80045
Stripe · TWD · payoutManual TWD payouts; whole currency amounts required2100100800 → 80000; 800.45 refused

The three Adyen profiles follow its decimal table for minor-unit APIs, excluding Terminal API. Stripe retains two-decimal representation for ISK and UGX while prohibiting fractions: the integer must be divisible by 100. For HUF and TWD, Stripe distinguishes two-decimal charges from manual payouts, which require an integer divisible by 100. Always select the operation profile; currency decimal count alone is insufficient. No exchange rate is described.

Adyen · Currency codes and minor units · Provider documentation · reviewed 2026-11-06

Stripe · Supported currencies and special cases · Provider documentation · reviewed 2026-11-06

정확한 금액 표현 워크숍

Select a profile, unit amount and quantity. Results show multiplier, step, unit integer, total integer and fixed decimal representations. Arithmetic uses exact integers; floating-point sums never determine the result. Extra decimal zeroes are accepted only when they do not change the value.

Workshop input profile: nonnegative amount with 1–12 digits before the point and 0–6 after it; ASCII point, no spaces, sign, grouping separator, exponent or redundant leading zeroes. Integer quantity 1–99 without leading zeroes. These educational bounds are not Adyen or Stripe limits.

No payment, API request, currency exchange, import, storage or export is performed. Exact representation establishes neither payment-method availability, minimum or maximum compliance, amount authorisation nor invoice compliance. This reader covers no tax, discount, negative refund, exchange, fee, settlement or applicable rounding rules.

A reviewable conversion path

A reviewable conversion path
StepCheck
1 · Read the stringSeparate integer and fraction without converting the value to floating point. Localised display strings require a separate explicit parser.
2 · Apply scale ePad the fraction to e. Beyond e, accept zeroes only; any extra nonzero digit causes a precision rejection.
3 · Check the stepThe resulting integer must be divisible by the profile step. Correct scale can still represent a prohibited value, such as fractional ISK in the Stripe profile.
4 · Multiply exactlyInteger total = unit integer × quantity. Reinsert the point e places from the end for technical representation; this is not a localised customer display.

Three rounding experiments separate from exact conversion

These fictional CIE calculations explicitly choose nearest rounding with ties upward, on nonnegative values only, to two decimals. This is an exercise convention, not a rule attributed to either provider. In a two-decimal profile, the interactive reader rejects these fractions rather than applying this convention.

Three rounding experiments separate from exact conversion
Exact amount × quantitySum of rounded linesRounded exact totalLines minus total
0.335 × 30.34 × 3 = 1.021.005 → 1.01+0.01
0.005 × 20.01 × 2 = 0.020.010 → 0.01+0.01
0.3333 × 30.33 × 3 = 0.990.9999 → 1.00−0.01

A rounding difference shows a different operation order; it does not by itself identify the legally or commercially correct result. Define the rule before calculation and retain the reference total and any residual allocation.

Twelve explained scenarios, available without JavaScript

M01 · Two decimals, three units
Two decimals, three units
Profile / amount / quantityExpected reading
adyen-eur / 10.99 / 31099 minor units per item; total 3297, or 32.97 EUR.
M02 · JPY without multiplying by 100
JPY without multiplying by 100
Profile / amount / quantityExpected reading
adyen-jpy / 500 / 2500 representation units per item; total 1000, or 1000 JPY.
M03 · Three KWD decimals
Three KWD decimals
Profile / amount / quantityExpected reading
adyen-kwd / 0.123 / 3123 minor units per item; total 369, or 0.369 KWD.
M04 · Unrepresentable JPY fraction
Unrepresentable JPY fraction
Profile / amount / quantityExpected reading
adyen-jpy / 10.5 / 1Precision rejection: 10.5 does not silently become 10 or 11. No integer amount is produced.
M05 · No implicit rounding
No implicit rounding
Profile / amount / quantityExpected reading
adyen-eur / 10.995 / 1Precision rejection: this exact reader selects no rounding rule for the third decimal.
M06 · ISK: scale and step differ
ISK: scale and step differ
Profile / amount / quantityExpected reading
stripe-isk / 5 / 25 ISK is represented as 500; two units produce 1000, or 10.00 in the two-decimal technical representation.
M07 · ISK: two decimals are insufficient
ISK: two decimals are insufficient
Profile / amount / quantityExpected reading
stripe-isk / 5.25 / 1Step rejection: this would represent fractional ISK. The contract requires an integer divisible by 100.
M08 · Display comma rejected
Display comma rejected
Profile / amount / quantityExpected reading
adyen-eur / 10,99 / 1Technical input rejected. Only the ASCII decimal point is accepted; the reader does not infer a locale.
M09 · Large integer preserved exactly
Large integer preserved exactly
Profile / amount / quantityExpected reading
adyen-kwd / 999999999999.999 / 99Integer total 98999999999999901, or 98999999999999.901 KWD. Arithmetic demonstration: this exceeds JavaScript Number safe integer precision and establishes no permitted API limit.
M10 · Exact zero, no eligibility inferred
Exact zero, no eligibility inferred
Profile / amount / quantityExpected reading
adyen-eur / 0.000 / 1Arithmetic conversion 0, representation 0.00. This does not establish acceptance of a zero payment.
M11 · Extra zeroes without loss
Extra zeroes without loss
Profile / amount / quantityExpected reading
adyen-jpy / 10.000 / 3Extra decimals are all zero: exact conversion 10; total 30 JPY.
M12 · Noncanonical quantity rejected
Noncanonical quantity rejected
Profile / amount / quantityExpected reading
adyen-eur / 10.99 / 03The CIE input profile requires an ASCII integer from 1 to 99 without leading zeroes. This syntax rejection is not a provider payment rule.
M13 · UGX: representation multiplied by 100
UGX: representation multiplied by 100
Profile / amount / quantityExpected reading
stripe-ugx / 5 / 15 UGX is represented by 500, with a step of 100.
M14 · Fractional UGX refused
Fractional UGX refused
Profile / amount / quantityExpected reading
stripe-ugx / 5.25 / 1525 fits the scale but is not divisible by 100; the fractional UGX amount is refused.
M15 · HUF: two-decimal charge
HUF: two-decimal charge
Profile / amount / quantityExpected reading
stripe-huf-charge / 10.45 / 110.45 HUF gives 1045 for a charge.
M16 · Same HUF, different manual payout
Same HUF, different manual payout
Profile / amount / quantityExpected reading
stripe-huf-payout / 10.45 / 11045 is not divisible by 100; this value is refused for a manual payout.
M17 · Whole-currency manual HUF payout
Whole-currency manual HUF payout
Profile / amount / quantityExpected reading
stripe-huf-payout / 10 / 110 HUF gives 1000, divisible by 100.
M18 · TWD: two-decimal charge
TWD: two-decimal charge
Profile / amount / quantityExpected reading
stripe-twd-charge / 800.45 / 1800.45 TWD gives 80045 for a charge.
M19 · Same TWD, different manual payout
Same TWD, different manual payout
Profile / amount / quantityExpected reading
stripe-twd-payout / 800.45 / 180045 is not divisible by 100; this value is refused for a manual payout.
M20 · Whole-currency manual TWD payout
Whole-currency manual TWD payout
Profile / amount / quantityExpected reading
stripe-twd-payout / 800 / 1800 TWD gives 80000, divisible by 100.

Test the monetary contract end to end

Test the monetary contract end to end
Suggested checkUseful record
ScopeProvider, API, operation, documentary version and currency. Do not extend a charge rule to every payout.
Reference valueExact amount linked to currency code; separate calculation unit, technical integer and presentation.
PrecisionBoundary cases, unrepresentable fractions, zeroes and integers beyond floating-point safe integer precision.
RoundingRule and application stage; compare line, total and allocation without changing conventions after observation.
ReconciliationValues and identifiers across order, request, confirmation and refund; also check server-side.
EligibilitySeparately verify current account, payment-method and operation constraints before any real transaction.

Investigate differences by retaining currency, unit and operation first. A correct symbol is insufficient: 500 may represent 500 JPY in one profile and 5 ISK in another. Exact representation and provider acceptance are complementary checks.

Sources and credits

Original CIE educational synthesis and calculations. Adyen and Stripe publish their respective documentation; no affiliation, certification or transaction guarantee is claimed. Fictional amounts are neither statistics nor client results. Recheck the current contract before a real integration.

Adyen · Currency codes and minor units · Provider documentation · reviewed 2026-11-06

SHA-256 : 558887aab2082ea9c937bdd1ec67eb27a3fd30098eda21107dea40a0d7f4beb0

Stripe · Supported currencies and special cases · Provider documentation · reviewed 2026-11-06

SHA-256 : e64bb9ab65e88a94c94fcc7bd8df1c1426d879e8020e7b2cc044b26bb6672929

공식 참조

참조는 방법을 뒷받침합니다. 상황에 맞게 검사를 조정하십시오. 이는 인증이 아닙니다. 원본 참조 제목 및 소스 문서는 다른 언어로 작성되었을 수 있습니다.

참고 자료 확인일 .