@ducatjs/money 0.0.0 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (285) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +51 -0
  3. package/README.md +617 -3
  4. package/assets/CREDITS.md +12 -0
  5. package/data/adyen-fx.json +19 -0
  6. package/data/adyen.json +171 -0
  7. package/data/braintree.json +223 -0
  8. package/data/cash-rounding.json +399 -0
  9. package/data/checkout.json +230 -0
  10. package/data/iso4217-list-one.xml +1956 -0
  11. package/data/klarna.json +95 -0
  12. package/data/paypal.json +65 -0
  13. package/data/stripe-fx.json +17 -0
  14. package/data/stripe.json +285 -0
  15. package/dist/adyen-fx.d.ts +25 -0
  16. package/dist/adyen-fx.d.ts.map +1 -0
  17. package/dist/adyen-fx.js +122 -0
  18. package/dist/adyen-fx.js.map +1 -0
  19. package/dist/adyen.d.ts +25 -0
  20. package/dist/adyen.d.ts.map +1 -0
  21. package/dist/adyen.js +34 -0
  22. package/dist/adyen.js.map +1 -0
  23. package/dist/allocate.d.ts +72 -0
  24. package/dist/allocate.d.ts.map +1 -0
  25. package/dist/allocate.js +314 -0
  26. package/dist/allocate.js.map +1 -0
  27. package/dist/bag.d.ts +58 -0
  28. package/dist/bag.d.ts.map +1 -0
  29. package/dist/bag.js +122 -0
  30. package/dist/bag.js.map +1 -0
  31. package/dist/braintree.d.ts +34 -0
  32. package/dist/braintree.d.ts.map +1 -0
  33. package/dist/braintree.js +45 -0
  34. package/dist/braintree.js.map +1 -0
  35. package/dist/cash.d.ts +35 -0
  36. package/dist/cash.d.ts.map +1 -0
  37. package/dist/cash.js +86 -0
  38. package/dist/cash.js.map +1 -0
  39. package/dist/checkout.d.ts +42 -0
  40. package/dist/checkout.d.ts.map +1 -0
  41. package/dist/checkout.js +52 -0
  42. package/dist/checkout.js.map +1 -0
  43. package/dist/convert.d.ts +51 -0
  44. package/dist/convert.d.ts.map +1 -0
  45. package/dist/convert.js +55 -0
  46. package/dist/convert.js.map +1 -0
  47. package/dist/currency.d.ts +22 -0
  48. package/dist/currency.d.ts.map +1 -0
  49. package/dist/currency.js +38 -0
  50. package/dist/currency.js.map +1 -0
  51. package/dist/decimal.d.ts +52 -0
  52. package/dist/decimal.d.ts.map +1 -0
  53. package/dist/decimal.js +251 -0
  54. package/dist/decimal.js.map +1 -0
  55. package/dist/ecb.d.ts +17 -0
  56. package/dist/ecb.d.ts.map +1 -0
  57. package/dist/ecb.js +147 -0
  58. package/dist/ecb.js.map +1 -0
  59. package/dist/exact.d.ts +62 -0
  60. package/dist/exact.d.ts.map +1 -0
  61. package/dist/exact.js +147 -0
  62. package/dist/exact.js.map +1 -0
  63. package/dist/fetch.d.ts +58 -0
  64. package/dist/fetch.d.ts.map +1 -0
  65. package/dist/fetch.js +79 -0
  66. package/dist/fetch.js.map +1 -0
  67. package/dist/fixed.d.ts +121 -0
  68. package/dist/fixed.d.ts.map +1 -0
  69. package/dist/fixed.js +420 -0
  70. package/dist/fixed.js.map +1 -0
  71. package/dist/fn.d.ts +27 -0
  72. package/dist/fn.d.ts.map +1 -0
  73. package/dist/fn.js +30 -0
  74. package/dist/fn.js.map +1 -0
  75. package/dist/format.d.ts +13 -0
  76. package/dist/format.d.ts.map +1 -0
  77. package/dist/format.js +90 -0
  78. package/dist/format.js.map +1 -0
  79. package/dist/generated/adyen.d.ts +3 -0
  80. package/dist/generated/adyen.d.ts.map +1 -0
  81. package/dist/generated/adyen.js +144 -0
  82. package/dist/generated/adyen.js.map +1 -0
  83. package/dist/generated/braintree.d.ts +3 -0
  84. package/dist/generated/braintree.d.ts.map +1 -0
  85. package/dist/generated/braintree.js +140 -0
  86. package/dist/generated/braintree.js.map +1 -0
  87. package/dist/generated/cash.d.ts +12 -0
  88. package/dist/generated/cash.d.ts.map +1 -0
  89. package/dist/generated/cash.js +364 -0
  90. package/dist/generated/cash.js.map +1 -0
  91. package/dist/generated/checkout.d.ts +3 -0
  92. package/dist/generated/checkout.d.ts.map +1 -0
  93. package/dist/generated/checkout.js +151 -0
  94. package/dist/generated/checkout.js.map +1 -0
  95. package/dist/generated/iso4217.d.ts +174 -0
  96. package/dist/generated/iso4217.d.ts.map +1 -0
  97. package/dist/generated/iso4217.js +175 -0
  98. package/dist/generated/iso4217.js.map +1 -0
  99. package/dist/generated/kernel.d.ts +17 -0
  100. package/dist/generated/kernel.d.ts.map +1 -0
  101. package/dist/generated/kernel.js +208 -0
  102. package/dist/generated/kernel.js.map +1 -0
  103. package/dist/generated/klarna.d.ts +3 -0
  104. package/dist/generated/klarna.d.ts.map +1 -0
  105. package/dist/generated/klarna.js +21 -0
  106. package/dist/generated/klarna.js.map +1 -0
  107. package/dist/generated/paypal.d.ts +3 -0
  108. package/dist/generated/paypal.d.ts.map +1 -0
  109. package/dist/generated/paypal.js +31 -0
  110. package/dist/generated/paypal.js.map +1 -0
  111. package/dist/generated/stripe.d.ts +8 -0
  112. package/dist/generated/stripe.d.ts.map +1 -0
  113. package/dist/generated/stripe.js +150 -0
  114. package/dist/generated/stripe.js.map +1 -0
  115. package/dist/index.d.ts +11 -0
  116. package/dist/index.d.ts.map +1 -0
  117. package/dist/index.js +11 -0
  118. package/dist/index.js.map +1 -0
  119. package/dist/klarna.d.ts +31 -0
  120. package/dist/klarna.d.ts.map +1 -0
  121. package/dist/klarna.js +38 -0
  122. package/dist/klarna.js.map +1 -0
  123. package/dist/money.d.ts +218 -0
  124. package/dist/money.d.ts.map +1 -0
  125. package/dist/money.js +577 -0
  126. package/dist/money.js.map +1 -0
  127. package/dist/parse.d.ts +11 -0
  128. package/dist/parse.d.ts.map +1 -0
  129. package/dist/parse.js +132 -0
  130. package/dist/parse.js.map +1 -0
  131. package/dist/paypal.d.ts +41 -0
  132. package/dist/paypal.d.ts.map +1 -0
  133. package/dist/paypal.js +58 -0
  134. package/dist/paypal.js.map +1 -0
  135. package/dist/plugins/adyen.d.ts +15 -0
  136. package/dist/plugins/adyen.d.ts.map +1 -0
  137. package/dist/plugins/adyen.js +10 -0
  138. package/dist/plugins/adyen.js.map +1 -0
  139. package/dist/plugins/all.d.ts +22 -0
  140. package/dist/plugins/all.d.ts.map +1 -0
  141. package/dist/plugins/all.js +23 -0
  142. package/dist/plugins/all.js.map +1 -0
  143. package/dist/plugins/allocate.d.ts +20 -0
  144. package/dist/plugins/allocate.d.ts.map +1 -0
  145. package/dist/plugins/allocate.js +26 -0
  146. package/dist/plugins/allocate.js.map +1 -0
  147. package/dist/plugins/braintree.d.ts +12 -0
  148. package/dist/plugins/braintree.d.ts.map +1 -0
  149. package/dist/plugins/braintree.js +12 -0
  150. package/dist/plugins/braintree.js.map +1 -0
  151. package/dist/plugins/cash.d.ts +19 -0
  152. package/dist/plugins/cash.d.ts.map +1 -0
  153. package/dist/plugins/cash.js +16 -0
  154. package/dist/plugins/cash.js.map +1 -0
  155. package/dist/plugins/checkout.d.ts +21 -0
  156. package/dist/plugins/checkout.d.ts.map +1 -0
  157. package/dist/plugins/checkout.js +16 -0
  158. package/dist/plugins/checkout.js.map +1 -0
  159. package/dist/plugins/convert.d.ts +20 -0
  160. package/dist/plugins/convert.d.ts.map +1 -0
  161. package/dist/plugins/convert.js +13 -0
  162. package/dist/plugins/convert.js.map +1 -0
  163. package/dist/plugins/exact.d.ts +15 -0
  164. package/dist/plugins/exact.d.ts.map +1 -0
  165. package/dist/plugins/exact.js +13 -0
  166. package/dist/plugins/exact.js.map +1 -0
  167. package/dist/plugins/fixed.d.ts +17 -0
  168. package/dist/plugins/fixed.d.ts.map +1 -0
  169. package/dist/plugins/fixed.js +13 -0
  170. package/dist/plugins/fixed.js.map +1 -0
  171. package/dist/plugins/format.d.ts +9 -0
  172. package/dist/plugins/format.d.ts.map +1 -0
  173. package/dist/plugins/format.js +16 -0
  174. package/dist/plugins/format.js.map +1 -0
  175. package/dist/plugins/klarna.d.ts +10 -0
  176. package/dist/plugins/klarna.d.ts.map +1 -0
  177. package/dist/plugins/klarna.js +10 -0
  178. package/dist/plugins/klarna.js.map +1 -0
  179. package/dist/plugins/paypal.d.ts +14 -0
  180. package/dist/plugins/paypal.d.ts.map +1 -0
  181. package/dist/plugins/paypal.js +16 -0
  182. package/dist/plugins/paypal.js.map +1 -0
  183. package/dist/plugins/prisma.d.ts +8 -0
  184. package/dist/plugins/prisma.d.ts.map +1 -0
  185. package/dist/plugins/prisma.js +13 -0
  186. package/dist/plugins/prisma.js.map +1 -0
  187. package/dist/plugins/stripe.d.ts +14 -0
  188. package/dist/plugins/stripe.d.ts.map +1 -0
  189. package/dist/plugins/stripe.js +16 -0
  190. package/dist/plugins/stripe.js.map +1 -0
  191. package/dist/plugins/tax.d.ts +21 -0
  192. package/dist/plugins/tax.d.ts.map +1 -0
  193. package/dist/plugins/tax.js +18 -0
  194. package/dist/plugins/tax.js.map +1 -0
  195. package/dist/prisma.d.ts +66 -0
  196. package/dist/prisma.d.ts.map +1 -0
  197. package/dist/prisma.js +66 -0
  198. package/dist/prisma.js.map +1 -0
  199. package/dist/processor.d.ts +28 -0
  200. package/dist/processor.d.ts.map +1 -0
  201. package/dist/processor.js +118 -0
  202. package/dist/processor.js.map +1 -0
  203. package/dist/provider.d.ts +89 -0
  204. package/dist/provider.d.ts.map +1 -0
  205. package/dist/provider.js +240 -0
  206. package/dist/provider.js.map +1 -0
  207. package/dist/rate.d.ts +119 -0
  208. package/dist/rate.d.ts.map +1 -0
  209. package/dist/rate.js +271 -0
  210. package/dist/rate.js.map +1 -0
  211. package/dist/rounding-error.d.ts +9 -0
  212. package/dist/rounding-error.d.ts.map +1 -0
  213. package/dist/rounding-error.js +9 -0
  214. package/dist/rounding-error.js.map +1 -0
  215. package/dist/rounding.d.ts +50 -0
  216. package/dist/rounding.d.ts.map +1 -0
  217. package/dist/rounding.js +87 -0
  218. package/dist/rounding.js.map +1 -0
  219. package/dist/stripe-fx.d.ts +22 -0
  220. package/dist/stripe-fx.d.ts.map +1 -0
  221. package/dist/stripe-fx.js +30 -0
  222. package/dist/stripe-fx.js.map +1 -0
  223. package/dist/stripe.d.ts +36 -0
  224. package/dist/stripe.d.ts.map +1 -0
  225. package/dist/stripe.js +39 -0
  226. package/dist/stripe.js.map +1 -0
  227. package/dist/tax.d.ts +29 -0
  228. package/dist/tax.d.ts.map +1 -0
  229. package/dist/tax.js +39 -0
  230. package/dist/tax.js.map +1 -0
  231. package/package.json +169 -5
  232. package/src/adyen-fx.ts +154 -0
  233. package/src/adyen.ts +46 -0
  234. package/src/allocate.ts +393 -0
  235. package/src/bag.ts +170 -0
  236. package/src/braintree.ts +71 -0
  237. package/src/cash.ts +115 -0
  238. package/src/checkout.ts +77 -0
  239. package/src/convert.ts +159 -0
  240. package/src/currency.ts +61 -0
  241. package/src/decimal.ts +283 -0
  242. package/src/ecb.ts +162 -0
  243. package/src/exact.ts +182 -0
  244. package/src/fetch.ts +127 -0
  245. package/src/fixed.ts +558 -0
  246. package/src/fn.ts +80 -0
  247. package/src/format.ts +106 -0
  248. package/src/generated/adyen.ts +144 -0
  249. package/src/generated/braintree.ts +140 -0
  250. package/src/generated/cash.ts +375 -0
  251. package/src/generated/checkout.ts +151 -0
  252. package/src/generated/iso4217.ts +179 -0
  253. package/src/generated/kernel.ts +230 -0
  254. package/src/generated/klarna.ts +21 -0
  255. package/src/generated/paypal.ts +31 -0
  256. package/src/generated/stripe.ts +150 -0
  257. package/src/index.ts +37 -0
  258. package/src/klarna.ts +54 -0
  259. package/src/money.ts +781 -0
  260. package/src/parse.ts +144 -0
  261. package/src/paypal.ts +93 -0
  262. package/src/plugins/adyen.ts +25 -0
  263. package/src/plugins/all.ts +47 -0
  264. package/src/plugins/allocate.ts +53 -0
  265. package/src/plugins/braintree.ts +23 -0
  266. package/src/plugins/cash.ts +33 -0
  267. package/src/plugins/checkout.ts +32 -0
  268. package/src/plugins/convert.ts +50 -0
  269. package/src/plugins/exact.ts +23 -0
  270. package/src/plugins/fixed.ts +28 -0
  271. package/src/plugins/format.ts +28 -0
  272. package/src/plugins/klarna.ts +21 -0
  273. package/src/plugins/paypal.ts +29 -0
  274. package/src/plugins/prisma.ts +24 -0
  275. package/src/plugins/stripe.ts +29 -0
  276. package/src/plugins/tax.ts +41 -0
  277. package/src/prisma.ts +118 -0
  278. package/src/processor.ts +181 -0
  279. package/src/provider.ts +324 -0
  280. package/src/rate.ts +377 -0
  281. package/src/rounding-error.ts +8 -0
  282. package/src/rounding.ts +122 -0
  283. package/src/stripe-fx.ts +49 -0
  284. package/src/stripe.ts +69 -0
  285. package/src/tax.ts +71 -0
@@ -0,0 +1,12 @@
1
+ # Logo credits
2
+
3
+ The ducat logo (`logo.png`, `logo-64.png`, `favicon.ico`) is derived from a photograph of a gold ducat of
4
+ Doge Francesco Foscari of Venice (1423–1457), on display in a museum:
5
+
6
+ - **Photo:** Francesco Bini, via Wikimedia Commons:
7
+ [Repubblica di venezia, francesco foscari, ducato in oro, con cristo entro mandorla, 1423-1457.jpg](https://commons.wikimedia.org/wiki/File:Repubblica_di_venezia,_francesco_foscari,_ducato_in_oro,_con_cristo_entro_mandorla,_1423-1457.jpg)
8
+ - **Licence:** [Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)](https://creativecommons.org/licenses/by-sa/4.0/)
9
+ - **Changes:** cropped to the coin, given a circular transparent mask, resized, and colour-quantised.
10
+
11
+ These image files are therefore licensed under **CC BY-SA 4.0**, not under the MIT licence that covers
12
+ ducat's code. The coin itself, struck in the 15th century, is in the public domain.
@@ -0,0 +1,19 @@
1
+ {
2
+ "source": "https://docs.adyen.com/reporting/settlement-reconciliation/transaction-level/settlement-details-report",
3
+ "retrieved": "2026-11-07",
4
+ "columns": {
5
+ "Gross Currency": "The three-character ISO currency code for the transaction currency.",
6
+ "Net Currency": "The three-character ISO currency code for the settlement currency.",
7
+ "Exchange Rate": "The exchange rate used for converting the gross amount into the net amount. This will be 1 if you process and settle in the same currency.",
8
+ "Creation Date": "The timestamp indicating when the payment was created on the Adyen payments platform. Format: YYYY-MM-DD HH:MM:SS",
9
+ "TimeZone": "The time zone of the Creation Date.",
10
+ "DCC Markup (NC)": "The DCC markup (in Net Currency)."
11
+ },
12
+ "notes": [
13
+ "For externally settled payments the listed exchange rate is Adyen's reference exchange rate, not the actual rate applied by the external acquirer.",
14
+ "Checkout dccQuote (ForexQuote, https://github.com/Adyen/adyen-openapi json/CheckoutService-v71.json at e7986c7): buy, sell and interbank are Amount objects ({currency, value} in minor units) described only as 'The buy rate.', 'The sell rate.' and 'The interbank amount.'; basePoints is an int32 'The base points.'; validTill is a date-time. How they map to a rate is not documented, so no adapter is provided for them."
15
+ ],
16
+ "vectors": [
17
+ { "row": { "Gross Currency": "GBP", "Gross Credit (GC)": "5.00", "Exchange Rate": "1", "Net Currency": "GBP", "Net Credit (NC)": "4.88" } }
18
+ ]
19
+ }
@@ -0,0 +1,171 @@
1
+ {
2
+ "source": "https://docs.adyen.com/development-resources/currency-codes",
3
+ "retrieved": "2026-11-07",
4
+ "footnote": "For CLP, CVE, IDR, and ISK the ISO 4217 standard has a different number of decimals than shown in our currency codes table. When submitting amounts in minor units, the decimals in the table on this page are leading. For example, ISK has zero decimals in the ISO 4217 standard, but to submit an ISK amount to Adyen you have to use two decimals as shown in the table.",
5
+ "terminalApi": "With the exception of Terminal API, our APIs expect you to submit transaction amount values in minor units: the smallest unit of a currency, depending on the number of decimals.",
6
+ "notInAdyenTable": [
7
+ "AFN",
8
+ "BIF",
9
+ "BTN",
10
+ "CDF",
11
+ "ERN",
12
+ "IRR",
13
+ "KPW",
14
+ "LBP",
15
+ "LRD",
16
+ "LSL",
17
+ "MGA",
18
+ "SDG",
19
+ "SSP",
20
+ "SYP",
21
+ "TJS",
22
+ "TMT",
23
+ "VED",
24
+ "VES",
25
+ "ZWG"
26
+ ],
27
+ "notInIso": [
28
+ "CNH",
29
+ "VEF"
30
+ ],
31
+ "exponents": {
32
+ "AED": 2,
33
+ "ALL": 2,
34
+ "AMD": 2,
35
+ "AOA": 2,
36
+ "ARS": 2,
37
+ "AUD": 2,
38
+ "AWG": 2,
39
+ "AZN": 2,
40
+ "BAM": 2,
41
+ "BBD": 2,
42
+ "BDT": 2,
43
+ "BHD": 3,
44
+ "BMD": 2,
45
+ "BND": 2,
46
+ "BOB": 2,
47
+ "BRL": 2,
48
+ "BSD": 2,
49
+ "BWP": 2,
50
+ "BYN": 2,
51
+ "BZD": 2,
52
+ "CAD": 2,
53
+ "CHF": 2,
54
+ "CLP": 2,
55
+ "CNH": 2,
56
+ "CNY": 2,
57
+ "COP": 2,
58
+ "CRC": 2,
59
+ "CUP": 2,
60
+ "CVE": 0,
61
+ "CZK": 2,
62
+ "DJF": 0,
63
+ "DKK": 2,
64
+ "DOP": 2,
65
+ "DZD": 2,
66
+ "EGP": 2,
67
+ "ETB": 2,
68
+ "EUR": 2,
69
+ "FJD": 2,
70
+ "FKP": 2,
71
+ "GBP": 2,
72
+ "GEL": 2,
73
+ "GHS": 2,
74
+ "GIP": 2,
75
+ "GMD": 2,
76
+ "GNF": 0,
77
+ "GTQ": 2,
78
+ "GYD": 2,
79
+ "HKD": 2,
80
+ "HNL": 2,
81
+ "HTG": 2,
82
+ "HUF": 2,
83
+ "IDR": 0,
84
+ "ILS": 2,
85
+ "INR": 2,
86
+ "IQD": 3,
87
+ "ISK": 2,
88
+ "JMD": 2,
89
+ "JOD": 3,
90
+ "JPY": 0,
91
+ "KES": 2,
92
+ "KGS": 2,
93
+ "KHR": 2,
94
+ "KMF": 0,
95
+ "KRW": 0,
96
+ "KWD": 3,
97
+ "KYD": 2,
98
+ "KZT": 2,
99
+ "LAK": 2,
100
+ "LKR": 2,
101
+ "LYD": 3,
102
+ "MAD": 2,
103
+ "MDL": 2,
104
+ "MKD": 2,
105
+ "MMK": 2,
106
+ "MNT": 2,
107
+ "MOP": 2,
108
+ "MRU": 2,
109
+ "MUR": 2,
110
+ "MVR": 2,
111
+ "MWK": 2,
112
+ "MXN": 2,
113
+ "MYR": 2,
114
+ "MZN": 2,
115
+ "NAD": 2,
116
+ "NGN": 2,
117
+ "NIO": 2,
118
+ "NOK": 2,
119
+ "NPR": 2,
120
+ "NZD": 2,
121
+ "OMR": 3,
122
+ "PAB": 2,
123
+ "PEN": 2,
124
+ "PGK": 2,
125
+ "PHP": 2,
126
+ "PKR": 2,
127
+ "PLN": 2,
128
+ "PYG": 0,
129
+ "QAR": 2,
130
+ "RON": 2,
131
+ "RSD": 2,
132
+ "RUB": 2,
133
+ "RWF": 0,
134
+ "SAR": 2,
135
+ "SBD": 2,
136
+ "SCR": 2,
137
+ "SEK": 2,
138
+ "SGD": 2,
139
+ "SHP": 2,
140
+ "SLE": 2,
141
+ "SOS": 2,
142
+ "SRD": 2,
143
+ "STN": 2,
144
+ "SVC": 2,
145
+ "SZL": 2,
146
+ "THB": 2,
147
+ "TND": 3,
148
+ "TOP": 2,
149
+ "TRY": 2,
150
+ "TTD": 2,
151
+ "TWD": 2,
152
+ "TZS": 2,
153
+ "UAH": 2,
154
+ "UGX": 0,
155
+ "USD": 2,
156
+ "UYU": 2,
157
+ "UZS": 2,
158
+ "VEF": 2,
159
+ "VND": 0,
160
+ "VUV": 0,
161
+ "WST": 2,
162
+ "XAF": 0,
163
+ "XCD": 2,
164
+ "XCG": 2,
165
+ "XOF": 0,
166
+ "XPF": 0,
167
+ "YER": 2,
168
+ "ZAR": 2,
169
+ "ZMW": 2
170
+ }
171
+ }
@@ -0,0 +1,223 @@
1
+ {
2
+ "processor": "Braintree",
3
+ "retrieved": "2026-11-07",
4
+ "amountFormat": "decimal-string",
5
+ "sources": {
6
+ "currencies": {
7
+ "url": "https://developer.paypal.com/braintree/docs/reference/general/currencies",
8
+ "quotes": [
9
+ "The following currency types are supported in the Braintree API. Available currencies will differ depending on your account setup and the country your company is located in.",
10
+ "*Zero-decimal currencies are marked with an asterisk.",
11
+ "BGN is no longer supported for authorization or settlement. Use EUR for all transactions involving Bulgaria."
12
+ ]
13
+ },
14
+ "sale": {
15
+ "url": "https://developer.paypal.com/braintree/docs/reference/request/transaction/sale",
16
+ "quotes": [
17
+ "This value must be greater than 0, and must match the currency format of the merchant account.",
18
+ "Can only contain numbers and one decimal point (e.g. `x.xx`).",
19
+ "Can't be greater than the maximum allowed by the processor.",
20
+ ":amount => \"10.00\""
21
+ ]
22
+ },
23
+ "errors": {
24
+ "url": "https://developer.paypal.com/braintree/docs/reference/general/validation-errors/all/",
25
+ "quotes": [
26
+ "81501 Amount cannot be negative. Even if creating a credit transaction, the amount should be given as x.xx, not -x.xx.",
27
+ "81503 Amount is an invalid format. Amount must be formatted like '10' or '10.00'. If the currency does not use decimal places, the amount cannot include decimal places.",
28
+ "81528 Amount is too large. The amount cannot be greater than the maximum allowed by the processor.",
29
+ "81531 Amount must be greater than zero. The amount of a transaction cannot be zero.",
30
+ "81536 Tax amount is too large. The tax amount cannot be longer than 9 digits."
31
+ ]
32
+ },
33
+ "graphql": {
34
+ "url": "https://developer.paypal.com/braintree/graphql/reference/types/amount",
35
+ "quotes": [
36
+ "A monetary amount, either a whole number or a number with exactly two or three decimal places."
37
+ ]
38
+ }
39
+ },
40
+ "defaultExponent": "iso",
41
+ "exponents": {
42
+ "BIF": 0,
43
+ "CLP": 0,
44
+ "DJF": 0,
45
+ "GNF": 0,
46
+ "HRK": 2,
47
+ "ISK": 0,
48
+ "JPY": 0,
49
+ "KMF": 0,
50
+ "KRW": 0,
51
+ "LAK": 0,
52
+ "LTL": 2,
53
+ "PYG": 0,
54
+ "RWF": 0,
55
+ "SLL": 2,
56
+ "STD": 2,
57
+ "UGX": 0,
58
+ "VND": 0,
59
+ "VUV": 0,
60
+ "XAF": 0,
61
+ "XOF": 0,
62
+ "XPF": 0,
63
+ "ZMK": 2,
64
+ "ZWD": 2
65
+ },
66
+ "currencies": [
67
+ "AED",
68
+ "AMD",
69
+ "AOA",
70
+ "ARS",
71
+ "AUD",
72
+ "AWG",
73
+ "AZN",
74
+ "BAM",
75
+ "BBD",
76
+ "BDT",
77
+ "BIF",
78
+ "BMD",
79
+ "BND",
80
+ "BOB",
81
+ "BRL",
82
+ "BSD",
83
+ "BWP",
84
+ "BYN",
85
+ "BZD",
86
+ "CAD",
87
+ "CHF",
88
+ "CLP",
89
+ "CNY",
90
+ "COP",
91
+ "CRC",
92
+ "CVE",
93
+ "CZK",
94
+ "DJF",
95
+ "DKK",
96
+ "DOP",
97
+ "DZD",
98
+ "EGP",
99
+ "ETB",
100
+ "EUR",
101
+ "FJD",
102
+ "FKP",
103
+ "GBP",
104
+ "GEL",
105
+ "GHS",
106
+ "GIP",
107
+ "GMD",
108
+ "GNF",
109
+ "GTQ",
110
+ "GYD",
111
+ "HKD",
112
+ "HNL",
113
+ "HRK",
114
+ "HTG",
115
+ "HUF",
116
+ "IDR",
117
+ "ILS",
118
+ "INR",
119
+ "ISK",
120
+ "JMD",
121
+ "JPY",
122
+ "KES",
123
+ "KGS",
124
+ "KHR",
125
+ "KMF",
126
+ "KRW",
127
+ "KYD",
128
+ "KZT",
129
+ "LAK",
130
+ "LBP",
131
+ "LKR",
132
+ "LRD",
133
+ "LSL",
134
+ "LTL",
135
+ "MAD",
136
+ "MDL",
137
+ "MKD",
138
+ "MNT",
139
+ "MOP",
140
+ "MUR",
141
+ "MVR",
142
+ "MWK",
143
+ "MXN",
144
+ "MYR",
145
+ "MZN",
146
+ "NAD",
147
+ "NGN",
148
+ "NIO",
149
+ "NOK",
150
+ "NPR",
151
+ "NZD",
152
+ "PAB",
153
+ "PEN",
154
+ "PGK",
155
+ "PHP",
156
+ "PKR",
157
+ "PLN",
158
+ "PYG",
159
+ "QAR",
160
+ "RON",
161
+ "RSD",
162
+ "RUB",
163
+ "RWF",
164
+ "SAR",
165
+ "SBD",
166
+ "SCR",
167
+ "SEK",
168
+ "SGD",
169
+ "SHP",
170
+ "SLL",
171
+ "SOS",
172
+ "SRD",
173
+ "STD",
174
+ "SVC",
175
+ "SYP",
176
+ "SZL",
177
+ "THB",
178
+ "TJS",
179
+ "TOP",
180
+ "TRY",
181
+ "TTD",
182
+ "TWD",
183
+ "TZS",
184
+ "UAH",
185
+ "UGX",
186
+ "USD",
187
+ "UYU",
188
+ "UZS",
189
+ "VES",
190
+ "VND",
191
+ "VUV",
192
+ "WST",
193
+ "XAF",
194
+ "XCD",
195
+ "XOF",
196
+ "XPF",
197
+ "YER",
198
+ "ZAR",
199
+ "ZMK",
200
+ "ZWD"
201
+ ],
202
+ "notes": [
203
+ "The amount is a decimal string in major units: '10.00', or '10' for a zero-decimal currency. Zero and negative amounts are errors (81531, 81501), refunds and credits included.",
204
+ "Zero-decimal (17 marked with an asterisk): the 16 ISO 0-decimal currencies listed, plus LAK (ISO 2). CLP, ISK and UGX are 0 as in ISO, unlike Adyen (CLP 2, ISK 2) and Stripe (ISK, UGX x100).",
205
+ "No ISO three-decimal currency (BHD, IQD, JOD, KWD, LYD, OMR, TND) is listed.",
206
+ "Withdrawn codes still listed: HRK, LTL, SLL, STD, ZMK and ZWD. The page marks none of them zero-decimal, so they are taken as 2.",
207
+ "The GraphQL Amount scalar allows three decimals; the REST sale page says x.xx. toBraintree emits the currency's decimals, which both accept."
208
+ ],
209
+ "unverified": [
210
+ {
211
+ "claim": "Withdrawn codes HRK, LTL, SLL, STD, ZMK and ZWD take 2 decimals (the page only says which currencies are zero-decimal).",
212
+ "verified": false
213
+ },
214
+ {
215
+ "claim": "Non-zero-decimal currencies take exactly their ISO 4217 decimals (the page gives no per-currency count).",
216
+ "verified": false
217
+ },
218
+ {
219
+ "claim": "Disbursements (payouts) use the same rules (no disbursement-specific amount format was found).",
220
+ "verified": false
221
+ }
222
+ ]
223
+ }