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.
- Node.js
- cURL
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',
},
]);
curl
-XPOST
-H 'x-api-key: your-salable-api-key'
-d '[{ "planUuid": "a-plan-uuid", "granteeId": "a-user-id", "member": "a-user-id" }, { "planUuid": "a-plan-uuid", "granteeId": "a-user-id", "member: "a-user-id"]'
'https://api.salable.app/licenses'