मुख्य सामग्री पर जाएं
POST
/
grants
/
{grant_id}
/
license-key
`POST /grants/{grant_id}/license-key` — merchant fulfills a pending manual license-key grant by supplying the key value.
curl --request POST \
  --url https://test.dodopayments.com/grants/{grant_id}/license-key \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "key": "<string>",
  "activations_limit": 123,
  "expires_at": "2023-11-07T05:31:56Z"
}
'
{
  "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>",
  "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>"
}
इस एंडपॉइंट का उपयोग केवल उन अनुदानों के लिए करें जो fulfillment_mode: manual के साथ लाइसेंस कुंजी अधिकार के तहत बनाए गए हैं। अनुदान को pending स्थिति में होना चाहिए और कोई कुंजी संलग्न नहीं होनी चाहिए। पूर्ण प्रवाह के लिए मैनुअल पूर्ति और मैनुअल लाइसेंस कुंजी पूर्ति एकीकरण गाइड देखें।

प्राधिकरण

Authorization
string
header
आवश्यक

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

पथ पैरामीटर

grant_id
string
आवश्यक

Grant ID

बॉडी

application/json

Request body for manually fulfilling a pending license-key grant.

key
string
आवश्यक

The license key string to deliver to the customer.

activations_limit
integer<int32> | null

Optional per-key activation limit; falls back to the entitlement config.

expires_at
string<date-time> | null

Optional per-key expiry; falls back to the entitlement config's duration.

प्रतिक्रिया

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

business_id
string
आवश्यक

Identifier of the business that owns the grant.

created_at
string<date-time>
आवश्यक

Timestamp when the grant was created.

customer_id
string
आवश्यक

Identifier of the customer the grant was issued to.

entitlement_id
string
आवश्यक

Identifier of the entitlement this grant was issued from.

id
string
आवश्यक

Unique identifier of the grant.

integration_type
enum<string>
आवश्यक

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

उपलब्ध विकल्प:
discord,
telegram,
github,
figma,
framer,
notion,
digital_files,
license_key
metadata
object
आवश्यक

Arbitrary key-value metadata recorded on the grant.

status
enum<string>
आवश्यक

Lifecycle status of the grant.

उपलब्ध विकल्प:
Pending,
Delivered,
Failed,
Revoked
updated_at
string<date-time>
आवश्यक

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
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.

license_key
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 June 9, 2026