This page guides you through setting up an Adyen account, making an API request for your first test payment, and installing one of our server-side libraries.
After these steps, you're ready to start building your integration.
Step 1: Sign up for a test account
You can sign up for a test account here: https://www.adyen.com/signup
A test account allows you to access the test Customer Area, a unified back end for managing your Adyen account across different channels, regions, and currencies.
When signing up, you'll get:
- One company account, YourCompany: This represents your core business entity with us.
- One merchant account, YourCompanyECOM: This is where your transactions are processed, and where you receive the payout of funds. If needed for your business, you can create additional merchant accounts.
Based on your country of business, we'll enable some popular payment methods for your account. You can enable more payment methods at any time.
Step 2: Get your API key
To submit payments to Adyen, you'll be making API requests that are authenticated with an API key. To generate your API Key:
- Log in to your Customer Area.
- Go to Account > API credentials, and select the credential for your integration, for example ws@Company.[YourCompanyAccount].
- Under Authentication, select Generate New API Key.
- Copy and securely store the API key in your system — you won't be able to restore it later.
If your API key is lost or compromised, you need to generate a new one. - Select Save at the bottom of the page.
Step 3: Make a test payment
To verify that your account is working correctly, let's make a test credit card payment for 10 EUR (1000 in minor units):
- In the code below, replace
YOUR_API_KEY
with your API key, andYourCompanyECOM
with the name of your merchant account. Make sure that you don't change the values of the encrypted fields — the request only works with the specific values below. - Copy the resulting code into your command line, and run the command.
curl https://checkout-test.adyen.com/v66/payments \
-H 'x-api-key: {hint:Your API key from your Customer Area}YOUR_API_KEY{/hint}' \
-H 'content-type: application/json' \
-d '{
"merchantAccount": "{hint:Name of your merchant account}YourCompanyECOM{/hint}",
"reference": "My first Adyen test payment",
"amount": {
"value": {hint:10 euros in minor units}1000{/hint},
"currency": "EUR"
},
"paymentMethod": {
"type": "scheme",
"encryptedCardNumber": "test_4111111111111111",
"encryptedExpiryMonth": "test_03",
"encryptedExpiryYear": "test_2030",
"encryptedSecurityCode": "test_737"
}
}'
If your account is set up correctly, you receive a response containing:
resultCode
: Authorised
You have just made a successful test credit card payment of 10 EUR!
The transaction will also show up in your Customer Area, under Transactions > Payments.
Step 4: Install a library
We recommend that you use one of our server-side libraries to connect with the Adyen APIs. This allows you to:
All our libraries are open-source and available on GitHub.
- Always use an API version that is up to date.
- Construct the right endpoints for communicating with the Adyen APIs.
The Java, C#, Go, and Node libraries also include generated models that you can use to generate API requests more easily.
All our libraries are connected to managed package systems, so they're easy to include in your project.
Requirements
- Ruby 2.3 or higher.
Installation
You can use ruby gems:
gem install adyen-ruby-api-library
Alternatively, you can download the release on GitHub.
Run bundle install
to install dependencies.
Using the library
Set up the client as a singleton resource; you'll use it for the API calls that you make to Adyen:
require 'adyen'
adyen = Adyen::Client.new
adyen.api_key = "YOUR X-API-KEY"
adyen.env = :test # Test environment
Recommended: Clone our example integration
For a closer look at how our Ruby library works, clone our Ruby on Rails example integration. This includes commented code, highlighting key features and concepts, and examples of API calls that can be made using the library.
Requirements
- Java 7 or higher.
Installation
You can use Maven, adding this dependency to your project's POM.
<dependency>
<groupId>com.adyen</groupId>
<artifactId>adyen-java-api-library</artifactId>
<version>LATEST_VERSION</version>
</dependency>
You can find the latest version version on GitHub, Alternatively, you can download the release on GitHub.
Using the library
Set up a client, and set the X-API-KEY
to your API key.
Client client = new Client("Your X-API-KEY", Environment.TEST); //Test environment
Recommended: Clone our example integration
For a closer look at how our Java library works, clone our Java/SparkJava example integration. This includes commented code, highlighting key features and concepts, and examples of API calls that can be made using the library.
Requirements
- PHP 5.6 or later.
- Curl with SSL support.
- The JSON PHP extension.
Installation
You can use Composer. Follow the installation instructions if you do not already have composer installed.
composer require adyen/php-api-library
In your PHP script, make sure you include the autoloader:
require __DIR__ . '/vendor/autoload.php';
Alternatively, you can download the release on GitHub.
Using the library
Set up the client as a singleton resource; you'll use it for the API calls that you make to Adyen:
$client = new \Adyen\Client();
$client->setEnvironment(\Adyen\Environment::TEST);
$client->setXApiKey("YOUR API KEY");
Recommended: Clone our example integration
For a closer look at how our PHP library works, clone our Laravel example integration. This includes commented code, highlighting key features and concepts, and examples of API calls that can be made using the library.
Requirements
- Python 2.7 or 3.6
- Packages: Requests or PycURL (optional)
Installation
You can use pip:
pip install Adyen
Alternatively, you can download the release on GitHub.
Using the library
Set up the client as a singleton resource; you'll use it for the API calls that you make to Adyen:
import Adyen
ady = Adyen.Adyen()
ady.payment.client.platform = "test"
ady.payment.client.xapikey = "YOUR-API-KEY"
Recommended: Clone our example integration
For a closer look at how our Python library works, clone our Python/Flask example integration. This includes commented code, highlighting key features and concepts, and examples of API calls that can be made using the library.
Requirements
- .NET standard 2.0.
Installation
You can use NuGet:
PM> Install-Package Adyen
Alternatively, you can download the release on GitHub.
Using the library
Set up the client as a singleton resource; you'll use it for the API calls that you make to Adyen:
var client = new Client ("YOUR-X-API-KEY", Adyen.Model.Enum.Environment.Test); // Test Environment
Requirements
- Node 8.0 or higher.
Installation
You can use npm:
npm install @adyen/api-library
Alternatively, you can download the release on GitHub.
Using the library
Set up the client as a singleton resource; you'll use it for the API calls that you make to Adyen:
const client = new Client({apiKey: [YOUR_API_KEY], environment: 'TEST'});
Recommended: Clone our example integration
For a closer look at how our Node library works, clone our example Node/Express or React/Express integrations. These include commented code, highlighting key features and concepts, and examples of API calls that can be made using the library.
Requirements
- Go 1.13 or higher.
Installation
You can use Go modules:
go get github.com/adyen/adyen-go-api-library/v2
Alternatively, you can download the release on GitHub.
Using the library
Set up the client as a singleton resource; you'll use it for the API calls that you make to Adyen:
import (
"github.com/adyen/adyen-go-api-library/v2/src/adyen"
"github.com/adyen/adyen-go-api-library/v2/src/common"
)
client := adyen.NewClient(&common.Config{
ApiKey: "YOUR-API-KEY",
Environment: common.TestEnv,
})
Next steps
You're now ready to start building your online payments integration.
To learn more about the available integration options, go to Online payments.
For a detailed integration guide, select an integration below: