Licenses
Validate License
API Documentation & SDKs
- Introduction
- Code Integration Tutorial
- SDKs - Node, Python, PHP, Go, Ruby, Java & Kotlin
- Payments Integration Guide
- Subscription Integration Guide
- Mobile Integration Guide
- On Demand Subscriptions
- Webhooks Details
- Managing Products Via API
- Metadata Guide
- Configuring Allowed Payment Methods
- MCP Server
- Technical - FAQs
Subscriptions
Discounts
Licenses
Customers
Products
Payouts
Miscellaneous
Licenses
Validate License
This endpoint allows you to validate a license for the user.
POST
/
licenses
/
validate
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() {
const response = await client.licenses.validate({ license_key: '2b1f8e2d-c41e-4e8f-b2d3-d9fd61c38f43' });
console.log(response.valid);
}
main();
{
"valid": true
}
Body
application/json
Response
200
application/json
License key validation result
The response is of type object
.
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() {
const response = await client.licenses.validate({ license_key: '2b1f8e2d-c41e-4e8f-b2d3-d9fd61c38f43' });
console.log(response.valid);
}
main();
{
"valid": true
}