{"id":13415176,"url":"https://github.com/Adyen/adyen-dotnet-api-library","last_synced_at":"2025-03-14T22:33:01.927Z","repository":{"id":27066137,"uuid":"110231446","full_name":"Adyen/adyen-dotnet-api-library","owner":"Adyen","description":"Adyen API Library for .NET","archived":false,"fork":false,"pushed_at":"2024-05-22T14:42:28.000Z","size":8624,"stargazers_count":100,"open_issues_count":11,"forks_count":113,"subscribers_count":18,"default_branch":"main","last_synced_at":"2024-05-22T15:58:41.544Z","etag":null,"topics":["adyen","api-client","api-library","dotnet","dotnetcore2","hacktoberfest","payment","payment-gateway","payment-integration","payments"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Adyen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-10T09:52:49.000Z","updated_at":"2024-05-27T17:30:59.487Z","dependencies_parsed_at":"2024-02-22T14:26:08.519Z","dependency_job_id":"d932ead3-9fed-45e8-9d1b-4d6f37e98c71","html_url":"https://github.com/Adyen/adyen-dotnet-api-library","commit_stats":{"total_commits":633,"total_committers":75,"mean_commits":8.44,"dds":"0.43759873617693523","last_synced_commit":"4206e3447fc8912a9d1498560a4102e5e37633cf"},"previous_names":[],"tags_count":77,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adyen%2Fadyen-dotnet-api-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adyen%2Fadyen-dotnet-api-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adyen%2Fadyen-dotnet-api-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adyen%2Fadyen-dotnet-api-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Adyen","download_url":"https://codeload.github.com/Adyen/adyen-dotnet-api-library/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221513997,"owners_count":16835757,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adyen","api-client","api-library","dotnet","dotnetcore2","hacktoberfest","payment","payment-gateway","payment-integration","payments"],"created_at":"2024-07-30T21:00:44.586Z","updated_at":"2025-03-14T22:33:01.919Z","avatar_url":"https://github.com/Adyen.png","language":"C#","funding_links":[],"categories":["E-Commerce and Payments","Libraries, Frameworks and Tools"],"sub_categories":["E-Commerce and Payments"],"readme":"![NET api](https://user-images.githubusercontent.com/16090523/211498272-75a50b61-b1cc-482e-9278-c10a267efe27.png)\n# Adyen .NET API Library\n[![nuget](https://img.shields.io/nuget/v/adyen.svg)](https://www.nuget.org/packages/adyen/) [![nuget](https://img.shields.io/nuget/dt/adyen.svg)](https://www.nuget.org/packages/adyen/) ![.NET Core](https://github.com/Adyen/adyen-dotnet-api-library/workflows/.NET%20Core/badge.svg)\n\nThis is the officially supported .NET library for the Adyen's APIs. Are you looking for examples? You can find our [.NET Integration examples on GitHub here](https://github.com/adyen-examples/adyen-dotnet-online-payments/).\n\n## Supported API versions\nThe library supports all APIs under the following services:\n\n| API                                                                                                                          | Description                                                                                                                                                                                                                                                                                                                             | Service Name                                                                                     | Supported version        |\n|------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------|--------------------------|\n| [Checkout API](https://docs.adyen.com/api-explorer/Checkout/71/overview)                                                     | Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort).                                                                        | [Checkout](Adyen/Service/Checkout)                                                               | **v71**                  |\n| [Payments API](https://docs.adyen.com/api-explorer/Payment/68/overview)                                                      | A set of API endpoints that allow you to initiate, settle, and modify payments on the Adyen payments platform. You can use the API to accept card payments (including One-Click and 3D Secure), bank transfers, ewallets, and many other payment methods.                                                                               | [Payments](Adyen/Service/Payments)                                                               | **v68**                  |\n| [Recurring API](https://docs.adyen.com/api-explorer/Recurring/68/overview)                                                   | The Recurring APIs allow you to manage and remove your tokens or saved payment details. Tokens should be created with validation during a payment request.                                                                                                                                                                              | [Recurring](Adyen/Service/RecurringService.cs)                                                   | **v68**                  |\n| [Payouts API](https://docs.adyen.com/api-explorer/Payout/68/overview)                                                        | A set of API endpoints that allow you to store payout details, confirm, or decline a payout.                                                                                                                                                                                                                                            | [Payouts](Adyen/Service/Payouts)                                                                 | **v68**                  |\n| [Adyen BinLookup API](https://docs.adyen.com/api-explorer/BinLookup/54/overview)                                             | Endpoints for retrieving information, such as cost estimates, and 3D Secure supported version based on a given BIN. Current supported version                                                                                                                                                                                           | [BinLookup](Adyen/Service/BinLookupService.cs)                                                   | **v54**                  |\n| [Stored Value API](https://docs.adyen.com/payment-methods/gift-cards/stored-value-api)                                       | Manage both online and point-of-sale gift cards and other stored-value cards.                                                                                                                                                                                                                                                           | [StoredValue](Adyen/Service/StoredValueService.cs)                                               | **v46**                  |\n| [Legal Entity Management API](https://docs.adyen.com/api-explorer/legalentity/3/overview)                                    | The Legal Entity Management API enables you to manage legal entities that contain information required for verification                                                                                                                                                                                                                 | [LegalEntityManagement](Adyen/Service/LegalEntityManagement)                                     | **v3**                   |\n| [Management API](https://docs.adyen.com/api-explorer/Management/3/overview)                                                  | Configure and manage your Adyen company and merchant accounts, stores, and payment terminals.                                                                                                                                                                                                                                           | [Management](Adyen/Service/Management)                                                           | **v3**                   |\n| [Transfers API](https://docs.adyen.com/api-explorer/transfers/4/overview)                                                    | The Transfers API provides endpoints that you can use to get information about all your transactions, move funds within your balance platform or send funds from your balance platform to a transfer instrument.                                                                                                                        | [Transfers](Adyen/Service/Transfers)                                                             | **v4**                   |\n| [Configuration API](https://docs.adyen.com/api-explorer/balanceplatform/2/overview)                                          | The Configuration API enables you to create a platform where you can onboard your users as account holders and create balance accounts, cards, and business accounts.                                                                                                                                                                   | [BalancePlatform](Adyen/Service/BalancePlatform)                                                 | **v2**                   |\n| [Balance Control API](https://docs.adyen.com/api-explorer/BalanceControl/1/overview)                                         | The Balance Control API lets you transfer funds between merchant accounts that belong to the same legal entity and are under the same company account.                                                                                                                                                                                  | [BalanceControl](Adyen/Service/BalanceControlService.cs)                                         | **v1**                   |\n| [Data Protection API](https://docs.adyen.com/development-resources/data-protection-api)                                      | Our Data Protection API allows you to process Subject Erasure Requests as mandated in General Data Protection Regulation (GDPR).                                                                                                                                                                                                        | [DataProtection](Adyen/Service/DataProtectionService.cs)                                         | **v1**                   |\n| [Terminal API (Cloud communications)](https://docs.adyen.com/point-of-sale/choose-your-architecture/cloud)                   | Our point-of-sale integration.                                                                                                                                                                                                                                                                                                          | [Cloud-based Terminal API](Adyen/Service/TerminalCloudApi.cs)                                  | Cloud-based Terminal API |      |\n| [Terminal API (Local communications)](https://docs.adyen.com/point-of-sale/choose-your-architecture/local)                   | Our point-of-sale integration.                                                                                                                                                                                                                                                                                                          | [Local-based Terminal API](Adyen/Service/TerminalLocalApi.cs)                                  | Local-based Terminal API |      |\n| [POS Terminal Management API](https://docs.adyen.com/api-explorer/postfmapi/1/overview)                                      | ~~This API provides endpoints for managing your point-of-sale (POS) payment terminals. You can use the API to obtain information about a specific terminal, retrieve overviews of your terminals and stores, and assign terminals to a merchant account or store.~~ ‼️ **Deprecated**: use instead the [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview) for the management of your terminal fleet. terminals.                                                                                | ~~[POSTerminalManagement](Adyen/Service/POSTerminalManagementService.cs)~~                           | ~~**v1**~~                   |\n| [Classic Platforms Account API](https://docs.adyen.com/api-explorer/Account/6/overview)                                      | This API is used for the classic integration. If you are just starting your implementation, refer to our new integration guide instead.                                                                                                                                                                                                 | [PlatformsAccount](Adyen/Service/PlatformsAccount)                                               | **v6**                   |\n| [Classic Platforms Fund API](https://docs.adyen.com/api-explorer/Fund/6/overview)                                            | This API is used for the classic integration. If you are just starting your implementation, refer to our new integration guide instead.                                                                                                                                                                                                 | [PlatformsFund](Adyen/Service/PlatformsFundService.cs)                                           | **v6**                   |\n| [Classic Platforms Hosted Onboarding Page API](https://docs.adyen.com/api-explorer/Hop/6/overview)                           | This API is used for the classic integration. If you are just starting your implementation, refer to our new integration guide instead.                                                                                                                                                                                                 | [PlatformsHostedOnboardingPage](Adyen/Service/PlatformsHostedOnboardingPage)                     | **v6**                   |\n| [Classic Platforms Notification Configuration API](https://docs.adyen.com/api-explorer/NotificationConfiguration/6/overview) | This API is used for the classic integration. If you are just starting your implementation, refer to our new integration guide instead.                                                                                                                                                                                                 | [PlatformsNotificationConfiguration](Adyen/Service/PlatformsNotificationConfigurationService.cs) | **v6**                   |\n| [Disputes API](https://docs.adyen.com/api-explorer/Disputes/30/overview)                                                     | You can use the [Disputes API](https://docs.adyen.com/risk-management/disputes-api) to automate the dispute handling process so that you can respond to disputes and chargebacks as soon as they are initiated. The Disputes API lets you retrieve defense reasons, supply and delete defense documents, and accept or defend disputes. | [Disputes](Adyen/Service/DisputesService.cs)                                                     | **v30**                  |\n| [POS Mobile API](https://docs.adyen.com/api-explorer/possdk/68/overview)                                    | The POS Mobile API is used in the mutual authentication flow between an Adyen Android or iOS [POS Mobile SDK](https://docs.adyen.com/point-of-sale/ipp-mobile/) and the Adyen payments platform. The POS Mobile SDK for Android or iOS devices enables businesses to accept in-person payments using a commercial off-the-shelf (COTS) device like a phone. For example, Tap to Pay transactions, or transactions on a mobile device in combination with a card reader |  [POS Mobile](Adyen/Service/PosMobileService.cs)                        | **v68**                |\n| [Payments App API](https://docs.adyen.com/api-explorer/payments-app/1/overview) | The Payments App API is used to Board and manage the Adyen Payments App on your Android mobile devices. | [PaymentsAppApi](Adyen/Service/PaymentsAppService.cs) | **v1** |\n\n## Supported Webhook versions\nThe library supports all webhooks under the following model directories:\n\n| Webhooks                                                                                          | Description                                                                                                                                                                                                                                                                         | Model Name                                                                       | Supported Version |\n|---------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------|-------------------|\n| [Authentication Webhooks](https://docs.adyen.com/api-explorer/Checkout/latest/overview)           | You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort).                                                                                                                     | [AcsWebhooks](Adyen/Model/AcsWebhooks)                                           | **v1**            |\n| [Configuration Webhooks](https://docs.adyen.com/api-explorer/balanceplatform-webhooks/2/overview) | You can use these webhooks to build your implementation. For example, you can use this information to update internal statuses when the status of a capability is changed.                                                                                                          | [ConfigurationWebhooks](Adyen/Model/ConfigurationWebhooks)                       | **v2**            |\n| [Transfer Webhooks](https://docs.adyen.com/api-explorer/transfer-webhooks/4/overview)             | You can use these webhooks to build your implementation. For example, you can use this information to update balances in your own dashboards or to keep track of incoming funds.                                                                                                    | [TransferWebhooks](Adyen/Model/TransferWebhooks)                                 | **v4**            |\n| [Transaction Webhooks](https://docs.adyen.com/api-explorer/transaction-webhooks/4/overview)       | Adyen sends webhooks to inform your system about incoming and outgoing transfers in your platform. You can use these webhooks to build your implementation. For example, you can use this information to update balances in your own dashboards or to keep track of incoming funds. | [TransactionWebhooks](Adyen/Model/TransactionWebhooks)                           | **v4**            |\n| [Report Webhooks](https://docs.adyen.com/api-explorer/report-webhooks/1/overview)                 | You can download reports programmatically by making an HTTP GET request, or manually from your Balance Platform Customer Area                                                                                                                                                       | [ReportWebhooks](Adyen/Model/ReportWebhooks)                                     | **v1**            |\n| [Management Webhooks](https://docs.adyen.com/api-explorer/ManagementNotification/3/overview)      | Adyen uses webhooks to inform your system about events that happen with your Adyen company and merchant accounts, stores, payment terminals, and payment methods when using Management API.                                                                                         | [ManagementWebhooks](Adyen/Model/ManagementWebhooks)                             | **v3**            |\n| [Negative Balance Warning Webhooks](https://docs.adyen.com/api-explorer/Webhooks/1/overview)      | Adyen sends this webhook to inform you about a balance account whose balance has been negative for a given number of days.                                                                                                                                                          | [NegativeBalanceWarningWebhooks](Adyen/Model/NegativeBalanceWarningWebhooks)     | **v1**            |\n| [Notification Webhooks](https://docs.adyen.com/api-explorer/Webhooks/1/overview)                  | We use webhooks to send you updates about payment status updates, newly available reports, and other events that you can subscribe to. For more information, refer to our documentation                                                                                             | [Notification](Adyen/Model/Notification)                                         | **v1**            |\n| [Classic Platform Webhooks](https://docs.adyen.com/api-explorer/Notification/6/overview)          | The Notification API sends notifications to the endpoints specified in a given subscription. Subscriptions are managed through the Notification Configuration API. The API specifications listed here detail the format of each notification.                                       | [PlatformWebhooks](Adyen/Model/PlatformWebhooks)                                 | **v6**            |\n\nFor more information, refer to our [documentation](https://docs.adyen.com/) or the [API Explorer](https://docs.adyen.com/api-explorer/).\n\n## Prerequisites\n- [Adyen Test Account](https://docs.adyen.com/get-started-with-adyen)\n- [Adyen API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). For testing, your API credential needs to have the [API PCI Payments role](https://docs.adyen.com/development-resources/api-credentials#roles).\n- Adyen .NET API Library supports .NET Standard 2.0 and .NET 6.0\n- In order for Adyen .NET API Library to support local terminal api certificate validation the application should be set to .net core 2.1 and above or .net framework 4.6.1 and above\n\n## Installation\nSimply download and restore nuget packages https://www.nuget.org/packages/Adyen/\nor install it from package manager\n```\nPM\u003e Install-Package Adyen -Version x.x.x\n```\n## ❗Disclaimer on Enum Values\n\nPlease note that the integer value (index) of the enums used in this library may change in future releases. These values are not guaranteed to remain static, and they may be modified, added, or removed as the library evolves.\n\n⚠️ We advise against hard-coding or relying on specific enum integer values in your implementation, as they may break compatibility with future versions of this library. Use instead the string value of the enums.\n\nUpon upgrade check the Release Notes and the associated PRs to understand the changes and any potential impact on your integration.\n\n## Using the library\n\nIn order to submit http request to Adyen API you need to initialize the client. The following example makes a checkout payment request:\n```csharp\nusing Adyen;\nusing Adyen.Model.Checkout;\nusing Adyen.Service.Checkout;\nusing Environment = Adyen.Model.Environment;\n\nvar config = new Config()\n{\n    XApiKey = \"ADYEN_API_KEY\",\n    Environment = Environment.Test\n};\nvar client = new Client(config);\nvar paymentsService = new PaymentsService(client);\nvar amount = new Model.Checkout.Amount(\"USD\", 1000);\nvar cardDetails = new CardDetails\n{\n    EncryptedCardNumber = \"test_4111111111111111\",\n    EncryptedSecurityCode = \"test_737\",\n    EncryptedExpiryMonth = \"test_03\",\n    EncryptedExpiryYear = \"test_2030\",\n    HolderName = \"John Smith\",\n    Type = CardDetails.TypeEnum.Card\n};\nvar paymentRequest = new Model.Checkout.PaymentRequest\n{\n    Reference = \"Your order number \",\n    ReturnUrl = @\"https://your-company.com/...\",\n    MerchantAccount = \"your-merchant-account\",\n    Amount = amount,\n    PaymentMethod = new CheckoutPaymentMethod(cardDetails)\n};\nvar paymentResponse = paymentsService.Payments(paymentRequest);\n```\nOr in case you would like to make an asynchronous `/payments` request with idempotency key and cancellation token, the last line would be instead:\n```sharp\nvar requestOptions = new RequestOptions();\nrequestOptions.IdempotencyKey = \"YourGeneratedUniqueGuid\";\nPaymentResponse paymentResponse = await paymentsService.PaymentsAsync(paymentRequest, requestOptions: requestOptions, cancellationToken: new CancellationToken());\n```\n### Deserializing JSON Strings\nIn some setups you might need to deserialize JSON strings to request objects. For example, when using the libraries in combination with [Dropin/Components](https://github.com/Adyen/adyen-web). Please use the built-in deserialization functions:\n~~~~ c#\n// Import the required model class\nusing Adyen.Model.Checkout;\n\n// Deserialize using built-in function\nPaymentRequest paymentRequest = PaymentRequest.FromJson(\"YOUR_JSON_STRING\");\n~~~~\n### Running the tests\nNavigate to adyen-dotnet-api-library folder and run the following commands.\n```\ndotnet build\ndotnet test\n```\n\n\u003e [!IMPORTANT] We have split and renamed `TerminalCloudApi.cs` to:\n\u003e 1. `TerminalApiAsyncService.cs` (which sends requests to `terminal-api.adyen.com/async`) and\n\u003e 2. `TerminalApiSyncService.cs` (which sends requests to `terminal-api.adyen.com/sync`)\n\u003e 3. `TerminalApiLocalService.cs` (which sends requests to your custom endpoint, f.e. `https://198.51.100.1:8443/nexo`)\n\n\n### Using the Cloud Terminal API \nIn order to submit POS request with Cloud Terminal API, you need to initialize the client with the **endpoints that it is closer to your region** when going **live**. The Endpoints are available as contacts in [ClientConfig](/Adyen/Constants/ClientConfig.cs).\nFor more information, visit our [documentation](https://docs.adyen.com/point-of-sale/design-your-integration/terminal-api/#live-endpoints)\n```csharp\n// Example for EU based region\nusing Adyen;\nusing Adyen.Constants;\n\nvar config = new Config\n{\n    XApiKey = \"ADYEN_API_KEY\",\n    CloudApiEndPoint = ClientConfig.CloudApiEndPointEULive\n};\nvar client = new Client(config);\n```\n\nTo parse the terminal API notifications, you can use the following custom deserializer. This method will throw an exception for non-notification requests.\n\n```csharp\nSaleToPoiMessageSerializer serializer = new SaleToPoiMessageSerializer();\nSaleToPOIRequest saleToPoiRequest = serializer.DeserializeNotification(your_terminal_notification);\n```\n\n### Example Cloud Terminal API integration `/sync`-endpoint\n```c#\nusing System;\nusing Adyen.Model;\nusing Adyen.Model.TerminalApi;\nusing Adyen.Model.TerminalApi.Message;\nusing Adyen.Service;\nusing Environment = Adyen.Model.Environment;\n \nnamespace Adyen.Terminal\n{\n   public static class Program\n   {\n        private static void Main(string[] args)\n        {\n            var config = new Config() {\n                XApiKey = \"ADYEN_API_KEY\",\n                Environment = Environment.Test\n            };\n            var client = new Client(config, Environment.Test);\n        }\n       \n        // Terminal-api `/sync` - `https://terminal-api-test.adyen.com/sync`\n        private static SyncEndpointExample(Client client) {\n            ITerminalApiSyncService terminalApiSyncService = new TerminalApiSyncService(client, new SaleToPoiMessageSerializer(), new SaleToPoiMessageSecuredEncryptor(), new SaleToPoiMessageSecuredSerializer());\n            SaleToPOIResponse response = terminalApiSyncService.Request(GetPaymentRequest()); // Use: await terminalApiSyncService.RequestAsync(GetPaymentRequest()) for asynchronous communications.\n            PaymentResponse paymentResponse = response.MessagePayload as PaymentResponse;\n            Console.WriteLine(paymentResponse?.Response?.Result);\n        }\n       \n        // Terminal-api `/async` - `https://terminal-api-test.adyen.com/async`\n        private static AsyncEndpointExample(Client client) {\n            ITerminalApiAsyncService terminalApiAsyncService = new TerminalApiAsyncService(client, new SaleToPoiMessageSerializer(), new SaleToPoiMessageSecuredEncryptor(), new SaleToPoiMessageSecuredSerializer());\n            String response = terminalApiAsyncService.Request(GetPaymentRequest()); // Use: await terminalApiAsyncService.RequestAsync(GetPaymentRequest()) for asynchronous communications.\n            Console.WriteLine(response);\n        }\n       \n        private static SaleToPOIRequest GetPaymentRequest()\n        {\n            var serviceID = \"SERVICE_ID\"; // ServiceId should be unique for every request\n            var saleID = \"SALE_ID\";\n            var POIID = \"SERIAL_NUMBER\";\n            var transactionID = \"123459\";\n            SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest()\n            {\n                MessageHeader = new MessageHeader()\n                {\n                    MessageClass = MessageClassType.Service,\n                    MessageCategory = MessageCategoryType.Payment,\n                    MessageType = MessageType.Request,\n                    ServiceID = serviceID,\n                    SaleID = saleID,\n                    POIID = POIID\n                },\n                MessagePayload = new PaymentRequest()\n                {\n                    SaleData = new SaleData()\n                    {\n                        SaleTransactionID = new TransactionIdentification()\n                        {\n                            TransactionID = transactionID,\n                            TimeStamp = DateTime.Now\n                        }\n                    },\n                    PaymentTransaction = new PaymentTransaction()\n                    {\n                        AmountsReq = new AmountsReq()\n                        {\n                            Currency = \"EUR\",\n                            RequestedAmount = new decimal(13.37)\n                        },\n                    },\n                }\n            };\n            return saleToPOIRequest;\n        }\n    }\n}\n```\n\n### Using the Local Terminal API\nThe request and response payloads are identical to the Cloud Terminal API, however an additional encryption details object is required to send the requests. You can retrieve these details from the Customer Area, make sure you update your terminal to the latest version if you've updated these keys.\n```csharp\nusing Adyen;\nusing Adyen.Security;\n\nvar encryptionCredentialDetails = new EncryptionCredentialDetails\n{\n    KeyVersion = 1,\n    AdyenCryptoVersion = 1,\n    KeyIdentifier = \"CryptoKeyIdentifier12345\",\n    Password = \"p@ssw0rd123456\"\n};\nvar config = new Config\n{\n    Environment = Model.Environment.Test,\n    LocalTerminalApiEndpoint = @\"https://_terminal_:8443/nexo/\" // _terminal_ example: `https://198.51.100.1:8443/nexo` (can be found in the WIFI settings of your terminal)\n};\nvar client = new Client(config);\nITerminalApiLocalService terminalApiLocalService = new TerminalApiLocalService(client);\n// Asynchronous call (preferred)\nvar saleToPOIResponse = await terminalApiLocalService.RequestEncryptedAsync(paymentRequest, encryptionCredentialDetails, new CancellationToken()); // Pass cancellation token or create a new one.\n// Synchronous (blocking) call\n//var saleToPOIResponse = terminalApiLocalService.RequestEncrypted(paymentRequest, encryptionCredentialDetails);\n```\nAlternatively one can use the local terminal API without encryption. This is only allowed in the TEST environment and in order for this to work one has to remove any encryption details from the Customer Area.\nWhen sending requests to a local (unknown) endpoint, you may run into `System.Net.Http.HttpRequestException: The SSL connection could not be established` due to certificate issues. \nFor **local** testing purposes, developers can override the `System.Net.Http.HttpClientHandler` and always returns `true` when validating the certificate. \n\n\u003e [!CAUTION] Follow the guide in the [Adyen documentation](https://docs.adyen.com/point-of-sale/design-your-integration/choose-your-architecture/local/#install-root-cert) to install the root certificate on TEST and on LIVE.\n\n```csharp\nusing Adyen;\nusing Adyen.Security;\n\n// Override the HttpClientHandler to always return true, for LOCAL TESTING PURPOSES, NEVER run this on live. \nvar handler = new System.Net.Http.HttpClientHandler { ServerCertificateCustomValidationCallback = (message, certificate2, arg3, arg4) =\u003e true };\nvar client = new Client(config, new System.Net.Http.HttpClient(handler));\n\nITerminalApiLocalService terminalApiLocalService = new TerminalApiLocalService(client, new SaleToPoiMessageSerializer(), new SaleToPoiMessageSecuredEncryptor(), new SaleToPoiMessageSecuredSerializer());\nSaleToPOIResponse response = await terminalApiLocalService.RequestEncryptedAsync(PaymentRequest());\nPaymentResponse paymentResponse = response.MessagePayload as PaymentResponse;\nConsole.WriteLine(paymentResponse?.Response?.Result);\n```\n\nTo parse the terminal API notifications, use the following custom deserializer. This method will throw an exception for non-notification requests.\n```csharp\nvar serializer = new SaleToPoiMessageSerializer();\nvar saleToPoiRequest = serializer.DeserializeNotification(your_terminal_notification);\n```\nNote that the `AdditionalResponse` field, when performing a CardAcquisition request could be either a `based64 encoded`-string or `key-value`-pair. You can use the `CardAcquisitionUtil.AdditionalResponse(...)`-function to deserialize it. \n```csharp\nAdditionalResponse additionalResponse = CardAcquisitionUtil.AdditionalResponse(jsonString);\n```\n\n\n\n### Parsing BalancePlatform and Management Webhooks\nIn order to parse banking webhooks, first validate the webhooks (recommended) by retrieving the hmac key from the webhook header and the hmac signature from the Balance Platform CA configuration page respectively.\n```csharp\nusing Adyen.Model.ConfigurationWebhooks;\nusing Adyen.Webhooks;\nusing Adyen.Util;\n\n...\nvar hmacValidator = new HmacValidator();\nvar handler = new BalancePlatformWebhookHandler();\nbool isValid = hmacValidator.IsValidWebhook(\"hmacSignature\", \"ADYEN_HMAC_KEY\", webhookPayload);\n\nif (isValid) {\n    dynamic webhook = handler.GetGenericBalancePlatformWebhook(webhookPayload);\n}\n```\nIf you want to handle specific webhook types you're expecting to receive, check the type and retrieve if the type is correct:\n```csharp\nvar handler = new BalancePlatformWebhookHandler();\nbool isAccountHolderNotification = handler.GetAccountHolderNotificationRequest(json_payload, out AccountHolderNotificationRequest webhook)\n// Your logic here based on whether the webhook parsed correctly or not\n```\nValidating management webhooks is identical to validating the balance platform webhooks. To parse the management webhooks, however, one calls the following handler:\n```csharp\nvar handler = new ManagementWebhookHandler();\nif(handler.GetMerchantCreatedNotificationRequest(json_payload, out MerchantCreatedNotificationRequest webhook))\n{ \n    // Your logic here using the passed through webhook variable\n}\n```\n\n## Feedback\nWe value your input! Help us enhance our API Libraries and improve the integration experience by providing your feedback. Please take a moment to fill out [our feedback form](https://forms.gle/A4EERrR6CWgKWe5r9) to share your thoughts, suggestions or ideas. \n\n## Contributing\nWe encourage you to contribute to this repository, so everyone can benefit from new features, bug fixes, and any other improvements.\nHave a look at our [contributing guidelines](/CONTRIBUTING.md) to find out how to raise a pull request.\n\n## Support\nIf you have a feature request, or spotted a bug or a technical problem, [create an issue here](https://github.com/Adyen/adyen-dotnet-api-library/issues/new/choose).\n\nFor other questions, [contact our Support Team](https://www.adyen.help/hc/en-us/requests/new?ticket_form_id=360000705420).\n\n## Licence\nThis repository is available under the [MIT license](/LICENSE).\n\n## See also\n* [Adyen .NET Integration Examples](https://github.com/adyen-examples/adyen-dotnet-online-payments/)\n* [Adyen Docs](https://docs.adyen.com/)\n* [API Explorer](https://docs.adyen.com/api-explorer/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAdyen%2Fadyen-dotnet-api-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAdyen%2Fadyen-dotnet-api-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAdyen%2Fadyen-dotnet-api-library/lists"}