From e51d392a33f15ab11933ccea1c4db62175abdd9d Mon Sep 17 00:00:00 2001 From: Thomas Danzl Date: Thu, 26 Feb 2026 15:02:28 +0100 Subject: [PATCH 01/17] #10 added docs about how payment vendor side tip is handled + extend HOWTO_01 and HOWTO_08 to log the tip information nicely on the console --- HOWTO_01_Payment_csharp/Program.cs | 7 ++--- HOWTO_01_Payment_csharp/README.MD | 19 ++++++++++++++ HOWTO_08_pay_sign_issue_csharp/Program.cs | 13 +++++----- README.MD | 2 +- .../IntegrationTestsPayment.cs | 2 +- libPosSystemAPI/PosAPIUtils/Utils.cs | 26 ++++++++++++++----- 6 files changed, 52 insertions(+), 17 deletions(-) diff --git a/HOWTO_01_Payment_csharp/Program.cs b/HOWTO_01_Payment_csharp/Program.cs index b0fd0f6..89e610f 100644 --- a/HOWTO_01_Payment_csharp/Program.cs +++ b/HOWTO_01_Payment_csharp/Program.cs @@ -63,11 +63,12 @@ static async Task Main(string[] args) // - the terminal ID is not defined here (null) so the request will be processed by all available terminals for the cashbox // IMPORTANT: In a real setup you might want to define a specific terminal ID here to target a specific payment terminal device; especially when multiple payment terminals are registered for the same cashbox! // - we provide the operation ID to be able to retry in case of failure - ExecutedResult payResult = await ftPosAPI.Pay.PaymentAsync(new PayItemRequest + var payItemRequest = new PayItemRequest { Description = "Card", Amount = amount, - }, fiskaltrust.Payment.DTO.PaymentProtocol.use_auto, null, operationId); + }; + ExecutedResult payResult = await ftPosAPI.Pay.PaymentAsync(payItemRequest, fiskaltrust.Payment.DTO.PaymentProtocol.use_auto, null, operationId); ///////////////////////////////////////////////////////////////////////////////////////////////// // Check Result @@ -80,7 +81,7 @@ static async Task Main(string[] args) { // YES --> SUCCESS: Payment was successful PayResponse payResp = await payResult.Operation.GetResponseAsAsync(); - Utils.DumpToLogger(payResp); + Utils.DumpToLogger(payResp, payItemRequest); break; } else diff --git a/HOWTO_01_Payment_csharp/README.MD b/HOWTO_01_Payment_csharp/README.MD index ad207b4..06b07ab 100644 --- a/HOWTO_01_Payment_csharp/README.MD +++ b/HOWTO_01_Payment_csharp/README.MD @@ -25,3 +25,22 @@ Several critical error scenarios must be managed carefully to prevent double pay - The response is not received within the expected time frame (HTTP timeout), which can be simulated by a device losing internet connectivity during payment execution. In all of these cases, the solution is to resend the original request using the identical operation ID and request body. The backend will then return the final result of the operation. + +## Special case - payment vendor added TIP + +In many payment vendor apps it is possible to add a tip to the payment amount. +Flow example in a restaruant: +- Guest asks for the bill +- Waiter triggers to create the bill at the POS (e.g. mobile device) +- The POS on the mobile device pushes the amount (for example 10€) to be paid to the configured payment app (via POS System API and the fiskaltrust InStore App) +- The payment app opens and the waiter hands the mobile device over to the guest +- The guest sees a TIP entry screen and adds a tip of 2€ +- The guests now pays the full sum of 12€ +- The payment app reports a paid amount of 12€ (including 2€ of tip) +- The fiskaltrust InStore App / POS System API does report back the following in the payment response (see also example in the POS System API docs): + - 2 pay items + - Pay item 1: The fully paid amount with the receipt -> 12€ + - Pay item 2: The tip with negative amount -> -2€ + - sum of the 2 pay items is the orginal requested amount of 10€ + +NOTE: The tip can be calculated by simply substracting the requested amount from the paid amount (12-10 = 2€ tip) or alternatively from the 2nd pay item (-2 * -1 = 2€ tip). diff --git a/HOWTO_08_pay_sign_issue_csharp/Program.cs b/HOWTO_08_pay_sign_issue_csharp/Program.cs index 074c24c..b84a436 100644 --- a/HOWTO_08_pay_sign_issue_csharp/Program.cs +++ b/HOWTO_08_pay_sign_issue_csharp/Program.cs @@ -54,14 +54,15 @@ static async Task Main(string[] args) decimal totalAmount = chargeItems.Sum(ci => ci.Amount); Logger.LogInfo($"Total amount to pay: {totalAmount} EUR"); + PayItemRequest payRequest = new() + { + Amount = totalAmount, + Description = "Card" + }; var payRunner = new ftPosAPIOperationRunner(); (PayResponse? pResp, string errorMsg) = await payRunner.Execute(async () => { - PayItemRequest payRequest = new() - { - Amount = totalAmount, - Description = "Card" - }; + return await ftPosAPI.Pay.PaymentAsync(payRequest, PaymentProtocol.use_auto, null, payRunner.OperationID); }); @@ -72,7 +73,7 @@ static async Task Main(string[] args) else { Logger.LogInfo("Payment succeeded."); - Utils.DumpToLogger(pResp); + Utils.DumpToLogger(pResp, payRequest); /////////////////////////////////////////////////////////////////////////////////////////////////////// /// diff --git a/README.MD b/README.MD index a4bbee9..fb5f2ca 100644 --- a/README.MD +++ b/README.MD @@ -80,7 +80,7 @@ Any payment amount will return a SUCCESS response, except for the following defi | 30000,10 | DECLINED | | 30000,20 | TIMEOUT (returned as an error message as no other option is available yet) | | 30000,40 | CANCELLED BY USER | -| 30000,50 | SUCCESS with added guest tip | +| 30000,50 | SUCCESS with added guest tip (see [HOWTO_01_Payment](HOWTO_01_Payment_csharp/README.MD) on how to handle such a tip) | | 30000,60 | SUCCESS after 1-minute delay | | 30000,70 | SUCCESS after 3-minute delay | | 30000,80 | SUCCESS after 6-minute delay | diff --git a/libPosSystemAPI.Test/IntegrationTestsPayment.cs b/libPosSystemAPI.Test/IntegrationTestsPayment.cs index e7ded9f..99c9c2e 100644 --- a/libPosSystemAPI.Test/IntegrationTestsPayment.cs +++ b/libPosSystemAPI.Test/IntegrationTestsPayment.cs @@ -39,7 +39,7 @@ public async Task TestPayment() Assert.NotNull(payResponse); Assert.True(payResponse.Protocol == Payment.DTO.PaymentProtocol.use_auto); Assert.NotNull(payResponse.ftPayItems); - // dummy payment provider should return exactly one pay item (as we did not execute a 30000,50 which would result in multiple pay items as there would be a tip) + // dummy payment provider should return exactly one pay item Assert.Single(payResponse.ftPayItems); PayItem pi = payResponse!.ftPayItems![0]; diff --git a/libPosSystemAPI/PosAPIUtils/Utils.cs b/libPosSystemAPI/PosAPIUtils/Utils.cs index d1ebaad..1620da0 100644 --- a/libPosSystemAPI/PosAPIUtils/Utils.cs +++ b/libPosSystemAPI/PosAPIUtils/Utils.cs @@ -182,7 +182,7 @@ public static (Guid ftCashboxID, string ftCashboxAccessToken)? GetCashboxCredent return (ftCashboxID, ftCashboxAccessToken); } - public static void DumpToLogger(PayResponse payResp) + public static void DumpToLogger(PayResponse payResp, PayItemRequest? payItemRequest = null) { Logger.LogInfo("Payment successful! Queue ID: " + payResp.ftQueueID); if (payResp.ftPayItems == null || payResp.ftPayItems.Length == 0) @@ -193,9 +193,15 @@ public static void DumpToLogger(PayResponse payResp) // pretty log the response (JSON) Logger.LogDebug("PayResponse: " + JsonSerializer.Serialize(payResp, new JsonSerializerOptions { WriteIndented = true })); - - foreach (PayItem ftPayItem in payResp.ftPayItems) + if (payItemRequest != null) + { + Logger.LogInfo("Requested Payment:"); + Logger.LogInfo($"- Amount: {payItemRequest.Amount}"); + } + Logger.LogInfo("Received Pay Response:"); + for (int i = 0; i < payResp.ftPayItems.Length; i++) { + PayItem ftPayItem = payResp.ftPayItems[i]; var payItemCaseData = ftPayItem.GetPayItemCaseData(); Dictionary? providerInfo = payItemCaseData?.Provider; @@ -204,10 +210,18 @@ public static void DumpToLogger(PayResponse payResp) { protocol = protocolValue.GetString() ?? "ERROR: invalid type"; } - Logger.LogInfo($"- {protocol}:"); + Logger.LogInfo($"- PayItem {i+1}"); + if (protocol != "unknown") Logger.LogInfo($"\t\tprotocol: {protocol}"); + Logger.LogInfo($"\t\tAmount: {ftPayItem.Amount}"); + if (payItemRequest != null) + { + decimal tipAmount = ftPayItem.Amount - payItemRequest.Amount; + Logger.LogInfo($"\t\t\tIncluded Tip Amount: {tipAmount}"); + } + Logger.LogInfo("\t\tReceipt:"); if (payItemCaseData?.Receipt == null) { - Logger.LogInfo("\t WARNING: No receipt info received!"); + Logger.LogInfo("\t\t\t WARNING: No receipt info received!"); } else { @@ -216,7 +230,7 @@ public static void DumpToLogger(PayResponse payResp) { foreach (string line in payReceipt) { - Logger.LogInfo($"\t{line}"); + Logger.LogInfo($"\t\t\t{line}"); } } } From d5f1bd16e1cec742f69bdb83748060f926b9f3e2 Mon Sep 17 00:00:00 2001 From: Thomas Danzl Date: Thu, 26 Feb 2026 15:17:03 +0100 Subject: [PATCH 02/17] #10 fix review feedback --- HOWTO_01_Payment_csharp/README.MD | 6 ++--- libPosSystemAPI/PosAPIUtils/Utils.cs | 35 ++++++++++++++++------------ 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/HOWTO_01_Payment_csharp/README.MD b/HOWTO_01_Payment_csharp/README.MD index 06b07ab..0c7064c 100644 --- a/HOWTO_01_Payment_csharp/README.MD +++ b/HOWTO_01_Payment_csharp/README.MD @@ -29,7 +29,7 @@ In all of these cases, the solution is to resend the original request using the ## Special case - payment vendor added TIP In many payment vendor apps it is possible to add a tip to the payment amount. -Flow example in a restaruant: +Flow example in a restaurant: - Guest asks for the bill - Waiter triggers to create the bill at the POS (e.g. mobile device) - The POS on the mobile device pushes the amount (for example 10€) to be paid to the configured payment app (via POS System API and the fiskaltrust InStore App) @@ -41,6 +41,6 @@ Flow example in a restaruant: - 2 pay items - Pay item 1: The fully paid amount with the receipt -> 12€ - Pay item 2: The tip with negative amount -> -2€ - - sum of the 2 pay items is the orginal requested amount of 10€ + - sum of the 2 pay items is the original requested amount of 10€ -NOTE: The tip can be calculated by simply substracting the requested amount from the paid amount (12-10 = 2€ tip) or alternatively from the 2nd pay item (-2 * -1 = 2€ tip). +NOTE: The tip can be calculated by simply subtracting the requested amount from the paid amount (12-10 = 2€ tip) or alternatively from the 2nd pay item (-2 * -1 = 2€ tip). diff --git a/libPosSystemAPI/PosAPIUtils/Utils.cs b/libPosSystemAPI/PosAPIUtils/Utils.cs index 1620da0..86509a8 100644 --- a/libPosSystemAPI/PosAPIUtils/Utils.cs +++ b/libPosSystemAPI/PosAPIUtils/Utils.cs @@ -211,26 +211,31 @@ public static void DumpToLogger(PayResponse payResp, PayItemRequest? payItemRequ protocol = protocolValue.GetString() ?? "ERROR: invalid type"; } Logger.LogInfo($"- PayItem {i+1}"); + Logger.LogInfo($"\t\tDescription: {ftPayItem.Description}"); if (protocol != "unknown") Logger.LogInfo($"\t\tprotocol: {protocol}"); Logger.LogInfo($"\t\tAmount: {ftPayItem.Amount}"); - if (payItemRequest != null) + // only show calculate included tip and process receipt for the real payment item and not for the additional info entries + if (payItemCaseData != null) { - decimal tipAmount = ftPayItem.Amount - payItemRequest.Amount; - Logger.LogInfo($"\t\t\tIncluded Tip Amount: {tipAmount}"); - } - Logger.LogInfo("\t\tReceipt:"); - if (payItemCaseData?.Receipt == null) - { - Logger.LogInfo("\t\t\t WARNING: No receipt info received!"); - } - else - { - string[]? payReceipt = ftPayItem.GetPayItemCaseData()?.Receipt; - if (payReceipt != null) + if (payItemRequest != null) + { + decimal tipAmount = ftPayItem.Amount - payItemRequest.Amount; + Logger.LogInfo($"\t\t\tIncluded Tip Amount: {tipAmount}"); + } + Logger.LogInfo("\t\tReceipt:"); + if (payItemCaseData?.Receipt == null) + { + Logger.LogInfo("\t\t\t WARNING: No receipt info received!"); + } + else { - foreach (string line in payReceipt) + string[]? payReceipt = ftPayItem.GetPayItemCaseData()?.Receipt; + if (payReceipt != null) { - Logger.LogInfo($"\t\t\t{line}"); + foreach (string line in payReceipt) + { + Logger.LogInfo($"\t\t\t{line}"); + } } } } From fc5b44ae6b3e8d992aa1fa9db4bb92cf19b63268 Mon Sep 17 00:00:00 2001 From: MaximilianFT Date: Mon, 2 Mar 2026 08:26:04 +0100 Subject: [PATCH 03/17] Apply suggestion from @deboragracio Co-authored-by: deboragracio <63159404+deboragracio@users.noreply.github.com> --- HOWTO_01_Payment_csharp/README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HOWTO_01_Payment_csharp/README.MD b/HOWTO_01_Payment_csharp/README.MD index 0c7064c..7709108 100644 --- a/HOWTO_01_Payment_csharp/README.MD +++ b/HOWTO_01_Payment_csharp/README.MD @@ -28,7 +28,7 @@ In all of these cases, the solution is to resend the original request using the ## Special case - payment vendor added TIP -In many payment vendor apps it is possible to add a tip to the payment amount. +In many payment vendor apps, it is possible to add a tip to the payment amount. Flow example in a restaurant: - Guest asks for the bill - Waiter triggers to create the bill at the POS (e.g. mobile device) From bf0c0883fafbb20ca095ecd127156cf282eb4a3f Mon Sep 17 00:00:00 2001 From: MaximilianFT Date: Mon, 2 Mar 2026 08:26:14 +0100 Subject: [PATCH 04/17] Apply suggestion from @deboragracio Co-authored-by: deboragracio <63159404+deboragracio@users.noreply.github.com> --- HOWTO_01_Payment_csharp/README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HOWTO_01_Payment_csharp/README.MD b/HOWTO_01_Payment_csharp/README.MD index 7709108..b78b523 100644 --- a/HOWTO_01_Payment_csharp/README.MD +++ b/HOWTO_01_Payment_csharp/README.MD @@ -29,7 +29,7 @@ In all of these cases, the solution is to resend the original request using the ## Special case - payment vendor added TIP In many payment vendor apps, it is possible to add a tip to the payment amount. -Flow example in a restaurant: +**Example flow in a restaurant:** - Guest asks for the bill - Waiter triggers to create the bill at the POS (e.g. mobile device) - The POS on the mobile device pushes the amount (for example 10€) to be paid to the configured payment app (via POS System API and the fiskaltrust InStore App) From 398621890912410902f5adf87c15efc3e9ac7303 Mon Sep 17 00:00:00 2001 From: MaximilianFT Date: Mon, 2 Mar 2026 08:26:26 +0100 Subject: [PATCH 05/17] Apply suggestion from @deboragracio Co-authored-by: deboragracio <63159404+deboragracio@users.noreply.github.com> --- HOWTO_01_Payment_csharp/README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HOWTO_01_Payment_csharp/README.MD b/HOWTO_01_Payment_csharp/README.MD index b78b523..0bde44b 100644 --- a/HOWTO_01_Payment_csharp/README.MD +++ b/HOWTO_01_Payment_csharp/README.MD @@ -30,7 +30,7 @@ In all of these cases, the solution is to resend the original request using the In many payment vendor apps, it is possible to add a tip to the payment amount. **Example flow in a restaurant:** -- Guest asks for the bill +1. The guest asks for the bill. - Waiter triggers to create the bill at the POS (e.g. mobile device) - The POS on the mobile device pushes the amount (for example 10€) to be paid to the configured payment app (via POS System API and the fiskaltrust InStore App) - The payment app opens and the waiter hands the mobile device over to the guest From e6bef63327608b935cc36a1c16671d78db934661 Mon Sep 17 00:00:00 2001 From: MaximilianFT Date: Mon, 2 Mar 2026 08:26:33 +0100 Subject: [PATCH 06/17] Apply suggestion from @deboragracio Co-authored-by: deboragracio <63159404+deboragracio@users.noreply.github.com> --- HOWTO_01_Payment_csharp/README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HOWTO_01_Payment_csharp/README.MD b/HOWTO_01_Payment_csharp/README.MD index 0bde44b..2190c21 100644 --- a/HOWTO_01_Payment_csharp/README.MD +++ b/HOWTO_01_Payment_csharp/README.MD @@ -31,7 +31,7 @@ In all of these cases, the solution is to resend the original request using the In many payment vendor apps, it is possible to add a tip to the payment amount. **Example flow in a restaurant:** 1. The guest asks for the bill. -- Waiter triggers to create the bill at the POS (e.g. mobile device) +2. The waiter triggers to create the bill on the POS (e.g., mobile device). - The POS on the mobile device pushes the amount (for example 10€) to be paid to the configured payment app (via POS System API and the fiskaltrust InStore App) - The payment app opens and the waiter hands the mobile device over to the guest - The guest sees a TIP entry screen and adds a tip of 2€ From 5e07d1336704cc3532642afb65be5593f5df0392 Mon Sep 17 00:00:00 2001 From: MaximilianFT Date: Mon, 2 Mar 2026 08:26:43 +0100 Subject: [PATCH 07/17] Apply suggestion from @deboragracio Co-authored-by: deboragracio <63159404+deboragracio@users.noreply.github.com> --- HOWTO_01_Payment_csharp/README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HOWTO_01_Payment_csharp/README.MD b/HOWTO_01_Payment_csharp/README.MD index 2190c21..1bf1702 100644 --- a/HOWTO_01_Payment_csharp/README.MD +++ b/HOWTO_01_Payment_csharp/README.MD @@ -32,7 +32,7 @@ In many payment vendor apps, it is possible to add a tip to the payment amount. **Example flow in a restaurant:** 1. The guest asks for the bill. 2. The waiter triggers to create the bill on the POS (e.g., mobile device). -- The POS on the mobile device pushes the amount (for example 10€) to be paid to the configured payment app (via POS System API and the fiskaltrust InStore App) +3. The POS on the mobile device sends the amount (e.g., 10€) to be paid to the configured payment app via POS System API and the **fiskaltrust** InStore App. - The payment app opens and the waiter hands the mobile device over to the guest - The guest sees a TIP entry screen and adds a tip of 2€ - The guests now pays the full sum of 12€ From 86a104f63c1ef9c8658da38be105ffda2dc7ab97 Mon Sep 17 00:00:00 2001 From: MaximilianFT Date: Mon, 2 Mar 2026 08:26:50 +0100 Subject: [PATCH 08/17] Apply suggestion from @deboragracio Co-authored-by: deboragracio <63159404+deboragracio@users.noreply.github.com> --- HOWTO_01_Payment_csharp/README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HOWTO_01_Payment_csharp/README.MD b/HOWTO_01_Payment_csharp/README.MD index 1bf1702..8e1c8a1 100644 --- a/HOWTO_01_Payment_csharp/README.MD +++ b/HOWTO_01_Payment_csharp/README.MD @@ -33,7 +33,7 @@ In many payment vendor apps, it is possible to add a tip to the payment amount. 1. The guest asks for the bill. 2. The waiter triggers to create the bill on the POS (e.g., mobile device). 3. The POS on the mobile device sends the amount (e.g., 10€) to be paid to the configured payment app via POS System API and the **fiskaltrust** InStore App. -- The payment app opens and the waiter hands the mobile device over to the guest +4. The payment app opens, and the waiter hands the mobile device to the guest. - The guest sees a TIP entry screen and adds a tip of 2€ - The guests now pays the full sum of 12€ - The payment app reports a paid amount of 12€ (including 2€ of tip) From b82d171b685c6cee567f2d7f3cbdd24677fad647 Mon Sep 17 00:00:00 2001 From: MaximilianFT Date: Mon, 2 Mar 2026 08:26:57 +0100 Subject: [PATCH 09/17] Apply suggestion from @deboragracio Co-authored-by: deboragracio <63159404+deboragracio@users.noreply.github.com> --- HOWTO_01_Payment_csharp/README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HOWTO_01_Payment_csharp/README.MD b/HOWTO_01_Payment_csharp/README.MD index 8e1c8a1..7f377b4 100644 --- a/HOWTO_01_Payment_csharp/README.MD +++ b/HOWTO_01_Payment_csharp/README.MD @@ -34,7 +34,7 @@ In many payment vendor apps, it is possible to add a tip to the payment amount. 2. The waiter triggers to create the bill on the POS (e.g., mobile device). 3. The POS on the mobile device sends the amount (e.g., 10€) to be paid to the configured payment app via POS System API and the **fiskaltrust** InStore App. 4. The payment app opens, and the waiter hands the mobile device to the guest. -- The guest sees a TIP entry screen and adds a tip of 2€ +5. The guest sees a TIP entry screen and adds a tip of 2€. - The guests now pays the full sum of 12€ - The payment app reports a paid amount of 12€ (including 2€ of tip) - The fiskaltrust InStore App / POS System API does report back the following in the payment response (see also example in the POS System API docs): From 9f0d017e9642d8e7c0a4b8ce2a003396abfae6cd Mon Sep 17 00:00:00 2001 From: MaximilianFT Date: Mon, 2 Mar 2026 08:27:04 +0100 Subject: [PATCH 10/17] Apply suggestion from @deboragracio Co-authored-by: deboragracio <63159404+deboragracio@users.noreply.github.com> --- HOWTO_01_Payment_csharp/README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HOWTO_01_Payment_csharp/README.MD b/HOWTO_01_Payment_csharp/README.MD index 7f377b4..01266d8 100644 --- a/HOWTO_01_Payment_csharp/README.MD +++ b/HOWTO_01_Payment_csharp/README.MD @@ -35,7 +35,7 @@ In many payment vendor apps, it is possible to add a tip to the payment amount. 3. The POS on the mobile device sends the amount (e.g., 10€) to be paid to the configured payment app via POS System API and the **fiskaltrust** InStore App. 4. The payment app opens, and the waiter hands the mobile device to the guest. 5. The guest sees a TIP entry screen and adds a tip of 2€. -- The guests now pays the full sum of 12€ +6. The guest now pays the full sum of 12€. - The payment app reports a paid amount of 12€ (including 2€ of tip) - The fiskaltrust InStore App / POS System API does report back the following in the payment response (see also example in the POS System API docs): - 2 pay items From 7921526eed7c21ff9691b46663dc5ada5d064cbe Mon Sep 17 00:00:00 2001 From: MaximilianFT Date: Mon, 2 Mar 2026 08:27:12 +0100 Subject: [PATCH 11/17] Apply suggestion from @deboragracio Co-authored-by: deboragracio <63159404+deboragracio@users.noreply.github.com> --- HOWTO_01_Payment_csharp/README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HOWTO_01_Payment_csharp/README.MD b/HOWTO_01_Payment_csharp/README.MD index 01266d8..f9d190e 100644 --- a/HOWTO_01_Payment_csharp/README.MD +++ b/HOWTO_01_Payment_csharp/README.MD @@ -36,7 +36,7 @@ In many payment vendor apps, it is possible to add a tip to the payment amount. 4. The payment app opens, and the waiter hands the mobile device to the guest. 5. The guest sees a TIP entry screen and adds a tip of 2€. 6. The guest now pays the full sum of 12€. -- The payment app reports a paid amount of 12€ (including 2€ of tip) +7. The payment app reports a paid amount of 12€ (including 2€ tip). - The fiskaltrust InStore App / POS System API does report back the following in the payment response (see also example in the POS System API docs): - 2 pay items - Pay item 1: The fully paid amount with the receipt -> 12€ From be8a16200f374e08bf938a05b567e42f8a54ea55 Mon Sep 17 00:00:00 2001 From: MaximilianFT Date: Mon, 2 Mar 2026 08:27:19 +0100 Subject: [PATCH 12/17] Apply suggestion from @deboragracio Co-authored-by: deboragracio <63159404+deboragracio@users.noreply.github.com> --- HOWTO_01_Payment_csharp/README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HOWTO_01_Payment_csharp/README.MD b/HOWTO_01_Payment_csharp/README.MD index f9d190e..85bf97b 100644 --- a/HOWTO_01_Payment_csharp/README.MD +++ b/HOWTO_01_Payment_csharp/README.MD @@ -37,7 +37,7 @@ In many payment vendor apps, it is possible to add a tip to the payment amount. 5. The guest sees a TIP entry screen and adds a tip of 2€. 6. The guest now pays the full sum of 12€. 7. The payment app reports a paid amount of 12€ (including 2€ tip). -- The fiskaltrust InStore App / POS System API does report back the following in the payment response (see also example in the POS System API docs): +8. The **fiskaltrust** InStore App / POS System API reports the following in the payment response (see also an example on the POS System API docs): - 2 pay items - Pay item 1: The fully paid amount with the receipt -> 12€ - Pay item 2: The tip with negative amount -> -2€ From 248ee4da20401854e44f990a07b983c846912b4d Mon Sep 17 00:00:00 2001 From: MaximilianFT Date: Mon, 2 Mar 2026 08:27:29 +0100 Subject: [PATCH 13/17] Apply suggestion from @deboragracio Co-authored-by: deboragracio <63159404+deboragracio@users.noreply.github.com> --- HOWTO_01_Payment_csharp/README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HOWTO_01_Payment_csharp/README.MD b/HOWTO_01_Payment_csharp/README.MD index 85bf97b..e94ec45 100644 --- a/HOWTO_01_Payment_csharp/README.MD +++ b/HOWTO_01_Payment_csharp/README.MD @@ -39,7 +39,7 @@ In many payment vendor apps, it is possible to add a tip to the payment amount. 7. The payment app reports a paid amount of 12€ (including 2€ tip). 8. The **fiskaltrust** InStore App / POS System API reports the following in the payment response (see also an example on the POS System API docs): - 2 pay items - - Pay item 1: The fully paid amount with the receipt -> 12€ + - Pay item 1: The total paid amount with the receipt -> 12€ - Pay item 2: The tip with negative amount -> -2€ - sum of the 2 pay items is the original requested amount of 10€ From 1927adec01a398c7f6985f20ef7ff6a06eaec7e7 Mon Sep 17 00:00:00 2001 From: MaximilianFT Date: Mon, 2 Mar 2026 08:27:36 +0100 Subject: [PATCH 14/17] Apply suggestion from @deboragracio Co-authored-by: deboragracio <63159404+deboragracio@users.noreply.github.com> --- HOWTO_01_Payment_csharp/README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HOWTO_01_Payment_csharp/README.MD b/HOWTO_01_Payment_csharp/README.MD index e94ec45..466028a 100644 --- a/HOWTO_01_Payment_csharp/README.MD +++ b/HOWTO_01_Payment_csharp/README.MD @@ -40,7 +40,7 @@ In many payment vendor apps, it is possible to add a tip to the payment amount. 8. The **fiskaltrust** InStore App / POS System API reports the following in the payment response (see also an example on the POS System API docs): - 2 pay items - Pay item 1: The total paid amount with the receipt -> 12€ - - Pay item 2: The tip with negative amount -> -2€ + - Pay item 2: The tip with a negative amount -> -2€ - sum of the 2 pay items is the original requested amount of 10€ NOTE: The tip can be calculated by simply subtracting the requested amount from the paid amount (12-10 = 2€ tip) or alternatively from the 2nd pay item (-2 * -1 = 2€ tip). From cc431eda7b65232d131a96e23c2ed44087f695a9 Mon Sep 17 00:00:00 2001 From: MaximilianFT Date: Mon, 2 Mar 2026 08:27:49 +0100 Subject: [PATCH 15/17] Apply suggestion from @deboragracio Co-authored-by: deboragracio <63159404+deboragracio@users.noreply.github.com> --- HOWTO_01_Payment_csharp/README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HOWTO_01_Payment_csharp/README.MD b/HOWTO_01_Payment_csharp/README.MD index 466028a..ddb642f 100644 --- a/HOWTO_01_Payment_csharp/README.MD +++ b/HOWTO_01_Payment_csharp/README.MD @@ -41,6 +41,6 @@ In many payment vendor apps, it is possible to add a tip to the payment amount. - 2 pay items - Pay item 1: The total paid amount with the receipt -> 12€ - Pay item 2: The tip with a negative amount -> -2€ - - sum of the 2 pay items is the original requested amount of 10€ + - The sum of the 2 pay items is the original requested amount of 10€ NOTE: The tip can be calculated by simply subtracting the requested amount from the paid amount (12-10 = 2€ tip) or alternatively from the 2nd pay item (-2 * -1 = 2€ tip). From 386ccd023e943f28ad6890508467b0e9213ec29b Mon Sep 17 00:00:00 2001 From: MaximilianFT Date: Mon, 2 Mar 2026 08:28:12 +0100 Subject: [PATCH 16/17] Apply suggestion from @deboragracio Co-authored-by: deboragracio <63159404+deboragracio@users.noreply.github.com> --- HOWTO_01_Payment_csharp/README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HOWTO_01_Payment_csharp/README.MD b/HOWTO_01_Payment_csharp/README.MD index ddb642f..22d3f18 100644 --- a/HOWTO_01_Payment_csharp/README.MD +++ b/HOWTO_01_Payment_csharp/README.MD @@ -43,4 +43,4 @@ In many payment vendor apps, it is possible to add a tip to the payment amount. - Pay item 2: The tip with a negative amount -> -2€ - The sum of the 2 pay items is the original requested amount of 10€ -NOTE: The tip can be calculated by simply subtracting the requested amount from the paid amount (12-10 = 2€ tip) or alternatively from the 2nd pay item (-2 * -1 = 2€ tip). +**NOTE:** The tip can be calculated by simply subtracting the requested amount from the paid amount (12-10 = 2€ tip) or alternatively by using the 2nd pay item (-2 * -1 = 2€ tip). From 13bafb15d1f8112cc40811ec9472896254635a86 Mon Sep 17 00:00:00 2001 From: MaximilianFT Date: Mon, 2 Mar 2026 08:28:30 +0100 Subject: [PATCH 17/17] Apply suggestion from @deboragracio Co-authored-by: deboragracio <63159404+deboragracio@users.noreply.github.com> --- README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.MD b/README.MD index fb5f2ca..ac3753a 100644 --- a/README.MD +++ b/README.MD @@ -80,7 +80,7 @@ Any payment amount will return a SUCCESS response, except for the following defi | 30000,10 | DECLINED | | 30000,20 | TIMEOUT (returned as an error message as no other option is available yet) | | 30000,40 | CANCELLED BY USER | -| 30000,50 | SUCCESS with added guest tip (see [HOWTO_01_Payment](HOWTO_01_Payment_csharp/README.MD) on how to handle such a tip) | +| 30000,50 | SUCCESS with added guest tip (see [HOWTO_01_Payment](HOWTO_01_Payment_csharp/README.MD) for instructions on handling tips) | | 30000,60 | SUCCESS after 1-minute delay | | 30000,70 | SUCCESS after 3-minute delay | | 30000,80 | SUCCESS after 6-minute delay |