sezzle-sdk
v1.1.1
Published
A node SDK for sezzle payment integration.
Downloads
16
Maintainers
Readme
Sezzle SDK
The Sezzle Sdk library provides convenient access to the Sezzle API from applications written in server-side JavaScript/TypeScript.
⚙️ Install
Install it locally in your project folder:
npm i sezzle-sdk
# Or Yarn
yarn add sezzle-sdk
Getting started
import { Sezzle } from "sezzle-sdk";
const sdk = new Sezzle({
publicKey: process.env.SEZZLE_PUBLIC_KEY,
secretKey: process.env.SEZZLE_PRIVATE_KEY,
environment: "sandbox", // default is production
});
// return list of created webhooks
const webhooks = await sdk.listWebhooks();
// create a tokenize session
const tokenizeSession = await sdk.createTokenizeSession({
cancel_url: {
href: "https://domain.com/list",
},
complete_url: {
href: "https://domain.com/orders",
},
customer: {
tokenize: true,
},
});