{"title":"Libraries","category":"default","creationDate":1684483080,"content":"<p>We provide server-side API libraries in several languages. Libraries are connected to managed package systems (Composer, Gradle, Maven, npm, NuGet, PyPi, RubyGems), which make them easy to include in your project.<\/p>\n<h2>How it works<\/h2>\n<p>Installing a library is not required, but will save you development time, because a library:<\/p>\n<ul>\n<li>\n<p>Uses an API version that is up to date.<\/p>\n<\/li>\n<li>\n<p>Has generated models to help you construct requests.<\/p>\n<p>For a point-of-sale integration with Terminal API, the libraries are wrappers around Terminal API. They include the models to create Terminal API requests.<\/p>\n<ul>\n<li>If your Terminal API integration uses cloud communications, you can use the C#, Go, Java, Node, PHP, or Ruby  libraries.<\/li>\n<li>\n<p>If your Terminal API integration uses local communications, you can use the C#, Java, or Node libraries. These also take care of <a href=\"\/point-of-sale\/design-your-integration\/choose-your-architecture\/local#protect-communications\">protecting local communications<\/a>.<\/p>\n<!-- list separator -->\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Sends the request to Adyen using its built-in HTTP client, so you do not have to create your own.<\/p>\n<\/li>\n<\/ul>\n<!-- list separator -->\n<p>For your library of choice:<\/p>\n<ol>\n<li>Make sure to comply with the requirements.<\/li>\n<li>Install the library.<\/li>\n<li>Make a test payment request, as described <a href=\"#libraries\">below<\/a>.<\/li>\n<\/ol>\n<h2 id=\"libraries\">Available libraries<\/h2>\n\n<div id=\"tabWxaeO\">\n    <div data-component-wrapper=\"tabs\">\n        <tabs\n                        :items=\"[{&quot;title&quot;:&quot;Java&quot;,&quot;content&quot;:&quot;\\n&lt;div class=\\&quot;additional-info-block output-inline\\&quot;&gt;\\n&lt;h5 class=\\&quot;article__heading additional-info-block__title\\&quot;&gt;Try our example integration&lt;\\\/h5&gt;&lt;div class=\\&quot;additional-info-block__body\\&quot;&gt;&lt;p&gt;&lt;img alt=\\&quot;\\&quot; src=\\&quot;\\\/user\\\/pages\\\/reuse\\\/development-resources\\\/api-libraries\\\/gitpod-icon.png\\&quot; \\\/&gt;&amp;nbsp;&amp;nbsp;&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/adyen-examples\\\/adyen-java-spring-online-payments#checkout-example\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Run it in Gitpod&lt;\\\/a&gt;. &lt;br&gt;&lt;img alt=\\&quot;\\&quot; src=\\&quot;\\\/user\\\/pages\\\/reuse\\\/development-resources\\\/api-libraries\\\/github-icon.png\\&quot; \\\/&gt;&amp;nbsp;&amp;nbsp;&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/adyen-examples\\\/adyen-java-spring-online-payments\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Clone the repository&lt;\\\/a&gt;.&lt;\\\/p&gt;&lt;\\\/div&gt;&lt;\\\/div&gt;\\n\\n&lt;h4&gt;Requirements&lt;\\\/h4&gt;\\n&lt;ul&gt;\\n&lt;li&gt;Java 11 or later.&lt;\\\/li&gt;\\n&lt;\\\/ul&gt;\\n&lt;h4&gt;Installation&lt;\\\/h4&gt;\\n&lt;p&gt;You can use &lt;a href=\\&quot;https:\\\/\\\/maven.apache.org\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Maven&lt;\\\/a&gt;, adding this dependency to your project&#039;s POM.&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Add the API library&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;xml\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;&amp;lt;dependency&amp;gt;\\\\n  &amp;lt;groupId&amp;gt;com.adyen&amp;lt;\\\\\\\/groupId&amp;gt;\\\\n  &amp;lt;artifactId&amp;gt;adyen-java-api-library&amp;lt;\\\\\\\/artifactId&amp;gt;\\\\n  &amp;lt;version&amp;gt;LATEST_VERSION&amp;lt;\\\\\\\/version&amp;gt;\\\\n&amp;lt;\\\\\\\/dependency&amp;gt;\\&quot;}]&#039; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&lt;p&gt;You can find the latest version on GitHub. Alternatively, you can download the &lt;a href=\\&quot;https:\\\/\\\/github.com\\\/Adyen\\\/adyen-java-api-library\\\/releases\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;release on GitHub&lt;\\\/a&gt;.&lt;\\\/p&gt;\\n&lt;h4&gt;Using the library&lt;\\\/h4&gt;\\n&lt;p&gt;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 &lt;strong&gt;10&lt;\\\/strong&gt; EUR (&lt;strong&gt;1000&lt;\\\/strong&gt; in minor units):&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Make a test payment request using the API library&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;java\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;\\\\\\\/\\\\\\\/ Import the required classes\\\\nimport com.adyen.Client;\\\\nimport com.adyen.enums.Environment;\\\\nimport com.adyen.service.checkout.PaymentsApi;\\\\nimport com.adyen.model.checkout.*;\\\\n\\\\n\\\\\\\/\\\\\\\/ Setup the client and service.\\\\nClient client = new Client(\\\\\\&quot;ADYEN_API_KEY\\\\\\&quot;, Environment.TEST);\\\\nPaymentsApi paymentsApi = new PaymentsApi(client);\\\\n\\\\n\\\\\\\/\\\\\\\/ Create a payment request.\\\\nPaymentRequest paymentRequest = new PaymentRequest();\\\\npaymentRequest.setMerchantAccount(\\\\\\&quot;YOUR_MERCHANT_ACCOUNT\\\\\\&quot;);\\\\nCardDetails cardDetails = new CardDetails();\\\\n    cardDetails.encryptedCardNumber(\\\\\\&quot;test_4111111111111111\\\\\\&quot;)\\\\n        .encryptedSecurityCode(\\\\\\&quot;test_737\\\\\\&quot;)\\\\n        .encryptedExpiryMonth(\\\\\\&quot;test_03\\\\\\&quot;)\\\\n        .encryptedExpiryYear(\\\\\\&quot;test_2030\\\\\\&quot;);\\\\npaymentRequest.setPaymentMethod(new CheckoutPaymentMethod(cardDetails));\\\\nAmount amount = new Amount().currency(\\\\\\&quot;EUR\\\\\\&quot;).value(1000L);\\\\npaymentRequest.setAmount(amount);\\\\npaymentRequest.setReference(\\\\\\&quot;My first Adyen test payment with an API library\\\\\\\/SDK\\\\\\&quot;);\\\\npaymentRequest.setReturnUrl(\\\\\\&quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\\\&quot;);\\\\n\\\\n\\\\\\\/\\\\\\\/ Add your idempotency key.\\\\nRequestOptions requestOptions = new RequestOptions();\\\\nrequestOptions.setIdempotencyKey(\\\\\\&quot;YOUR_IDEMPOTENCY_KEY\\\\\\&quot;);\\\\n\\\\n\\\\\\\/\\\\\\\/ Make a request to the \\\\\\\/payments endpoint.\\\\nPaymentResponse paymentResponse = paymentsApi.payments(paymentRequest, requestOptions);\\&quot;}]&#039; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&quot;,&quot;altTitle&quot;:null,&quot;oldTabId&quot;:1,&quot;relation&quot;:&quot;&quot;},{&quot;title&quot;:&quot;PHP&quot;,&quot;content&quot;:&quot;\\n&lt;div class=\\&quot;additional-info-block output-inline\\&quot;&gt;\\n&lt;h5 class=\\&quot;article__heading additional-info-block__title\\&quot;&gt;Try our example integration&lt;\\\/h5&gt;&lt;div class=\\&quot;additional-info-block__body\\&quot;&gt;&lt;p&gt;&lt;img alt=\\&quot;\\&quot; src=\\&quot;\\\/user\\\/pages\\\/reuse\\\/development-resources\\\/api-libraries\\\/gitpod-icon.png\\&quot; \\\/&gt;&amp;nbsp;&amp;nbsp;&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/adyen-examples\\\/adyen-php-online-payments#run-this-integration-in-seconds-using-gitpod\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Run it in Gitpod&lt;\\\/a&gt;. &lt;br&gt;&lt;img alt=\\&quot;\\&quot; src=\\&quot;\\\/user\\\/pages\\\/reuse\\\/development-resources\\\/api-libraries\\\/github-icon.png\\&quot; \\\/&gt;&amp;nbsp;&amp;nbsp;&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/adyen-examples\\\/adyen-php-online-payments\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Clone the repository&lt;\\\/a&gt;.&lt;\\\/p&gt;&lt;\\\/div&gt;&lt;\\\/div&gt;\\n\\n&lt;h4&gt;Requirements&lt;\\\/h4&gt;\\n&lt;ul&gt;\\n&lt;li&gt;PHP 7.3 or later.&lt;\\\/li&gt;\\n&lt;li&gt;cURL with SSL support.&lt;\\\/li&gt;\\n&lt;li&gt;The JSON PHP extension.&lt;\\\/li&gt;\\n&lt;li&gt;The list of dependencies from the composer require list.&lt;\\\/li&gt;\\n&lt;\\\/ul&gt;\\n&lt;h4&gt;Installation&lt;\\\/h4&gt;\\n&lt;p&gt;You can use &lt;a href=\\&quot;https:\\\/\\\/getcomposer.org\\\/\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Composer&lt;\\\/a&gt;. Follow the &lt;a href=\\&quot;https:\\\/\\\/getcomposer.org\\\/doc\\\/00-intro.md\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;installation instructions&lt;\\\/a&gt; if you do not already have composer installed.&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Install the API library&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;bash\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;composer require adyen\\\\\\\/php-api-library\\&quot;}]&#039; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&lt;p&gt;In your PHP script, make sure you include the autoloader:&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Include the autoloader&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=\\&quot;[{&amp;quot;language&amp;quot;:&amp;quot;php&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;require __DIR__ . &#039;\\\\\\\/vendor\\\\\\\/autoload.php&#039;;&amp;quot;}]\\&quot; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&lt;p&gt;Alternatively, you can download the &lt;a href=\\&quot;https:\\\/\\\/github.com\\\/Adyen\\\/adyen-php-api-library\\\/releases\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;release on GitHub&lt;\\\/a&gt;.&lt;\\\/p&gt;\\n&lt;h4&gt;Using the library&lt;\\\/h4&gt;\\n&lt;p&gt;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 &lt;strong&gt;10&lt;\\\/strong&gt; EUR (&lt;strong&gt;1000&lt;\\\/strong&gt; in minor units):&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Make a test payment request using the API library&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=\\&quot;[{&amp;quot;language&amp;quot;:&amp;quot;php&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Set up the client and service.\\\\n\\\\n$client = new \\\\\\\\Adyen\\\\\\\\Client();\\\\n\\\\n$client-&amp;gt;setXApiKey(\\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;);\\\\n$client-&amp;gt;setEnvironment(\\\\\\\\Adyen\\\\\\\\Environment::TEST);\\\\n$client-&amp;gt;setTimeout(30);\\\\n\\\\n$service = new \\\\\\\\Adyen\\\\\\\\Service\\\\\\\\Checkout\\\\\\\\PaymentsApi($client);\\\\n\\\\n$requestOptions[&#039;idempotencyKey&#039;] = \\\\&amp;quot;YOUR_IDEMPOTENCY_KEY\\\\&amp;quot;;\\\\n\\\\n\\\\\\\/\\\\\\\/ Create a PaymentMethod object.\\\\n$paymentMethod = new CheckoutPaymentMethod();\\\\n$paymentMethod\\\\n    -&amp;gt;setType(\\\\&amp;quot;scheme\\\\&amp;quot;)\\\\n    -&amp;gt;setEncryptedCardNumber(\\\\&amp;quot;test_4111111111111111\\\\&amp;quot;)\\\\n    -&amp;gt;setEncryptedExpiryMonth(\\\\&amp;quot;test_03\\\\&amp;quot;)\\\\n    -&amp;gt;setEncryptedExpiryYear(\\\\&amp;quot;test_2030\\\\&amp;quot;)\\\\n    -&amp;gt;setEncryptedSecurityCode(\\\\&amp;quot;test_737\\\\&amp;quot;);\\\\n\\\\n\\\\\\\/\\\\\\\/ Create an Amount object.\\\\n$amount = new Amount();\\\\n$amount\\\\n    -&amp;gt;setValue(1500)\\\\n    -&amp;gt;setCurrency(\\\\&amp;quot;EUR\\\\&amp;quot;);\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the PaymentRequest object.\\\\n$paymentRequest = new PaymentRequest();\\\\n$paymentRequest\\\\n    -&amp;gt;setMerchantAccount(\\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;)\\\\n    -&amp;gt;setPaymentMethod($paymentMethod)\\\\n    -&amp;gt;setAmount($amount)\\\\n    -&amp;gt;setReference(\\\\&amp;quot;My first Adyen test payment with an API library\\\\\\\/SDK\\\\&amp;quot;)\\\\n    -&amp;gt;setReturnUrl(\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/...\\\\&amp;quot;);\\\\n\\\\n\\\\\\\/\\\\\\\/ Make a \\\\\\\/payments request.\\\\n$result = $service-&amp;gt;payments($paymentRequest, $requestOptions);&amp;quot;}]\\&quot; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&quot;,&quot;altTitle&quot;:null,&quot;oldTabId&quot;:1,&quot;relation&quot;:&quot;&quot;},{&quot;title&quot;:&quot;C#&quot;,&quot;content&quot;:&quot;\\n&lt;h4&gt;Requirements&lt;\\\/h4&gt;\\n&lt;ul&gt;\\n&lt;li&gt;.NET standard 2.0 or later.&lt;\\\/li&gt;\\n&lt;li&gt;For Terminal API certificate validation, set the application to either of the following:\\n&lt;ul&gt;\\n&lt;li&gt;.NET core 2.1 or later&lt;\\\/li&gt;\\n&lt;li&gt;.NET framework 4.6.1 or later&lt;\\\/li&gt;\\n&lt;\\\/ul&gt;&lt;\\\/li&gt;\\n&lt;\\\/ul&gt;\\n&lt;h4&gt;Installation&lt;\\\/h4&gt;\\n&lt;p&gt;You can use &lt;a href=\\&quot;https:\\\/\\\/www.nuget.org\\\/packages\\\/Adyen\\\/\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;NuGet&lt;\\\/a&gt;:&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Install the API library&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;bash\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;PM&amp;gt; Install-Package Adyen -Version LATEST_VERSION\\&quot;}]&#039; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&lt;p&gt;Alternatively, you can download the\\u00a0&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/Adyen\\\/adyen-dotnet-api-library\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;release on GitHub&lt;\\\/a&gt;.&lt;\\\/p&gt;\\n&lt;h4&gt;Using the library&lt;\\\/h4&gt;\\n&lt;p&gt;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 &lt;strong&gt;10&lt;\\\/strong&gt; EUR (&lt;strong&gt;1000&lt;\\\/strong&gt; in minor units):&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Make a test payment request using the API library&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;cs\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;using Adyen;\\\\nusing Adyen.Model.Checkout;\\\\nusing Adyen.Service;\\\\nusing Environment = Adyen.Model.Environment;\\\\n\\\\n\\\\\\\/\\\\\\\/ Create a paymentRequest object.\\\\nvar amount = new Amount(\\\\\\&quot;USD\\\\\\&quot;, 1000);\\\\nvar paymentRequest = new PaymentRequest\\\\n{\\\\n    Reference = \\\\\\&quot;My first Adyen test payment with an API library\\\\\\\/SDK\\\\\\&quot;,\\\\n    Amount = amount,\\\\n    ReturnUrl = @\\\\\\&quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/...\\\\\\&quot;,\\\\n    MerchantAccount = \\\\\\&quot;YOUR_MERCHANT_ACCOUNT\\\\\\&quot;,\\\\n};\\\\n\\\\n\\\\\\\/\\\\\\\/ Set up the client and service.\\\\nvar config = new Config\\\\n{\\\\n    XApiKey = \\\\\\&quot;ADYEN_API_KEY\\\\\\&quot;,\\\\n    Environment = Environment.Test\\\\n};\\\\nvar client = new Client(config);\\\\nvar checkout = new PaymentsService(client);\\\\n\\\\n\\\\\\\/\\\\\\\/ Add your idempotency key.\\\\nvar requestOptions = new RequestOptions { IdempotencyKey= \\\\\\&quot;YOUR_IDEMPOTENCY_KEY\\\\\\&quot; };\\\\n\\\\n\\\\\\\/\\\\\\\/ Make a \\\\\\\/payments request.\\\\nvar paymentResponse = checkout.Payments(paymentRequest, requestOptions);\\&quot;}]&#039; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&quot;,&quot;altTitle&quot;:null,&quot;oldTabId&quot;:1,&quot;relation&quot;:&quot;&quot;},{&quot;title&quot;:&quot;NodeJS&quot;,&quot;content&quot;:&quot;\\n&lt;div class=\\&quot;additional-info-block output-inline\\&quot;&gt;\\n&lt;h5 class=\\&quot;article__heading additional-info-block__title\\&quot;&gt;Try our example integration&lt;\\\/h5&gt;&lt;div class=\\&quot;additional-info-block__body\\&quot;&gt;&lt;p&gt;&lt;img alt=\\&quot;\\&quot; src=\\&quot;\\\/user\\\/pages\\\/reuse\\\/development-resources\\\/api-libraries\\\/gitpod-icon.png\\&quot; \\\/&gt;&amp;nbsp;&amp;nbsp;&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/adyen-examples\\\/adyen-node-online-payments#checkout-example\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Run it in Gitpod&lt;\\\/a&gt;. &lt;br&gt;&lt;img alt=\\&quot;\\&quot; src=\\&quot;\\\/user\\\/pages\\\/reuse\\\/development-resources\\\/api-libraries\\\/github-icon.png\\&quot; \\\/&gt;&amp;nbsp;&amp;nbsp;&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/adyen-examples\\\/adyen-node-online-payments\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Clone the repository&lt;\\\/a&gt;.&lt;\\\/p&gt;&lt;\\\/div&gt;&lt;\\\/div&gt;\\n\\n&lt;h4&gt;Requirements&lt;\\\/h4&gt;\\n&lt;ul&gt;\\n&lt;li&gt;Node.js version 18 or later.&lt;\\\/li&gt;\\n&lt;\\\/ul&gt;\\n&lt;h4&gt;Installation&lt;\\\/h4&gt;\\n&lt;p&gt;You can use &lt;a href=\\&quot;https:\\\/\\\/www.npmjs.com\\\/\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;npm&lt;\\\/a&gt;:&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Install the API library&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;bash\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;npm install --save @adyen\\\\\\\/api-library\\\\nnpm update @adyen\\\\\\\/api-library\\&quot;}]&#039; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&lt;p&gt;Alternatively, you can download the &lt;a href=\\&quot;https:\\\/\\\/github.com\\\/Adyen\\\/adyen-node-api-library\\\/releases\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;release on GitHub&lt;\\\/a&gt;.&lt;\\\/p&gt;\\n&lt;h4&gt;Using the library&lt;\\\/h4&gt;\\n&lt;p&gt;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 &lt;strong&gt;10&lt;\\\/strong&gt; EUR (&lt;strong&gt;1000&lt;\\\/strong&gt; in minor units):&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Make a test payment request using the API library&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=\\&quot;[{&amp;quot;language&amp;quot;:&amp;quot;js&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Step 1: Require the parts of the module you want to use.\\\\nconst { Client, CheckoutAPI} = require(&#039;@adyen\\\\\\\/api-library&#039;);\\\\n\\\\n\\\\\\\/\\\\\\\/ Step 2: Initialize the client object.\\\\nconst client = new Client({apiKey: \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;, environment: \\\\&amp;quot;TEST\\\\&amp;quot;});\\\\n\\\\n\\\\\\\/\\\\\\\/ Step 3: Initialize the API object.\\\\nconst checkoutApi = new CheckoutAPI(client);\\\\n\\\\n\\\\\\\/\\\\\\\/ Step 4: Create the request object.\\\\nconst paymentRequest = {\\\\n    amount: {\\\\n      currency: \\\\&amp;quot;USD\\\\&amp;quot;,\\\\n      value: 1000 \\\\\\\/\\\\\\\/ value in minor units\\\\n    },\\\\n    reference: \\\\&amp;quot;My first Adyen test payment with an API library\\\\\\\/SDK\\\\&amp;quot;,\\\\n    paymentMethod: {\\\\n      type: \\\\&amp;quot;scheme\\\\&amp;quot;,\\\\n      encryptedCardNumber: \\\\&amp;quot;test_4111111111111111\\\\&amp;quot;,\\\\n      encryptedExpiryMonth: \\\\&amp;quot;test_03\\\\&amp;quot;,\\\\n      encryptedExpiryYear: \\\\&amp;quot;test_2030\\\\&amp;quot;,\\\\n      encryptedSecurityCode: \\\\&amp;quot;test_737\\\\&amp;quot;\\\\n    },\\\\n    shopperReference: \\\\&amp;quot;YOUR_SHOPPER_REFERENCE\\\\&amp;quot;,\\\\n    storePaymentMethod: true,\\\\n    shopperInteraction: \\\\&amp;quot;Ecommerce\\\\&amp;quot;,\\\\n    recurringProcessingModel: \\\\&amp;quot;CardOnFile\\\\&amp;quot;,\\\\n    returnUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/...\\\\&amp;quot;,\\\\n    merchantAccount: \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;\\\\n};\\\\n\\\\n\\\\\\\/\\\\\\\/ Optional: Add your idempotency key.\\\\nconst requestOptions = { idempotencyKey: \\\\&amp;quot;YOUR_IDEMPOTENCY_KEY\\\\&amp;quot; };\\\\n\\\\n\\\\\\\/\\\\\\\/ Step 5: Make a \\\\\\\/payments request.\\\\ncheckoutApi.PaymentsApi.payments(paymentRequest, requestOptions)\\\\n  .then(paymentResponse =&amp;gt; console.log(paymentResponse.pspReference))\\\\n  .catch(error =&amp;gt; console.log(error));&amp;quot;}]\\&quot; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&quot;,&quot;altTitle&quot;:null,&quot;oldTabId&quot;:1,&quot;relation&quot;:&quot;&quot;},{&quot;title&quot;:&quot;Go&quot;,&quot;content&quot;:&quot;\\n&lt;div class=\\&quot;additional-info-block output-inline\\&quot;&gt;\\n&lt;h5 class=\\&quot;article__heading additional-info-block__title\\&quot;&gt;Try our example integration&lt;\\\/h5&gt;&lt;div class=\\&quot;additional-info-block__body\\&quot;&gt;&lt;p&gt;&lt;img alt=\\&quot;\\&quot; src=\\&quot;\\\/user\\\/pages\\\/reuse\\\/development-resources\\\/api-libraries\\\/gitpod-icon.png\\&quot; \\\/&gt;&amp;nbsp;&amp;nbsp;&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/adyen-examples\\\/adyen-golang-online-payments#run-this-integration-in-seconds-using-gitpod\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Run it in Gitpod&lt;\\\/a&gt;. &lt;br&gt;&lt;img alt=\\&quot;\\&quot; src=\\&quot;\\\/user\\\/pages\\\/reuse\\\/development-resources\\\/api-libraries\\\/github-icon.png\\&quot; \\\/&gt;&amp;nbsp;&amp;nbsp;&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/adyen-examples\\\/adyen-golang-online-payments\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Clone the repository&lt;\\\/a&gt;.&lt;\\\/p&gt;&lt;\\\/div&gt;&lt;\\\/div&gt;\\n\\n&lt;h4&gt;Requirements&lt;\\\/h4&gt;\\n&lt;ul&gt;\\n&lt;li&gt;Go 1.13 or later.&lt;\\\/li&gt;\\n&lt;\\\/ul&gt;\\n&lt;h4&gt;Installation&lt;\\\/h4&gt;\\n&lt;p&gt;You can use\\u00a0&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/golang\\\/go\\\/wiki\\\/Modules\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Go modules&lt;\\\/a&gt;:&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Install the API library&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;shell\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;go get github.com\\\\\\\/adyen\\\\\\\/adyen-go-api-library\\\\\\\/v7\\&quot;}]&#039; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&lt;p&gt;Alternatively, you can download the\\u00a0&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/Adyen\\\/adyen-go-api-library\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;release on GitHub&lt;\\\/a&gt;.&lt;\\\/p&gt;\\n&lt;h4&gt;Using the library&lt;\\\/h4&gt;\\n&lt;p&gt;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 &lt;strong&gt;10&lt;\\\/strong&gt; EUR (&lt;strong&gt;1000&lt;\\\/strong&gt; in minor units):&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Make a test payment request using the API library&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;go\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;import (\\\\n    \\\\\\&quot;context\\\\\\&quot;\\\\n    \\\\\\&quot;fmt\\\\\\&quot;\\\\n\\\\t\\\\\\&quot;github.com\\\\\\\/adyen\\\\\\\/adyen-go-api-library\\\\\\\/v7\\\\\\\/src\\\\\\\/checkout\\\\\\&quot;\\\\n\\\\t\\\\\\&quot;github.com\\\\\\\/adyen\\\\\\\/adyen-go-api-library\\\\\\\/v7\\\\\\\/src\\\\\\\/common\\\\\\&quot;\\\\n\\\\t\\\\\\&quot;github.com\\\\\\\/adyen\\\\\\\/adyen-go-api-library\\\\\\\/v7\\\\\\\/src\\\\\\\/adyen\\\\\\&quot;\\\\n)\\\\n\\\\n\\\\\\\/\\\\\\\/ Create a payment object.\\\\n\\\\nfunc ExamplePaymentWithIdempotencyKey() {\\\\n    client := adyen.NewClient(&amp;amp;common.Config{\\\\n    ApiKey:      \\\\\\&quot;ADYEN_API_KEY\\\\\\&quot;,\\\\n    Environment: common.TestEnv,\\\\n    Debug:       true,\\\\n})\\\\n\\\\nservice := client.Checkout()\\\\n\\\\ncard := checkout.NewCardDetails()\\\\ncard.SetEncryptedCardNumber(\\\\\\&quot;test_4111111111111111\\\\\\&quot;)\\\\ncard.SetEncryptedExpiryMonth(\\\\\\&quot;test_03\\\\\\&quot;)\\\\ncard.SetEncryptedExpiryYear(\\\\\\&quot;test_2030\\\\\\&quot;)\\\\ncard.SetEncryptedSecurityCode(\\\\\\&quot;test_737\\\\\\&quot;)\\\\n\\\\n\\\\\\\/\\\\\\\/ Create a payment request.\\\\nreq := service.PaymentsApi.PaymentsInput().PaymentRequest(checkout.PaymentRequest{\\\\n    Amount:          *checkout.NewAmount(\\\\\\&quot;EUR\\\\\\&quot;, int64(1000)),\\\\n    MerchantAccount: \\\\\\&quot;YOUR_MERCHANT_ACCOUNT\\\\\\&quot;,\\\\n    PaymentMethod:   checkout.CardDetailsAsCheckoutPaymentMethod(card),\\\\n    Reference:       \\\\\\&quot;My first Adyen test payment with an API library\\\\\\\/SDK\\\\\\&quot;,\\\\n    ReturnUrl:       \\\\\\&quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/...\\\\\\&quot;,\\\\n})\\\\n\\\\n\\\\\\\/\\\\\\\/ Add your idempotency key.\\\\nreq = req.IdempotencyKey(\\\\\\&quot;YOUR_IDEMPOTENCY_KEY\\\\\\&quot;)\\\\n\\\\nres, httpRes, err := service.PaymentsApi.Payments(context.Background(), req)\\\\n\\\\nfmt.Println(res, httpRes, err)\\\\n}\\&quot;}]&#039; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&quot;,&quot;altTitle&quot;:null,&quot;oldTabId&quot;:1,&quot;relation&quot;:&quot;&quot;},{&quot;title&quot;:&quot;Python&quot;,&quot;content&quot;:&quot;\\n&lt;div class=\\&quot;additional-info-block output-inline\\&quot;&gt;\\n&lt;h5 class=\\&quot;article__heading additional-info-block__title\\&quot;&gt;Try our example integration&lt;\\\/h5&gt;&lt;div class=\\&quot;additional-info-block__body\\&quot;&gt;&lt;p&gt;&lt;img alt=\\&quot;\\&quot; src=\\&quot;\\\/user\\\/pages\\\/reuse\\\/development-resources\\\/api-libraries\\\/gitpod-icon.png\\&quot; \\\/&gt;&amp;nbsp;&amp;nbsp;&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/adyen-examples\\\/adyen-python-online-payments#run-this-integration-in-seconds-using-gitpod\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Run it in Gitpod&lt;\\\/a&gt;. &lt;br&gt;&lt;img alt=\\&quot;\\&quot; src=\\&quot;\\\/user\\\/pages\\\/reuse\\\/development-resources\\\/api-libraries\\\/github-icon.png\\&quot; \\\/&gt;&amp;nbsp;&amp;nbsp;&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/adyen-examples\\\/adyen-python-online-payments\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Clone the repository&lt;\\\/a&gt;.&lt;\\\/p&gt;&lt;\\\/div&gt;&lt;\\\/div&gt;\\n\\n&lt;h4&gt;Requirements&lt;\\\/h4&gt;\\n&lt;ul&gt;\\n&lt;li&gt;Python 3.6 or later.&lt;\\\/li&gt;\\n&lt;li&gt;(Optional) Packages: Requests or PycURL&lt;\\\/li&gt;\\n&lt;\\\/ul&gt;\\n&lt;h4&gt;Installation&lt;\\\/h4&gt;\\n&lt;p&gt;You can use\\u00a0&lt;a href=\\&quot;https:\\\/\\\/pip.pypa.io\\\/en\\\/stable\\\/\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;pip&lt;\\\/a&gt;:&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Install the API library&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;py\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;pip install Adyen\\&quot;}]&#039; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&lt;p&gt;Alternatively, you can download the\\u00a0&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/Adyen\\\/adyen-python-api-library\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;release on GitHub&lt;\\\/a&gt;.&lt;\\\/p&gt;\\n&lt;h4&gt;Using the library&lt;\\\/h4&gt;\\n&lt;p&gt;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 &lt;strong&gt;10&lt;\\\/strong&gt; EUR (&lt;strong&gt;1000&lt;\\\/strong&gt; in minor units):&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Make a test payment request using the API library&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;py\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;import Adyen\\\\n\\\\nadyen = Adyen.Adyen()\\\\n\\\\nadyen.payment.client.xapikey = \\\\\\&quot;ADYEN_API_KEY\\\\\\&quot;\\\\nadyen.payment.client.platform = \\\\\\&quot;test\\\\\\&quot;  # Change the value to live for the live environment.\\\\n\\\\nrequest = {\\\\n      \\\\\\&quot;amount\\\\\\&quot;: {\\\\n        \\\\\\&quot;currency\\\\\\&quot;: \\\\\\&quot;USD\\\\\\&quot;,\\\\n        \\\\\\&quot;value\\\\\\&quot;: 1000 # Value in minor units.\\\\n      },\\\\n      \\\\\\&quot;reference\\\\\\&quot;: \\\\\\&quot;My first Adyen test payment with an API library\\\\\\\/SDK\\\\\\&quot;,\\\\n      \\\\\\&quot;paymentMethod\\\\\\&quot;: {\\\\n        \\\\\\&quot;type\\\\\\&quot;: \\\\\\&quot;visa\\\\\\&quot;,\\\\n        \\\\\\&quot;encryptedCardNumber\\\\\\&quot;: \\\\\\&quot;test_4111111111111111\\\\\\&quot;,\\\\n        \\\\\\&quot;encryptedExpiryMonth\\\\\\&quot;: \\\\\\&quot;test_03\\\\\\&quot;,\\\\n        \\\\\\&quot;encryptedExpiryYear\\\\\\&quot;: \\\\\\&quot;test_2030\\\\\\&quot;,\\\\n        \\\\\\&quot;encryptedSecurityCode\\\\\\&quot;: \\\\\\&quot;test_737\\\\\\&quot;\\\\n      },\\\\n      \\\\\\&quot;shopperReference\\\\\\&quot;: \\\\\\&quot;YOUR_SHOPPER_REFERENCE\\\\\\&quot;,\\\\n      \\\\\\&quot;returnUrl\\\\\\&quot;: \\\\\\&quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/...\\\\\\&quot;,\\\\n      \\\\\\&quot;merchantAccount\\\\\\&quot;: \\\\\\&quot;YOUR_MERCHANT_ACCOUNT\\\\\\&quot;\\\\n    }\\\\n\\\\nresult = adyen.checkout.payments_api.payments(request, idempotency_key=\\\\\\&quot;YOUR_IDEMPOTENCY_KEY\\\\\\&quot;)\\&quot;}]&#039; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&quot;,&quot;altTitle&quot;:null,&quot;oldTabId&quot;:1,&quot;relation&quot;:&quot;&quot;},{&quot;title&quot;:&quot;Ruby&quot;,&quot;content&quot;:&quot;\\n&lt;div class=\\&quot;additional-info-block output-inline\\&quot;&gt;\\n&lt;h5 class=\\&quot;article__heading additional-info-block__title\\&quot;&gt;Try our example integration&lt;\\\/h5&gt;&lt;div class=\\&quot;additional-info-block__body\\&quot;&gt;&lt;p&gt;&lt;img alt=\\&quot;\\&quot; src=\\&quot;\\\/user\\\/pages\\\/reuse\\\/development-resources\\\/api-libraries\\\/gitpod-icon.png\\&quot; \\\/&gt;&amp;nbsp;&amp;nbsp;&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/adyen-examples\\\/adyen-rails-online-payments#run-this-integration-in-seconds-using-gitpod\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Run it in Gitpod&lt;\\\/a&gt;. &lt;br&gt;&lt;img alt=\\&quot;\\&quot; src=\\&quot;\\\/user\\\/pages\\\/reuse\\\/development-resources\\\/api-libraries\\\/github-icon.png\\&quot; \\\/&gt;&amp;nbsp;&amp;nbsp;&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/adyen-examples\\\/adyen-rails-online-payments\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Clone the repository&lt;\\\/a&gt;.&lt;\\\/p&gt;&lt;\\\/div&gt;&lt;\\\/div&gt;\\n\\n&lt;h4&gt;Requirements&lt;\\\/h4&gt;\\n&lt;ul&gt;\\n&lt;li&gt;Ruby 2.7 or later.&lt;\\\/li&gt;\\n&lt;\\\/ul&gt;\\n&lt;h4&gt;Installation&lt;\\\/h4&gt;\\n&lt;p&gt;You can use &lt;a href=\\&quot;https:\\\/\\\/rubygems.org\\\/\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;RubyGems&lt;\\\/a&gt;:&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Install the API library&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;bash\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;gem install adyen-ruby-api-library\\&quot;}]&#039; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&lt;p&gt;Alternatively, you can download the &lt;a href=\\&quot;https:\\\/\\\/github.com\\\/Adyen\\\/adyen-ruby-api-library\\\/releases\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;release on GitHub&lt;\\\/a&gt;.&lt;\\\/p&gt;\\n&lt;p&gt;Run &lt;code&gt;bundle install&lt;\\\/code&gt; to install dependencies.&lt;\\\/p&gt;\\n&lt;h4&gt;Using the library&lt;\\\/h4&gt;\\n&lt;p&gt;Set up the client as a singleton resource that you use for the API requests:&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Set up the API library client&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=\\&quot;[{&amp;quot;language&amp;quot;:&amp;quot;ruby&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;require &#039;adyen-ruby-api-library&#039;\\\\n\\\\nadyen = Adyen::Client.new\\\\nadyen.api_key = \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;\\\\nheaders = {\\\\&amp;quot;idempotency-key\\\\&amp;quot;: \\\\&amp;quot;YOUR_IDEMPOTENCY_KEY\\\\&amp;quot;}\\\\n\\\\nresponse = adyen.checkout.payments_api.payments({\\\\n  :amount =&amp;gt; {\\\\n    :currency =&amp;gt; \\\\&amp;quot;EUR\\\\&amp;quot;,\\\\n    :value =&amp;gt; 1000\\\\n  },\\\\n  :reference =&amp;gt; \\\\&amp;quot;My first Adyen test payment with an API library\\\\\\\/SDK\\\\&amp;quot;,\\\\n  :paymentMethod =&amp;gt; {\\\\n    :type =&amp;gt; \\\\&amp;quot;scheme\\\\&amp;quot;,\\\\n    :encryptedCardNumber =&amp;gt; \\\\&amp;quot;test_4111111111111111\\\\&amp;quot;,\\\\n    :encryptedExpiryMonth =&amp;gt; \\\\&amp;quot;test_03\\\\&amp;quot;,\\\\n    :encryptedExpiryYear =&amp;gt; \\\\&amp;quot;test_2030\\\\&amp;quot;,\\\\n    :encryptedSecurityCode =&amp;gt; \\\\&amp;quot;test_737\\\\&amp;quot;\\\\n  },\\\\n  :returnUrl =&amp;gt; \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout\\\\\\\/\\\\&amp;quot;,\\\\n  :merchantAccount =&amp;gt; \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;\\\\n})&amp;quot;}]\\&quot; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&quot;,&quot;altTitle&quot;:null,&quot;oldTabId&quot;:1,&quot;relation&quot;:&quot;&quot;}]\"\n            :should-update-when-url-changes='false'>\n        <\/tabs>\n    <\/div>\n<\/div>\n","url":"https:\/\/docs.adyen.com\/development-resources\/libraries","articleFields":{"feedback_component":true,"next_steps":[{"title":"Integrate with API","description":"Read our comprehensive guide to accept payments with APIs.","url":"\/online-payments\/build-your-integration","required":false},{"title":"Add payment methods","description":"Learn about payment methods and how to integrate them.","url":"\/payment-methods","required":false},{"title":"Set up webhooks","description":"Receive confirmation when a payment is authorised or fails.","url":"\/development-resources\/webhooks","required":false},{"title":"Payment modifications","description":"Find out how to cancel, refund, or capture a payment using our API.","url":"\/online-payments\/modify-payments","required":false}],"id":"42834702","type":"page","_expandable":{"operations":""},"status":"current","filters_component":false},"algolia":{"url":"https:\/\/docs.adyen.com\/development-resources\/libraries","title":"Libraries","content":"We provide server-side API libraries in several languages. Libraries are connected to managed package systems (Composer, Gradle, Maven, npm, NuGet, PyPi, RubyGems), which make them easy to include in your project.\nHow it works\nInstalling a library is not required, but will save you development time, because a library:\n\n\nUses an API version that is up to date.\n\n\nHas generated models to help you construct requests.\nFor a point-of-sale integration with Terminal API, the libraries are wrappers around Terminal API. They include the models to create Terminal API requests.\n\nIf your Terminal API integration uses cloud communications, you can use the C#, Go, Java, Node, PHP, or Ruby  libraries.\n\nIf your Terminal API integration uses local communications, you can use the C#, Java, or Node libraries. These also take care of protecting local communications.\n\n\n\n\n\nSends the request to Adyen using its built-in HTTP client, so you do not have to create your own.\n\n\n\nFor your library of choice:\n\nMake sure to comply with the requirements.\nInstall the library.\nMake a test payment request, as described below.\n\nAvailable libraries\n\n\n    \n        \n        \n    \n\n","type":"page","locale":"en","boost":18,"hierarchy":{"lvl0":"Home","lvl1":"Development resources","lvl2":"Libraries"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/","lvl1":"https:\/\/docs.adyen.com\/development-resources","lvl2":"\/development-resources\/libraries"},"levels":3,"category":"Development Resources","category_color":"green","tags":["Libraries"]},"articleFiles":{"payment_successful.gif":"<img alt=\"\" src=\"https:\/\/docs.adyen.com\/user\/pages\/docs\/13.development-resources\/09.libraries\/payment_successful.gif\" \/>"}}
