Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

paddle-sdk

avaly7.6kMIT4.7.0TypeScript support: included

The Paddle.com Node.js SDK

paddle, sdk, api, payments, subscriptions

readme

Paddle.com Node.js SDK

Github Actions NPM version

Welcome to the Paddle.com Node.js SDK documentation.

Installation

Install the SDK module using npm:

$ npm install paddle-sdk

or using yarn:

$ yarn add paddle-sdk

Usage

import { PaddleSDK } from 'paddle-sdk';

async function run() {
    const client = new PaddleSDK(
        'your-vendor-id-here',
        'your-unique-api-key-here'
    );

    const products = await client.getProducts();
    console.log(products);

    const plans = await client.getProductPlans(123);
    console.log(plans);
}

run();

For CommonJS:

const { PaddleSDK } = require('paddle-sdk');

Documentation

Read the documentation.

Change log

The change log can be found here: CHANGELOG.md.

Authors and license

Author: Valentin Agachi.

MIT License, see the included License.md file.

changelog

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

4.7.0 (2024-10-21)

Features

4.6.2 (2023-11-11)

4.6.1 (2023-06-22)

Bug Fixes

  • Add getPrices response type (#90) (3b4cfd2)
  • Fix getSubscriptionModifiers response type (#91) (ffddc60)
  • Fix type of recurring_prices in GeneratePaylinkBody (#92) (45b3a1a)

4.6.0 (2023-06-21)

Features

4.5.0 (2023-06-12)

Features

  • Add passthrough when updating a subscription (#87) (5503641)

4.4.0 (2023-05-08)

Features

  • Custom error class with Paddle API code and message (#85) (8b015b7)

4.3.0 (2023-04-26)

Features

  • Support all options for getSubscriptionPayments (#82) (7ec2c6d)
  • Support the One-off Charge API (#83) (9b28977)

4.2.0 (2023-04-20)

Features

4.1.0 (2023-04-06)

Features

Bug Fixes

  • Add customer_email to GeneratePaylinkBody (#77) (2e0bedd)

4.0.1 (2023-03-30)

Bug Fixes

4.0.0 (2023-03-25)

⚠ BREAKING CHANGES

  • The package source is now written in TypeScript. It ships with native TypeScript types in both CommonJS and ESM syntax.

  • Rewrite in TypeScript (#69) (bac3c5e)

3.3.0 (2023-02-08)

Features

  • Add reschedule payment API endpoint (#52) (7d2c92b)

3.2.0 (2022-12-06)

Features

3.1.0 (2022-12-05)

Features

3.0.0 (2022-09-21)

⚠ BREAKING CHANGES

  • Requires node v14+

Features

  • Add support for Checkout API, new endpoints, more parameters (#47) (efc98b1)

2.5.1 (2022-04-11)

Bug Fixes

2.5.0 (2022-02-08)

Features

  • Optional arguments for getProductPlans, getPlanUsers, getPlanPayments (#36) (af19b25)

2.4.0 (2022-02-06)

Features

Bug Fixes

  • Get users transactions correctly (#40) (461fb03)

2.3.0 (2021-07-01)

Features

  • Update a subscription quantity and price (#27) (72a160a)

2.2.0 (2020-05-12)

Features

  • Add TS declaration file and build command (562de86)

2.1.0 (2019-12-29)

Features

  • Update subscription plan method (310f54d)

2.0.0 (2019-12-27)

⚠ BREAKING CHANGES

  • Requires node v10+

Features

  • Upgrade all dependencies (ce2d240)

1.3.0 (2019-11-12)

Features

1.2.2 (2019-06-18)

1.2.1 (2019-06-18)

Bug Fixes

  • Throw on error responses with 2xx status code (28f07da)

1.2.0 (2018-03-23)

Features

1.1.0 (2017-11-20)

Features

  • Verify Webhook Alerts :tada: (d343da2)

1.0.0 (2017-11-19)

Features

  • Initial commit (6bc14b0)
  • Only getters methods are avilable in this version