Search

Are you looking for test card numbers?

Would you like to contact support?

Online-payment icon

Get started

Set up your Adyen account and make a test payment.

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:

  1. Log in to your Customer Area.
  2. Go to Account > Users, and select the user ws@Company.[YourCompanyAccount].
  3. Under Authentication, click Generate New API Key
  4. Copy and securely store the API key in your system — you won't be able to restore it later.
  5. Click 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):

  1. In the code below, replace YOUR_API_KEY with your API key, and YourCompanyECOM 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.
  2. Copy the resulting code into your command line, and run the command.

    The command uses jq to pretty-print the response, so make sure you have it installed, or remove the | jq '.' from the code.

curl https://checkout-test.adyen.com/v52/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"
  }
}'| jq '.'

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 the latest API version.
  • Construct the right endpoints for communicating with the Adyen APIs.

The Java, C#, 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.1 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.3 or higher.
  • 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");

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.

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 your integration below: