Customers
고객 Entitlement 목록 조회
고객에게 전달되었거나 아직 처리 중인 모든 entitlement grant를 가져옵니다.
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>",
"integration_type": "discord",
"status": "pending",
"updated_at": "2023-11-07T05:31:56Z",
"delivered_at": "2023-11-07T05:31:56Z",
"entitlement_description": "<string>",
"revoked_at": "2023-11-07T05:31:56Z"
}
]
}인증
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.
경로 매개변수
Customer ID
응답
Show child attributes
Show child attributes
마지막 수정일 2026년 8월 6일
이 페이지가 도움이 되었나요?
⌘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>",
"integration_type": "discord",
"status": "pending",
"updated_at": "2023-11-07T05:31:56Z",
"delivered_at": "2023-11-07T05:31:56Z",
"entitlement_description": "<string>",
"revoked_at": "2023-11-07T05:31:56Z"
}
]
}