Skip to main content
DELETE
/
entitlements
/
{id}
/
grants
/
{grant_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 entitlementGrant = await client.entitlements.grants.revoke('entg_w0ZCJZgNXuNDdMVzvja6p', {
  id: 'ent_jt7jcvI79Xh8eehqgWdcm',
});

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
)
entitlement_grant = client.entitlements.grants.revoke(
grant_id="entg_w0ZCJZgNXuNDdMVzvja6p",
id="ent_jt7jcvI79Xh8eehqgWdcm",
)
print(entitlement_grant.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"),
)
entitlementGrant, err := client.Entitlements.Grants.Revoke(
context.TODO(),
"ent_jt7jcvI79Xh8eehqgWdcm",
"entg_w0ZCJZgNXuNDdMVzvja6p",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", entitlementGrant.ID)
}
package com.dodopayments.api.example;

import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.entitlements.grants.EntitlementGrant;
import com.dodopayments.api.models.entitlements.grants.GrantRevokeParams;

public final class Main {
private Main() {}

public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();

GrantRevokeParams params = GrantRevokeParams.builder()
.id("ent_jt7jcvI79Xh8eehqgWdcm")
.grantId("entg_w0ZCJZgNXuNDdMVzvja6p")
.build();
EntitlementGrant entitlementGrant = client.entitlements().grants().revoke(params);
}
}
package com.dodopayments.api.example

import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.entitlements.grants.EntitlementGrant
import com.dodopayments.api.models.entitlements.grants.GrantRevokeParams

fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()

val params: GrantRevokeParams = GrantRevokeParams.builder()
.id("ent_jt7jcvI79Xh8eehqgWdcm")
.grantId("entg_w0ZCJZgNXuNDdMVzvja6p")
.build()
val entitlementGrant: EntitlementGrant = client.entitlements().grants().revoke(params)
}
require "dodopayments"

dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)

entitlement_grant = dodo_payments.entitlements.grants.revoke("entg_w0ZCJZgNXuNDdMVzvja6p", id: "ent_jt7jcvI79Xh8eehqgWdcm")

puts(entitlement_grant)
<?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 {
$entitlementGrant = $client->entitlements->grants->revoke(
'entg_w0ZCJZgNXuNDdMVzvja6p', id: 'ent_jt7jcvI79Xh8eehqgWdcm'
);

var_dump($entitlementGrant);
} catch (APIException $e) {
echo $e->getMessage();
}
using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.Entitlements.Grants;

DodoPaymentsClient client = new();

GrantRevokeParams parameters = new()
{
ID = "ent_jt7jcvI79Xh8eehqgWdcm",
GrantID = "entg_w0ZCJZgNXuNDdMVzvja6p",
};

var entitlementGrant = await client.Entitlements.Grants.Revoke(parameters);

Console.WriteLine(entitlementGrant);
use dodopayments::Client;

#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let id = "id";
let grant_id = "grant_id";
let result = client
.entitlements()
.grants()
.revoke()
.id(id)
.grant_id(grant_id)
.await?;
println!("{result:?}");
Ok(())
}
curl --request DELETE \
--url https://test.dodopayments.com/entitlements/{id}/grants/{grant_id} \
--header 'Authorization: Bearer <token>'
{
  "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>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Entitlement ID

grant_id
string
required

Grant ID

Response

Detailed view of a single entitlement grant: who it's for, its lifecycle state, and any integration-specific delivery payload.

brand_id
string
required

Brand id this grant belongs to.

business_id
string
required

Identifier of the business that owns the grant.

created_at
string<date-time>
required

Timestamp when the grant was created.

customer_id
string
required

Identifier of the customer the grant was issued to.

entitlement_id
string
required

Identifier of the entitlement this grant was issued from.

id
string
required

Unique identifier of the grant.

integration_type
enum<string>
required

The integration type of the grant's entitlement (e.g. license_key).

Available options:
discord,
telegram,
github,
figma,
framer,
notion,
digital_files,
license_key,
feature_flag
metadata
Metadata · object
required

Arbitrary key-value metadata recorded on the grant.

status
enum<string>
required

Lifecycle status of the grant.

Available options:
Pending,
Delivered,
Failed,
Revoked
updated_at
string<date-time>
required

Timestamp when the grant was last modified.

delivered_at
string<date-time> | null

Timestamp when the grant transitioned to delivered, when applicable.

digital_product_delivery
null | Digital Product Delivery · object

Digital-product-delivery payload, present when the entitlement integration is digital_files.

error_code
string | null

Machine-readable code reported when delivery failed, when applicable.

error_message
string | null

Human-readable message reported when delivery failed, when applicable.

feature
null | object

Typed feature payload, present only when the entitlement integration is feature_flag; null for every other integration type.

license_key
null | object

License-key delivery payload, present when the entitlement integration is license_key.

oauth_expires_at
string<date-time> | null

Timestamp when oauth_url stops being valid, when applicable.

oauth_url
string | null

Customer-facing OAuth URL for OAuth-style integrations. Populated during the customer-portal accept flow; null until the customer completes that step, and on grants for non-OAuth integrations.

payment_id
string | null

Identifier of the payment that triggered this grant, when applicable.

revocation_reason
string | null

Reason recorded when the grant was revoked, when applicable.

revoked_at
string<date-time> | null

Timestamp when the grant transitioned to revoked, when applicable.

subscription_id
string | null

Identifier of the subscription that triggered this grant, when applicable.

Last modified on May 6, 2026