Recupere uma lista de chaves de licença associadas à sua conta.
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const licenseKey of client.licenseKeys.list()) {
console.log(licenseKey.id);
}{
"items": [
{
"business_id": "<string>",
"created_at": "2024-01-01T00:00:00Z",
"customer_id": "cus_123",
"id": "lic_123",
"instances_count": 123,
"key": "<string>",
"payment_id": "<string>",
"product_id": "<string>",
"status": "active",
"activations_limit": 5,
"expires_at": "2024-12-31T23:59:59Z",
"subscription_id": "<string>"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Page size default is 10 max is 100
x >= 0Page number default is 0
x >= 0Filter by customer ID
Filter by license key status
active, expired, disabled Filter by product ID
Mostrar atributos filhos
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.
The current status of the license key (e.g., active, inactive, expired).
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.
Esta página foi útil?
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const licenseKey of client.licenseKeys.list()) {
console.log(licenseKey.id);
}{
"items": [
{
"business_id": "<string>",
"created_at": "2024-01-01T00:00:00Z",
"customer_id": "cus_123",
"id": "lic_123",
"instances_count": 123,
"key": "<string>",
"payment_id": "<string>",
"product_id": "<string>",
"status": "active",
"activations_limit": 5,
"expires_at": "2024-12-31T23:59:59Z",
"subscription_id": "<string>"
}
]
}