Questo endpoint consente di convalidare una licenza per l’utente.
POST
/
licenses
/
validate
JavaScript
import DodoPayments from 'dodopayments';const client = new DodoPayments({ bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted});const response = await client.licenses.validate({ license_key: '2b1f8e2d-c41e-4e8f-b2d3-d9fd61c38f43',});console.log(response.valid);
Use this file to discover all available pages before exploring further.
Nessuna chiave API richiesta: Questo è un endpoint pubblico che non richiede autenticazione. Puoi chiamarlo direttamente da applicazioni client, software desktop o CLI per convalidare i codici di licenza senza esporre le tue credenziali API.
import DodoPayments from 'dodopayments';const client = new DodoPayments({ bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted});const response = await client.licenses.validate({ license_key: '2b1f8e2d-c41e-4e8f-b2d3-d9fd61c38f43',});console.log(response.valid);