import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: 'My Bearer Token',
});
const licenseKeyInstance = await client.licenses.activate({ license_key: 'license_key', name: 'name' });
console.log(licenseKeyInstance.id);
{
"business_id": "<string>",
"created_at": "2024-01-01T00:00:00Z",
"id": "lki_123",
"license_key_id": "lic_123",
"name": "Production Server 1"
}
This endpoint allows you to activate a license for the user.
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: 'My Bearer Token',
});
const licenseKeyInstance = await client.licenses.activate({ license_key: 'license_key', name: 'name' });
console.log(licenseKeyInstance.id);
{
"business_id": "<string>",
"created_at": "2024-01-01T00:00:00Z",
"id": "lki_123",
"license_key_id": "lic_123",
"name": "Production Server 1"
}
License key instance created
The response is of type object
.
Was this page helpful?