Are you looking for test card numbers?

Would you like to contact support?

Default 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: Create a test account

Get started with Adyen by creating a free test account. Your test account gives you access to the test Customer Area, which is a unified dashboard where you can manage your Adyen integration across regions and currencies.

When you sign up, you 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.
A test account lets you try out Adyen's integrations, but does not guarantee that you will be able to process live payments.

Based on your country of business, we enable some popular payment methods for your account. You can enable more payment methods at any time.

To learn more about the steps needed to accept live payments, see the Get started with Adyen guide.

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 Developers > API credentials, and select the API credential username for your integration, for example ws@Company.[YourCompanyAccount].
  3. Under Server settings > Authentication select the API key tab.
  4. Select Generate API key.
  5. Select the copy icon and store your API key securely in your system.
  6. Select Save changes.

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.
curl https://checkout-test.adyen.com/v69/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.

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: