Entitlements
ग्राहक अनुदानों की सूची
प्रत्येक अधिकार पर एक पंक्ति के साथ, प्रत्येक ग्राहक के अधिकार अनुदानों को सूचीबद्ध करें, स्थिति और एकीकरण प्रकार द्वारा वैकल्पिक फ़िल्टर के साथ। फ़ीचर-फ्लैग अनुदानों में टाइप्ड फ़ीचर पेलोड शामिल है।
GET
/
customers
/
{customer_id}
/
entitlement-grants
JavaScript
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const entitlementGrant of client.customers.listEntitlementGrants(
'cus_TV52uJWWXt2yIoBBxpjaa',
)) {
console.log(entitlementGrant.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
)
page = client.customers.list_entitlement_grants(
customer_id="cus_TV52uJWWXt2yIoBBxpjaa",
)
page = page.items[0]
print(page.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"),
)
page, err := client.Customers.ListEntitlementGrants(
context.TODO(),
"cus_TV52uJWWXt2yIoBBxpjaa",
dodopayments.CustomerListEntitlementGrantsParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}package com.dodopayments.api.example;
import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.customers.CustomerListEntitlementGrantsPage;
import com.dodopayments.api.models.customers.CustomerListEntitlementGrantsParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
CustomerListEntitlementGrantsPage page = client.customers().listEntitlementGrants("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.CustomerListEntitlementGrantsPage
import com.dodopayments.api.models.customers.CustomerListEntitlementGrantsParams
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val page: CustomerListEntitlementGrantsPage = client.customers().listEntitlementGrants("cus_TV52uJWWXt2yIoBBxpjaa")
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
page = dodo_payments.customers.list_entitlement_grants("cus_TV52uJWWXt2yIoBBxpjaa")
puts(page)<?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 {
$page = $client->customers->listEntitlementGrants(
'cus_TV52uJWWXt2yIoBBxpjaa',
integrationType: 'discord',
pageNumber: 0,
pageSize: 0,
status: 'Pending',
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.Customers;
DodoPaymentsClient client = new();
CustomerListEntitlementGrantsParams parameters = new()
{
CustomerID = "cus_TV52uJWWXt2yIoBBxpjaa"
};
var page = await client.Customers.ListEntitlementGrants(parameters);
await foreach (var item in page.Paginate())
{
Console.WriteLine(item);
}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_entitlement_grants()
.customer_id(customer_id)
.query(serde_json::json!({}))
.await?;
println!("{result:?}");
Ok(())
}curl --request GET \
--url https://test.dodopayments.com/customers/{customer_id}/entitlement-grants \
--header 'Authorization: Bearer <token>'{
"items": [
{
"brand_id": "<string>",
"business_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"customer_id": "<string>",
"entitlement_id": "<string>",
"id": "<string>",
"metadata": {},
"updated_at": "2023-11-07T05:31:56Z",
"delivered_at": "2023-11-07T05:31:56Z",
"digital_product_delivery": {
"files": [
{
"download_url": "<string>",
"expires_in": 123,
"file_id": "<string>",
"filename": "<string>",
"content_type": "<string>",
"file_size": 123
}
],
"external_url": "<string>",
"instructions": "<string>"
},
"error_code": "<string>",
"error_message": "<string>",
"feature": {
"feature_id": "<string>",
"feature_type": "boolean"
},
"license_key": {
"activations_used": 123,
"key": "<string>",
"activations_limit": 123,
"expires_at": "2023-11-07T05:31:56Z"
},
"oauth_expires_at": "2023-11-07T05:31:56Z",
"oauth_url": "<string>",
"payment_id": "<string>",
"revocation_reason": "<string>",
"revoked_at": "2023-11-07T05:31:56Z",
"subscription_id": "<string>"
}
]
}प्राधिकरण
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
पथ पैरामीटर
Customer ID
क्वेरी पैरामीटर
Page size (default 10, max 100)
आवश्यक सीमा:
x >= 0Page number (default 0)
आवश्यक सीमा:
x >= 0Filter by grant status
उपलब्ध विकल्प:
Pending, Delivered, Failed, Revoked Filter by integration type (e.g. feature_flag)
उपलब्ध विकल्प:
discord, telegram, github, figma, framer, notion, digital_files, license_key, feature_flag प्रतिक्रिया
Show child attributes
Show child attributes
अंतिम संशोधन 9 जुलाई 2026
वाज़ दिस पेज हेल्पफुल
प्रीवियस
लाइसेंस कुंजी अनुदान पूरा करेंलंबित लाइसेंस-कुंजी अनुदान को मैन्युअल रूप से कुंजी मान प्रदान करके पूरा करें। कुंजी डालता है, इसे ग्राहक को ईमेल द्वारा भेजता है, और अनुदान को वितरित स्थिति में स्थानांतरित करता है।
नेक्स्ट
⌘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
});
// Automatically fetches more pages as needed.
for await (const entitlementGrant of client.customers.listEntitlementGrants(
'cus_TV52uJWWXt2yIoBBxpjaa',
)) {
console.log(entitlementGrant.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
)
page = client.customers.list_entitlement_grants(
customer_id="cus_TV52uJWWXt2yIoBBxpjaa",
)
page = page.items[0]
print(page.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"),
)
page, err := client.Customers.ListEntitlementGrants(
context.TODO(),
"cus_TV52uJWWXt2yIoBBxpjaa",
dodopayments.CustomerListEntitlementGrantsParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}package com.dodopayments.api.example;
import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.customers.CustomerListEntitlementGrantsPage;
import com.dodopayments.api.models.customers.CustomerListEntitlementGrantsParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
CustomerListEntitlementGrantsPage page = client.customers().listEntitlementGrants("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.CustomerListEntitlementGrantsPage
import com.dodopayments.api.models.customers.CustomerListEntitlementGrantsParams
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val page: CustomerListEntitlementGrantsPage = client.customers().listEntitlementGrants("cus_TV52uJWWXt2yIoBBxpjaa")
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
page = dodo_payments.customers.list_entitlement_grants("cus_TV52uJWWXt2yIoBBxpjaa")
puts(page)<?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 {
$page = $client->customers->listEntitlementGrants(
'cus_TV52uJWWXt2yIoBBxpjaa',
integrationType: 'discord',
pageNumber: 0,
pageSize: 0,
status: 'Pending',
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.Customers;
DodoPaymentsClient client = new();
CustomerListEntitlementGrantsParams parameters = new()
{
CustomerID = "cus_TV52uJWWXt2yIoBBxpjaa"
};
var page = await client.Customers.ListEntitlementGrants(parameters);
await foreach (var item in page.Paginate())
{
Console.WriteLine(item);
}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_entitlement_grants()
.customer_id(customer_id)
.query(serde_json::json!({}))
.await?;
println!("{result:?}");
Ok(())
}curl --request GET \
--url https://test.dodopayments.com/customers/{customer_id}/entitlement-grants \
--header 'Authorization: Bearer <token>'{
"items": [
{
"brand_id": "<string>",
"business_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"customer_id": "<string>",
"entitlement_id": "<string>",
"id": "<string>",
"metadata": {},
"updated_at": "2023-11-07T05:31:56Z",
"delivered_at": "2023-11-07T05:31:56Z",
"digital_product_delivery": {
"files": [
{
"download_url": "<string>",
"expires_in": 123,
"file_id": "<string>",
"filename": "<string>",
"content_type": "<string>",
"file_size": 123
}
],
"external_url": "<string>",
"instructions": "<string>"
},
"error_code": "<string>",
"error_message": "<string>",
"feature": {
"feature_id": "<string>",
"feature_type": "boolean"
},
"license_key": {
"activations_used": 123,
"key": "<string>",
"activations_limit": 123,
"expires_at": "2023-11-07T05:31:56Z"
},
"oauth_expires_at": "2023-11-07T05:31:56Z",
"oauth_url": "<string>",
"payment_id": "<string>",
"revocation_reason": "<string>",
"revoked_at": "2023-11-07T05:31:56Z",
"subscription_id": "<string>"
}
]
}