1.0.13 • Published 2 years ago

resubscribe-sdk v1.0.13

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
2 years 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

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.9

2 years ago

1.0.10

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago