Search

Are you looking for test card numbers?

Would you like to contact support?

Developer-resource icon

Libraries

Adyen provides server-side libraries in several languages. We put the source for all our libraries, as well as example integrations, on our GitHub.

PHP

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 a client and set the credentials to the Adyen platform.

If you don't know your X-API-KEY, you can obtain it from the Customer Area, as described in How to get the API key.

For Test:

$client = new \Adyen\Client();
$client->setXApiKey("YOUR X-API-KEY");
$client->setEnvironment(\Adyen\Environment::TEST);

For Live:

When you want to process on the live environment, include your live URL prefix:

$client->setEnvironment(\Adyen\Environment::LIVE, "Your live URL prefix"); //Live environment

To make your first payment, follow the instructions on our API integration guide

Java

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 credentials to the Adyen platform.

If you don't know your X-API-KEY, you can obtain it from the Customer Area, as described in How to get the API key.

For Test:

Client client = new Client("Your X-API-KEY", Environment.TEST); //Test environment

For Live:

When you want to process on the live environment, include your live URL prefix:

Client client = new Client("Your X-API-KEY", Environment.LIVE, "Your live URL prefix"); //Live environment

To make your first payment, follow the instructions on our API integration guide

JavaScript

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 a client and set the credentials to the Adyen platform.
If you don't know your X-API-KEY, you can obtain it from the Customer Area, as described in How to get the API key.

For Test:

const client = new Client({apiKey: [YOUR_API_KEY], environment: 'TEST'});`

For Live:

When you want to process on the live environment, include your live URL prefix:

const client = new Client({apiKey: [YOUR_API_KEY], environment: 'LIVE', liveEndpointUrlPrefix: 'YOUR_LIVE_ENDPOINT_PREFIX'});

To make your first payment, follow the instructions on our API integration guide

Ruby

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 a client and set the credentials to the Adyen platform.

If you don't know your X-API-KEY, you can obtain it from the Customer Area, as described in How to get the API key.

For Test:

require 'adyen'

adyen = Adyen::Client.new 
adyen.api_key = "YOUR X-API-KEY"
adyen.env = :test # Test environment

For Live:

When you want to process on the live environment, include your live URL prefix:

adyen.env = :live # Live environment
adyen.live_url_prefix = "Your live URL prefix"

To make your first payment, follow the instructions on our API integration guide

C#

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 a client and set the credentials to the Adyen platform.

If you don't know your X-API-KEY, you can obtain it from the Customer Area, as described in How to get the API key.

For Test:

var client = new Client ("YOUR-X-API-KEY", Adyen.Model.Enum.Environment.Test); // Test Environment

For Live:

When you want to process on the live environment, include your live URL prefix:

var client = new Client ("YOUR X-API-KEY", Adyen.Model.Enum.Environment.Live, "Your live URL prefix"); //Live environment

To make your first payment, follow the instructions on our API integration guide

Python

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 a client and set the credentials to the Adyen platform.

If you don't know your X-API-KEY, you can obtain it from the Customer Area, as described in How to get the API key.

For Test:

ady = Adyen.Adyen()
client = ady.client
client.xapikey = "YOUR X-API-KEY"
client.platform = "test"

For Live:

When you want to process on the live environment, include your live URL prefix:

client.xapikey = "YOUR X-API-KEY"
client.platform = "live"
client.live_endpoint_prefix= "Your live URL prefix" 

To make your first payment, follow the instructions on our API integration guide

Next steps