Skip to main content

Create an ad hoc license

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 { Salable } from '@salable/node-sdk';
const salable = new Salable('your-salable-api-key');

const license = await salable.licenses.create([
{
planUuid: 'your-plan-uuid',
member: 'orgId_1234',
granteeId: 'userId-1',
},
{
planUuid: 'your-plan-uuid',
member: 'orgId_1234',
granteeId: 'userId-2',
},
]);