Customers
List Customer Entitlements
Get all entitlement grants that have been delivered to, or are still in flight for, a customer.
GET
/
customers
/
{customer_id}
/
entitlements
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.customers.listEntitlements('cus_TV52uJWWXt2yIoBBxpjaa');
console.log(response.items);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
)
response = client.customers.list_entitlements(
"cus_TV52uJWWXt2yIoBBxpjaa",
)
print(response.items)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"),
)
response, err := client.Customers.ListEntitlements(context.TODO(), "cus_TV52uJWWXt2yIoBBxpjaa")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Items)
}
package com.dodopayments.api.example;
import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.customers.CustomerListEntitlementsParams;
import com.dodopayments.api.models.customers.CustomerListEntitlementsResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
CustomerListEntitlementsResponse response = client.customers().listEntitlements("cus_TV52uJWWXt2yIoBBxpjaa");
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.customers.CustomerListEntitlementsParams
import com.dodopayments.api.models.customers.CustomerListEntitlementsResponse
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val response: CustomerListEntitlementsResponse = client.customers().listEntitlements("cus_TV52uJWWXt2yIoBBxpjaa")
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
response = dodo_payments.customers.list_entitlements("cus_TV52uJWWXt2yIoBBxpjaa")
puts(response)<?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 {
$response = $client->customers->listEntitlements('cus_TV52uJWWXt2yIoBBxpjaa');
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.Customers;
DodoPaymentsClient client = new();
CustomerListEntitlementsParams parameters = new()
{
CustomerID = "cus_TV52uJWWXt2yIoBBxpjaa"
};
var response = await client.Customers.ListEntitlements(parameters);
Console.WriteLine(response);use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let customer_id = "customer_id";
let result = client
.customers()
.list_entitlements()
.customer_id(customer_id)
.await?;
println!("{result:?}");
Ok(())
}curl --request GET \
--url https://test.dodopayments.com/customers/{customer_id}/entitlements \
--header 'Authorization: Bearer <token>'{
"items": [
{
"created_at": "2023-11-07T05:31:56Z",
"entitlement_id": "<string>",
"entitlement_name": "<string>",
"grant_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"delivered_at": "2023-11-07T05:31:56Z",
"entitlement_description": "<string>",
"revoked_at": "2023-11-07T05:31:56Z"
}
]
}Last modified on August 5, 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 response = await client.customers.listEntitlements('cus_TV52uJWWXt2yIoBBxpjaa');
console.log(response.items);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
)
response = client.customers.list_entitlements(
"cus_TV52uJWWXt2yIoBBxpjaa",
)
print(response.items)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"),
)
response, err := client.Customers.ListEntitlements(context.TODO(), "cus_TV52uJWWXt2yIoBBxpjaa")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Items)
}
package com.dodopayments.api.example;
import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.customers.CustomerListEntitlementsParams;
import com.dodopayments.api.models.customers.CustomerListEntitlementsResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
CustomerListEntitlementsResponse response = client.customers().listEntitlements("cus_TV52uJWWXt2yIoBBxpjaa");
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.customers.CustomerListEntitlementsParams
import com.dodopayments.api.models.customers.CustomerListEntitlementsResponse
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val response: CustomerListEntitlementsResponse = client.customers().listEntitlements("cus_TV52uJWWXt2yIoBBxpjaa")
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
response = dodo_payments.customers.list_entitlements("cus_TV52uJWWXt2yIoBBxpjaa")
puts(response)<?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 {
$response = $client->customers->listEntitlements('cus_TV52uJWWXt2yIoBBxpjaa');
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.Customers;
DodoPaymentsClient client = new();
CustomerListEntitlementsParams parameters = new()
{
CustomerID = "cus_TV52uJWWXt2yIoBBxpjaa"
};
var response = await client.Customers.ListEntitlements(parameters);
Console.WriteLine(response);use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let customer_id = "customer_id";
let result = client
.customers()
.list_entitlements()
.customer_id(customer_id)
.await?;
println!("{result:?}");
Ok(())
}curl --request GET \
--url https://test.dodopayments.com/customers/{customer_id}/entitlements \
--header 'Authorization: Bearer <token>'{
"items": [
{
"created_at": "2023-11-07T05:31:56Z",
"entitlement_id": "<string>",
"entitlement_name": "<string>",
"grant_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"delivered_at": "2023-11-07T05:31:56Z",
"entitlement_description": "<string>",
"revoked_at": "2023-11-07T05:31:56Z"
}
]
}