1.0.13 • Published 1 year ago

resubscribe-sdk v1.0.13

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
1 year ago

Resubscribe.ai SDK

The official TypeScript SDK for Resubscribe.

Usage

Direct Link

Directly link your users to Resubscribe.

import Resubscribe from 'resubscribe-sdk';

const url = await Resubscribe.getLink({
  email: 'example@acme.org',
  userId: 'user_987654321',
});

// add url to an email, push notification, etc.

Cancellation Events

Send an email to your users when they cancel their subscription.

TypeScript:

import Resubscribe from 'resubscribe-sdk';

// init API key
Resubscribe.init({
  apiKey: process.env.RESUBSCRIBE_API_KEY, // your API key
};

// register an event
Resubscribe.registerEvent(
  {
    id: 'event_12346789',
    type: 'cancellation-unsubscribe-paid',
  },
  {
    userId: 'user_987654321',
    email: 'example@acme.org',
  },
);

Node.js:

const Resubscribe = require('resubscribe-sdk').default;
1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.9

1 year ago

1.0.10

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago