API Documentation & SDKs
Subscriptions
Discounts
Licenses
Customers
Products
Payouts
Miscellaneous
Get License Keys
Retrieve a list of license keys associated with your account.
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});
async function main() {
// Automatically fetches more pages as needed.
for await (const licenseKey of client.licenseKeys.list()) {
console.log(licenseKey.id);
}
}
main();
{
"items": [
{
"activations_limit": 5,
"business_id": "<string>",
"created_at": "2024-01-01T00:00:00Z",
"customer_id": "cus_123",
"expires_at": "2024-12-31T23:59:59Z",
"id": "lic_123",
"instances_count": 123,
"key": "<string>",
"payment_id": "<string>",
"product_id": "<string>",
"status": "active",
"subscription_id": "<string>"
}
]
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Query Parameters
Page size default is 10 max is 100
x >= 0
Page number default is 0
x >= 0
Filter by customer ID
Filter by license key status
active
, expired
, disabled
Filter by product ID
Response
The unique identifier of the business associated with the license key.
The timestamp indicating when the license key was created, in UTC.
"2024-01-01T00:00:00Z"
The unique identifier of the customer associated with the license key.
"cus_123"
The unique identifier of the license key.
"lic_123"
The current number of instances activated for this license key.
The license key string.
The unique identifier of the payment associated with the license key.
The unique identifier of the product associated with the license key.
active
, expired
, disabled
The maximum number of activations allowed for this license key.
5
The timestamp indicating when the license key expires, in UTC.
"2024-12-31T23:59:59Z"
The unique identifier of the subscription associated with the license key, if any.
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});
async function main() {
// Automatically fetches more pages as needed.
for await (const licenseKey of client.licenseKeys.list()) {
console.log(licenseKey.id);
}
}
main();
{
"items": [
{
"activations_limit": 5,
"business_id": "<string>",
"created_at": "2024-01-01T00:00:00Z",
"customer_id": "cus_123",
"expires_at": "2024-12-31T23:59:59Z",
"id": "lic_123",
"instances_count": 123,
"key": "<string>",
"payment_id": "<string>",
"product_id": "<string>",
"status": "active",
"subscription_id": "<string>"
}
]
}