Skip to main content

Create an ad hoc license

danger

Deprecated. Use create subscription.

Ad hoc licenses are used for free plans or if you want to grant a specific customer free access to a paid plan. In this case, you can create an ad hoc license to bypass payment/subscription.

import { initSalable } from '@salable/node-sdk';

const salable = initSalable('your-salable-api-key', 'v3');
const license = await salable.licenses.create([
{
planUuid: 'your-plan-uuid',
member: 'owner-id',
granteeId: 'user-id',
},
{
planUuid: 'your-plan-uuid',
member: 'owner-id',
granteeId: 'user-id-2',
},
]);