TypeScript SDK
Install and start using the TypeScript SDK.
Intro
The Adyen APIs SDK provides access to the Adyen APIs REST APIs.
Adyen Checkout API Configure and manage your Adyen company and merchant accounts, stores, and payment terminals.
Authentication
Each request to the Management API must be signed with an API key. Generate your API key in the Customer Area and then set this key to the X-API-Key header value.
To access the live endpoints, you need to generate a new API key in your live Customer Area.
Versioning
Management API handles versioning as part of the endpoint URL. For example, to send a request to this version of the /companies/{companyId}/webhooks endpoint, use:
https://management-test.adyen.com/v3/companies/{companyId}/webhooksGoing live
To access the live endpoints, you need an API key from your live Customer Area. Use this API key to make requests to:
https://management-live.adyen.com/v3Release notes
Have a look at the release notes to find out what changed in this version!
Installation
The SDK compiles to dist/ before it can be referenced — run its build script once in the SDK folder, then add it to your project by path:
npm install <path-to-sdk>Quick Start
Create one client and reuse it. Configure its behaviour through ClientOptions.
import { AdyenApIsClient } from "adyen-apis";
const client = new AdyenApIsClient({
apiKeyAuth: "YOUR_API_KEY",
basicAuth: { username: "YOUR_USERNAME", password: "YOUR_PASSWORD" },
});Nothing in ClientOptions is required — new AdyenApIsClient() compiles — and each option left out falls back to its default. This API declares one environment, so there is no environment to select and no host to state at the construction site.
From CommonJS
The package ships both dialects from a single entry, so require works with full types. In a TypeScript CommonJS file use the import ... = require(...) form — a plain destructuring require runs fine but gives you any.
import sdk = require("adyen-apis");
const client = new sdk.AdyenApIsClient({
apiKeyAuth: "YOUR_API_KEY",
basicAuth: { username: "YOUR_USERNAME", password: "YOUR_PASSWORD" },
});