Skip to content

sumup/sumup-ts

sumup-ts

NPM Version JSR Version Build Status

IMPORTANT: This SDK is under heavy development and subject to breaking changes.

The Node.js SDK for the SumUp API.

To learn more, check out our API Reference and Documentation.

Requirements

Node 18 or higher.

Installation

Install the package with:

npm install @sumup/sdk
# or
yarn add @sumup/sdk

Install from jsr:

deno add jsr:@sumup/sdk
# or
npx jsr add @sumup/sdk

Usage

const sumup = require('@sumup/sdk')({
  apiKey: 'sup_sk_MvxmLOl0...'
});

sumup.merchant.get()
  .then(merchant => console.info(merchant))
  .catch(error => console.error(error));

Or using ES modules and async/await:

import SumUp from "@sumup/sdk";

const client = new SumUp({
  apiKey: 'sup_sk_MvxmLOl0...',
});

const merchant = await client.merchant.get();
console.info(merchant);

Examples

Run examples:

npx tsx examples/checkout/index.ts