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.
Make a test payment with encrypted card details
curl https://checkout-test.adyen.com/v70/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.}YOUR_MERCHANT_ACCOUNT{/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 provide server-side API libraries in several languages. Because the libraries are connected to managed package systems (Composer, Gradle, Maven, npm, NuGet, PyPi, RubyGems) they are easy to include in your project. Installing a library is not required, but will save you development time, because a library:

  • Uses an API version that is up to date.
  • Has generated models to help you construct requests.
  • Sends the request to Adyen using its built-in HTTP client, so you don't have to create your own.
Try our example integration

Requirements

  • Ruby 2.3 or higher.

Installation

You can use RubyGems:

Install the API library
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 that you use for the API requests to Adyen and make a test payment request. For example, to make a test credit card payment for 10 EUR (1000 in minor units):

Make a test payment request using the API library
require 'adyen'

# Set up the client.

adyen = Adyen::Client.new
adyen.api_key = "YOUR_API_KEY"
adyen.env = :test 

# Make a test POST /payments request.

response = adyen.checkout.payments({
    :paymentMethod => {
        :type => "scheme",
        :encryptedCardNumber => "test_4111111111111111",
        :encryptedExpiryMonth => "test_03",
        :encryptedExpiryYear => "test_2030",
        :encryptedSecurityCode => "test_737"
    },
    :amount => {
        :currency => 'EUR',
        :value => 1000
    },
    :reference => "YOUR_ORDER_REFERENCE",
    :returnUrl => "https://your-company.com/checkout?shopperOrder=12xy..",
    :merchantAccount => 'YOUR_MERCHANT_ACCOUNT'
})

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: