From 514394485b0fc2cb2ac4e74243def02580261624 Mon Sep 17 00:00:00 2001 From: Joey Koster <107549011+joey-koster-ct@users.noreply.github.com> Date: Mon, 13 Jan 2025 14:29:08 +0100 Subject: [PATCH] chore(docs): update README.MD with information about fraction digits (#494) * chore(template): update readme.md with info about the currency convertions * chore(readme.md): add reference to the payments sdk * chore(readme.md): update readme.md --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 1997965..76888be 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,16 @@ The template contains two modules : Regarding the development of processor module, please refer to the following documentations: +### Currencies + +A special note regarding the usage of currencies and working with them. commercetools provides monetary values in cent amounts which adheres to the standard. + +This means that for the currency `EUR` the minor units will be expressed with fraction digits of 2. I.e. a value of 1 euro and 50 cents will be expressed as `150`. Some currencies have 0 or even 4 fraction digits. + +It's important to note that individual PSP could differ from this standard and/or require special attention when passing data between the connector and psp. So it's important to convert properly on the input and output layer when interacting with PSP. + +commercetools provides the library [connect-payments-sdk](https://github.com/commercetools/connect-payments-sdk) which includes various utility function to help with these conversions. + - [Development of Processor](./processor/README.md) #### 1. Develop your specific needs