Adyen 10.0.0
See the version list below for details.
dotnet add package Adyen --version 10.0.0
NuGet\Install-Package Adyen -Version 10.0.0
<PackageReference Include="Adyen" Version="10.0.0" />
paket add Adyen --version 10.0.0
#r "nuget: Adyen, 10.0.0"
// Install Adyen as a Cake Addin #addin nuget:?package=Adyen&version=10.0.0 // Install Adyen as a Cake Tool #tool nuget:?package=Adyen&version=10.0.0
Adyen .NET API Library
This is the officially supported .NET library for using Adyen's APIs.
Supported API versions
The library supports all APIs under the following services:
API | Description | Service Name | Supported version | |
---|---|---|---|---|
Checkout API | 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 | v70 | |
Payments API | 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 | v68 | |
Recurring API | 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 | v68 | |
Payouts API | A set of API endpoints that allow you to store payout details, confirm, or decline a payout. | Payouts | v68 | |
Adyen BinLookup API | Endpoints for retrieving information, such as cost estimates, and 3D Secure supported version based on a given BIN. Current supported version | BinLookup | v54 | |
Stored Value API | Manage both online and point-of-sale gift cards and other stored-value cards. | StoredValue | v46 | |
Legal Entity Management API | The Legal Entity Management API enables you to manage legal entities that contain information required for verification | LegalEntityManagement | v3 | |
Transfers API | 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 | v3 | |
Balance Control API | 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 | v1 | |
Data Protection API | Our Data Protection API allows you to process Subject Erasure Requests as mandated in General Data Protection Regulation (GDPR). | DataProtection | v1 | |
Hosted Onboarding API | The Hosted onboarding API provides endpoints that you can use to generate links to Adyen-hosted pages, such as an onboarding page or a PCI compliance questionnaire. You can provide these links to your account holders so that they can complete their onboarding. | HostedOnboardingPages | v1 | |
Account API | The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. | Account | v5 | |
Fund API | The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. | Fund | v5 | |
Terminal API (Cloud communications) | Our point-of-sale integration. | Cloud-based Terminal API | Cloud-based Terminal API | |
Terminal API (Local communications) | Our point-of-sale integration. | Local-based Terminal API | Local-based Terminal API | |
POS Terminal Management API | 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. | POSTerminalManagement | v1 |
For more information, refer to our documentation or the API Explorer.
Prerequisites
- Adyen test account
- API key. For testing, your API credential needs to have the API PCI Payments role.
- Adyen dotnet API Library supports .net standard 2.0 and above
- In order for Adyen dotnet 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
Installation
Simply download and restore nuget packages https://www.nuget.org/packages/Adyen/ or install it from package manager
PM> Install-Package Adyen -Version x.x.x
Using the library
In order to submit http request to Adyen API you need to initialize the client. The following example makes a checkout payment request:
// Create a paymentsRequest
using Adyen;
using Adyen.Model.Checkout;
using Adyen.Service;
using Environment = Adyen.Model.Enum.Environment;
// Create a paymentsRequest
var amount = new Amount("USD", 1000);
var paymentRequest = new PaymentRequest
{
Reference = "Your order number",
Amount = amount,
ReturnUrl = @"https://your-company.com/...",
MerchantAccount = "Your merchantAccount",
};
//Create the http client
var config = new Config
{
XApiKey = "Your merchant XAPI key",
Environment = Environment.Test
};
var client = new Client(config);
var checkout = new PaymentsService(client);
//Make the call to the service. This example code makes a call to /payments
var paymentResponse = checkout.Payments(paymentRequest);
Or in case you would like to make an asynchronous /payments call with idempotency key and cancellation token, the last line would be instead:
Task<PaymentResponse> paymentResponse = checkout.PaymentsAsync(
paymentRequest,
requestOptions: myIdempotencyKey,
cancellationToken: myCancellationToken);
Running the tests
Navigate to adyen-dotnet-api-library folder and run the following commands.
dotnet build
dotnet test
Using the Cloud Terminal API
In 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. The Endpoints are available as contacts in ClientConfig For more information please read our documentation
//Example for EU based Endpoint Syncronous
using Adyen;
using Adyen.Constants;
var config = new Config
{
XApiKey = "Your merchant XAPI key",
CloudApiEndPoint = ClientConfig.CloudApiEndPointEULive
};
var client = new Client(config);
To parse the terminal API notifications, please use the following custom deserializer. This method will throw an exception for non-notification requests.
var serializer = new SaleToPoiMessageSerializer();
var saleToPoiRequest = serializer.DeserializeNotification(your_terminal_notification);
Example Cloud Terminal API integration
using System;
using Adyen.Model.Nexo;
using Adyen.Model.Nexo.Message;
using Adyen.Service;
using Environment = Adyen.Model.Enum.Environment;
namespace Adyen.Terminal
{
public static class Program
{
private static string XApiKey = "YOUR-API-KEY";
private static void Main(string[] args)
{
var client = new Client(XApiKey, Environment.Test);
PosPaymentCloudApi posPaymentCloudApi = new PosPaymentCloudApi(client);
SaleToPOIResponse response = posPaymentCloudApi.TerminalApiCloudSync(PaymentRequest());
PaymentResponse paymentResponse = (PaymentResponse) response.MessagePayload;
Console.WriteLine(paymentResponse.Response.Result);
}
private static SaleToPOIRequest PaymentRequest()
{
var serviceID = "SERVICE_ID"; // ServiceId should be unique for every request
var saleID = "SALE_ID";
var POIID = "SERIAL_NUMBER";
var transactionID = "123459";
var saleToPOIRequest = new SaleToPOIRequest()
{
MessageHeader = new MessageHeader()
{
MessageClass = MessageClassType.Service,
MessageCategory = MessageCategoryType.Payment,
MessageType = MessageType.Request,
ServiceID = serviceID,
SaleID = saleID,
POIID = POIID
},
MessagePayload = new PaymentRequest()
{
SaleData = new SaleData()
{
SaleTransactionID = new TransactionIdentification()
{
TransactionID = transactionID,
TimeStamp = DateTime.Now
}
},
PaymentTransaction = new PaymentTransaction()
{
AmountsReq = new AmountsReq()
{
Currency = "EUR",
RequestedAmount = new decimal(10.9)
},
},
}
};
return saleToPOIRequest;
}
}
}
Using the Local Terminal API
The request and response payloads are identical to the Cloud Terminal API, however an additional encryption details object is required to send the requests.
var encryptionCredentialDetails = new EncryptionCredentialDetails
{
AdyenCryptoVersion = 1,
KeyIdentifier = "CryptoKeyIdentifier12345",
Password = "p@ssw0rd123456"
};
var config = new Config
{
Environment = Model.Environment.Live,
LocalTerminalApiEndpoint = @"https://_terminal_:8443/nexo/"
};
var client = new Client(config);
var posPaymentLocalApi = new PosPaymentLocalApi(client);
var saleToPOIResponse = posPaymentLocalApi.TerminalApiLocal(paymentRequest, encryptionCredentialDetails);
To parse the terminal API notifications, please use the following custom deserializer. This method will throw an exception for non-notification requests.
var serializer = new SaleToPoiMessageSerializer();
var saleToPoiRequest = serializer.DeserializeNotification(your_terminal_notification);
Feedback
We 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 to share your thoughts, suggestions or ideas.
Contributing
We encourage you to contribute to this repository, so everyone can benefit from new features, bug fixes, and any other improvements. Have a look at our contributing guidelines to find out how to raise a pull request.
Support
If you have a feature request, or spotted a bug or a technical problem, create an issue here.
For other questions, contact our Support Team.
Licence
This repository is available under the MIT license.
See also
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Extensions.Http (>= 7.0.0)
- Newtonsoft.Json (>= 13.0.3)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Net.Http (>= 4.3.4)
-
net6.0
- Microsoft.Extensions.Http (>= 7.0.0)
- Newtonsoft.Json (>= 13.0.3)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Net.Http (>= 4.3.4)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Adyen:
Package | Downloads |
---|---|
APF.Core.Transactions.Common
Package Description |
|
UFPayments
UFPayments seamlessly integrates Umbraco Forms with leading payment providers Mollie, Adyen and Stripe |
|
Vendr.Contrib.PaymentProviders.Adyen
Adyen payment provider for Vendr, the eCommerce package for Umbraco |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
23.0.0 | 369 | 11/5/2024 |
22.0.0 | 2,966 | 10/22/2024 |
21.0.0 | 11,679 | 10/7/2024 |
20.0.0 | 11,887 | 9/10/2024 |
19.1.0 | 13,712 | 8/29/2024 |
19.0.0 | 4,248 | 8/22/2024 |
18.0.0 | 30,304 | 7/18/2024 |
17.0.0 | 19,254 | 7/4/2024 |
16.2.0 | 9,698 | 6/21/2024 |
16.1.0 | 11,941 | 5/30/2024 |
16.0.0 | 2,215 | 5/24/2024 |
15.0.0 | 14,558 | 5/2/2024 |
14.4.0 | 33,227 | 4/11/2024 |
14.3.0 | 6,969 | 4/4/2024 |
14.2.1 | 11,184 | 3/28/2024 |
14.1.0 | 42,443 | 2/29/2024 |
14.0.1 | 10,306 | 2/15/2024 |
14.0.0 | 12,017 | 1/30/2024 |
13.2.0 | 64,488 | 12/19/2023 |
13.1.0 | 10,309 | 12/11/2023 |
13.0.0 | 94,434 | 11/7/2023 |
12.0.0 | 8,132 | 10/23/2023 |
11.2.1 | 12,062 | 10/9/2023 |
11.2.0 | 13,511 | 9/26/2023 |
11.1.2 | 16,747 | 9/13/2023 |
11.1.1 | 1,066 | 9/11/2023 |
11.1.0 | 6,632 | 8/28/2023 |
11.0.1 | 2,367 | 8/22/2023 |
11.0.0 | 14,261 | 8/7/2023 |
10.1.0 | 42,698 | 6/9/2023 |
10.0.0 | 45,671 | 5/12/2023 |
10.0.0-beta | 3,375 | 3/16/2023 |
9.2.3 | 4,562 | 3/29/2024 |
9.2.2 | 127 | 3/28/2024 |
9.2.1 | 107,340 | 4/5/2023 |
9.2.0 | 113,399 | 2/2/2023 |
9.1.0 | 254,995 | 9/21/2022 |
9.0.0 | 125,416 | 6/8/2022 |
8.2.0 | 137,456 | 4/12/2022 |
8.1.0 | 166,724 | 1/12/2022 |
8.0.1 | 73,584 | 10/19/2021 |
8.0.0 | 2,783 | 10/8/2021 |
7.3.0 | 6,392 | 10/4/2021 |
7.2.0 | 133,816 | 7/8/2021 |
7.1.0 | 61,929 | 5/12/2021 |
7.0.0 | 11,179 | 4/22/2021 |
6.1.0 | 126,799 | 1/27/2021 |
6.0.0 | 15,926 | 1/8/2021 |
5.7.0 | 119,020 | 9/25/2020 |
5.6.0 | 82,797 | 8/20/2020 |
5.5.0 | 60,037 | 6/25/2020 |
5.4.0 | 22,596 | 5/29/2020 |
5.3.0 | 60,116 | 4/1/2020 |
5.2.1 | 41,691 | 3/16/2020 |
5.2.0 | 15,999 | 2/19/2020 |
5.1.0 | 10,859 | 1/31/2020 |
5.0.0 | 30,992 | 1/15/2020 |
4.0.0 | 7,600 | 1/6/2020 |
3.5.0 | 36,334 | 11/13/2019 |
3.4.0 | 17,922 | 10/2/2019 |
3.3.0 | 16,980 | 8/30/2019 |
3.2.3 | 10,625 | 8/8/2019 |
3.2.2 | 1,698 | 8/7/2019 |
3.2.1 | 763 | 8/6/2019 |
3.2.0 | 810 | 8/1/2019 |
3.1.0 | 23,093 | 7/5/2019 |
3.0.2 | 2,656 | 6/20/2019 |
3.0.1 | 675 | 6/19/2019 |
3.0.0 | 1,670 | 6/13/2019 |