Licenses
Get License Key Instance
Retrieve details of a specific license key instance by its ID.
GET
/
license_key_instances
/
{id}
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 licenseKeyInstance = await client.licenseKeyInstances.retrieve('lki_EeWORStkMc7z0KycI31VS');
console.log(licenseKeyInstance.id);import os
from dodopayments import DodoPayments
client = DodoPayments(
bearer_token=os.environ.get("DODO_PAYMENTS_API_KEY"), # This is the default and can be omitted
)
license_key_instance = client.license_key_instances.retrieve(
"lki_EeWORStkMc7z0KycI31VS",
)
print(license_key_instance.id)package main
import (
"context"
"fmt"
"github.com/dodopayments/dodopayments-go"
"github.com/dodopayments/dodopayments-go/option"
)
func main() {
client := dodopayments.NewClient(
option.WithBearerToken("My Bearer Token"),
)
licenseKeyInstance, err := client.LicenseKeyInstances.Get(context.TODO(), "lki_EeWORStkMc7z0KycI31VS")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", licenseKeyInstance.ID)
}
package com.dodopayments.api.example;
import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.licensekeyinstances.LicenseKeyInstance;
import com.dodopayments.api.models.licensekeyinstances.LicenseKeyInstanceRetrieveParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
LicenseKeyInstance licenseKeyInstance = client.licenseKeyInstances().retrieve("lki_EeWORStkMc7z0KycI31VS");
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.licensekeyinstances.LicenseKeyInstance
import com.dodopayments.api.models.licensekeyinstances.LicenseKeyInstanceRetrieveParams
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val licenseKeyInstance: LicenseKeyInstance = client.licenseKeyInstances().retrieve("lki_EeWORStkMc7z0KycI31VS")
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
license_key_instance = dodo_payments.license_key_instances.retrieve("lki_EeWORStkMc7z0KycI31VS")
puts(license_key_instance)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Dodopayments\Client;
use Dodopayments\Core\Exceptions\APIException;
$client = new Client(
bearerToken: getenv('DODO_PAYMENTS_API_KEY') ?: 'My Bearer Token',
environment: 'test_mode',
);
try {
$licenseKeyInstance = $client->licenseKeyInstances->retrieve(
'lki_EeWORStkMc7z0KycI31VS'
);
var_dump($licenseKeyInstance);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.LicenseKeyInstances;
DodoPaymentsClient client = new();
LicenseKeyInstanceRetrieveParams parameters = new()
{
ID = "lki_EeWORStkMc7z0KycI31VS"
};
var licenseKeyInstance = await client.LicenseKeyInstances.Retrieve(parameters);
Console.WriteLine(licenseKeyInstance);use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let id = "id";
let result = client
.license_key_instances()
.retrieve()
.id(id)
.await?;
println!("{result:?}");
Ok(())
}curl --request GET \
--url https://test.dodopayments.com/license_key_instances/{id} \
--header 'Authorization: Bearer <token>'{
"business_id": "<string>",
"created_at": "2024-01-01T00:00:00.000Z",
"id": "lki_123",
"license_key_id": "lic_123",
"name": "Production Server 1"
}Authorizations
Send your API key as a bearer token: Authorization: Bearer <api_key>. A test mode key starts with dodo_test_, for example dodo_test_AbCd1234EfGh5678.<secret>. A live mode key starts with dodo_live_. Use a test mode key on test.dodopayments.com and a live mode key on live.dodopayments.com. Keys from before these tags have no tag and operate as before.
Path Parameters
License key instance ID
Last modified on March 25, 2026
Was this page helpful?
⌘I
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 licenseKeyInstance = await client.licenseKeyInstances.retrieve('lki_EeWORStkMc7z0KycI31VS');
console.log(licenseKeyInstance.id);import os
from dodopayments import DodoPayments
client = DodoPayments(
bearer_token=os.environ.get("DODO_PAYMENTS_API_KEY"), # This is the default and can be omitted
)
license_key_instance = client.license_key_instances.retrieve(
"lki_EeWORStkMc7z0KycI31VS",
)
print(license_key_instance.id)package main
import (
"context"
"fmt"
"github.com/dodopayments/dodopayments-go"
"github.com/dodopayments/dodopayments-go/option"
)
func main() {
client := dodopayments.NewClient(
option.WithBearerToken("My Bearer Token"),
)
licenseKeyInstance, err := client.LicenseKeyInstances.Get(context.TODO(), "lki_EeWORStkMc7z0KycI31VS")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", licenseKeyInstance.ID)
}
package com.dodopayments.api.example;
import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.licensekeyinstances.LicenseKeyInstance;
import com.dodopayments.api.models.licensekeyinstances.LicenseKeyInstanceRetrieveParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
LicenseKeyInstance licenseKeyInstance = client.licenseKeyInstances().retrieve("lki_EeWORStkMc7z0KycI31VS");
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.licensekeyinstances.LicenseKeyInstance
import com.dodopayments.api.models.licensekeyinstances.LicenseKeyInstanceRetrieveParams
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val licenseKeyInstance: LicenseKeyInstance = client.licenseKeyInstances().retrieve("lki_EeWORStkMc7z0KycI31VS")
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
license_key_instance = dodo_payments.license_key_instances.retrieve("lki_EeWORStkMc7z0KycI31VS")
puts(license_key_instance)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Dodopayments\Client;
use Dodopayments\Core\Exceptions\APIException;
$client = new Client(
bearerToken: getenv('DODO_PAYMENTS_API_KEY') ?: 'My Bearer Token',
environment: 'test_mode',
);
try {
$licenseKeyInstance = $client->licenseKeyInstances->retrieve(
'lki_EeWORStkMc7z0KycI31VS'
);
var_dump($licenseKeyInstance);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.LicenseKeyInstances;
DodoPaymentsClient client = new();
LicenseKeyInstanceRetrieveParams parameters = new()
{
ID = "lki_EeWORStkMc7z0KycI31VS"
};
var licenseKeyInstance = await client.LicenseKeyInstances.Retrieve(parameters);
Console.WriteLine(licenseKeyInstance);use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let id = "id";
let result = client
.license_key_instances()
.retrieve()
.id(id)
.await?;
println!("{result:?}");
Ok(())
}curl --request GET \
--url https://test.dodopayments.com/license_key_instances/{id} \
--header 'Authorization: Bearer <token>'{
"business_id": "<string>",
"created_at": "2024-01-01T00:00:00.000Z",
"id": "lki_123",
"license_key_id": "lic_123",
"name": "Production Server 1"
}