dodopayments-mcp 2.40.0 → 2.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -64,7 +64,7 @@ const EMBEDDED_METHODS = [
64
64
  "customization?: { force_language?: string; show_on_demand_tag?: boolean; show_order_details?: boolean; theme?: 'dark' | 'light' | 'system'; theme_config?: { dark?: theme_mode_config; font_primary_url?: string; font_secondary_url?: string; font_size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'; font_weight?: 'normal' | 'medium' | 'bold' | 'extraBold'; light?: theme_mode_config; pay_button_text?: string; radius?: string; }; };",
65
65
  'discount_code?: string;',
66
66
  'discount_codes?: string[];',
67
- 'feature_flags?: { allow_currency_selection?: boolean; allow_customer_editing_business_name?: boolean; allow_customer_editing_city?: boolean; allow_customer_editing_country?: boolean; allow_customer_editing_email?: boolean; allow_customer_editing_name?: boolean; allow_customer_editing_state?: boolean; allow_customer_editing_street?: boolean; allow_customer_editing_tax_id?: boolean; allow_customer_editing_zipcode?: boolean; allow_discount_code?: boolean; allow_phone_number_collection?: boolean; allow_tax_id?: boolean; always_create_new_customer?: boolean; redirect_immediately?: boolean; require_phone_number?: boolean; };',
67
+ 'feature_flags?: { allow_currency_selection?: boolean; allow_customer_editing_business_name?: boolean; allow_customer_editing_city?: boolean; allow_customer_editing_country?: boolean; allow_customer_editing_email?: boolean; allow_customer_editing_name?: boolean; allow_customer_editing_state?: boolean; allow_customer_editing_street?: boolean; allow_customer_editing_tax_id?: boolean; allow_customer_editing_zipcode?: boolean; allow_discount_code?: boolean; allow_editing_addons?: boolean; allow_phone_number_collection?: boolean; allow_tax_id?: boolean; always_create_new_customer?: boolean; redirect_immediately?: boolean; require_phone_number?: boolean; };',
68
68
  'force_3ds?: boolean;',
69
69
  'mandate_min_amount_inr_paise?: number;',
70
70
  'metadata?: object;',
@@ -78,7 +78,7 @@ const EMBEDDED_METHODS = [
78
78
  'tax_id?: string;',
79
79
  ],
80
80
  response: '{ session_id: string; checkout_url?: string; client_secret?: string; payment_id?: string; publishable_key?: string; }',
81
- markdown: "## create\n\n`client.checkoutSessions.create(product_cart: { product_id: string; quantity: number; addons?: attach_addon[]; amount?: number; credit_entitlements?: object[]; }[], allowed_payment_method_types?: string[], billing_address?: { country: country_code; city?: string; state?: string; street?: string; zipcode?: string; }, billing_currency?: string, cancel_url?: string, confirm?: boolean, custom_fields?: { field_type: 'text' | 'number' | 'email' | 'url' | 'date' | 'dropdown' | 'boolean'; key: string; label: string; options?: string[]; placeholder?: string; required?: boolean; }[], customer?: object | object, customer_business_name?: string, customization?: { force_language?: string; show_on_demand_tag?: boolean; show_order_details?: boolean; theme?: 'dark' | 'light' | 'system'; theme_config?: theme_config; }, discount_code?: string, discount_codes?: string[], feature_flags?: { allow_currency_selection?: boolean; allow_customer_editing_business_name?: boolean; allow_customer_editing_city?: boolean; allow_customer_editing_country?: boolean; allow_customer_editing_email?: boolean; allow_customer_editing_name?: boolean; allow_customer_editing_state?: boolean; allow_customer_editing_street?: boolean; allow_customer_editing_tax_id?: boolean; allow_customer_editing_zipcode?: boolean; allow_discount_code?: boolean; allow_phone_number_collection?: boolean; allow_tax_id?: boolean; always_create_new_customer?: boolean; redirect_immediately?: boolean; require_phone_number?: boolean; }, force_3ds?: boolean, mandate_min_amount_inr_paise?: number, metadata?: object, minimal_address?: boolean, payment_method_id?: string, product_collection_id?: string, return_url?: string, short_link?: boolean, show_saved_payment_methods?: boolean, subscription_data?: { on_demand?: on_demand_subscription; trial_period_days?: number; }, tax_id?: string): { session_id: string; checkout_url?: string; client_secret?: string; payment_id?: string; publishable_key?: string; }`\n\n**post** `/checkouts`\n\n### Parameters\n\n- `product_cart: { product_id: string; quantity: number; addons?: { addon_id: string; quantity: number; }[]; amount?: number; credit_entitlements?: { credit_entitlement_id: string; credits_amount: string; }[]; }[]`\n\n- `allowed_payment_method_types?: string[]`\n Customers will never see payment methods that are not in this list.\nHowever, adding a method here does not guarantee customers will see it.\nAvailability still depends on other factors (e.g., customer location, merchant settings).\n\nDisclaimar: Always provide 'credit' and 'debit' as a fallback.\nIf all payment methods are unavailable, checkout session will fail.\n\n- `billing_address?: { country: string; city?: string; state?: string; street?: string; zipcode?: string; }`\n Billing address information for the session\n - `country: string`\n Two-letter ISO country code (ISO 3166-1 alpha-2)\n - `city?: string`\n City name\n - `state?: string`\n State or province name\n - `street?: string`\n Street address including house number and unit/apartment if applicable\n - `zipcode?: string`\n Postal code or ZIP code\n\n- `billing_currency?: string`\n This field is ingored if adaptive pricing is disabled\n\n- `cancel_url?: string`\n The URL to redirect the customer if they cancel or go back from the checkout.\nIf not provided, the back button will not be displayed.\n\n- `confirm?: boolean`\n If confirm is true, all the details will be finalized. If required data is missing, an API error is thrown.\n\n- `custom_fields?: { field_type: 'text' | 'number' | 'email' | 'url' | 'date' | 'dropdown' | 'boolean'; key: string; label: string; options?: string[]; placeholder?: string; required?: boolean; }[]`\n Custom fields to collect from customer during checkout (max 5 fields)\n\n- `customer?: { customer_id: string; } | { email: string; name?: string; phone_number?: string; }`\n Customer details for the session\n\n- `customer_business_name?: string`\n Optional business / legal name associated with the tax id. When provided\ntogether with a valid tax id for a B2B purchase, this name is rendered\non the invoice instead of the customer's personal name.\n\n- `customization?: { force_language?: string; show_on_demand_tag?: boolean; show_order_details?: boolean; theme?: 'dark' | 'light' | 'system'; theme_config?: { dark?: theme_mode_config; font_primary_url?: string; font_secondary_url?: string; font_size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'; font_weight?: 'normal' | 'medium' | 'bold' | 'extraBold'; light?: theme_mode_config; pay_button_text?: string; radius?: string; }; }`\n Customization for the checkout session page\n - `force_language?: string`\n Force the checkout interface to render in a specific language (e.g. `en`, `es`)\n - `show_on_demand_tag?: boolean`\n Show on demand tag\n\nDefault is true\n - `show_order_details?: boolean`\n Show order details by default\n\nDefault is true\n - `theme?: 'dark' | 'light' | 'system'`\n Theme of the page (determines which mode - light/dark/system - to use)\n\nIf not provided, uses the business-configured theme from business_themes table.\n - `theme_config?: { dark?: { bg_primary?: string; bg_secondary?: string; border_primary?: string; border_secondary?: string; button_primary?: string; button_primary_hover?: string; button_secondary?: string; button_secondary_hover?: string; button_text_primary?: string; button_text_secondary?: string; input_focus_border?: string; text_error?: string; text_placeholder?: string; text_primary?: string; text_secondary?: string; text_success?: string; }; font_primary_url?: string; font_secondary_url?: string; font_size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'; font_weight?: 'normal' | 'medium' | 'bold' | 'extraBold'; light?: { bg_primary?: string; bg_secondary?: string; border_primary?: string; border_secondary?: string; button_primary?: string; button_primary_hover?: string; button_secondary?: string; button_secondary_hover?: string; button_text_primary?: string; button_text_secondary?: string; input_focus_border?: string; text_error?: string; text_placeholder?: string; text_primary?: string; text_secondary?: string; text_success?: string; }; pay_button_text?: string; radius?: string; }`\n Optional custom theme configuration with colors for light and dark modes\n\n- `discount_code?: string`\n DEPRECATED: Use discount_codes instead. Cannot be used together with discount_codes.\n\n- `discount_codes?: string[]`\n Stacked discount codes to apply, in order. Max 20.\nCannot be used together with discount_code.\n\n- `feature_flags?: { allow_currency_selection?: boolean; allow_customer_editing_business_name?: boolean; allow_customer_editing_city?: boolean; allow_customer_editing_country?: boolean; allow_customer_editing_email?: boolean; allow_customer_editing_name?: boolean; allow_customer_editing_state?: boolean; allow_customer_editing_street?: boolean; allow_customer_editing_tax_id?: boolean; allow_customer_editing_zipcode?: boolean; allow_discount_code?: boolean; allow_phone_number_collection?: boolean; allow_tax_id?: boolean; always_create_new_customer?: boolean; redirect_immediately?: boolean; require_phone_number?: boolean; }`\n - `allow_currency_selection?: boolean`\n if customer is allowed to change currency, set it to true\n\nDefault is true\n - `allow_customer_editing_business_name?: boolean`\n If true, the customer can supply or edit the business name associated\nwith the tax id during checkout. Works independently of\n`allow_customer_editing_tax_id` — either flag (or `allow_tax_id`) is\nsufficient to let the customer override the session's business name.\nTypically set together with `allow_customer_editing_tax_id`.\n\nDefault is false\n - `allow_customer_editing_city?: boolean`\n - `allow_customer_editing_country?: boolean`\n - `allow_customer_editing_email?: boolean`\n - `allow_customer_editing_name?: boolean`\n - `allow_customer_editing_state?: boolean`\n - `allow_customer_editing_street?: boolean`\n - `allow_customer_editing_tax_id?: boolean`\n - `allow_customer_editing_zipcode?: boolean`\n - `allow_discount_code?: boolean`\n If the customer is allowed to apply discount code, set it to true.\n\nDefault is true\n - `allow_phone_number_collection?: boolean`\n If phone number is collected from customer, set it to rue\n\nDefault is true\n - `allow_tax_id?: boolean`\n If the customer is allowed to add tax id, set it to true\n\nDefault is true\n - `always_create_new_customer?: boolean`\n Set to true if a new customer object should be created.\nBy default email is used to find an existing customer to attach the session to\n\nDefault is false\n - `redirect_immediately?: boolean`\n If true, redirects the customer immediately after payment completion\n\nDefault is false\n - `require_phone_number?: boolean`\n If true, the customer must provide a phone number to complete checkout.\nRequires `allow_phone_number_collection` to also be true.\n\nDefault is false\n\n- `force_3ds?: boolean`\n Override merchant default 3DS behaviour for this session\n\n- `mandate_min_amount_inr_paise?: number`\n Override the merchant-level mandate floor (in INR paise) for INR\ne-mandates on Indian-card recurring payments. The mandate amount sent to\nthe processor is `max(this_floor, actual_billing_amount)`, so this is\neffectively the customer-facing authorization ceiling whenever billing is\nlower. When unset, the merchant setting applies; when that's also unset,\nthe system default of ₹15,000 applies.\n\n- `metadata?: object`\n Additional metadata associated with the payment. Defaults to empty if not provided.\n\n- `minimal_address?: boolean`\n If true, only zipcode is required when confirm is true; other address fields remain optional\n\n- `payment_method_id?: string`\n Optional payment method ID to use for this checkout session.\nOnly allowed when `confirm` is true.\nIf provided, existing customer id must also be provided.\n\n- `product_collection_id?: string`\n Product collection ID for collection-based checkout flow\n\n- `return_url?: string`\n The url to redirect after payment failure or success.\n\n- `short_link?: boolean`\n If true, returns a shortened checkout URL.\nDefaults to false if not specified.\n\n- `show_saved_payment_methods?: boolean`\n Display saved payment methods of a returning customer False by default\n\n- `subscription_data?: { on_demand?: { mandate_only: boolean; adaptive_currency_fees_inclusive?: boolean; product_currency?: currency; product_description?: string; product_price?: number; }; trial_period_days?: number; }`\n - `on_demand?: { mandate_only: boolean; adaptive_currency_fees_inclusive?: boolean; product_currency?: string; product_description?: string; product_price?: number; }`\n - `trial_period_days?: number`\n Optional trial period in days If specified, this value overrides the trial period set in the product's price Must be between 0 and 10000 days\n\n- `tax_id?: string`\n Tax ID for the customer (e.g. VAT number). Requires billing_address with country.\n\n### Returns\n\n- `{ session_id: string; checkout_url?: string; client_secret?: string; payment_id?: string; publishable_key?: string; }`\n\n - `session_id: string`\n - `checkout_url?: string`\n - `client_secret?: string`\n - `payment_id?: string`\n - `publishable_key?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst checkoutSessionResponse = await client.checkoutSessions.create({ product_cart: [{ product_id: 'product_id', quantity: 0 }] });\n\nconsole.log(checkoutSessionResponse);\n```",
81
+ markdown: "## create\n\n`client.checkoutSessions.create(product_cart: { product_id: string; quantity: number; addons?: attach_addon[]; amount?: number; credit_entitlements?: object[]; }[], allowed_payment_method_types?: string[], billing_address?: { country: country_code; city?: string; state?: string; street?: string; zipcode?: string; }, billing_currency?: string, cancel_url?: string, confirm?: boolean, custom_fields?: { field_type: 'text' | 'number' | 'email' | 'url' | 'date' | 'dropdown' | 'boolean'; key: string; label: string; options?: string[]; placeholder?: string; required?: boolean; }[], customer?: object | object, customer_business_name?: string, customization?: { force_language?: string; show_on_demand_tag?: boolean; show_order_details?: boolean; theme?: 'dark' | 'light' | 'system'; theme_config?: theme_config; }, discount_code?: string, discount_codes?: string[], feature_flags?: { allow_currency_selection?: boolean; allow_customer_editing_business_name?: boolean; allow_customer_editing_city?: boolean; allow_customer_editing_country?: boolean; allow_customer_editing_email?: boolean; allow_customer_editing_name?: boolean; allow_customer_editing_state?: boolean; allow_customer_editing_street?: boolean; allow_customer_editing_tax_id?: boolean; allow_customer_editing_zipcode?: boolean; allow_discount_code?: boolean; allow_editing_addons?: boolean; allow_phone_number_collection?: boolean; allow_tax_id?: boolean; always_create_new_customer?: boolean; redirect_immediately?: boolean; require_phone_number?: boolean; }, force_3ds?: boolean, mandate_min_amount_inr_paise?: number, metadata?: object, minimal_address?: boolean, payment_method_id?: string, product_collection_id?: string, return_url?: string, short_link?: boolean, show_saved_payment_methods?: boolean, subscription_data?: { on_demand?: on_demand_subscription; trial_period_days?: number; }, tax_id?: string): { session_id: string; checkout_url?: string; client_secret?: string; payment_id?: string; publishable_key?: string; }`\n\n**post** `/checkouts`\n\n### Parameters\n\n- `product_cart: { product_id: string; quantity: number; addons?: { addon_id: string; quantity: number; }[]; amount?: number; credit_entitlements?: { credit_entitlement_id: string; credits_amount: string; }[]; }[]`\n\n- `allowed_payment_method_types?: string[]`\n Customers will never see payment methods that are not in this list.\nHowever, adding a method here does not guarantee customers will see it.\nAvailability still depends on other factors (e.g., customer location, merchant settings).\n\nDisclaimar: Always provide 'credit' and 'debit' as a fallback.\nIf all payment methods are unavailable, checkout session will fail.\n\n- `billing_address?: { country: string; city?: string; state?: string; street?: string; zipcode?: string; }`\n Billing address information for the session\n - `country: string`\n Two-letter ISO country code (ISO 3166-1 alpha-2)\n - `city?: string`\n City name\n - `state?: string`\n State or province name\n - `street?: string`\n Street address including house number and unit/apartment if applicable\n - `zipcode?: string`\n Postal code or ZIP code\n\n- `billing_currency?: string`\n This field is ingored if adaptive pricing is disabled\n\n- `cancel_url?: string`\n The URL to redirect the customer if they cancel or go back from the checkout.\nIf not provided, the back button will not be displayed.\n\n- `confirm?: boolean`\n If confirm is true, all the details will be finalized. If required data is missing, an API error is thrown.\n\n- `custom_fields?: { field_type: 'text' | 'number' | 'email' | 'url' | 'date' | 'dropdown' | 'boolean'; key: string; label: string; options?: string[]; placeholder?: string; required?: boolean; }[]`\n Custom fields to collect from customer during checkout (max 5 fields)\n\n- `customer?: { customer_id: string; } | { email: string; name?: string; phone_number?: string; }`\n Customer details for the session\n\n- `customer_business_name?: string`\n Optional business / legal name associated with the tax id. When provided\ntogether with a valid tax id for a B2B purchase, this name is rendered\non the invoice instead of the customer's personal name.\n\n- `customization?: { force_language?: string; show_on_demand_tag?: boolean; show_order_details?: boolean; theme?: 'dark' | 'light' | 'system'; theme_config?: { dark?: theme_mode_config; font_primary_url?: string; font_secondary_url?: string; font_size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'; font_weight?: 'normal' | 'medium' | 'bold' | 'extraBold'; light?: theme_mode_config; pay_button_text?: string; radius?: string; }; }`\n Customization for the checkout session page\n - `force_language?: string`\n Force the checkout interface to render in a specific language (e.g. `en`, `es`)\n - `show_on_demand_tag?: boolean`\n Show on demand tag\n\nDefault is true\n - `show_order_details?: boolean`\n Show order details by default\n\nDefault is true\n - `theme?: 'dark' | 'light' | 'system'`\n Theme of the page (determines which mode - light/dark/system - to use)\n\nIf not provided, uses the business-configured theme from business_themes table.\n - `theme_config?: { dark?: { bg_primary?: string; bg_secondary?: string; border_primary?: string; border_secondary?: string; button_primary?: string; button_primary_hover?: string; button_secondary?: string; button_secondary_hover?: string; button_text_primary?: string; button_text_secondary?: string; input_focus_border?: string; text_error?: string; text_placeholder?: string; text_primary?: string; text_secondary?: string; text_success?: string; }; font_primary_url?: string; font_secondary_url?: string; font_size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'; font_weight?: 'normal' | 'medium' | 'bold' | 'extraBold'; light?: { bg_primary?: string; bg_secondary?: string; border_primary?: string; border_secondary?: string; button_primary?: string; button_primary_hover?: string; button_secondary?: string; button_secondary_hover?: string; button_text_primary?: string; button_text_secondary?: string; input_focus_border?: string; text_error?: string; text_placeholder?: string; text_primary?: string; text_secondary?: string; text_success?: string; }; pay_button_text?: string; radius?: string; }`\n Optional custom theme configuration with colors for light and dark modes\n\n- `discount_code?: string`\n DEPRECATED: Use discount_codes instead. Cannot be used together with discount_codes.\n\n- `discount_codes?: string[]`\n Stacked discount codes to apply, in order. Max 20.\nCannot be used together with discount_code.\n\n- `feature_flags?: { allow_currency_selection?: boolean; allow_customer_editing_business_name?: boolean; allow_customer_editing_city?: boolean; allow_customer_editing_country?: boolean; allow_customer_editing_email?: boolean; allow_customer_editing_name?: boolean; allow_customer_editing_state?: boolean; allow_customer_editing_street?: boolean; allow_customer_editing_tax_id?: boolean; allow_customer_editing_zipcode?: boolean; allow_discount_code?: boolean; allow_editing_addons?: boolean; allow_phone_number_collection?: boolean; allow_tax_id?: boolean; always_create_new_customer?: boolean; redirect_immediately?: boolean; require_phone_number?: boolean; }`\n - `allow_currency_selection?: boolean`\n if customer is allowed to change currency, set it to true\n\nDefault is true\n - `allow_customer_editing_business_name?: boolean`\n If true, the customer can supply or edit the business name associated\nwith the tax id during checkout. Works independently of\n`allow_customer_editing_tax_id` — either flag (or `allow_tax_id`) is\nsufficient to let the customer override the session's business name.\nTypically set together with `allow_customer_editing_tax_id`.\n\nDefault is false\n - `allow_customer_editing_city?: boolean`\n - `allow_customer_editing_country?: boolean`\n - `allow_customer_editing_email?: boolean`\n - `allow_customer_editing_name?: boolean`\n - `allow_customer_editing_state?: boolean`\n - `allow_customer_editing_street?: boolean`\n - `allow_customer_editing_tax_id?: boolean`\n - `allow_customer_editing_zipcode?: boolean`\n - `allow_discount_code?: boolean`\n If the customer is allowed to apply discount code, set it to true.\n\nDefault is true\n - `allow_editing_addons?: boolean`\n If true, the customer can add or remove addons on a subscription product\nduring checkout.\n\nDefault is false\n - `allow_phone_number_collection?: boolean`\n If phone number is collected from customer, set it to rue\n\nDefault is true\n - `allow_tax_id?: boolean`\n If the customer is allowed to add tax id, set it to true\n\nDefault is true\n - `always_create_new_customer?: boolean`\n Set to true if a new customer object should be created.\nBy default email is used to find an existing customer to attach the session to\n\nDefault is false\n - `redirect_immediately?: boolean`\n If true, redirects the customer immediately after payment completion\n\nDefault is false\n - `require_phone_number?: boolean`\n If true, the customer must provide a phone number to complete checkout.\nRequires `allow_phone_number_collection` to also be true.\n\nDefault is false\n\n- `force_3ds?: boolean`\n Override merchant default 3DS behaviour for this session\n\n- `mandate_min_amount_inr_paise?: number`\n Override the merchant-level mandate floor (in INR paise) for INR\ne-mandates on Indian-card recurring payments. The mandate amount sent to\nthe processor is `max(this_floor, actual_billing_amount)`, so this is\neffectively the customer-facing authorization ceiling whenever billing is\nlower. When unset, the merchant setting applies; when that's also unset,\nthe system default of ₹15,000 applies.\n\n- `metadata?: object`\n Additional metadata associated with the payment. Defaults to empty if not provided.\n\n- `minimal_address?: boolean`\n If true, only zipcode is required when confirm is true; other address fields remain optional\n\n- `payment_method_id?: string`\n Optional payment method ID to use for this checkout session.\nOnly allowed when `confirm` is true.\nIf provided, existing customer id must also be provided.\n\n- `product_collection_id?: string`\n Product collection ID for collection-based checkout flow\n\n- `return_url?: string`\n The url to redirect after payment failure or success.\n\n- `short_link?: boolean`\n If true, returns a shortened checkout URL.\nDefaults to false if not specified.\n\n- `show_saved_payment_methods?: boolean`\n Display saved payment methods of a returning customer False by default\n\n- `subscription_data?: { on_demand?: { mandate_only: boolean; adaptive_currency_fees_inclusive?: boolean; product_currency?: currency; product_description?: string; product_price?: number; }; trial_period_days?: number; }`\n - `on_demand?: { mandate_only: boolean; adaptive_currency_fees_inclusive?: boolean; product_currency?: string; product_description?: string; product_price?: number; }`\n - `trial_period_days?: number`\n Optional trial period in days If specified, this value overrides the trial period set in the product's price Must be between 0 and 10000 days\n\n- `tax_id?: string`\n Tax ID for the customer (e.g. VAT number). Requires billing_address with country.\n\n### Returns\n\n- `{ session_id: string; checkout_url?: string; client_secret?: string; payment_id?: string; publishable_key?: string; }`\n\n - `session_id: string`\n - `checkout_url?: string`\n - `client_secret?: string`\n - `payment_id?: string`\n - `publishable_key?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst checkoutSessionResponse = await client.checkoutSessions.create({ product_cart: [{ product_id: 'product_id', quantity: 0 }] });\n\nconsole.log(checkoutSessionResponse);\n```",
82
82
  perLanguage: {
83
83
  typescript: {
84
84
  method: 'client.checkoutSessions.create',
@@ -109,7 +109,7 @@ const EMBEDDED_METHODS = [
109
109
  },
110
110
  php: {
111
111
  method: 'checkoutSessions->create',
112
- example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(bearerToken: 'My Bearer Token', environment: 'test_mode');\n\n$checkoutSessionResponse = $client->checkoutSessions->create(\n productCart: [\n [\n 'productID' => 'product_id',\n 'quantity' => 0,\n 'addons' => [['addonID' => 'addon_id', 'quantity' => 0]],\n 'amount' => 0,\n 'creditEntitlements' => [\n [\n 'creditEntitlementID' => 'credit_entitlement_id',\n 'creditsAmount' => 'credits_amount',\n ],\n ],\n ],\n ],\n allowedPaymentMethodTypes: [PaymentMethodTypes::ACH],\n billingAddress: [\n 'country' => CountryCode::AF,\n 'city' => 'city',\n 'state' => 'state',\n 'street' => 'street',\n 'zipcode' => 'zipcode',\n ],\n billingCurrency: Currency::AED,\n cancelURL: 'cancel_url',\n confirm: true,\n customFields: [\n [\n 'fieldType' => 'text',\n 'key' => 'key',\n 'label' => 'label',\n 'options' => ['string'],\n 'placeholder' => 'placeholder',\n 'required' => true,\n ],\n ],\n customer: ['customerID' => 'customer_id'],\n customerBusinessName: 'customer_business_name',\n customization: [\n 'forceLanguage' => 'force_language',\n 'showOnDemandTag' => true,\n 'showOrderDetails' => true,\n 'theme' => 'dark',\n 'themeConfig' => [\n 'dark' => [\n 'bgPrimary' => 'bg_primary',\n 'bgSecondary' => 'bg_secondary',\n 'borderPrimary' => 'border_primary',\n 'borderSecondary' => 'border_secondary',\n 'buttonPrimary' => 'button_primary',\n 'buttonPrimaryHover' => 'button_primary_hover',\n 'buttonSecondary' => 'button_secondary',\n 'buttonSecondaryHover' => 'button_secondary_hover',\n 'buttonTextPrimary' => 'button_text_primary',\n 'buttonTextSecondary' => 'button_text_secondary',\n 'inputFocusBorder' => 'input_focus_border',\n 'textError' => 'text_error',\n 'textPlaceholder' => 'text_placeholder',\n 'textPrimary' => 'text_primary',\n 'textSecondary' => 'text_secondary',\n 'textSuccess' => 'text_success',\n ],\n 'fontPrimaryURL' => 'font_primary_url',\n 'fontSecondaryURL' => 'font_secondary_url',\n 'fontSize' => 'xs',\n 'fontWeight' => 'normal',\n 'light' => [\n 'bgPrimary' => 'bg_primary',\n 'bgSecondary' => 'bg_secondary',\n 'borderPrimary' => 'border_primary',\n 'borderSecondary' => 'border_secondary',\n 'buttonPrimary' => 'button_primary',\n 'buttonPrimaryHover' => 'button_primary_hover',\n 'buttonSecondary' => 'button_secondary',\n 'buttonSecondaryHover' => 'button_secondary_hover',\n 'buttonTextPrimary' => 'button_text_primary',\n 'buttonTextSecondary' => 'button_text_secondary',\n 'inputFocusBorder' => 'input_focus_border',\n 'textError' => 'text_error',\n 'textPlaceholder' => 'text_placeholder',\n 'textPrimary' => 'text_primary',\n 'textSecondary' => 'text_secondary',\n 'textSuccess' => 'text_success',\n ],\n 'payButtonText' => 'pay_button_text',\n 'radius' => 'radius',\n ],\n ],\n discountCode: 'discount_code',\n discountCodes: ['string'],\n featureFlags: [\n 'allowCurrencySelection' => true,\n 'allowCustomerEditingBusinessName' => true,\n 'allowCustomerEditingCity' => true,\n 'allowCustomerEditingCountry' => true,\n 'allowCustomerEditingEmail' => true,\n 'allowCustomerEditingName' => true,\n 'allowCustomerEditingState' => true,\n 'allowCustomerEditingStreet' => true,\n 'allowCustomerEditingTaxID' => true,\n 'allowCustomerEditingZipcode' => true,\n 'allowDiscountCode' => true,\n 'allowPhoneNumberCollection' => true,\n 'allowTaxID' => true,\n 'alwaysCreateNewCustomer' => true,\n 'redirectImmediately' => true,\n 'requirePhoneNumber' => true,\n ],\n force3DS: true,\n mandateMinAmountInrPaise: 0,\n metadata: ['foo' => 'string'],\n minimalAddress: true,\n paymentMethodID: 'payment_method_id',\n productCollectionID: 'product_collection_id',\n returnURL: 'return_url',\n shortLink: true,\n showSavedPaymentMethods: true,\n subscriptionData: [\n 'onDemand' => [\n 'mandateOnly' => true,\n 'adaptiveCurrencyFeesInclusive' => true,\n 'productCurrency' => Currency::AED,\n 'productDescription' => 'product_description',\n 'productPrice' => 0,\n ],\n 'trialPeriodDays' => 0,\n ],\n taxID: 'tax_id',\n);\n\nvar_dump($checkoutSessionResponse);",
112
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(bearerToken: 'My Bearer Token', environment: 'test_mode');\n\n$checkoutSessionResponse = $client->checkoutSessions->create(\n productCart: [\n [\n 'productID' => 'product_id',\n 'quantity' => 0,\n 'addons' => [['addonID' => 'addon_id', 'quantity' => 0]],\n 'amount' => 0,\n 'creditEntitlements' => [\n [\n 'creditEntitlementID' => 'credit_entitlement_id',\n 'creditsAmount' => 'credits_amount',\n ],\n ],\n ],\n ],\n allowedPaymentMethodTypes: [PaymentMethodTypes::ACH],\n billingAddress: [\n 'country' => CountryCode::AF,\n 'city' => 'city',\n 'state' => 'state',\n 'street' => 'street',\n 'zipcode' => 'zipcode',\n ],\n billingCurrency: Currency::AED,\n cancelURL: 'cancel_url',\n confirm: true,\n customFields: [\n [\n 'fieldType' => 'text',\n 'key' => 'key',\n 'label' => 'label',\n 'options' => ['string'],\n 'placeholder' => 'placeholder',\n 'required' => true,\n ],\n ],\n customer: ['customerID' => 'customer_id'],\n customerBusinessName: 'customer_business_name',\n customization: [\n 'forceLanguage' => 'force_language',\n 'showOnDemandTag' => true,\n 'showOrderDetails' => true,\n 'theme' => 'dark',\n 'themeConfig' => [\n 'dark' => [\n 'bgPrimary' => 'bg_primary',\n 'bgSecondary' => 'bg_secondary',\n 'borderPrimary' => 'border_primary',\n 'borderSecondary' => 'border_secondary',\n 'buttonPrimary' => 'button_primary',\n 'buttonPrimaryHover' => 'button_primary_hover',\n 'buttonSecondary' => 'button_secondary',\n 'buttonSecondaryHover' => 'button_secondary_hover',\n 'buttonTextPrimary' => 'button_text_primary',\n 'buttonTextSecondary' => 'button_text_secondary',\n 'inputFocusBorder' => 'input_focus_border',\n 'textError' => 'text_error',\n 'textPlaceholder' => 'text_placeholder',\n 'textPrimary' => 'text_primary',\n 'textSecondary' => 'text_secondary',\n 'textSuccess' => 'text_success',\n ],\n 'fontPrimaryURL' => 'font_primary_url',\n 'fontSecondaryURL' => 'font_secondary_url',\n 'fontSize' => 'xs',\n 'fontWeight' => 'normal',\n 'light' => [\n 'bgPrimary' => 'bg_primary',\n 'bgSecondary' => 'bg_secondary',\n 'borderPrimary' => 'border_primary',\n 'borderSecondary' => 'border_secondary',\n 'buttonPrimary' => 'button_primary',\n 'buttonPrimaryHover' => 'button_primary_hover',\n 'buttonSecondary' => 'button_secondary',\n 'buttonSecondaryHover' => 'button_secondary_hover',\n 'buttonTextPrimary' => 'button_text_primary',\n 'buttonTextSecondary' => 'button_text_secondary',\n 'inputFocusBorder' => 'input_focus_border',\n 'textError' => 'text_error',\n 'textPlaceholder' => 'text_placeholder',\n 'textPrimary' => 'text_primary',\n 'textSecondary' => 'text_secondary',\n 'textSuccess' => 'text_success',\n ],\n 'payButtonText' => 'pay_button_text',\n 'radius' => 'radius',\n ],\n ],\n discountCode: 'discount_code',\n discountCodes: ['string'],\n featureFlags: [\n 'allowCurrencySelection' => true,\n 'allowCustomerEditingBusinessName' => true,\n 'allowCustomerEditingCity' => true,\n 'allowCustomerEditingCountry' => true,\n 'allowCustomerEditingEmail' => true,\n 'allowCustomerEditingName' => true,\n 'allowCustomerEditingState' => true,\n 'allowCustomerEditingStreet' => true,\n 'allowCustomerEditingTaxID' => true,\n 'allowCustomerEditingZipcode' => true,\n 'allowDiscountCode' => true,\n 'allowEditingAddons' => true,\n 'allowPhoneNumberCollection' => true,\n 'allowTaxID' => true,\n 'alwaysCreateNewCustomer' => true,\n 'redirectImmediately' => true,\n 'requirePhoneNumber' => true,\n ],\n force3DS: true,\n mandateMinAmountInrPaise: 0,\n metadata: ['foo' => 'string'],\n minimalAddress: true,\n paymentMethodID: 'payment_method_id',\n productCollectionID: 'product_collection_id',\n returnURL: 'return_url',\n shortLink: true,\n showSavedPaymentMethods: true,\n subscriptionData: [\n 'onDemand' => [\n 'mandateOnly' => true,\n 'adaptiveCurrencyFeesInclusive' => true,\n 'productCurrency' => Currency::AED,\n 'productDescription' => 'product_description',\n 'productPrice' => 0,\n ],\n 'trialPeriodDays' => 0,\n ],\n taxID: 'tax_id',\n);\n\nvar_dump($checkoutSessionResponse);",
113
113
  },
114
114
  csharp: {
115
115
  method: 'CheckoutSessions.Create',
@@ -187,7 +187,7 @@ const EMBEDDED_METHODS = [
187
187
  "customization?: { force_language?: string; show_on_demand_tag?: boolean; show_order_details?: boolean; theme?: 'dark' | 'light' | 'system'; theme_config?: { dark?: theme_mode_config; font_primary_url?: string; font_secondary_url?: string; font_size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'; font_weight?: 'normal' | 'medium' | 'bold' | 'extraBold'; light?: theme_mode_config; pay_button_text?: string; radius?: string; }; };",
188
188
  'discount_code?: string;',
189
189
  'discount_codes?: string[];',
190
- 'feature_flags?: { allow_currency_selection?: boolean; allow_customer_editing_business_name?: boolean; allow_customer_editing_city?: boolean; allow_customer_editing_country?: boolean; allow_customer_editing_email?: boolean; allow_customer_editing_name?: boolean; allow_customer_editing_state?: boolean; allow_customer_editing_street?: boolean; allow_customer_editing_tax_id?: boolean; allow_customer_editing_zipcode?: boolean; allow_discount_code?: boolean; allow_phone_number_collection?: boolean; allow_tax_id?: boolean; always_create_new_customer?: boolean; redirect_immediately?: boolean; require_phone_number?: boolean; };',
190
+ 'feature_flags?: { allow_currency_selection?: boolean; allow_customer_editing_business_name?: boolean; allow_customer_editing_city?: boolean; allow_customer_editing_country?: boolean; allow_customer_editing_email?: boolean; allow_customer_editing_name?: boolean; allow_customer_editing_state?: boolean; allow_customer_editing_street?: boolean; allow_customer_editing_tax_id?: boolean; allow_customer_editing_zipcode?: boolean; allow_discount_code?: boolean; allow_editing_addons?: boolean; allow_phone_number_collection?: boolean; allow_tax_id?: boolean; always_create_new_customer?: boolean; redirect_immediately?: boolean; require_phone_number?: boolean; };',
191
191
  'force_3ds?: boolean;',
192
192
  'mandate_min_amount_inr_paise?: number;',
193
193
  'metadata?: object;',
@@ -201,7 +201,7 @@ const EMBEDDED_METHODS = [
201
201
  'tax_id?: string;',
202
202
  ],
203
203
  response: '{ billing_country: string; currency: string; current_breakup: { discount: number; subtotal: number; total_amount: number; tax?: number; }; is_byop: boolean; product_cart: { credit_entitlements: object[]; currency: currency; discounted_price: number; is_subscription: boolean; is_usage_based: boolean; meters: object[]; og_currency: currency; og_price: number; product_id: string; quantity: number; tax_category: tax_category; tax_inclusive: boolean; tax_rate: number; addons?: object[]; description?: string; discount_amount?: number; discount_cycle?: number; name?: string; tax?: number; }[]; total_price: number; recurring_breakup?: { discount: number; subtotal: number; total_amount: number; tax?: number; }; tax_id_business_name?: string; tax_id_err_msg?: string; tax_id_format_name?: string; total_tax?: number; }',
204
- markdown: "## preview\n\n`client.checkoutSessions.preview(product_cart: { product_id: string; quantity: number; addons?: attach_addon[]; amount?: number; credit_entitlements?: object[]; }[], allowed_payment_method_types?: string[], billing_address?: { country: country_code; city?: string; state?: string; street?: string; zipcode?: string; }, billing_currency?: string, cancel_url?: string, confirm?: boolean, custom_fields?: { field_type: 'text' | 'number' | 'email' | 'url' | 'date' | 'dropdown' | 'boolean'; key: string; label: string; options?: string[]; placeholder?: string; required?: boolean; }[], customer?: object | object, customer_business_name?: string, customization?: { force_language?: string; show_on_demand_tag?: boolean; show_order_details?: boolean; theme?: 'dark' | 'light' | 'system'; theme_config?: theme_config; }, discount_code?: string, discount_codes?: string[], feature_flags?: { allow_currency_selection?: boolean; allow_customer_editing_business_name?: boolean; allow_customer_editing_city?: boolean; allow_customer_editing_country?: boolean; allow_customer_editing_email?: boolean; allow_customer_editing_name?: boolean; allow_customer_editing_state?: boolean; allow_customer_editing_street?: boolean; allow_customer_editing_tax_id?: boolean; allow_customer_editing_zipcode?: boolean; allow_discount_code?: boolean; allow_phone_number_collection?: boolean; allow_tax_id?: boolean; always_create_new_customer?: boolean; redirect_immediately?: boolean; require_phone_number?: boolean; }, force_3ds?: boolean, mandate_min_amount_inr_paise?: number, metadata?: object, minimal_address?: boolean, payment_method_id?: string, product_collection_id?: string, return_url?: string, short_link?: boolean, show_saved_payment_methods?: boolean, subscription_data?: { on_demand?: on_demand_subscription; trial_period_days?: number; }, tax_id?: string): { billing_country: country_code; currency: currency; current_breakup: object; is_byop: boolean; product_cart: object[]; total_price: number; recurring_breakup?: object; tax_id_business_name?: string; tax_id_err_msg?: string; tax_id_format_name?: string; total_tax?: number; }`\n\n**post** `/checkouts/preview`\n\n### Parameters\n\n- `product_cart: { product_id: string; quantity: number; addons?: { addon_id: string; quantity: number; }[]; amount?: number; credit_entitlements?: { credit_entitlement_id: string; credits_amount: string; }[]; }[]`\n\n- `allowed_payment_method_types?: string[]`\n Customers will never see payment methods that are not in this list.\nHowever, adding a method here does not guarantee customers will see it.\nAvailability still depends on other factors (e.g., customer location, merchant settings).\n\nDisclaimar: Always provide 'credit' and 'debit' as a fallback.\nIf all payment methods are unavailable, checkout session will fail.\n\n- `billing_address?: { country: string; city?: string; state?: string; street?: string; zipcode?: string; }`\n Billing address information for the session\n - `country: string`\n Two-letter ISO country code (ISO 3166-1 alpha-2)\n - `city?: string`\n City name\n - `state?: string`\n State or province name\n - `street?: string`\n Street address including house number and unit/apartment if applicable\n - `zipcode?: string`\n Postal code or ZIP code\n\n- `billing_currency?: string`\n This field is ingored if adaptive pricing is disabled\n\n- `cancel_url?: string`\n The URL to redirect the customer if they cancel or go back from the checkout.\nIf not provided, the back button will not be displayed.\n\n- `confirm?: boolean`\n If confirm is true, all the details will be finalized. If required data is missing, an API error is thrown.\n\n- `custom_fields?: { field_type: 'text' | 'number' | 'email' | 'url' | 'date' | 'dropdown' | 'boolean'; key: string; label: string; options?: string[]; placeholder?: string; required?: boolean; }[]`\n Custom fields to collect from customer during checkout (max 5 fields)\n\n- `customer?: { customer_id: string; } | { email: string; name?: string; phone_number?: string; }`\n Customer details for the session\n\n- `customer_business_name?: string`\n Optional business / legal name associated with the tax id. When provided\ntogether with a valid tax id for a B2B purchase, this name is rendered\non the invoice instead of the customer's personal name.\n\n- `customization?: { force_language?: string; show_on_demand_tag?: boolean; show_order_details?: boolean; theme?: 'dark' | 'light' | 'system'; theme_config?: { dark?: theme_mode_config; font_primary_url?: string; font_secondary_url?: string; font_size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'; font_weight?: 'normal' | 'medium' | 'bold' | 'extraBold'; light?: theme_mode_config; pay_button_text?: string; radius?: string; }; }`\n Customization for the checkout session page\n - `force_language?: string`\n Force the checkout interface to render in a specific language (e.g. `en`, `es`)\n - `show_on_demand_tag?: boolean`\n Show on demand tag\n\nDefault is true\n - `show_order_details?: boolean`\n Show order details by default\n\nDefault is true\n - `theme?: 'dark' | 'light' | 'system'`\n Theme of the page (determines which mode - light/dark/system - to use)\n\nIf not provided, uses the business-configured theme from business_themes table.\n - `theme_config?: { dark?: { bg_primary?: string; bg_secondary?: string; border_primary?: string; border_secondary?: string; button_primary?: string; button_primary_hover?: string; button_secondary?: string; button_secondary_hover?: string; button_text_primary?: string; button_text_secondary?: string; input_focus_border?: string; text_error?: string; text_placeholder?: string; text_primary?: string; text_secondary?: string; text_success?: string; }; font_primary_url?: string; font_secondary_url?: string; font_size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'; font_weight?: 'normal' | 'medium' | 'bold' | 'extraBold'; light?: { bg_primary?: string; bg_secondary?: string; border_primary?: string; border_secondary?: string; button_primary?: string; button_primary_hover?: string; button_secondary?: string; button_secondary_hover?: string; button_text_primary?: string; button_text_secondary?: string; input_focus_border?: string; text_error?: string; text_placeholder?: string; text_primary?: string; text_secondary?: string; text_success?: string; }; pay_button_text?: string; radius?: string; }`\n Optional custom theme configuration with colors for light and dark modes\n\n- `discount_code?: string`\n DEPRECATED: Use discount_codes instead. Cannot be used together with discount_codes.\n\n- `discount_codes?: string[]`\n Stacked discount codes to apply, in order. Max 20.\nCannot be used together with discount_code.\n\n- `feature_flags?: { allow_currency_selection?: boolean; allow_customer_editing_business_name?: boolean; allow_customer_editing_city?: boolean; allow_customer_editing_country?: boolean; allow_customer_editing_email?: boolean; allow_customer_editing_name?: boolean; allow_customer_editing_state?: boolean; allow_customer_editing_street?: boolean; allow_customer_editing_tax_id?: boolean; allow_customer_editing_zipcode?: boolean; allow_discount_code?: boolean; allow_phone_number_collection?: boolean; allow_tax_id?: boolean; always_create_new_customer?: boolean; redirect_immediately?: boolean; require_phone_number?: boolean; }`\n - `allow_currency_selection?: boolean`\n if customer is allowed to change currency, set it to true\n\nDefault is true\n - `allow_customer_editing_business_name?: boolean`\n If true, the customer can supply or edit the business name associated\nwith the tax id during checkout. Works independently of\n`allow_customer_editing_tax_id` — either flag (or `allow_tax_id`) is\nsufficient to let the customer override the session's business name.\nTypically set together with `allow_customer_editing_tax_id`.\n\nDefault is false\n - `allow_customer_editing_city?: boolean`\n - `allow_customer_editing_country?: boolean`\n - `allow_customer_editing_email?: boolean`\n - `allow_customer_editing_name?: boolean`\n - `allow_customer_editing_state?: boolean`\n - `allow_customer_editing_street?: boolean`\n - `allow_customer_editing_tax_id?: boolean`\n - `allow_customer_editing_zipcode?: boolean`\n - `allow_discount_code?: boolean`\n If the customer is allowed to apply discount code, set it to true.\n\nDefault is true\n - `allow_phone_number_collection?: boolean`\n If phone number is collected from customer, set it to rue\n\nDefault is true\n - `allow_tax_id?: boolean`\n If the customer is allowed to add tax id, set it to true\n\nDefault is true\n - `always_create_new_customer?: boolean`\n Set to true if a new customer object should be created.\nBy default email is used to find an existing customer to attach the session to\n\nDefault is false\n - `redirect_immediately?: boolean`\n If true, redirects the customer immediately after payment completion\n\nDefault is false\n - `require_phone_number?: boolean`\n If true, the customer must provide a phone number to complete checkout.\nRequires `allow_phone_number_collection` to also be true.\n\nDefault is false\n\n- `force_3ds?: boolean`\n Override merchant default 3DS behaviour for this session\n\n- `mandate_min_amount_inr_paise?: number`\n Override the merchant-level mandate floor (in INR paise) for INR\ne-mandates on Indian-card recurring payments. The mandate amount sent to\nthe processor is `max(this_floor, actual_billing_amount)`, so this is\neffectively the customer-facing authorization ceiling whenever billing is\nlower. When unset, the merchant setting applies; when that's also unset,\nthe system default of ₹15,000 applies.\n\n- `metadata?: object`\n Additional metadata associated with the payment. Defaults to empty if not provided.\n\n- `minimal_address?: boolean`\n If true, only zipcode is required when confirm is true; other address fields remain optional\n\n- `payment_method_id?: string`\n Optional payment method ID to use for this checkout session.\nOnly allowed when `confirm` is true.\nIf provided, existing customer id must also be provided.\n\n- `product_collection_id?: string`\n Product collection ID for collection-based checkout flow\n\n- `return_url?: string`\n The url to redirect after payment failure or success.\n\n- `short_link?: boolean`\n If true, returns a shortened checkout URL.\nDefaults to false if not specified.\n\n- `show_saved_payment_methods?: boolean`\n Display saved payment methods of a returning customer False by default\n\n- `subscription_data?: { on_demand?: { mandate_only: boolean; adaptive_currency_fees_inclusive?: boolean; product_currency?: currency; product_description?: string; product_price?: number; }; trial_period_days?: number; }`\n - `on_demand?: { mandate_only: boolean; adaptive_currency_fees_inclusive?: boolean; product_currency?: string; product_description?: string; product_price?: number; }`\n - `trial_period_days?: number`\n Optional trial period in days If specified, this value overrides the trial period set in the product's price Must be between 0 and 10000 days\n\n- `tax_id?: string`\n Tax ID for the customer (e.g. VAT number). Requires billing_address with country.\n\n### Returns\n\n- `{ billing_country: string; currency: string; current_breakup: { discount: number; subtotal: number; total_amount: number; tax?: number; }; is_byop: boolean; product_cart: { credit_entitlements: { credit_entitlement_id: string; credit_entitlement_name: string; credit_entitlement_unit: string; credits_amount: string; }[]; currency: string; discounted_price: number; is_subscription: boolean; is_usage_based: boolean; meters: { measurement_unit: string; name: string; price_per_unit: string; description?: string; free_threshold?: number; }[]; og_currency: string; og_price: number; product_id: string; quantity: number; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; tax_inclusive: boolean; tax_rate: number; addons?: { addon_id: string; currency: currency; discounted_price: number; name: string; og_currency: currency; og_price: number; quantity: number; tax_category: tax_category; tax_inclusive: boolean; tax_rate: number; description?: string; discount_amount?: number; tax?: number; }[]; description?: string; discount_amount?: number; discount_cycle?: number; name?: string; tax?: number; }[]; total_price: number; recurring_breakup?: { discount: number; subtotal: number; total_amount: number; tax?: number; }; tax_id_business_name?: string; tax_id_err_msg?: string; tax_id_format_name?: string; total_tax?: number; }`\n Data returned by the calculate checkout session API\n\n - `billing_country: string`\n - `currency: string`\n - `current_breakup: { discount: number; subtotal: number; total_amount: number; tax?: number; }`\n - `is_byop: boolean`\n - `product_cart: { credit_entitlements: { credit_entitlement_id: string; credit_entitlement_name: string; credit_entitlement_unit: string; credits_amount: string; }[]; currency: string; discounted_price: number; is_subscription: boolean; is_usage_based: boolean; meters: { measurement_unit: string; name: string; price_per_unit: string; description?: string; free_threshold?: number; }[]; og_currency: string; og_price: number; product_id: string; quantity: number; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; tax_inclusive: boolean; tax_rate: number; addons?: { addon_id: string; currency: string; discounted_price: number; name: string; og_currency: string; og_price: number; quantity: number; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; tax_inclusive: boolean; tax_rate: number; description?: string; discount_amount?: number; tax?: number; }[]; description?: string; discount_amount?: number; discount_cycle?: number; name?: string; tax?: number; }[]`\n - `total_price: number`\n - `recurring_breakup?: { discount: number; subtotal: number; total_amount: number; tax?: number; }`\n - `tax_id_business_name?: string`\n - `tax_id_err_msg?: string`\n - `tax_id_format_name?: string`\n - `total_tax?: number`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst response = await client.checkoutSessions.preview({ product_cart: [{ product_id: 'product_id', quantity: 0 }] });\n\nconsole.log(response);\n```",
204
+ markdown: "## preview\n\n`client.checkoutSessions.preview(product_cart: { product_id: string; quantity: number; addons?: attach_addon[]; amount?: number; credit_entitlements?: object[]; }[], allowed_payment_method_types?: string[], billing_address?: { country: country_code; city?: string; state?: string; street?: string; zipcode?: string; }, billing_currency?: string, cancel_url?: string, confirm?: boolean, custom_fields?: { field_type: 'text' | 'number' | 'email' | 'url' | 'date' | 'dropdown' | 'boolean'; key: string; label: string; options?: string[]; placeholder?: string; required?: boolean; }[], customer?: object | object, customer_business_name?: string, customization?: { force_language?: string; show_on_demand_tag?: boolean; show_order_details?: boolean; theme?: 'dark' | 'light' | 'system'; theme_config?: theme_config; }, discount_code?: string, discount_codes?: string[], feature_flags?: { allow_currency_selection?: boolean; allow_customer_editing_business_name?: boolean; allow_customer_editing_city?: boolean; allow_customer_editing_country?: boolean; allow_customer_editing_email?: boolean; allow_customer_editing_name?: boolean; allow_customer_editing_state?: boolean; allow_customer_editing_street?: boolean; allow_customer_editing_tax_id?: boolean; allow_customer_editing_zipcode?: boolean; allow_discount_code?: boolean; allow_editing_addons?: boolean; allow_phone_number_collection?: boolean; allow_tax_id?: boolean; always_create_new_customer?: boolean; redirect_immediately?: boolean; require_phone_number?: boolean; }, force_3ds?: boolean, mandate_min_amount_inr_paise?: number, metadata?: object, minimal_address?: boolean, payment_method_id?: string, product_collection_id?: string, return_url?: string, short_link?: boolean, show_saved_payment_methods?: boolean, subscription_data?: { on_demand?: on_demand_subscription; trial_period_days?: number; }, tax_id?: string): { billing_country: country_code; currency: currency; current_breakup: object; is_byop: boolean; product_cart: object[]; total_price: number; recurring_breakup?: object; tax_id_business_name?: string; tax_id_err_msg?: string; tax_id_format_name?: string; total_tax?: number; }`\n\n**post** `/checkouts/preview`\n\n### Parameters\n\n- `product_cart: { product_id: string; quantity: number; addons?: { addon_id: string; quantity: number; }[]; amount?: number; credit_entitlements?: { credit_entitlement_id: string; credits_amount: string; }[]; }[]`\n\n- `allowed_payment_method_types?: string[]`\n Customers will never see payment methods that are not in this list.\nHowever, adding a method here does not guarantee customers will see it.\nAvailability still depends on other factors (e.g., customer location, merchant settings).\n\nDisclaimar: Always provide 'credit' and 'debit' as a fallback.\nIf all payment methods are unavailable, checkout session will fail.\n\n- `billing_address?: { country: string; city?: string; state?: string; street?: string; zipcode?: string; }`\n Billing address information for the session\n - `country: string`\n Two-letter ISO country code (ISO 3166-1 alpha-2)\n - `city?: string`\n City name\n - `state?: string`\n State or province name\n - `street?: string`\n Street address including house number and unit/apartment if applicable\n - `zipcode?: string`\n Postal code or ZIP code\n\n- `billing_currency?: string`\n This field is ingored if adaptive pricing is disabled\n\n- `cancel_url?: string`\n The URL to redirect the customer if they cancel or go back from the checkout.\nIf not provided, the back button will not be displayed.\n\n- `confirm?: boolean`\n If confirm is true, all the details will be finalized. If required data is missing, an API error is thrown.\n\n- `custom_fields?: { field_type: 'text' | 'number' | 'email' | 'url' | 'date' | 'dropdown' | 'boolean'; key: string; label: string; options?: string[]; placeholder?: string; required?: boolean; }[]`\n Custom fields to collect from customer during checkout (max 5 fields)\n\n- `customer?: { customer_id: string; } | { email: string; name?: string; phone_number?: string; }`\n Customer details for the session\n\n- `customer_business_name?: string`\n Optional business / legal name associated with the tax id. When provided\ntogether with a valid tax id for a B2B purchase, this name is rendered\non the invoice instead of the customer's personal name.\n\n- `customization?: { force_language?: string; show_on_demand_tag?: boolean; show_order_details?: boolean; theme?: 'dark' | 'light' | 'system'; theme_config?: { dark?: theme_mode_config; font_primary_url?: string; font_secondary_url?: string; font_size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'; font_weight?: 'normal' | 'medium' | 'bold' | 'extraBold'; light?: theme_mode_config; pay_button_text?: string; radius?: string; }; }`\n Customization for the checkout session page\n - `force_language?: string`\n Force the checkout interface to render in a specific language (e.g. `en`, `es`)\n - `show_on_demand_tag?: boolean`\n Show on demand tag\n\nDefault is true\n - `show_order_details?: boolean`\n Show order details by default\n\nDefault is true\n - `theme?: 'dark' | 'light' | 'system'`\n Theme of the page (determines which mode - light/dark/system - to use)\n\nIf not provided, uses the business-configured theme from business_themes table.\n - `theme_config?: { dark?: { bg_primary?: string; bg_secondary?: string; border_primary?: string; border_secondary?: string; button_primary?: string; button_primary_hover?: string; button_secondary?: string; button_secondary_hover?: string; button_text_primary?: string; button_text_secondary?: string; input_focus_border?: string; text_error?: string; text_placeholder?: string; text_primary?: string; text_secondary?: string; text_success?: string; }; font_primary_url?: string; font_secondary_url?: string; font_size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'; font_weight?: 'normal' | 'medium' | 'bold' | 'extraBold'; light?: { bg_primary?: string; bg_secondary?: string; border_primary?: string; border_secondary?: string; button_primary?: string; button_primary_hover?: string; button_secondary?: string; button_secondary_hover?: string; button_text_primary?: string; button_text_secondary?: string; input_focus_border?: string; text_error?: string; text_placeholder?: string; text_primary?: string; text_secondary?: string; text_success?: string; }; pay_button_text?: string; radius?: string; }`\n Optional custom theme configuration with colors for light and dark modes\n\n- `discount_code?: string`\n DEPRECATED: Use discount_codes instead. Cannot be used together with discount_codes.\n\n- `discount_codes?: string[]`\n Stacked discount codes to apply, in order. Max 20.\nCannot be used together with discount_code.\n\n- `feature_flags?: { allow_currency_selection?: boolean; allow_customer_editing_business_name?: boolean; allow_customer_editing_city?: boolean; allow_customer_editing_country?: boolean; allow_customer_editing_email?: boolean; allow_customer_editing_name?: boolean; allow_customer_editing_state?: boolean; allow_customer_editing_street?: boolean; allow_customer_editing_tax_id?: boolean; allow_customer_editing_zipcode?: boolean; allow_discount_code?: boolean; allow_editing_addons?: boolean; allow_phone_number_collection?: boolean; allow_tax_id?: boolean; always_create_new_customer?: boolean; redirect_immediately?: boolean; require_phone_number?: boolean; }`\n - `allow_currency_selection?: boolean`\n if customer is allowed to change currency, set it to true\n\nDefault is true\n - `allow_customer_editing_business_name?: boolean`\n If true, the customer can supply or edit the business name associated\nwith the tax id during checkout. Works independently of\n`allow_customer_editing_tax_id` — either flag (or `allow_tax_id`) is\nsufficient to let the customer override the session's business name.\nTypically set together with `allow_customer_editing_tax_id`.\n\nDefault is false\n - `allow_customer_editing_city?: boolean`\n - `allow_customer_editing_country?: boolean`\n - `allow_customer_editing_email?: boolean`\n - `allow_customer_editing_name?: boolean`\n - `allow_customer_editing_state?: boolean`\n - `allow_customer_editing_street?: boolean`\n - `allow_customer_editing_tax_id?: boolean`\n - `allow_customer_editing_zipcode?: boolean`\n - `allow_discount_code?: boolean`\n If the customer is allowed to apply discount code, set it to true.\n\nDefault is true\n - `allow_editing_addons?: boolean`\n If true, the customer can add or remove addons on a subscription product\nduring checkout.\n\nDefault is false\n - `allow_phone_number_collection?: boolean`\n If phone number is collected from customer, set it to rue\n\nDefault is true\n - `allow_tax_id?: boolean`\n If the customer is allowed to add tax id, set it to true\n\nDefault is true\n - `always_create_new_customer?: boolean`\n Set to true if a new customer object should be created.\nBy default email is used to find an existing customer to attach the session to\n\nDefault is false\n - `redirect_immediately?: boolean`\n If true, redirects the customer immediately after payment completion\n\nDefault is false\n - `require_phone_number?: boolean`\n If true, the customer must provide a phone number to complete checkout.\nRequires `allow_phone_number_collection` to also be true.\n\nDefault is false\n\n- `force_3ds?: boolean`\n Override merchant default 3DS behaviour for this session\n\n- `mandate_min_amount_inr_paise?: number`\n Override the merchant-level mandate floor (in INR paise) for INR\ne-mandates on Indian-card recurring payments. The mandate amount sent to\nthe processor is `max(this_floor, actual_billing_amount)`, so this is\neffectively the customer-facing authorization ceiling whenever billing is\nlower. When unset, the merchant setting applies; when that's also unset,\nthe system default of ₹15,000 applies.\n\n- `metadata?: object`\n Additional metadata associated with the payment. Defaults to empty if not provided.\n\n- `minimal_address?: boolean`\n If true, only zipcode is required when confirm is true; other address fields remain optional\n\n- `payment_method_id?: string`\n Optional payment method ID to use for this checkout session.\nOnly allowed when `confirm` is true.\nIf provided, existing customer id must also be provided.\n\n- `product_collection_id?: string`\n Product collection ID for collection-based checkout flow\n\n- `return_url?: string`\n The url to redirect after payment failure or success.\n\n- `short_link?: boolean`\n If true, returns a shortened checkout URL.\nDefaults to false if not specified.\n\n- `show_saved_payment_methods?: boolean`\n Display saved payment methods of a returning customer False by default\n\n- `subscription_data?: { on_demand?: { mandate_only: boolean; adaptive_currency_fees_inclusive?: boolean; product_currency?: currency; product_description?: string; product_price?: number; }; trial_period_days?: number; }`\n - `on_demand?: { mandate_only: boolean; adaptive_currency_fees_inclusive?: boolean; product_currency?: string; product_description?: string; product_price?: number; }`\n - `trial_period_days?: number`\n Optional trial period in days If specified, this value overrides the trial period set in the product's price Must be between 0 and 10000 days\n\n- `tax_id?: string`\n Tax ID for the customer (e.g. VAT number). Requires billing_address with country.\n\n### Returns\n\n- `{ billing_country: string; currency: string; current_breakup: { discount: number; subtotal: number; total_amount: number; tax?: number; }; is_byop: boolean; product_cart: { credit_entitlements: { credit_entitlement_id: string; credit_entitlement_name: string; credit_entitlement_unit: string; credits_amount: string; }[]; currency: string; discounted_price: number; is_subscription: boolean; is_usage_based: boolean; meters: { measurement_unit: string; name: string; price_per_unit: string; description?: string; free_threshold?: number; }[]; og_currency: string; og_price: number; product_id: string; quantity: number; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; tax_inclusive: boolean; tax_rate: number; addons?: { addon_id: string; currency: currency; discounted_price: number; name: string; og_currency: currency; og_price: number; quantity: number; tax_category: tax_category; tax_inclusive: boolean; tax_rate: number; description?: string; discount_amount?: number; tax?: number; }[]; description?: string; discount_amount?: number; discount_cycle?: number; name?: string; tax?: number; }[]; total_price: number; recurring_breakup?: { discount: number; subtotal: number; total_amount: number; tax?: number; }; tax_id_business_name?: string; tax_id_err_msg?: string; tax_id_format_name?: string; total_tax?: number; }`\n Data returned by the calculate checkout session API\n\n - `billing_country: string`\n - `currency: string`\n - `current_breakup: { discount: number; subtotal: number; total_amount: number; tax?: number; }`\n - `is_byop: boolean`\n - `product_cart: { credit_entitlements: { credit_entitlement_id: string; credit_entitlement_name: string; credit_entitlement_unit: string; credits_amount: string; }[]; currency: string; discounted_price: number; is_subscription: boolean; is_usage_based: boolean; meters: { measurement_unit: string; name: string; price_per_unit: string; description?: string; free_threshold?: number; }[]; og_currency: string; og_price: number; product_id: string; quantity: number; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; tax_inclusive: boolean; tax_rate: number; addons?: { addon_id: string; currency: string; discounted_price: number; name: string; og_currency: string; og_price: number; quantity: number; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; tax_inclusive: boolean; tax_rate: number; description?: string; discount_amount?: number; tax?: number; }[]; description?: string; discount_amount?: number; discount_cycle?: number; name?: string; tax?: number; }[]`\n - `total_price: number`\n - `recurring_breakup?: { discount: number; subtotal: number; total_amount: number; tax?: number; }`\n - `tax_id_business_name?: string`\n - `tax_id_err_msg?: string`\n - `tax_id_format_name?: string`\n - `total_tax?: number`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst response = await client.checkoutSessions.preview({ product_cart: [{ product_id: 'product_id', quantity: 0 }] });\n\nconsole.log(response);\n```",
205
205
  perLanguage: {
206
206
  typescript: {
207
207
  method: 'client.checkoutSessions.preview',
@@ -232,7 +232,7 @@ const EMBEDDED_METHODS = [
232
232
  },
233
233
  php: {
234
234
  method: 'checkoutSessions->preview',
235
- example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(bearerToken: 'My Bearer Token', environment: 'test_mode');\n\n$response = $client->checkoutSessions->preview(\n productCart: [\n [\n 'productID' => 'product_id',\n 'quantity' => 0,\n 'addons' => [['addonID' => 'addon_id', 'quantity' => 0]],\n 'amount' => 0,\n 'creditEntitlements' => [\n [\n 'creditEntitlementID' => 'credit_entitlement_id',\n 'creditsAmount' => 'credits_amount',\n ],\n ],\n ],\n ],\n allowedPaymentMethodTypes: [PaymentMethodTypes::ACH],\n billingAddress: [\n 'country' => CountryCode::AF,\n 'city' => 'city',\n 'state' => 'state',\n 'street' => 'street',\n 'zipcode' => 'zipcode',\n ],\n billingCurrency: Currency::AED,\n cancelURL: 'cancel_url',\n confirm: true,\n customFields: [\n [\n 'fieldType' => 'text',\n 'key' => 'key',\n 'label' => 'label',\n 'options' => ['string'],\n 'placeholder' => 'placeholder',\n 'required' => true,\n ],\n ],\n customer: ['customerID' => 'customer_id'],\n customerBusinessName: 'customer_business_name',\n customization: [\n 'forceLanguage' => 'force_language',\n 'showOnDemandTag' => true,\n 'showOrderDetails' => true,\n 'theme' => 'dark',\n 'themeConfig' => [\n 'dark' => [\n 'bgPrimary' => 'bg_primary',\n 'bgSecondary' => 'bg_secondary',\n 'borderPrimary' => 'border_primary',\n 'borderSecondary' => 'border_secondary',\n 'buttonPrimary' => 'button_primary',\n 'buttonPrimaryHover' => 'button_primary_hover',\n 'buttonSecondary' => 'button_secondary',\n 'buttonSecondaryHover' => 'button_secondary_hover',\n 'buttonTextPrimary' => 'button_text_primary',\n 'buttonTextSecondary' => 'button_text_secondary',\n 'inputFocusBorder' => 'input_focus_border',\n 'textError' => 'text_error',\n 'textPlaceholder' => 'text_placeholder',\n 'textPrimary' => 'text_primary',\n 'textSecondary' => 'text_secondary',\n 'textSuccess' => 'text_success',\n ],\n 'fontPrimaryURL' => 'font_primary_url',\n 'fontSecondaryURL' => 'font_secondary_url',\n 'fontSize' => 'xs',\n 'fontWeight' => 'normal',\n 'light' => [\n 'bgPrimary' => 'bg_primary',\n 'bgSecondary' => 'bg_secondary',\n 'borderPrimary' => 'border_primary',\n 'borderSecondary' => 'border_secondary',\n 'buttonPrimary' => 'button_primary',\n 'buttonPrimaryHover' => 'button_primary_hover',\n 'buttonSecondary' => 'button_secondary',\n 'buttonSecondaryHover' => 'button_secondary_hover',\n 'buttonTextPrimary' => 'button_text_primary',\n 'buttonTextSecondary' => 'button_text_secondary',\n 'inputFocusBorder' => 'input_focus_border',\n 'textError' => 'text_error',\n 'textPlaceholder' => 'text_placeholder',\n 'textPrimary' => 'text_primary',\n 'textSecondary' => 'text_secondary',\n 'textSuccess' => 'text_success',\n ],\n 'payButtonText' => 'pay_button_text',\n 'radius' => 'radius',\n ],\n ],\n discountCode: 'discount_code',\n discountCodes: ['string'],\n featureFlags: [\n 'allowCurrencySelection' => true,\n 'allowCustomerEditingBusinessName' => true,\n 'allowCustomerEditingCity' => true,\n 'allowCustomerEditingCountry' => true,\n 'allowCustomerEditingEmail' => true,\n 'allowCustomerEditingName' => true,\n 'allowCustomerEditingState' => true,\n 'allowCustomerEditingStreet' => true,\n 'allowCustomerEditingTaxID' => true,\n 'allowCustomerEditingZipcode' => true,\n 'allowDiscountCode' => true,\n 'allowPhoneNumberCollection' => true,\n 'allowTaxID' => true,\n 'alwaysCreateNewCustomer' => true,\n 'redirectImmediately' => true,\n 'requirePhoneNumber' => true,\n ],\n force3DS: true,\n mandateMinAmountInrPaise: 0,\n metadata: ['foo' => 'string'],\n minimalAddress: true,\n paymentMethodID: 'payment_method_id',\n productCollectionID: 'product_collection_id',\n returnURL: 'return_url',\n shortLink: true,\n showSavedPaymentMethods: true,\n subscriptionData: [\n 'onDemand' => [\n 'mandateOnly' => true,\n 'adaptiveCurrencyFeesInclusive' => true,\n 'productCurrency' => Currency::AED,\n 'productDescription' => 'product_description',\n 'productPrice' => 0,\n ],\n 'trialPeriodDays' => 0,\n ],\n taxID: 'tax_id',\n);\n\nvar_dump($response);",
235
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(bearerToken: 'My Bearer Token', environment: 'test_mode');\n\n$response = $client->checkoutSessions->preview(\n productCart: [\n [\n 'productID' => 'product_id',\n 'quantity' => 0,\n 'addons' => [['addonID' => 'addon_id', 'quantity' => 0]],\n 'amount' => 0,\n 'creditEntitlements' => [\n [\n 'creditEntitlementID' => 'credit_entitlement_id',\n 'creditsAmount' => 'credits_amount',\n ],\n ],\n ],\n ],\n allowedPaymentMethodTypes: [PaymentMethodTypes::ACH],\n billingAddress: [\n 'country' => CountryCode::AF,\n 'city' => 'city',\n 'state' => 'state',\n 'street' => 'street',\n 'zipcode' => 'zipcode',\n ],\n billingCurrency: Currency::AED,\n cancelURL: 'cancel_url',\n confirm: true,\n customFields: [\n [\n 'fieldType' => 'text',\n 'key' => 'key',\n 'label' => 'label',\n 'options' => ['string'],\n 'placeholder' => 'placeholder',\n 'required' => true,\n ],\n ],\n customer: ['customerID' => 'customer_id'],\n customerBusinessName: 'customer_business_name',\n customization: [\n 'forceLanguage' => 'force_language',\n 'showOnDemandTag' => true,\n 'showOrderDetails' => true,\n 'theme' => 'dark',\n 'themeConfig' => [\n 'dark' => [\n 'bgPrimary' => 'bg_primary',\n 'bgSecondary' => 'bg_secondary',\n 'borderPrimary' => 'border_primary',\n 'borderSecondary' => 'border_secondary',\n 'buttonPrimary' => 'button_primary',\n 'buttonPrimaryHover' => 'button_primary_hover',\n 'buttonSecondary' => 'button_secondary',\n 'buttonSecondaryHover' => 'button_secondary_hover',\n 'buttonTextPrimary' => 'button_text_primary',\n 'buttonTextSecondary' => 'button_text_secondary',\n 'inputFocusBorder' => 'input_focus_border',\n 'textError' => 'text_error',\n 'textPlaceholder' => 'text_placeholder',\n 'textPrimary' => 'text_primary',\n 'textSecondary' => 'text_secondary',\n 'textSuccess' => 'text_success',\n ],\n 'fontPrimaryURL' => 'font_primary_url',\n 'fontSecondaryURL' => 'font_secondary_url',\n 'fontSize' => 'xs',\n 'fontWeight' => 'normal',\n 'light' => [\n 'bgPrimary' => 'bg_primary',\n 'bgSecondary' => 'bg_secondary',\n 'borderPrimary' => 'border_primary',\n 'borderSecondary' => 'border_secondary',\n 'buttonPrimary' => 'button_primary',\n 'buttonPrimaryHover' => 'button_primary_hover',\n 'buttonSecondary' => 'button_secondary',\n 'buttonSecondaryHover' => 'button_secondary_hover',\n 'buttonTextPrimary' => 'button_text_primary',\n 'buttonTextSecondary' => 'button_text_secondary',\n 'inputFocusBorder' => 'input_focus_border',\n 'textError' => 'text_error',\n 'textPlaceholder' => 'text_placeholder',\n 'textPrimary' => 'text_primary',\n 'textSecondary' => 'text_secondary',\n 'textSuccess' => 'text_success',\n ],\n 'payButtonText' => 'pay_button_text',\n 'radius' => 'radius',\n ],\n ],\n discountCode: 'discount_code',\n discountCodes: ['string'],\n featureFlags: [\n 'allowCurrencySelection' => true,\n 'allowCustomerEditingBusinessName' => true,\n 'allowCustomerEditingCity' => true,\n 'allowCustomerEditingCountry' => true,\n 'allowCustomerEditingEmail' => true,\n 'allowCustomerEditingName' => true,\n 'allowCustomerEditingState' => true,\n 'allowCustomerEditingStreet' => true,\n 'allowCustomerEditingTaxID' => true,\n 'allowCustomerEditingZipcode' => true,\n 'allowDiscountCode' => true,\n 'allowEditingAddons' => true,\n 'allowPhoneNumberCollection' => true,\n 'allowTaxID' => true,\n 'alwaysCreateNewCustomer' => true,\n 'redirectImmediately' => true,\n 'requirePhoneNumber' => true,\n ],\n force3DS: true,\n mandateMinAmountInrPaise: 0,\n metadata: ['foo' => 'string'],\n minimalAddress: true,\n paymentMethodID: 'payment_method_id',\n productCollectionID: 'product_collection_id',\n returnURL: 'return_url',\n shortLink: true,\n showSavedPaymentMethods: true,\n subscriptionData: [\n 'onDemand' => [\n 'mandateOnly' => true,\n 'adaptiveCurrencyFeesInclusive' => true,\n 'productCurrency' => Currency::AED,\n 'productDescription' => 'product_description',\n 'productPrice' => 0,\n ],\n 'trialPeriodDays' => 0,\n ],\n taxID: 'tax_id',\n);\n\nvar_dump($response);",
236
236
  },
237
237
  csharp: {
238
238
  method: 'CheckoutSessions.Preview',
@@ -672,7 +672,7 @@ const EMBEDDED_METHODS = [
672
672
  'tax_id?: string;',
673
673
  ],
674
674
  response: "{ addons: object[]; billing: object; brand_id: string; cancel_at_next_billing_date: boolean; created_at: string; credit_entitlement_cart: object[]; currency: string; customer: object; metadata: object; meter_credit_entitlement_cart: object[]; meters: object[]; next_billing_date: string; on_demand: boolean; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; previous_billing_date: string; product_id: string; quantity: number; recurring_pre_tax_amount: number; status: 'pending' | 'active' | 'on_hold' | 'cancelled' | 'failed' | 'expired'; subscription_id: string; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; tax_inclusive: boolean; trial_period_days: number; cancellation_comment?: string; cancellation_feedback?: string; cancelled_at?: string; custom_field_responses?: object[]; customer_business_name?: string; discount_cycles_remaining?: number; discount_id?: string; discounts?: object[]; expires_at?: string; payment_method_id?: string; scheduled_change?: object; tax_id?: string; }",
675
- markdown: "## update\n\n`client.subscriptions.update(subscription_id: string, billing?: { country: country_code; city?: string; state?: string; street?: string; zipcode?: string; }, cancel_at_next_billing_date?: boolean, cancel_reason?: string, cancellation_comment?: string, cancellation_feedback?: string, credit_entitlement_cart?: { credit_entitlement_id: string; credits_amount?: string; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_enabled?: boolean; overage_limit?: string; rollover_enabled?: boolean; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: 'Day' | 'Week' | 'Month' | 'Year'; }[], customer_business_name?: string, customer_name?: string, disable_on_demand?: { next_billing_date: string; }, metadata?: object, next_billing_date?: string, status?: 'pending' | 'active' | 'on_hold' | 'cancelled' | 'failed' | 'expired', tax_id?: string): { addons: addon_cart_response_item[]; billing: billing_address; brand_id: string; cancel_at_next_billing_date: boolean; created_at: string; credit_entitlement_cart: credit_entitlement_cart_response[]; currency: currency; customer: customer_limited_details; metadata: metadata; meter_credit_entitlement_cart: meter_credit_entitlement_cart_response[]; meters: meter_cart_response_item[]; next_billing_date: string; on_demand: boolean; payment_frequency_count: number; payment_frequency_interval: time_interval; previous_billing_date: string; product_id: string; quantity: number; recurring_pre_tax_amount: number; status: subscription_status; subscription_id: string; subscription_period_count: number; subscription_period_interval: time_interval; tax_inclusive: boolean; trial_period_days: number; cancellation_comment?: string; cancellation_feedback?: cancellation_feedback; cancelled_at?: string; custom_field_responses?: custom_field_response[]; customer_business_name?: string; discount_cycles_remaining?: number; discount_id?: string; discounts?: discount_detail[]; expires_at?: string; payment_method_id?: string; scheduled_change?: scheduled_plan_change; tax_id?: string; }`\n\n**patch** `/subscriptions/{subscription_id}`\n\n### Parameters\n\n- `subscription_id: string`\n\n- `billing?: { country: string; city?: string; state?: string; street?: string; zipcode?: string; }`\n - `country: string`\n Two-letter ISO country code (ISO 3166-1 alpha-2)\n - `city?: string`\n City name\n - `state?: string`\n State or province name\n - `street?: string`\n Street address including house number and unit/apartment if applicable\n - `zipcode?: string`\n Postal code or ZIP code\n\n- `cancel_at_next_billing_date?: boolean`\n When set, the subscription will remain active until the end of billing period\n\n- `cancel_reason?: string`\n\n- `cancellation_comment?: string`\n Free-text cancellation comment (only valid when cancelling or scheduling cancellation).\n\n- `cancellation_feedback?: string`\n Customer-supplied churn reason (only valid when cancelling or scheduling cancellation).\n\n- `credit_entitlement_cart?: { credit_entitlement_id: string; credits_amount?: string; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_enabled?: boolean; overage_limit?: string; rollover_enabled?: boolean; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: 'Day' | 'Week' | 'Month' | 'Year'; }[]`\n Update credit entitlement cart settings\n\n- `customer_business_name?: string`\n Optional business / legal name associated with the tax id. When provided\ntogether with a valid tax id for a B2B subscription, this name is rendered\non the invoice instead of the customer's personal name. Send `null` to\nexplicitly clear the business name.\n\n- `customer_name?: string`\n\n- `disable_on_demand?: { next_billing_date: string; }`\n - `next_billing_date: string`\n\n- `metadata?: object`\n\n- `next_billing_date?: string`\n\n- `status?: 'pending' | 'active' | 'on_hold' | 'cancelled' | 'failed' | 'expired'`\n\n- `tax_id?: string`\n\n### Returns\n\n- `{ addons: { addon_id: string; quantity: number; }[]; billing: { country: country_code; city?: string; state?: string; street?: string; zipcode?: string; }; brand_id: string; cancel_at_next_billing_date: boolean; created_at: string; credit_entitlement_cart: { credit_entitlement_id: string; credit_entitlement_name: string; credits_amount: string; overage_balance: string; overage_behavior: cbb_overage_behavior; overage_enabled: boolean; product_id: string; remaining_balance: string; rollover_enabled: boolean; unit: string; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_limit?: string; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: time_interval; }[]; currency: string; customer: { customer_id: string; email: string; name: string; metadata?: metadata; phone_number?: string; }; metadata: object; meter_credit_entitlement_cart: { credit_entitlement_id: string; meter_id: string; meter_name: string; meter_units_per_credit: string; product_id: string; }[]; meters: { currency: currency; free_threshold: number; measurement_unit: string; meter_id: string; name: string; description?: string; price_per_unit?: string; }[]; next_billing_date: string; on_demand: boolean; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; previous_billing_date: string; product_id: string; quantity: number; recurring_pre_tax_amount: number; status: 'pending' | 'active' | 'on_hold' | 'cancelled' | 'failed' | 'expired'; subscription_id: string; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; tax_inclusive: boolean; trial_period_days: number; cancellation_comment?: string; cancellation_feedback?: string; cancelled_at?: string; custom_field_responses?: { key: string; value: string; }[]; customer_business_name?: string; discount_cycles_remaining?: number; discount_id?: string; discounts?: { amount: number; business_id: string; code: string; created_at: string; discount_id: string; metadata: metadata; position: number; preserve_on_plan_change: boolean; restricted_to: string[]; times_used: number; type: discount_type; cycles_remaining?: number; expires_at?: string; name?: string; subscription_cycles?: number; usage_limit?: number; }[]; expires_at?: string; payment_method_id?: string; scheduled_change?: { id: string; addons: object[]; created_at: string; effective_at: string; product_id: string; quantity: number; product_description?: string; product_name?: string; }; tax_id?: string; }`\n Response struct representing subscription details\n\n - `addons: { addon_id: string; quantity: number; }[]`\n - `billing: { country: string; city?: string; state?: string; street?: string; zipcode?: string; }`\n - `brand_id: string`\n - `cancel_at_next_billing_date: boolean`\n - `created_at: string`\n - `credit_entitlement_cart: { credit_entitlement_id: string; credit_entitlement_name: string; credits_amount: string; overage_balance: string; overage_behavior: 'forgive_at_reset' | 'invoice_at_billing' | 'carry_deficit' | 'carry_deficit_auto_repay'; overage_enabled: boolean; product_id: string; remaining_balance: string; rollover_enabled: boolean; unit: string; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_limit?: string; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: 'Day' | 'Week' | 'Month' | 'Year'; }[]`\n - `currency: string`\n - `customer: { customer_id: string; email: string; name: string; metadata?: object; phone_number?: string; }`\n - `metadata: object`\n - `meter_credit_entitlement_cart: { credit_entitlement_id: string; meter_id: string; meter_name: string; meter_units_per_credit: string; product_id: string; }[]`\n - `meters: { currency: string; free_threshold: number; measurement_unit: string; meter_id: string; name: string; description?: string; price_per_unit?: string; }[]`\n - `next_billing_date: string`\n - `on_demand: boolean`\n - `payment_frequency_count: number`\n - `payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'`\n - `previous_billing_date: string`\n - `product_id: string`\n - `quantity: number`\n - `recurring_pre_tax_amount: number`\n - `status: 'pending' | 'active' | 'on_hold' | 'cancelled' | 'failed' | 'expired'`\n - `subscription_id: string`\n - `subscription_period_count: number`\n - `subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'`\n - `tax_inclusive: boolean`\n - `trial_period_days: number`\n - `cancellation_comment?: string`\n - `cancellation_feedback?: string`\n - `cancelled_at?: string`\n - `custom_field_responses?: { key: string; value: string; }[]`\n - `customer_business_name?: string`\n - `discount_cycles_remaining?: number`\n - `discount_id?: string`\n - `discounts?: { amount: number; business_id: string; code: string; created_at: string; discount_id: string; metadata: object; position: number; preserve_on_plan_change: boolean; restricted_to: string[]; times_used: number; type: 'percentage'; cycles_remaining?: number; expires_at?: string; name?: string; subscription_cycles?: number; usage_limit?: number; }[]`\n - `expires_at?: string`\n - `payment_method_id?: string`\n - `scheduled_change?: { id: string; addons: { addon_id: string; name: string; quantity: number; }[]; created_at: string; effective_at: string; product_id: string; quantity: number; product_description?: string; product_name?: string; }`\n - `tax_id?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst subscription = await client.subscriptions.update('sub_Iuaq622bbmmfOGrVTqdXv');\n\nconsole.log(subscription);\n```",
675
+ markdown: "## update\n\n`client.subscriptions.update(subscription_id: string, billing?: { country: country_code; city?: string; state?: string; street?: string; zipcode?: string; }, cancel_at_next_billing_date?: boolean, cancel_reason?: string, cancellation_comment?: string, cancellation_feedback?: string, credit_entitlement_cart?: { credit_entitlement_id: string; credits_amount?: string; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_enabled?: boolean; overage_limit?: string; rollover_enabled?: boolean; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: 'Day' | 'Week' | 'Month' | 'Year'; }[], customer_business_name?: string, customer_name?: string, disable_on_demand?: { next_billing_date: string; }, metadata?: object, next_billing_date?: string, status?: 'pending' | 'active' | 'on_hold' | 'cancelled' | 'failed' | 'expired', tax_id?: string): { addons: addon_cart_response_item[]; billing: billing_address; brand_id: string; cancel_at_next_billing_date: boolean; created_at: string; credit_entitlement_cart: credit_entitlement_cart_response[]; currency: currency; customer: customer_limited_details; metadata: metadata; meter_credit_entitlement_cart: meter_credit_entitlement_cart_response[]; meters: meter_cart_response_item[]; next_billing_date: string; on_demand: boolean; payment_frequency_count: number; payment_frequency_interval: time_interval; previous_billing_date: string; product_id: string; quantity: number; recurring_pre_tax_amount: number; status: subscription_status; subscription_id: string; subscription_period_count: number; subscription_period_interval: time_interval; tax_inclusive: boolean; trial_period_days: number; cancellation_comment?: string; cancellation_feedback?: cancellation_feedback; cancelled_at?: string; custom_field_responses?: custom_field_response[]; customer_business_name?: string; discount_cycles_remaining?: number; discount_id?: string; discounts?: discount_detail[]; expires_at?: string; payment_method_id?: string; scheduled_change?: scheduled_plan_change; tax_id?: string; }`\n\n**patch** `/subscriptions/{subscription_id}`\n\n### Parameters\n\n- `subscription_id: string`\n\n- `billing?: { country: string; city?: string; state?: string; street?: string; zipcode?: string; }`\n - `country: string`\n Two-letter ISO country code (ISO 3166-1 alpha-2)\n - `city?: string`\n City name\n - `state?: string`\n State or province name\n - `street?: string`\n Street address including house number and unit/apartment if applicable\n - `zipcode?: string`\n Postal code or ZIP code\n\n- `cancel_at_next_billing_date?: boolean`\n When set, the subscription will remain active until the end of billing period\n\n- `cancel_reason?: string`\n\n- `cancellation_comment?: string`\n Free-text cancellation comment (only valid when cancelling or scheduling cancellation).\n\n- `cancellation_feedback?: string`\n Customer-supplied churn reason (only valid when cancelling or scheduling cancellation).\n\n- `credit_entitlement_cart?: { credit_entitlement_id: string; credits_amount?: string; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_enabled?: boolean; overage_limit?: string; rollover_enabled?: boolean; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: 'Day' | 'Week' | 'Month' | 'Year'; }[]`\n Update credit entitlement cart settings\n\n- `customer_business_name?: string`\n Optional business / legal name associated with the tax id. When provided\ntogether with a valid tax id for a B2B subscription, this name is rendered\non the invoice instead of the customer's personal name. Send `null` to\nexplicitly clear the business name.\n\n- `customer_name?: string`\n\n- `disable_on_demand?: { next_billing_date: string; }`\n - `next_billing_date: string`\n\n- `metadata?: object`\n Arbitrary key-value metadata. Values can be string, integer, number, or boolean.\n\n- `next_billing_date?: string`\n\n- `status?: 'pending' | 'active' | 'on_hold' | 'cancelled' | 'failed' | 'expired'`\n\n- `tax_id?: string`\n\n### Returns\n\n- `{ addons: { addon_id: string; quantity: number; }[]; billing: { country: country_code; city?: string; state?: string; street?: string; zipcode?: string; }; brand_id: string; cancel_at_next_billing_date: boolean; created_at: string; credit_entitlement_cart: { credit_entitlement_id: string; credit_entitlement_name: string; credits_amount: string; overage_balance: string; overage_behavior: cbb_overage_behavior; overage_enabled: boolean; product_id: string; remaining_balance: string; rollover_enabled: boolean; unit: string; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_limit?: string; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: time_interval; }[]; currency: string; customer: { customer_id: string; email: string; name: string; metadata?: metadata; phone_number?: string; }; metadata: object; meter_credit_entitlement_cart: { credit_entitlement_id: string; meter_id: string; meter_name: string; meter_units_per_credit: string; product_id: string; }[]; meters: { currency: currency; free_threshold: number; measurement_unit: string; meter_id: string; name: string; description?: string; price_per_unit?: string; }[]; next_billing_date: string; on_demand: boolean; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; previous_billing_date: string; product_id: string; quantity: number; recurring_pre_tax_amount: number; status: 'pending' | 'active' | 'on_hold' | 'cancelled' | 'failed' | 'expired'; subscription_id: string; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; tax_inclusive: boolean; trial_period_days: number; cancellation_comment?: string; cancellation_feedback?: string; cancelled_at?: string; custom_field_responses?: { key: string; value: string; }[]; customer_business_name?: string; discount_cycles_remaining?: number; discount_id?: string; discounts?: { amount: number; business_id: string; code: string; created_at: string; discount_id: string; metadata: metadata; position: number; preserve_on_plan_change: boolean; restricted_to: string[]; times_used: number; type: discount_type; cycles_remaining?: number; expires_at?: string; name?: string; subscription_cycles?: number; usage_limit?: number; }[]; expires_at?: string; payment_method_id?: string; scheduled_change?: { id: string; addons: object[]; created_at: string; effective_at: string; product_id: string; quantity: number; product_description?: string; product_name?: string; }; tax_id?: string; }`\n Response struct representing subscription details\n\n - `addons: { addon_id: string; quantity: number; }[]`\n - `billing: { country: string; city?: string; state?: string; street?: string; zipcode?: string; }`\n - `brand_id: string`\n - `cancel_at_next_billing_date: boolean`\n - `created_at: string`\n - `credit_entitlement_cart: { credit_entitlement_id: string; credit_entitlement_name: string; credits_amount: string; overage_balance: string; overage_behavior: 'forgive_at_reset' | 'invoice_at_billing' | 'carry_deficit' | 'carry_deficit_auto_repay'; overage_enabled: boolean; product_id: string; remaining_balance: string; rollover_enabled: boolean; unit: string; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_limit?: string; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: 'Day' | 'Week' | 'Month' | 'Year'; }[]`\n - `currency: string`\n - `customer: { customer_id: string; email: string; name: string; metadata?: object; phone_number?: string; }`\n - `metadata: object`\n - `meter_credit_entitlement_cart: { credit_entitlement_id: string; meter_id: string; meter_name: string; meter_units_per_credit: string; product_id: string; }[]`\n - `meters: { currency: string; free_threshold: number; measurement_unit: string; meter_id: string; name: string; description?: string; price_per_unit?: string; }[]`\n - `next_billing_date: string`\n - `on_demand: boolean`\n - `payment_frequency_count: number`\n - `payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'`\n - `previous_billing_date: string`\n - `product_id: string`\n - `quantity: number`\n - `recurring_pre_tax_amount: number`\n - `status: 'pending' | 'active' | 'on_hold' | 'cancelled' | 'failed' | 'expired'`\n - `subscription_id: string`\n - `subscription_period_count: number`\n - `subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'`\n - `tax_inclusive: boolean`\n - `trial_period_days: number`\n - `cancellation_comment?: string`\n - `cancellation_feedback?: string`\n - `cancelled_at?: string`\n - `custom_field_responses?: { key: string; value: string; }[]`\n - `customer_business_name?: string`\n - `discount_cycles_remaining?: number`\n - `discount_id?: string`\n - `discounts?: { amount: number; business_id: string; code: string; created_at: string; discount_id: string; metadata: object; position: number; preserve_on_plan_change: boolean; restricted_to: string[]; times_used: number; type: 'percentage'; cycles_remaining?: number; expires_at?: string; name?: string; subscription_cycles?: number; usage_limit?: number; }[]`\n - `expires_at?: string`\n - `payment_method_id?: string`\n - `scheduled_change?: { id: string; addons: { addon_id: string; name: string; quantity: number; }[]; created_at: string; effective_at: string; product_id: string; quantity: number; product_description?: string; product_name?: string; }`\n - `tax_id?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst subscription = await client.subscriptions.update('sub_Iuaq622bbmmfOGrVTqdXv');\n\nconsole.log(subscription);\n```",
676
676
  perLanguage: {
677
677
  typescript: {
678
678
  method: 'client.subscriptions.update',
@@ -2114,8 +2114,8 @@ const EMBEDDED_METHODS = [
2114
2114
  stainlessPath: '(resource) customers > (method) list_entitlements',
2115
2115
  qualified: 'client.customers.listEntitlements',
2116
2116
  params: ['customer_id: string;'],
2117
- response: "{ items: { created_at: string; entitlement_id: string; entitlement_name: string; grant_id: string; integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key'; status: 'pending' | 'delivered' | 'failed' | 'revoked'; updated_at: string; delivered_at?: string; entitlement_description?: string; revoked_at?: string; }[]; }",
2118
- markdown: "## list_entitlements\n\n`client.customers.listEntitlements(customer_id: string): { items: object[]; }`\n\n**get** `/customers/{customer_id}/entitlements`\n\nList all entitlement grants delivered (or in flight) to a customer.\n\n### Parameters\n\n- `customer_id: string`\n\n### Returns\n\n- `{ items: { created_at: string; entitlement_id: string; entitlement_name: string; grant_id: string; integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key'; status: 'pending' | 'delivered' | 'failed' | 'revoked'; updated_at: string; delivered_at?: string; entitlement_description?: string; revoked_at?: string; }[]; }`\n\n - `items: { created_at: string; entitlement_id: string; entitlement_name: string; grant_id: string; integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key'; status: 'pending' | 'delivered' | 'failed' | 'revoked'; updated_at: string; delivered_at?: string; entitlement_description?: string; revoked_at?: string; }[]`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst response = await client.customers.listEntitlements('cus_TV52uJWWXt2yIoBBxpjaa');\n\nconsole.log(response);\n```",
2117
+ response: "{ items: { created_at: string; entitlement_id: string; entitlement_name: string; grant_id: string; integration_type: string; status: 'pending' | 'delivered' | 'failed' | 'revoked'; updated_at: string; delivered_at?: string; entitlement_description?: string; revoked_at?: string; }[]; }",
2118
+ markdown: "## list_entitlements\n\n`client.customers.listEntitlements(customer_id: string): { items: object[]; }`\n\n**get** `/customers/{customer_id}/entitlements`\n\nList all entitlement grants delivered (or in flight) to a customer.\n\n### Parameters\n\n- `customer_id: string`\n\n### Returns\n\n- `{ items: { created_at: string; entitlement_id: string; entitlement_name: string; grant_id: string; integration_type: string; status: 'pending' | 'delivered' | 'failed' | 'revoked'; updated_at: string; delivered_at?: string; entitlement_description?: string; revoked_at?: string; }[]; }`\n\n - `items: { created_at: string; entitlement_id: string; entitlement_name: string; grant_id: string; integration_type: string; status: 'pending' | 'delivered' | 'failed' | 'revoked'; updated_at: string; delivered_at?: string; entitlement_description?: string; revoked_at?: string; }[]`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst response = await client.customers.listEntitlements('cus_TV52uJWWXt2yIoBBxpjaa');\n\nconsole.log(response);\n```",
2119
2119
  perLanguage: {
2120
2120
  typescript: {
2121
2121
  method: 'client.customers.listEntitlements',
@@ -2154,6 +2154,61 @@ const EMBEDDED_METHODS = [
2154
2154
  },
2155
2155
  },
2156
2156
  },
2157
+ {
2158
+ name: 'list_entitlement_grants',
2159
+ endpoint: '/customers/{customer_id}/entitlement-grants',
2160
+ httpMethod: 'get',
2161
+ summary: "List all of a customer's entitlement grants across every entitlement.\nOne row per grant.",
2162
+ description: "List all of a customer's entitlement grants across every entitlement.\nOne row per grant.",
2163
+ stainlessPath: '(resource) customers > (method) list_entitlement_grants',
2164
+ qualified: 'client.customers.listEntitlementGrants',
2165
+ params: [
2166
+ 'customer_id: string;',
2167
+ 'integration_type?: string;',
2168
+ 'page_number?: number;',
2169
+ 'page_size?: number;',
2170
+ "status?: 'Pending' | 'Delivered' | 'Failed' | 'Revoked';",
2171
+ ],
2172
+ response: "{ id: string; brand_id: string; business_id: string; created_at: string; customer_id: string; entitlement_id: string; integration_type: string; metadata: object; status: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'; updated_at: string; delivered_at?: string; digital_product_delivery?: { files: digital_product_delivery_file[]; external_url?: string; instructions?: string; }; error_code?: string; error_message?: string; feature?: { feature_id: string; feature_type: feature_type; }; license_key?: { activations_used: number; key: string; activations_limit?: number; expires_at?: string; }; oauth_expires_at?: string; oauth_url?: string; payment_id?: string; revocation_reason?: string; revoked_at?: string; subscription_id?: string; }",
2173
+ markdown: "## list_entitlement_grants\n\n`client.customers.listEntitlementGrants(customer_id: string, integration_type?: string, page_number?: number, page_size?: number, status?: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'): { id: string; brand_id: string; business_id: string; created_at: string; customer_id: string; entitlement_id: string; integration_type: entitlement_integration_type; metadata: metadata; status: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'; updated_at: string; delivered_at?: string; digital_product_delivery?: digital_product_delivery; error_code?: string; error_message?: string; feature?: feature; license_key?: license_key_grant; oauth_expires_at?: string; oauth_url?: string; payment_id?: string; revocation_reason?: string; revoked_at?: string; subscription_id?: string; }`\n\n**get** `/customers/{customer_id}/entitlement-grants`\n\nList all of a customer's entitlement grants across every entitlement.\nOne row per grant.\n\n### Parameters\n\n- `customer_id: string`\n\n- `integration_type?: string`\n Filter by integration type (e.g. `feature_flag`)\n\n- `page_number?: number`\n Page number (default 0)\n\n- `page_size?: number`\n Page size (default 10, max 100)\n\n- `status?: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'`\n Filter by grant status\n\n### Returns\n\n- `{ id: string; brand_id: string; business_id: string; created_at: string; customer_id: string; entitlement_id: string; integration_type: string; metadata: object; status: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'; updated_at: string; delivered_at?: string; digital_product_delivery?: { files: digital_product_delivery_file[]; external_url?: string; instructions?: string; }; error_code?: string; error_message?: string; feature?: { feature_id: string; feature_type: feature_type; }; license_key?: { activations_used: number; key: string; activations_limit?: number; expires_at?: string; }; oauth_expires_at?: string; oauth_url?: string; payment_id?: string; revocation_reason?: string; revoked_at?: string; subscription_id?: string; }`\n Detailed view of a single entitlement grant: who it's for, its\nlifecycle state, and any integration-specific delivery payload.\n\n - `id: string`\n - `brand_id: string`\n - `business_id: string`\n - `created_at: string`\n - `customer_id: string`\n - `entitlement_id: string`\n - `integration_type: string`\n - `metadata: object`\n - `status: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'`\n - `updated_at: string`\n - `delivered_at?: string`\n - `digital_product_delivery?: { files: { download_url: string; expires_in: number; file_id: string; filename: string; content_type?: string; file_size?: number; }[]; external_url?: string; instructions?: string; }`\n - `error_code?: string`\n - `error_message?: string`\n - `feature?: { feature_id: string; feature_type: 'boolean'; }`\n - `license_key?: { activations_used: number; key: string; activations_limit?: number; expires_at?: string; }`\n - `oauth_expires_at?: string`\n - `oauth_url?: string`\n - `payment_id?: string`\n - `revocation_reason?: string`\n - `revoked_at?: string`\n - `subscription_id?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\n// Automatically fetches more pages as needed.\nfor await (const entitlementGrant of client.customers.listEntitlementGrants('cus_TV52uJWWXt2yIoBBxpjaa')) {\n console.log(entitlementGrant);\n}\n```",
2174
+ perLanguage: {
2175
+ typescript: {
2176
+ method: 'client.customers.listEntitlementGrants',
2177
+ example: "import DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments({\n bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const entitlementGrant of client.customers.listEntitlementGrants(\n 'cus_TV52uJWWXt2yIoBBxpjaa',\n)) {\n console.log(entitlementGrant.id);\n}",
2178
+ },
2179
+ http: {
2180
+ example: 'curl https://live.dodopayments.com/customers/$CUSTOMER_ID/entitlement-grants \\\n -H "Authorization: Bearer $DODO_PAYMENTS_API_KEY"',
2181
+ },
2182
+ python: {
2183
+ method: 'customers.list_entitlement_grants',
2184
+ example: 'import os\nfrom dodopayments import DodoPayments\n\nclient = DodoPayments(\n bearer_token=os.environ.get("DODO_PAYMENTS_API_KEY"), # This is the default and can be omitted\n)\npage = client.customers.list_entitlement_grants(\n customer_id="cus_TV52uJWWXt2yIoBBxpjaa",\n)\npage = page.items[0]\nprint(page.id)',
2185
+ },
2186
+ java: {
2187
+ method: 'customers().listEntitlementGrants',
2188
+ example: 'package com.dodopayments.api.example;\n\nimport com.dodopayments.api.client.DodoPaymentsClient;\nimport com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;\nimport com.dodopayments.api.models.customers.CustomerListEntitlementGrantsPage;\nimport com.dodopayments.api.models.customers.CustomerListEntitlementGrantsParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();\n\n CustomerListEntitlementGrantsPage page = client.customers().listEntitlementGrants("cus_TV52uJWWXt2yIoBBxpjaa");\n }\n}',
2189
+ },
2190
+ kotlin: {
2191
+ method: 'customers().listEntitlementGrants',
2192
+ example: 'package com.dodopayments.api.example\n\nimport com.dodopayments.api.client.DodoPaymentsClient\nimport com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient\nimport com.dodopayments.api.models.customers.CustomerListEntitlementGrantsPage\nimport com.dodopayments.api.models.customers.CustomerListEntitlementGrantsParams\n\nfun main() {\n val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()\n\n val page: CustomerListEntitlementGrantsPage = client.customers().listEntitlementGrants("cus_TV52uJWWXt2yIoBBxpjaa")\n}',
2193
+ },
2194
+ go: {
2195
+ method: 'client.Customers.ListEntitlementGrants',
2196
+ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dodopayments/dodopayments-go"\n\t"github.com/dodopayments/dodopayments-go/option"\n)\n\nfunc main() {\n\tclient := dodopayments.NewClient(\n\t\toption.WithBearerToken("My Bearer Token"),\n\t)\n\tpage, err := client.Customers.ListEntitlementGrants(\n\t\tcontext.TODO(),\n\t\t"cus_TV52uJWWXt2yIoBBxpjaa",\n\t\tdodopayments.CustomerListEntitlementGrantsParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
2197
+ },
2198
+ ruby: {
2199
+ method: 'customers.list_entitlement_grants',
2200
+ example: 'require "dodopayments"\n\ndodo_payments = Dodopayments::Client.new(\n bearer_token: "My Bearer Token",\n environment: "test_mode" # defaults to "live_mode"\n)\n\npage = dodo_payments.customers.list_entitlement_grants("cus_TV52uJWWXt2yIoBBxpjaa")\n\nputs(page)',
2201
+ },
2202
+ php: {
2203
+ method: 'customers->listEntitlementGrants',
2204
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(bearerToken: 'My Bearer Token', environment: 'test_mode');\n\n$page = $client->customers->listEntitlementGrants(\n 'cus_TV52uJWWXt2yIoBBxpjaa',\n integrationType: 'discord',\n pageNumber: 0,\n pageSize: 0,\n status: 'Pending',\n);\n\nvar_dump($page);",
2205
+ },
2206
+ csharp: {
2207
+ method: 'Customers.ListEntitlementGrants',
2208
+ example: 'CustomerListEntitlementGrantsParams parameters = new()\n{\n CustomerID = "cus_TV52uJWWXt2yIoBBxpjaa"\n};\n\nvar page = await client.Customers.ListEntitlementGrants(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
2209
+ },
2210
+ },
2211
+ },
2157
2212
  {
2158
2213
  name: 'create',
2159
2214
  endpoint: '/customers/{customer_id}/customer-portal/session',
@@ -2839,7 +2894,7 @@ const EMBEDDED_METHODS = [
2839
2894
  'recurring?: boolean;',
2840
2895
  ],
2841
2896
  response: "{ business_id: string; created_at: string; entitlements: object[]; is_recurring: boolean; metadata: object; product_id: string; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; updated_at: string; currency?: string; description?: string; image?: string; name?: string; price?: number; price_detail?: object | object | object; pricing_mode?: 'by_currency' | 'by_country'; tax_inclusive?: boolean; }",
2842
- markdown: "## list\n\n`client.products.list(archived?: boolean, brand_id?: string, page_number?: number, page_size?: number, recurring?: boolean): { business_id: string; created_at: string; entitlements: product_entitlement_summary[]; is_recurring: boolean; metadata: metadata; product_id: string; tax_category: tax_category; updated_at: string; currency?: currency; description?: string; image?: string; name?: string; price?: number; price_detail?: price; pricing_mode?: pricing_mode; tax_inclusive?: boolean; }`\n\n**get** `/products`\n\n### Parameters\n\n- `archived?: boolean`\n List archived products\n\n- `brand_id?: string`\n filter by Brand id\n\n- `page_number?: number`\n Page number default is 0\n\n- `page_size?: number`\n Page size default is 10 max is 100\n\n- `recurring?: boolean`\n Filter products by pricing type:\n- `true`: Show only recurring pricing products (e.g. subscriptions)\n- `false`: Show only one-time price products\n- `null` or absent: Show both types of products\n\n### Returns\n\n- `{ business_id: string; created_at: string; entitlements: { id: string; integration_config: integration_config_response; integration_type: entitlement_integration_type; name: string; description?: string; }[]; is_recurring: boolean; metadata: object; product_id: string; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; updated_at: string; currency?: string; description?: string; image?: string; name?: string; price?: number; price_detail?: { currency: currency; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: currency; discount: number; payment_frequency_count: number; payment_frequency_interval: time_interval; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: currency; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: time_interval; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'usage_based_price'; meters?: add_meter_to_price[]; tax_inclusive?: boolean; }; pricing_mode?: 'by_currency' | 'by_country'; tax_inclusive?: boolean; }`\n\n - `business_id: string`\n - `created_at: string`\n - `entitlements: { id: string; integration_config: { permission: github_permission; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: object; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: time_interval; fulfillment_mode?: 'auto' | 'manual'; }; integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key'; name: string; description?: string; }[]`\n - `is_recurring: boolean`\n - `metadata: object`\n - `product_id: string`\n - `tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'`\n - `updated_at: string`\n - `currency?: string`\n - `description?: string`\n - `image?: string`\n - `name?: string`\n - `price?: number`\n - `price_detail?: { currency: string; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: string; discount: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: string; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'usage_based_price'; meters?: { meter_id: string; credit_entitlement_id?: string; description?: string; free_threshold?: number; measurement_unit?: string; meter_units_per_credit?: string; name?: string; price_per_unit?: string; }[]; tax_inclusive?: boolean; }`\n - `pricing_mode?: 'by_currency' | 'by_country'`\n - `tax_inclusive?: boolean`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\n// Automatically fetches more pages as needed.\nfor await (const productListResponse of client.products.list()) {\n console.log(productListResponse);\n}\n```",
2897
+ markdown: "## list\n\n`client.products.list(archived?: boolean, brand_id?: string, page_number?: number, page_size?: number, recurring?: boolean): { business_id: string; created_at: string; entitlements: product_entitlement_summary[]; is_recurring: boolean; metadata: metadata; product_id: string; tax_category: tax_category; updated_at: string; currency?: currency; description?: string; image?: string; name?: string; price?: number; price_detail?: price; pricing_mode?: pricing_mode; tax_inclusive?: boolean; }`\n\n**get** `/products`\n\n### Parameters\n\n- `archived?: boolean`\n List archived products\n\n- `brand_id?: string`\n filter by Brand id\n\n- `page_number?: number`\n Page number default is 0\n\n- `page_size?: number`\n Page size default is 10 max is 100\n\n- `recurring?: boolean`\n Filter products by pricing type:\n- `true`: Show only recurring pricing products (e.g. subscriptions)\n- `false`: Show only one-time price products\n- `null` or absent: Show both types of products\n\n### Returns\n\n- `{ business_id: string; created_at: string; entitlements: { id: string; integration_config: integration_config_response; integration_type: entitlement_integration_type; name: string; description?: string; }[]; is_recurring: boolean; metadata: object; product_id: string; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; updated_at: string; currency?: string; description?: string; image?: string; name?: string; price?: number; price_detail?: { currency: currency; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: currency; discount: number; payment_frequency_count: number; payment_frequency_interval: time_interval; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: currency; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: time_interval; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'usage_based_price'; meters?: add_meter_to_price[]; tax_inclusive?: boolean; }; pricing_mode?: 'by_currency' | 'by_country'; tax_inclusive?: boolean; }`\n\n - `business_id: string`\n - `created_at: string`\n - `entitlements: { id: string; integration_config: { feature_id: string; feature_type: feature_type; } | { permission: github_permission; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: object; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: time_interval; fulfillment_mode?: 'auto' | 'manual'; }; integration_type: string; name: string; description?: string; }[]`\n - `is_recurring: boolean`\n - `metadata: object`\n - `product_id: string`\n - `tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'`\n - `updated_at: string`\n - `currency?: string`\n - `description?: string`\n - `image?: string`\n - `name?: string`\n - `price?: number`\n - `price_detail?: { currency: string; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: string; discount: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: string; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'usage_based_price'; meters?: { meter_id: string; credit_entitlement_id?: string; description?: string; free_threshold?: number; measurement_unit?: string; meter_units_per_credit?: string; name?: string; price_per_unit?: string; }[]; tax_inclusive?: boolean; }`\n - `pricing_mode?: 'by_currency' | 'by_country'`\n - `tax_inclusive?: boolean`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\n// Automatically fetches more pages as needed.\nfor await (const productListResponse of client.products.list()) {\n console.log(productListResponse);\n}\n```",
2843
2898
  perLanguage: {
2844
2899
  typescript: {
2845
2900
  method: 'client.products.list',
@@ -2904,7 +2959,7 @@ const EMBEDDED_METHODS = [
2904
2959
  "pricing_mode?: 'by_currency' | 'by_country';",
2905
2960
  ],
2906
2961
  response: "{ brand_id: string; business_id: string; created_at: string; credit_entitlements: object[]; entitlements: object[]; is_recurring: boolean; license_key_enabled: boolean; metadata: object; price: object | object | object; product_id: string; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; updated_at: string; addons?: string[]; description?: string; digital_product_delivery?: object; image?: string; license_key_activation_message?: string; license_key_activations_limit?: number; license_key_duration?: object; name?: string; pricing_mode?: 'by_currency' | 'by_country'; product_collection_id?: string; }",
2907
- markdown: "## create\n\n`client.products.create(name: string, price: { currency: currency; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: currency; discount: number; payment_frequency_count: number; payment_frequency_interval: time_interval; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: currency; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: time_interval; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'usage_based_price'; meters?: add_meter_to_price[]; tax_inclusive?: boolean; }, tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech', addons?: string[], brand_id?: string, credit_entitlements?: { credit_entitlement_id: string; credits_amount: string; currency?: currency; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_behavior?: cbb_overage_behavior; overage_enabled?: boolean; overage_limit?: string; price_per_unit?: string; proration_behavior?: cbb_proration_behavior; rollover_enabled?: boolean; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: time_interval; trial_credits?: string; trial_credits_expire_after_trial?: boolean; }[], description?: string, digital_product_delivery?: { external_url?: string; instructions?: string; }, entitlements?: { entitlement_id: string; }[], license_key_activation_message?: string, license_key_activations_limit?: number, license_key_duration?: { count: number; interval: time_interval; }, license_key_enabled?: boolean, metadata?: object, pricing_mode?: 'by_currency' | 'by_country'): { brand_id: string; business_id: string; created_at: string; credit_entitlements: credit_entitlement_mapping_response[]; entitlements: product_entitlement_summary[]; is_recurring: boolean; license_key_enabled: boolean; metadata: metadata; price: price; product_id: string; tax_category: tax_category; updated_at: string; addons?: string[]; description?: string; digital_product_delivery?: digital_product_delivery; image?: string; license_key_activation_message?: string; license_key_activations_limit?: number; license_key_duration?: license_key_duration; name?: string; pricing_mode?: pricing_mode; product_collection_id?: string; }`\n\n**post** `/products`\n\n### Parameters\n\n- `name: string`\n Name of the product\n\n- `price: { currency: string; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: string; discount: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: string; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'usage_based_price'; meters?: { meter_id: string; credit_entitlement_id?: string; description?: string; free_threshold?: number; measurement_unit?: string; meter_units_per_credit?: string; name?: string; price_per_unit?: string; }[]; tax_inclusive?: boolean; }`\n Price configuration for the product\n\n- `tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'`\n Tax category applied to this product\n\n- `addons?: string[]`\n Addons available for subscription product\n\n- `brand_id?: string`\n Brand id for the product, if not provided will default to primary brand\n\n- `credit_entitlements?: { credit_entitlement_id: string; credits_amount: string; currency?: string; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_behavior?: 'forgive_at_reset' | 'invoice_at_billing' | 'carry_deficit' | 'carry_deficit_auto_repay'; overage_enabled?: boolean; overage_limit?: string; price_per_unit?: string; proration_behavior?: 'prorate' | 'no_prorate'; rollover_enabled?: boolean; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: 'Day' | 'Week' | 'Month' | 'Year'; trial_credits?: string; trial_credits_expire_after_trial?: boolean; }[]`\n Optional credit entitlements to attach (max 5)\n\n- `description?: string`\n Optional description of the product\n\n- `digital_product_delivery?: { external_url?: string; instructions?: string; }`\n Choose how you would like you digital product delivered\n\ndeprecated: use entitlements instead\n - `external_url?: string`\n External URL to digital product\n - `instructions?: string`\n Instructions to download and use the digital product\n\n- `entitlements?: { entitlement_id: string; }[]`\n Optional entitlements to attach to this product (max 50)\n\n- `license_key_activation_message?: string`\n Optional message displayed during license key activation\n\ndeprecated: use entitlements instead. Ignored when a `license_key`\nentitlement is attached via the `entitlements` field.\n\n- `license_key_activations_limit?: number`\n The number of times the license key can be activated.\nMust be 0 or greater\n\ndeprecated: use entitlements instead. Ignored when a `license_key`\nentitlement is attached via the `entitlements` field.\n\n- `license_key_duration?: { count: number; interval: 'Day' | 'Week' | 'Month' | 'Year'; }`\n Duration configuration for the license key.\nSet to null if you don't want the license key to expire.\nFor subscriptions, the lifetime of the license key is tied to the subscription period\n\ndeprecated: use entitlements instead. Ignored when a `license_key`\nentitlement is attached via the `entitlements` field.\n - `count: number`\n - `interval: 'Day' | 'Week' | 'Month' | 'Year'`\n\n- `license_key_enabled?: boolean`\n When true, generates and sends a license key to your customer.\nDefaults to false\n\ndeprecated: use entitlements instead. If a `license_key` entitlement is\nalso attached via the `entitlements` field, the `license_key_*` config\nfields below are ignored — the attached entitlement's config is the\nsource of truth.\n\n- `metadata?: object`\n Additional metadata for the product\n\n- `pricing_mode?: 'by_currency' | 'by_country'`\n Pricing mode for localized pricing. When set, rules from\n/products/{id}/localized-prices apply at checkout. NULL means base-only\n(existing behavior).\n\n### Returns\n\n- `{ brand_id: string; business_id: string; created_at: string; credit_entitlements: { id: string; credit_entitlement_id: string; credit_entitlement_name: string; credit_entitlement_unit: string; credits_amount: string; overage_behavior: cbb_overage_behavior; overage_enabled: boolean; proration_behavior: cbb_proration_behavior; rollover_enabled: boolean; trial_credits_expire_after_trial: boolean; currency?: currency; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_limit?: string; price_per_unit?: string; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: time_interval; trial_credits?: string; }[]; entitlements: { id: string; integration_config: integration_config_response; integration_type: entitlement_integration_type; name: string; description?: string; }[]; is_recurring: boolean; license_key_enabled: boolean; metadata: object; price: { currency: currency; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: currency; discount: number; payment_frequency_count: number; payment_frequency_interval: time_interval; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: currency; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: time_interval; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'usage_based_price'; meters?: add_meter_to_price[]; tax_inclusive?: boolean; }; product_id: string; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; updated_at: string; addons?: string[]; description?: string; digital_product_delivery?: { files: digital_product_delivery_file[]; external_url?: string; instructions?: string; }; image?: string; license_key_activation_message?: string; license_key_activations_limit?: number; license_key_duration?: { count: number; interval: time_interval; }; name?: string; pricing_mode?: 'by_currency' | 'by_country'; product_collection_id?: string; }`\n\n - `brand_id: string`\n - `business_id: string`\n - `created_at: string`\n - `credit_entitlements: { id: string; credit_entitlement_id: string; credit_entitlement_name: string; credit_entitlement_unit: string; credits_amount: string; overage_behavior: 'forgive_at_reset' | 'invoice_at_billing' | 'carry_deficit' | 'carry_deficit_auto_repay'; overage_enabled: boolean; proration_behavior: 'prorate' | 'no_prorate'; rollover_enabled: boolean; trial_credits_expire_after_trial: boolean; currency?: string; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_limit?: string; price_per_unit?: string; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: 'Day' | 'Week' | 'Month' | 'Year'; trial_credits?: string; }[]`\n - `entitlements: { id: string; integration_config: { permission: github_permission; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: object; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: time_interval; fulfillment_mode?: 'auto' | 'manual'; }; integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key'; name: string; description?: string; }[]`\n - `is_recurring: boolean`\n - `license_key_enabled: boolean`\n - `metadata: object`\n - `price: { currency: string; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: string; discount: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: string; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'usage_based_price'; meters?: { meter_id: string; credit_entitlement_id?: string; description?: string; free_threshold?: number; measurement_unit?: string; meter_units_per_credit?: string; name?: string; price_per_unit?: string; }[]; tax_inclusive?: boolean; }`\n - `product_id: string`\n - `tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'`\n - `updated_at: string`\n - `addons?: string[]`\n - `description?: string`\n - `digital_product_delivery?: { files: { download_url: string; expires_in: number; file_id: string; filename: string; content_type?: string; file_size?: number; }[]; external_url?: string; instructions?: string; }`\n - `image?: string`\n - `license_key_activation_message?: string`\n - `license_key_activations_limit?: number`\n - `license_key_duration?: { count: number; interval: 'Day' | 'Week' | 'Month' | 'Year'; }`\n - `name?: string`\n - `pricing_mode?: 'by_currency' | 'by_country'`\n - `product_collection_id?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst product = await client.products.create({\n name: 'name',\n price: {\n currency: 'AED',\n discount: 0,\n price: 0,\n purchasing_power_parity: true,\n type: 'one_time_price',\n},\n tax_category: 'digital_products',\n});\n\nconsole.log(product);\n```",
2962
+ markdown: "## create\n\n`client.products.create(name: string, price: { currency: currency; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: currency; discount: number; payment_frequency_count: number; payment_frequency_interval: time_interval; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: currency; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: time_interval; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'usage_based_price'; meters?: add_meter_to_price[]; tax_inclusive?: boolean; }, tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech', addons?: string[], brand_id?: string, credit_entitlements?: { credit_entitlement_id: string; credits_amount: string; currency?: currency; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_behavior?: cbb_overage_behavior; overage_enabled?: boolean; overage_limit?: string; price_per_unit?: string; proration_behavior?: cbb_proration_behavior; rollover_enabled?: boolean; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: time_interval; trial_credits?: string; trial_credits_expire_after_trial?: boolean; }[], description?: string, digital_product_delivery?: { external_url?: string; instructions?: string; }, entitlements?: { entitlement_id: string; }[], license_key_activation_message?: string, license_key_activations_limit?: number, license_key_duration?: { count: number; interval: time_interval; }, license_key_enabled?: boolean, metadata?: object, pricing_mode?: 'by_currency' | 'by_country'): { brand_id: string; business_id: string; created_at: string; credit_entitlements: credit_entitlement_mapping_response[]; entitlements: product_entitlement_summary[]; is_recurring: boolean; license_key_enabled: boolean; metadata: metadata; price: price; product_id: string; tax_category: tax_category; updated_at: string; addons?: string[]; description?: string; digital_product_delivery?: digital_product_delivery; image?: string; license_key_activation_message?: string; license_key_activations_limit?: number; license_key_duration?: license_key_duration; name?: string; pricing_mode?: pricing_mode; product_collection_id?: string; }`\n\n**post** `/products`\n\n### Parameters\n\n- `name: string`\n Name of the product\n\n- `price: { currency: string; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: string; discount: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: string; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'usage_based_price'; meters?: { meter_id: string; credit_entitlement_id?: string; description?: string; free_threshold?: number; measurement_unit?: string; meter_units_per_credit?: string; name?: string; price_per_unit?: string; }[]; tax_inclusive?: boolean; }`\n Price configuration for the product\n\n- `tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'`\n Tax category applied to this product\n\n- `addons?: string[]`\n Addons available for subscription product\n\n- `brand_id?: string`\n Brand id for the product, if not provided will default to primary brand\n\n- `credit_entitlements?: { credit_entitlement_id: string; credits_amount: string; currency?: string; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_behavior?: 'forgive_at_reset' | 'invoice_at_billing' | 'carry_deficit' | 'carry_deficit_auto_repay'; overage_enabled?: boolean; overage_limit?: string; price_per_unit?: string; proration_behavior?: 'prorate' | 'no_prorate'; rollover_enabled?: boolean; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: 'Day' | 'Week' | 'Month' | 'Year'; trial_credits?: string; trial_credits_expire_after_trial?: boolean; }[]`\n Optional credit entitlements to attach (max 5)\n\n- `description?: string`\n Optional description of the product\n\n- `digital_product_delivery?: { external_url?: string; instructions?: string; }`\n Choose how you would like you digital product delivered\n\ndeprecated: use entitlements instead\n - `external_url?: string`\n External URL to digital product\n - `instructions?: string`\n Instructions to download and use the digital product\n\n- `entitlements?: { entitlement_id: string; }[]`\n Optional entitlements to attach to this product (max 50)\n\n- `license_key_activation_message?: string`\n Optional message displayed during license key activation\n\ndeprecated: use entitlements instead. Ignored when a `license_key`\nentitlement is attached via the `entitlements` field.\n\n- `license_key_activations_limit?: number`\n The number of times the license key can be activated.\nMust be 0 or greater\n\ndeprecated: use entitlements instead. Ignored when a `license_key`\nentitlement is attached via the `entitlements` field.\n\n- `license_key_duration?: { count: number; interval: 'Day' | 'Week' | 'Month' | 'Year'; }`\n Duration configuration for the license key.\nSet to null if you don't want the license key to expire.\nFor subscriptions, the lifetime of the license key is tied to the subscription period\n\ndeprecated: use entitlements instead. Ignored when a `license_key`\nentitlement is attached via the `entitlements` field.\n - `count: number`\n - `interval: 'Day' | 'Week' | 'Month' | 'Year'`\n Unit of a duration count (e.g. license-key validity period).\n\n- `license_key_enabled?: boolean`\n When true, generates and sends a license key to your customer.\nDefaults to false\n\ndeprecated: use entitlements instead. If a `license_key` entitlement is\nalso attached via the `entitlements` field, the `license_key_*` config\nfields below are ignored — the attached entitlement's config is the\nsource of truth.\n\n- `metadata?: object`\n Additional metadata for the product\n\n- `pricing_mode?: 'by_currency' | 'by_country'`\n Pricing mode for localized pricing. When set, rules from\n/products/{id}/localized-prices apply at checkout. NULL means base-only\n(existing behavior).\n\n### Returns\n\n- `{ brand_id: string; business_id: string; created_at: string; credit_entitlements: { id: string; credit_entitlement_id: string; credit_entitlement_name: string; credit_entitlement_unit: string; credits_amount: string; overage_behavior: cbb_overage_behavior; overage_enabled: boolean; proration_behavior: cbb_proration_behavior; rollover_enabled: boolean; trial_credits_expire_after_trial: boolean; currency?: currency; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_limit?: string; price_per_unit?: string; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: time_interval; trial_credits?: string; }[]; entitlements: { id: string; integration_config: integration_config_response; integration_type: entitlement_integration_type; name: string; description?: string; }[]; is_recurring: boolean; license_key_enabled: boolean; metadata: object; price: { currency: currency; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: currency; discount: number; payment_frequency_count: number; payment_frequency_interval: time_interval; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: currency; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: time_interval; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'usage_based_price'; meters?: add_meter_to_price[]; tax_inclusive?: boolean; }; product_id: string; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; updated_at: string; addons?: string[]; description?: string; digital_product_delivery?: { files: digital_product_delivery_file[]; external_url?: string; instructions?: string; }; image?: string; license_key_activation_message?: string; license_key_activations_limit?: number; license_key_duration?: { count: number; interval: time_interval; }; name?: string; pricing_mode?: 'by_currency' | 'by_country'; product_collection_id?: string; }`\n\n - `brand_id: string`\n - `business_id: string`\n - `created_at: string`\n - `credit_entitlements: { id: string; credit_entitlement_id: string; credit_entitlement_name: string; credit_entitlement_unit: string; credits_amount: string; overage_behavior: 'forgive_at_reset' | 'invoice_at_billing' | 'carry_deficit' | 'carry_deficit_auto_repay'; overage_enabled: boolean; proration_behavior: 'prorate' | 'no_prorate'; rollover_enabled: boolean; trial_credits_expire_after_trial: boolean; currency?: string; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_limit?: string; price_per_unit?: string; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: 'Day' | 'Week' | 'Month' | 'Year'; trial_credits?: string; }[]`\n - `entitlements: { id: string; integration_config: { feature_id: string; feature_type: feature_type; } | { permission: github_permission; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: object; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: time_interval; fulfillment_mode?: 'auto' | 'manual'; }; integration_type: string; name: string; description?: string; }[]`\n - `is_recurring: boolean`\n - `license_key_enabled: boolean`\n - `metadata: object`\n - `price: { currency: string; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: string; discount: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: string; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'usage_based_price'; meters?: { meter_id: string; credit_entitlement_id?: string; description?: string; free_threshold?: number; measurement_unit?: string; meter_units_per_credit?: string; name?: string; price_per_unit?: string; }[]; tax_inclusive?: boolean; }`\n - `product_id: string`\n - `tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'`\n - `updated_at: string`\n - `addons?: string[]`\n - `description?: string`\n - `digital_product_delivery?: { files: { download_url: string; expires_in: number; file_id: string; filename: string; content_type?: string; file_size?: number; }[]; external_url?: string; instructions?: string; }`\n - `image?: string`\n - `license_key_activation_message?: string`\n - `license_key_activations_limit?: number`\n - `license_key_duration?: { count: number; interval: 'Day' | 'Week' | 'Month' | 'Year'; }`\n - `name?: string`\n - `pricing_mode?: 'by_currency' | 'by_country'`\n - `product_collection_id?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst product = await client.products.create({\n name: 'name',\n price: {\n currency: 'AED',\n discount: 0,\n price: 0,\n purchasing_power_parity: true,\n type: 'one_time_price',\n},\n tax_category: 'digital_products',\n});\n\nconsole.log(product);\n```",
2908
2963
  perLanguage: {
2909
2964
  typescript: {
2910
2965
  method: 'client.products.create',
@@ -2953,7 +3008,7 @@ const EMBEDDED_METHODS = [
2953
3008
  qualified: 'client.products.retrieve',
2954
3009
  params: ['id: string;'],
2955
3010
  response: "{ brand_id: string; business_id: string; created_at: string; credit_entitlements: object[]; entitlements: object[]; is_recurring: boolean; license_key_enabled: boolean; metadata: object; price: object | object | object; product_id: string; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; updated_at: string; addons?: string[]; description?: string; digital_product_delivery?: object; image?: string; license_key_activation_message?: string; license_key_activations_limit?: number; license_key_duration?: object; name?: string; pricing_mode?: 'by_currency' | 'by_country'; product_collection_id?: string; }",
2956
- markdown: "## retrieve\n\n`client.products.retrieve(id: string): { brand_id: string; business_id: string; created_at: string; credit_entitlements: credit_entitlement_mapping_response[]; entitlements: product_entitlement_summary[]; is_recurring: boolean; license_key_enabled: boolean; metadata: metadata; price: price; product_id: string; tax_category: tax_category; updated_at: string; addons?: string[]; description?: string; digital_product_delivery?: digital_product_delivery; image?: string; license_key_activation_message?: string; license_key_activations_limit?: number; license_key_duration?: license_key_duration; name?: string; pricing_mode?: pricing_mode; product_collection_id?: string; }`\n\n**get** `/products/{id}`\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ brand_id: string; business_id: string; created_at: string; credit_entitlements: { id: string; credit_entitlement_id: string; credit_entitlement_name: string; credit_entitlement_unit: string; credits_amount: string; overage_behavior: cbb_overage_behavior; overage_enabled: boolean; proration_behavior: cbb_proration_behavior; rollover_enabled: boolean; trial_credits_expire_after_trial: boolean; currency?: currency; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_limit?: string; price_per_unit?: string; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: time_interval; trial_credits?: string; }[]; entitlements: { id: string; integration_config: integration_config_response; integration_type: entitlement_integration_type; name: string; description?: string; }[]; is_recurring: boolean; license_key_enabled: boolean; metadata: object; price: { currency: currency; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: currency; discount: number; payment_frequency_count: number; payment_frequency_interval: time_interval; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: currency; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: time_interval; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'usage_based_price'; meters?: add_meter_to_price[]; tax_inclusive?: boolean; }; product_id: string; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; updated_at: string; addons?: string[]; description?: string; digital_product_delivery?: { files: digital_product_delivery_file[]; external_url?: string; instructions?: string; }; image?: string; license_key_activation_message?: string; license_key_activations_limit?: number; license_key_duration?: { count: number; interval: time_interval; }; name?: string; pricing_mode?: 'by_currency' | 'by_country'; product_collection_id?: string; }`\n\n - `brand_id: string`\n - `business_id: string`\n - `created_at: string`\n - `credit_entitlements: { id: string; credit_entitlement_id: string; credit_entitlement_name: string; credit_entitlement_unit: string; credits_amount: string; overage_behavior: 'forgive_at_reset' | 'invoice_at_billing' | 'carry_deficit' | 'carry_deficit_auto_repay'; overage_enabled: boolean; proration_behavior: 'prorate' | 'no_prorate'; rollover_enabled: boolean; trial_credits_expire_after_trial: boolean; currency?: string; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_limit?: string; price_per_unit?: string; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: 'Day' | 'Week' | 'Month' | 'Year'; trial_credits?: string; }[]`\n - `entitlements: { id: string; integration_config: { permission: github_permission; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: object; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: time_interval; fulfillment_mode?: 'auto' | 'manual'; }; integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key'; name: string; description?: string; }[]`\n - `is_recurring: boolean`\n - `license_key_enabled: boolean`\n - `metadata: object`\n - `price: { currency: string; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: string; discount: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: string; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'usage_based_price'; meters?: { meter_id: string; credit_entitlement_id?: string; description?: string; free_threshold?: number; measurement_unit?: string; meter_units_per_credit?: string; name?: string; price_per_unit?: string; }[]; tax_inclusive?: boolean; }`\n - `product_id: string`\n - `tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'`\n - `updated_at: string`\n - `addons?: string[]`\n - `description?: string`\n - `digital_product_delivery?: { files: { download_url: string; expires_in: number; file_id: string; filename: string; content_type?: string; file_size?: number; }[]; external_url?: string; instructions?: string; }`\n - `image?: string`\n - `license_key_activation_message?: string`\n - `license_key_activations_limit?: number`\n - `license_key_duration?: { count: number; interval: 'Day' | 'Week' | 'Month' | 'Year'; }`\n - `name?: string`\n - `pricing_mode?: 'by_currency' | 'by_country'`\n - `product_collection_id?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst product = await client.products.retrieve('pdt_R8AWMPiV8RyJElcCKvAID');\n\nconsole.log(product);\n```",
3011
+ markdown: "## retrieve\n\n`client.products.retrieve(id: string): { brand_id: string; business_id: string; created_at: string; credit_entitlements: credit_entitlement_mapping_response[]; entitlements: product_entitlement_summary[]; is_recurring: boolean; license_key_enabled: boolean; metadata: metadata; price: price; product_id: string; tax_category: tax_category; updated_at: string; addons?: string[]; description?: string; digital_product_delivery?: digital_product_delivery; image?: string; license_key_activation_message?: string; license_key_activations_limit?: number; license_key_duration?: license_key_duration; name?: string; pricing_mode?: pricing_mode; product_collection_id?: string; }`\n\n**get** `/products/{id}`\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ brand_id: string; business_id: string; created_at: string; credit_entitlements: { id: string; credit_entitlement_id: string; credit_entitlement_name: string; credit_entitlement_unit: string; credits_amount: string; overage_behavior: cbb_overage_behavior; overage_enabled: boolean; proration_behavior: cbb_proration_behavior; rollover_enabled: boolean; trial_credits_expire_after_trial: boolean; currency?: currency; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_limit?: string; price_per_unit?: string; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: time_interval; trial_credits?: string; }[]; entitlements: { id: string; integration_config: integration_config_response; integration_type: entitlement_integration_type; name: string; description?: string; }[]; is_recurring: boolean; license_key_enabled: boolean; metadata: object; price: { currency: currency; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: currency; discount: number; payment_frequency_count: number; payment_frequency_interval: time_interval; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: currency; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: time_interval; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'usage_based_price'; meters?: add_meter_to_price[]; tax_inclusive?: boolean; }; product_id: string; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; updated_at: string; addons?: string[]; description?: string; digital_product_delivery?: { files: digital_product_delivery_file[]; external_url?: string; instructions?: string; }; image?: string; license_key_activation_message?: string; license_key_activations_limit?: number; license_key_duration?: { count: number; interval: time_interval; }; name?: string; pricing_mode?: 'by_currency' | 'by_country'; product_collection_id?: string; }`\n\n - `brand_id: string`\n - `business_id: string`\n - `created_at: string`\n - `credit_entitlements: { id: string; credit_entitlement_id: string; credit_entitlement_name: string; credit_entitlement_unit: string; credits_amount: string; overage_behavior: 'forgive_at_reset' | 'invoice_at_billing' | 'carry_deficit' | 'carry_deficit_auto_repay'; overage_enabled: boolean; proration_behavior: 'prorate' | 'no_prorate'; rollover_enabled: boolean; trial_credits_expire_after_trial: boolean; currency?: string; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_limit?: string; price_per_unit?: string; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: 'Day' | 'Week' | 'Month' | 'Year'; trial_credits?: string; }[]`\n - `entitlements: { id: string; integration_config: { feature_id: string; feature_type: feature_type; } | { permission: github_permission; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: object; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: time_interval; fulfillment_mode?: 'auto' | 'manual'; }; integration_type: string; name: string; description?: string; }[]`\n - `is_recurring: boolean`\n - `license_key_enabled: boolean`\n - `metadata: object`\n - `price: { currency: string; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: string; discount: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: string; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'usage_based_price'; meters?: { meter_id: string; credit_entitlement_id?: string; description?: string; free_threshold?: number; measurement_unit?: string; meter_units_per_credit?: string; name?: string; price_per_unit?: string; }[]; tax_inclusive?: boolean; }`\n - `product_id: string`\n - `tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'`\n - `updated_at: string`\n - `addons?: string[]`\n - `description?: string`\n - `digital_product_delivery?: { files: { download_url: string; expires_in: number; file_id: string; filename: string; content_type?: string; file_size?: number; }[]; external_url?: string; instructions?: string; }`\n - `image?: string`\n - `license_key_activation_message?: string`\n - `license_key_activations_limit?: number`\n - `license_key_duration?: { count: number; interval: 'Day' | 'Week' | 'Month' | 'Year'; }`\n - `name?: string`\n - `pricing_mode?: 'by_currency' | 'by_country'`\n - `product_collection_id?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst product = await client.products.retrieve('pdt_R8AWMPiV8RyJElcCKvAID');\n\nconsole.log(product);\n```",
2957
3012
  perLanguage: {
2958
3013
  typescript: {
2959
3014
  method: 'client.products.retrieve',
@@ -3019,7 +3074,7 @@ const EMBEDDED_METHODS = [
3019
3074
  "pricing_mode?: 'by_currency' | 'by_country';",
3020
3075
  "tax_category?: 'digital_products' | 'saas' | 'e_book' | 'edtech';",
3021
3076
  ],
3022
- markdown: "## update\n\n`client.products.update(id: string, addons?: string[], brand_id?: string, credit_entitlements?: { credit_entitlement_id: string; credits_amount: string; currency?: currency; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_behavior?: cbb_overage_behavior; overage_enabled?: boolean; overage_limit?: string; price_per_unit?: string; proration_behavior?: cbb_proration_behavior; rollover_enabled?: boolean; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: time_interval; trial_credits?: string; trial_credits_expire_after_trial?: boolean; }[], description?: string, digital_product_delivery?: { external_url?: string; files?: string[]; instructions?: string; }, entitlements?: { entitlement_id: string; }[], image_id?: string, license_key_activation_message?: string, license_key_activations_limit?: number, license_key_duration?: { count: number; interval: time_interval; }, license_key_enabled?: boolean, metadata?: object, name?: string, price?: { currency: currency; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: currency; discount: number; payment_frequency_count: number; payment_frequency_interval: time_interval; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: currency; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: time_interval; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'usage_based_price'; meters?: add_meter_to_price[]; tax_inclusive?: boolean; }, pricing_mode?: 'by_currency' | 'by_country', tax_category?: 'digital_products' | 'saas' | 'e_book' | 'edtech'): void`\n\n**patch** `/products/{id}`\n\n### Parameters\n\n- `id: string`\n\n- `addons?: string[]`\n Available Addons for subscription products\n\n- `brand_id?: string`\n\n- `credit_entitlements?: { credit_entitlement_id: string; credits_amount: string; currency?: string; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_behavior?: 'forgive_at_reset' | 'invoice_at_billing' | 'carry_deficit' | 'carry_deficit_auto_repay'; overage_enabled?: boolean; overage_limit?: string; price_per_unit?: string; proration_behavior?: 'prorate' | 'no_prorate'; rollover_enabled?: boolean; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: 'Day' | 'Week' | 'Month' | 'Year'; trial_credits?: string; trial_credits_expire_after_trial?: boolean; }[]`\n Credit entitlements to update (replaces all existing when present)\nSend empty array to remove all, omit field to leave unchanged\n\n- `description?: string`\n Description of the product, optional and must be at most 1000 characters.\n\n- `digital_product_delivery?: { external_url?: string; files?: string[]; instructions?: string; }`\n Choose how you would like you digital product delivered\n\ndeprecated: use entitlements instead\n - `external_url?: string`\n External URL to digital product\n - `files?: string[]`\n Uploaded files ids of digital product\n - `instructions?: string`\n Instructions to download and use the digital product\n\n- `entitlements?: { entitlement_id: string; }[]`\n Entitlements to attach (replaces all existing when present)\nSend empty array to remove all, omit field to leave unchanged\n\n- `image_id?: string`\n Product image id after its uploaded to S3\n\n- `license_key_activation_message?: string`\n Message sent to the customer upon license key activation.\n\nOnly applicable if `license_key_enabled` is `true`. This message contains instructions for\nactivating the license key.\n\ndeprecated: use entitlements instead\n\n- `license_key_activations_limit?: number`\n Limit for the number of activations for the license key.\n\nOnly applicable if `license_key_enabled` is `true`. Represents the maximum number of times\nthe license key can be activated.\n\ndeprecated: use entitlements instead\n\n- `license_key_duration?: { count: number; interval: 'Day' | 'Week' | 'Month' | 'Year'; }`\n Duration of the license key if enabled.\n\nOnly applicable if `license_key_enabled` is `true`. Represents the duration in days for which\nthe license key is valid.\n\ndeprecated: use entitlements instead\n - `count: number`\n - `interval: 'Day' | 'Week' | 'Month' | 'Year'`\n\n- `license_key_enabled?: boolean`\n Whether the product requires a license key.\n\nIf `true`, additional fields related to license key (duration, activations limit, activation message)\nbecome applicable.\n\ndeprecated: use entitlements instead\n\n- `metadata?: object`\n Additional metadata for the product\n\n- `name?: string`\n Name of the product, optional and must be at most 100 characters.\n\n- `price?: { currency: string; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: string; discount: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: string; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'usage_based_price'; meters?: { meter_id: string; credit_entitlement_id?: string; description?: string; free_threshold?: number; measurement_unit?: string; meter_units_per_credit?: string; name?: string; price_per_unit?: string; }[]; tax_inclusive?: boolean; }`\n Price details of the product.\n\n- `pricing_mode?: 'by_currency' | 'by_country'`\n Update the pricing mode. Omit to leave unchanged; set to null to clear\n(which archives all active localized rules for this product). Changing\nto a different non-null mode also archives any rules whose mode doesn't\nmatch the new mode.\n\n- `tax_category?: 'digital_products' | 'saas' | 'e_book' | 'edtech'`\n Tax category of the product.\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nawait client.products.update('pdt_R8AWMPiV8RyJElcCKvAID')\n```",
3077
+ markdown: "## update\n\n`client.products.update(id: string, addons?: string[], brand_id?: string, credit_entitlements?: { credit_entitlement_id: string; credits_amount: string; currency?: currency; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_behavior?: cbb_overage_behavior; overage_enabled?: boolean; overage_limit?: string; price_per_unit?: string; proration_behavior?: cbb_proration_behavior; rollover_enabled?: boolean; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: time_interval; trial_credits?: string; trial_credits_expire_after_trial?: boolean; }[], description?: string, digital_product_delivery?: { external_url?: string; files?: string[]; instructions?: string; }, entitlements?: { entitlement_id: string; }[], image_id?: string, license_key_activation_message?: string, license_key_activations_limit?: number, license_key_duration?: { count: number; interval: time_interval; }, license_key_enabled?: boolean, metadata?: object, name?: string, price?: { currency: currency; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: currency; discount: number; payment_frequency_count: number; payment_frequency_interval: time_interval; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: currency; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: time_interval; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'usage_based_price'; meters?: add_meter_to_price[]; tax_inclusive?: boolean; }, pricing_mode?: 'by_currency' | 'by_country', tax_category?: 'digital_products' | 'saas' | 'e_book' | 'edtech'): void`\n\n**patch** `/products/{id}`\n\n### Parameters\n\n- `id: string`\n\n- `addons?: string[]`\n Available Addons for subscription products\n\n- `brand_id?: string`\n\n- `credit_entitlements?: { credit_entitlement_id: string; credits_amount: string; currency?: string; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_behavior?: 'forgive_at_reset' | 'invoice_at_billing' | 'carry_deficit' | 'carry_deficit_auto_repay'; overage_enabled?: boolean; overage_limit?: string; price_per_unit?: string; proration_behavior?: 'prorate' | 'no_prorate'; rollover_enabled?: boolean; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: 'Day' | 'Week' | 'Month' | 'Year'; trial_credits?: string; trial_credits_expire_after_trial?: boolean; }[]`\n Credit entitlements to update (replaces all existing when present)\nSend empty array to remove all, omit field to leave unchanged\n\n- `description?: string`\n Description of the product, optional and must be at most 1000 characters.\n\n- `digital_product_delivery?: { external_url?: string; files?: string[]; instructions?: string; }`\n Choose how you would like you digital product delivered\n\ndeprecated: use entitlements instead\n - `external_url?: string`\n External URL to digital product\n - `files?: string[]`\n Uploaded files ids of digital product\n - `instructions?: string`\n Instructions to download and use the digital product\n\n- `entitlements?: { entitlement_id: string; }[]`\n Entitlements to attach (replaces all existing when present)\nSend empty array to remove all, omit field to leave unchanged\n\n- `image_id?: string`\n Product image id after its uploaded to S3\n\n- `license_key_activation_message?: string`\n Message sent to the customer upon license key activation.\n\nOnly applicable if `license_key_enabled` is `true`. This message contains instructions for\nactivating the license key.\n\ndeprecated: use entitlements instead\n\n- `license_key_activations_limit?: number`\n Limit for the number of activations for the license key.\n\nOnly applicable if `license_key_enabled` is `true`. Represents the maximum number of times\nthe license key can be activated.\n\ndeprecated: use entitlements instead\n\n- `license_key_duration?: { count: number; interval: 'Day' | 'Week' | 'Month' | 'Year'; }`\n Duration of the license key if enabled.\n\nOnly applicable if `license_key_enabled` is `true`. Represents the duration in days for which\nthe license key is valid.\n\ndeprecated: use entitlements instead\n - `count: number`\n - `interval: 'Day' | 'Week' | 'Month' | 'Year'`\n Unit of a duration count (e.g. license-key validity period).\n\n- `license_key_enabled?: boolean`\n Whether the product requires a license key.\n\nIf `true`, additional fields related to license key (duration, activations limit, activation message)\nbecome applicable.\n\ndeprecated: use entitlements instead\n\n- `metadata?: object`\n Additional metadata for the product\n\n- `name?: string`\n Name of the product, optional and must be at most 100 characters.\n\n- `price?: { currency: string; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: string; discount: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: string; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'usage_based_price'; meters?: { meter_id: string; credit_entitlement_id?: string; description?: string; free_threshold?: number; measurement_unit?: string; meter_units_per_credit?: string; name?: string; price_per_unit?: string; }[]; tax_inclusive?: boolean; }`\n Price details of the product.\n\n- `pricing_mode?: 'by_currency' | 'by_country'`\n Update the pricing mode. Omit to leave unchanged; set to null to clear\n(which archives all active localized rules for this product). Changing\nto a different non-null mode also archives any rules whose mode doesn't\nmatch the new mode.\n\n- `tax_category?: 'digital_products' | 'saas' | 'e_book' | 'edtech'`\n Tax category of the product.\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nawait client.products.update('pdt_R8AWMPiV8RyJElcCKvAID')\n```",
3023
3078
  perLanguage: {
3024
3079
  typescript: {
3025
3080
  method: 'client.products.update',
@@ -6032,13 +6087,9 @@ const EMBEDDED_METHODS = [
6032
6087
  description: 'GET /entitlements',
6033
6088
  stainlessPath: '(resource) entitlements > (method) list',
6034
6089
  qualified: 'client.entitlements.list',
6035
- params: [
6036
- "integration_type?: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key';",
6037
- 'page_number?: number;',
6038
- 'page_size?: number;',
6039
- ],
6040
- response: "{ id: string; business_id: string; created_at: string; integration_config: { permission: github_permission; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: object; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: time_interval; fulfillment_mode?: 'auto' | 'manual'; }; integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key'; is_active: boolean; metadata: object; name: string; updated_at: string; description?: string; }",
6041
- markdown: "## list\n\n`client.entitlements.list(integration_type?: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key', page_number?: number, page_size?: number): { id: string; business_id: string; created_at: string; integration_config: integration_config_response; integration_type: entitlement_integration_type; is_active: boolean; metadata: metadata; name: string; updated_at: string; description?: string; }`\n\n**get** `/entitlements`\n\nGET /entitlements\n\n### Parameters\n\n- `integration_type?: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key'`\n Filter by integration type\n\n- `page_number?: number`\n Page number (default 0)\n\n- `page_size?: number`\n Page size (default 10, max 100)\n\n### Returns\n\n- `{ id: string; business_id: string; created_at: string; integration_config: { permission: github_permission; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: object; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: time_interval; fulfillment_mode?: 'auto' | 'manual'; }; integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key'; is_active: boolean; metadata: object; name: string; updated_at: string; description?: string; }`\n Detailed view of a single entitlement: identity, integration type,\nintegration-specific configuration, and metadata.\n\n - `id: string`\n - `business_id: string`\n - `created_at: string`\n - `integration_config: { permission: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: { files: { download_url: string; expires_in: number; file_id: string; filename: string; content_type?: string; file_size?: number; }[]; external_url?: string; instructions?: string; }; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: 'Day' | 'Week' | 'Month' | 'Year'; fulfillment_mode?: 'auto' | 'manual'; }`\n - `integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key'`\n - `is_active: boolean`\n - `metadata: object`\n - `name: string`\n - `updated_at: string`\n - `description?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\n// Automatically fetches more pages as needed.\nfor await (const entitlement of client.entitlements.list()) {\n console.log(entitlement);\n}\n```",
6090
+ params: ['integration_type?: string;', 'page_number?: number;', 'page_size?: number;'],
6091
+ response: "{ id: string; business_id: string; created_at: string; integration_config: { feature_id: string; feature_type: feature_type; } | { permission: github_permission; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: object; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: time_interval; fulfillment_mode?: 'auto' | 'manual'; }; integration_type: string; is_active: boolean; metadata: object; name: string; updated_at: string; description?: string; }",
6092
+ markdown: "## list\n\n`client.entitlements.list(integration_type?: string, page_number?: number, page_size?: number): { id: string; business_id: string; created_at: string; integration_config: integration_config_response; integration_type: entitlement_integration_type; is_active: boolean; metadata: metadata; name: string; updated_at: string; description?: string; }`\n\n**get** `/entitlements`\n\nGET /entitlements\n\n### Parameters\n\n- `integration_type?: string`\n Filter by integration type\n\n- `page_number?: number`\n Page number (default 0)\n\n- `page_size?: number`\n Page size (default 10, max 100)\n\n### Returns\n\n- `{ id: string; business_id: string; created_at: string; integration_config: { feature_id: string; feature_type: feature_type; } | { permission: github_permission; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: object; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: time_interval; fulfillment_mode?: 'auto' | 'manual'; }; integration_type: string; is_active: boolean; metadata: object; name: string; updated_at: string; description?: string; }`\n Detailed view of a single entitlement: identity, integration type,\nintegration-specific configuration, and metadata.\n\n - `id: string`\n - `business_id: string`\n - `created_at: string`\n - `integration_config: { feature_id: string; feature_type: 'boolean'; } | { permission: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: { files: { download_url: string; expires_in: number; file_id: string; filename: string; content_type?: string; file_size?: number; }[]; external_url?: string; instructions?: string; }; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: 'Day' | 'Week' | 'Month' | 'Year'; fulfillment_mode?: 'auto' | 'manual'; }`\n - `integration_type: string`\n - `is_active: boolean`\n - `metadata: object`\n - `name: string`\n - `updated_at: string`\n - `description?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\n// Automatically fetches more pages as needed.\nfor await (const entitlement of client.entitlements.list()) {\n console.log(entitlement);\n}\n```",
6042
6093
  perLanguage: {
6043
6094
  typescript: {
6044
6095
  method: 'client.entitlements.list',
@@ -6086,49 +6137,49 @@ const EMBEDDED_METHODS = [
6086
6137
  stainlessPath: '(resource) entitlements > (method) create',
6087
6138
  qualified: 'client.entitlements.create',
6088
6139
  params: [
6089
- "integration_config: { permission: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_file_ids: string[]; external_url?: string; instructions?: string; legacy_file_ids?: string[]; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: 'Day' | 'Week' | 'Month' | 'Year'; fulfillment_mode?: 'auto' | 'manual'; };",
6090
- "integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key';",
6140
+ "integration_config: { feature_id: string; feature_type: 'boolean'; } | { permission: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_file_ids: string[]; external_url?: string; instructions?: string; legacy_file_ids?: string[]; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: 'Day' | 'Week' | 'Month' | 'Year'; fulfillment_mode?: 'auto' | 'manual'; };",
6141
+ 'integration_type: string;',
6091
6142
  'name: string;',
6092
6143
  'description?: string;',
6093
6144
  'metadata?: object;',
6094
6145
  ],
6095
- response: "{ id: string; business_id: string; created_at: string; integration_config: { permission: github_permission; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: object; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: time_interval; fulfillment_mode?: 'auto' | 'manual'; }; integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key'; is_active: boolean; metadata: object; name: string; updated_at: string; description?: string; }",
6096
- markdown: "## create\n\n`client.entitlements.create(integration_config: { permission: github_permission; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_file_ids: string[]; external_url?: string; instructions?: string; legacy_file_ids?: string[]; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: time_interval; fulfillment_mode?: 'auto' | 'manual'; }, integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key', name: string, description?: string, metadata?: object): { id: string; business_id: string; created_at: string; integration_config: integration_config_response; integration_type: entitlement_integration_type; is_active: boolean; metadata: metadata; name: string; updated_at: string; description?: string; }`\n\n**post** `/entitlements`\n\nPOST /entitlements\n\n### Parameters\n\n- `integration_config: { permission: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_file_ids: string[]; external_url?: string; instructions?: string; legacy_file_ids?: string[]; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: 'Day' | 'Week' | 'Month' | 'Year'; fulfillment_mode?: 'auto' | 'manual'; }`\n Platform-specific configuration (validated per integration_type)\n\n- `integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key'`\n Which platform integration this entitlement uses\n\n- `name: string`\n Display name for this entitlement\n\n- `description?: string`\n Optional description\n\n- `metadata?: object`\n Additional metadata for the entitlement\n\n### Returns\n\n- `{ id: string; business_id: string; created_at: string; integration_config: { permission: github_permission; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: object; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: time_interval; fulfillment_mode?: 'auto' | 'manual'; }; integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key'; is_active: boolean; metadata: object; name: string; updated_at: string; description?: string; }`\n Detailed view of a single entitlement: identity, integration type,\nintegration-specific configuration, and metadata.\n\n - `id: string`\n - `business_id: string`\n - `created_at: string`\n - `integration_config: { permission: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: { files: { download_url: string; expires_in: number; file_id: string; filename: string; content_type?: string; file_size?: number; }[]; external_url?: string; instructions?: string; }; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: 'Day' | 'Week' | 'Month' | 'Year'; fulfillment_mode?: 'auto' | 'manual'; }`\n - `integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key'`\n - `is_active: boolean`\n - `metadata: object`\n - `name: string`\n - `updated_at: string`\n - `description?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst entitlement = await client.entitlements.create({\n integration_config: { permission: 'pull', target_id: 'target_id' },\n integration_type: 'discord',\n name: 'name',\n});\n\nconsole.log(entitlement);\n```",
6146
+ response: "{ id: string; business_id: string; created_at: string; integration_config: { feature_id: string; feature_type: feature_type; } | { permission: github_permission; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: object; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: time_interval; fulfillment_mode?: 'auto' | 'manual'; }; integration_type: string; is_active: boolean; metadata: object; name: string; updated_at: string; description?: string; }",
6147
+ markdown: "## create\n\n`client.entitlements.create(integration_config: { feature_id: string; feature_type: feature_type; } | { permission: github_permission; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_file_ids: string[]; external_url?: string; instructions?: string; legacy_file_ids?: string[]; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: time_interval; fulfillment_mode?: 'auto' | 'manual'; }, integration_type: string, name: string, description?: string, metadata?: object): { id: string; business_id: string; created_at: string; integration_config: integration_config_response; integration_type: entitlement_integration_type; is_active: boolean; metadata: metadata; name: string; updated_at: string; description?: string; }`\n\n**post** `/entitlements`\n\nPOST /entitlements\n\n### Parameters\n\n- `integration_config: { feature_id: string; feature_type: 'boolean'; } | { permission: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_file_ids: string[]; external_url?: string; instructions?: string; legacy_file_ids?: string[]; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: 'Day' | 'Week' | 'Month' | 'Year'; fulfillment_mode?: 'auto' | 'manual'; }`\n Platform-specific configuration (validated per integration_type)\n\n- `integration_type: string`\n Which platform integration this entitlement uses\n\n- `name: string`\n Display name for this entitlement\n\n- `description?: string`\n Optional description\n\n- `metadata?: object`\n Additional metadata for the entitlement\n\n### Returns\n\n- `{ id: string; business_id: string; created_at: string; integration_config: { feature_id: string; feature_type: feature_type; } | { permission: github_permission; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: object; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: time_interval; fulfillment_mode?: 'auto' | 'manual'; }; integration_type: string; is_active: boolean; metadata: object; name: string; updated_at: string; description?: string; }`\n Detailed view of a single entitlement: identity, integration type,\nintegration-specific configuration, and metadata.\n\n - `id: string`\n - `business_id: string`\n - `created_at: string`\n - `integration_config: { feature_id: string; feature_type: 'boolean'; } | { permission: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: { files: { download_url: string; expires_in: number; file_id: string; filename: string; content_type?: string; file_size?: number; }[]; external_url?: string; instructions?: string; }; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: 'Day' | 'Week' | 'Month' | 'Year'; fulfillment_mode?: 'auto' | 'manual'; }`\n - `integration_type: string`\n - `is_active: boolean`\n - `metadata: object`\n - `name: string`\n - `updated_at: string`\n - `description?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst entitlement = await client.entitlements.create({\n integration_config: { feature_id: 'feature_id', feature_type: 'boolean' },\n integration_type: 'discord',\n name: 'name',\n});\n\nconsole.log(entitlement);\n```",
6097
6148
  perLanguage: {
6098
6149
  typescript: {
6099
6150
  method: 'client.entitlements.create',
6100
- example: "import DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments({\n bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted\n});\n\nconst entitlement = await client.entitlements.create({\n integration_config: { permission: 'pull', target_id: 'target_id' },\n integration_type: 'discord',\n name: 'name',\n});\n\nconsole.log(entitlement.id);",
6151
+ example: "import DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments({\n bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted\n});\n\nconst entitlement = await client.entitlements.create({\n integration_config: { feature_id: 'feature_id', feature_type: 'boolean' },\n integration_type: 'discord',\n name: 'name',\n});\n\nconsole.log(entitlement.id);",
6101
6152
  },
6102
6153
  http: {
6103
- example: 'curl https://live.dodopayments.com/entitlements \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $DODO_PAYMENTS_API_KEY" \\\n -d \'{\n "integration_config": {\n "permission": "pull",\n "target_id": "target_id"\n },\n "integration_type": "discord",\n "name": "name"\n }\'',
6154
+ example: 'curl https://live.dodopayments.com/entitlements \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $DODO_PAYMENTS_API_KEY" \\\n -d \'{\n "integration_config": {\n "feature_id": "feature_id",\n "feature_type": "boolean"\n },\n "integration_type": "discord",\n "name": "name"\n }\'',
6104
6155
  },
6105
6156
  python: {
6106
6157
  method: 'entitlements.create',
6107
- example: 'import os\nfrom dodopayments import DodoPayments\n\nclient = DodoPayments(\n bearer_token=os.environ.get("DODO_PAYMENTS_API_KEY"), # This is the default and can be omitted\n)\nentitlement = client.entitlements.create(\n integration_config={\n "permission": "pull",\n "target_id": "target_id",\n },\n integration_type="discord",\n name="name",\n)\nprint(entitlement.id)',
6158
+ example: 'import os\nfrom dodopayments import DodoPayments\n\nclient = DodoPayments(\n bearer_token=os.environ.get("DODO_PAYMENTS_API_KEY"), # This is the default and can be omitted\n)\nentitlement = client.entitlements.create(\n integration_config={\n "feature_id": "feature_id",\n "feature_type": "boolean",\n },\n integration_type="discord",\n name="name",\n)\nprint(entitlement.id)',
6108
6159
  },
6109
6160
  java: {
6110
6161
  method: 'entitlements().create',
6111
- example: 'package com.dodopayments.api.example;\n\nimport com.dodopayments.api.client.DodoPaymentsClient;\nimport com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;\nimport com.dodopayments.api.models.entitlements.Entitlement;\nimport com.dodopayments.api.models.entitlements.EntitlementCreateParams;\nimport com.dodopayments.api.models.entitlements.EntitlementIntegrationType;\nimport com.dodopayments.api.models.entitlements.GitHubPermission;\nimport com.dodopayments.api.models.entitlements.IntegrationConfig;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();\n\n EntitlementCreateParams params = EntitlementCreateParams.builder()\n .integrationConfig(IntegrationConfig.GitHubConfig.builder()\n .permission(GitHubPermission.PULL)\n .targetId("target_id")\n .build())\n .integrationType(EntitlementIntegrationType.DISCORD)\n .name("name")\n .build();\n Entitlement entitlement = client.entitlements().create(params);\n }\n}',
6162
+ example: 'package com.dodopayments.api.example;\n\nimport com.dodopayments.api.client.DodoPaymentsClient;\nimport com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;\nimport com.dodopayments.api.models.entitlements.Entitlement;\nimport com.dodopayments.api.models.entitlements.EntitlementCreateParams;\nimport com.dodopayments.api.models.entitlements.EntitlementIntegrationType;\nimport com.dodopayments.api.models.entitlements.FeatureType;\nimport com.dodopayments.api.models.entitlements.IntegrationConfig;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();\n\n EntitlementCreateParams params = EntitlementCreateParams.builder()\n .integrationConfig(IntegrationConfig.FeatureFlagConfig.builder()\n .featureId("feature_id")\n .featureType(FeatureType.BOOLEAN)\n .build())\n .integrationType(EntitlementIntegrationType.DISCORD)\n .name("name")\n .build();\n Entitlement entitlement = client.entitlements().create(params);\n }\n}',
6112
6163
  },
6113
6164
  kotlin: {
6114
6165
  method: 'entitlements().create',
6115
- example: 'package com.dodopayments.api.example\n\nimport com.dodopayments.api.client.DodoPaymentsClient\nimport com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient\nimport com.dodopayments.api.models.entitlements.Entitlement\nimport com.dodopayments.api.models.entitlements.EntitlementCreateParams\nimport com.dodopayments.api.models.entitlements.EntitlementIntegrationType\nimport com.dodopayments.api.models.entitlements.GitHubPermission\nimport com.dodopayments.api.models.entitlements.IntegrationConfig\n\nfun main() {\n val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()\n\n val params: EntitlementCreateParams = EntitlementCreateParams.builder()\n .integrationConfig(IntegrationConfig.GitHubConfig.builder()\n .permission(GitHubPermission.PULL)\n .targetId("target_id")\n .build())\n .integrationType(EntitlementIntegrationType.DISCORD)\n .name("name")\n .build()\n val entitlement: Entitlement = client.entitlements().create(params)\n}',
6166
+ example: 'package com.dodopayments.api.example\n\nimport com.dodopayments.api.client.DodoPaymentsClient\nimport com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient\nimport com.dodopayments.api.models.entitlements.Entitlement\nimport com.dodopayments.api.models.entitlements.EntitlementCreateParams\nimport com.dodopayments.api.models.entitlements.EntitlementIntegrationType\nimport com.dodopayments.api.models.entitlements.FeatureType\nimport com.dodopayments.api.models.entitlements.IntegrationConfig\n\nfun main() {\n val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()\n\n val params: EntitlementCreateParams = EntitlementCreateParams.builder()\n .integrationConfig(IntegrationConfig.FeatureFlagConfig.builder()\n .featureId("feature_id")\n .featureType(FeatureType.BOOLEAN)\n .build())\n .integrationType(EntitlementIntegrationType.DISCORD)\n .name("name")\n .build()\n val entitlement: Entitlement = client.entitlements().create(params)\n}',
6116
6167
  },
6117
6168
  go: {
6118
6169
  method: 'client.Entitlements.New',
6119
- example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dodopayments/dodopayments-go"\n\t"github.com/dodopayments/dodopayments-go/option"\n)\n\nfunc main() {\n\tclient := dodopayments.NewClient(\n\t\toption.WithBearerToken("My Bearer Token"),\n\t)\n\tentitlement, err := client.Entitlements.New(context.TODO(), dodopayments.EntitlementNewParams{\n\t\tIntegrationConfig: dodopayments.F[dodopayments.IntegrationConfigUnionParam](dodopayments.IntegrationConfigGitHubConfigParam{\n\t\t\tPermission: dodopayments.F(dodopayments.GitHubPermissionPull),\n\t\t\tTargetID: dodopayments.F("target_id"),\n\t\t}),\n\t\tIntegrationType: dodopayments.F(dodopayments.EntitlementIntegrationTypeDiscord),\n\t\tName: dodopayments.F("name"),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", entitlement.ID)\n}\n',
6170
+ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dodopayments/dodopayments-go"\n\t"github.com/dodopayments/dodopayments-go/option"\n)\n\nfunc main() {\n\tclient := dodopayments.NewClient(\n\t\toption.WithBearerToken("My Bearer Token"),\n\t)\n\tentitlement, err := client.Entitlements.New(context.TODO(), dodopayments.EntitlementNewParams{\n\t\tIntegrationConfig: dodopayments.F[dodopayments.IntegrationConfigUnionParam](dodopayments.IntegrationConfigFeatureFlagConfigParam{\n\t\t\tFeatureID: dodopayments.F("feature_id"),\n\t\t\tFeatureType: dodopayments.F(dodopayments.FeatureTypeBoolean),\n\t\t}),\n\t\tIntegrationType: dodopayments.F(dodopayments.EntitlementIntegrationTypeDiscord),\n\t\tName: dodopayments.F("name"),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", entitlement.ID)\n}\n',
6120
6171
  },
6121
6172
  ruby: {
6122
6173
  method: 'entitlements.create',
6123
- example: 'require "dodopayments"\n\ndodo_payments = Dodopayments::Client.new(\n bearer_token: "My Bearer Token",\n environment: "test_mode" # defaults to "live_mode"\n)\n\nentitlement = dodo_payments.entitlements.create(\n integration_config: {permission: :pull, target_id: "target_id"},\n integration_type: :discord,\n name: "name"\n)\n\nputs(entitlement)',
6174
+ example: 'require "dodopayments"\n\ndodo_payments = Dodopayments::Client.new(\n bearer_token: "My Bearer Token",\n environment: "test_mode" # defaults to "live_mode"\n)\n\nentitlement = dodo_payments.entitlements.create(\n integration_config: {feature_id: "feature_id", feature_type: :boolean},\n integration_type: :discord,\n name: "name"\n)\n\nputs(entitlement)',
6124
6175
  },
6125
6176
  php: {
6126
6177
  method: 'entitlements->create',
6127
- example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(bearerToken: 'My Bearer Token', environment: 'test_mode');\n\n$entitlement = $client->entitlements->create(\n integrationConfig: [\n 'permission' => GitHubPermission::PULL, 'targetID' => 'target_id'\n ],\n integrationType: EntitlementIntegrationType::DISCORD,\n name: 'name',\n description: 'description',\n metadata: ['foo' => 'string'],\n);\n\nvar_dump($entitlement);",
6178
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(bearerToken: 'My Bearer Token', environment: 'test_mode');\n\n$entitlement = $client->entitlements->create(\n integrationConfig: [\n 'featureID' => 'feature_id', 'featureType' => FeatureType::BOOLEAN\n ],\n integrationType: EntitlementIntegrationType::DISCORD,\n name: 'name',\n description: 'description',\n metadata: ['foo' => 'string'],\n);\n\nvar_dump($entitlement);",
6128
6179
  },
6129
6180
  csharp: {
6130
6181
  method: 'Entitlements.Create',
6131
- example: 'EntitlementCreateParams parameters = new()\n{\n IntegrationConfig = new GitHubConfig()\n {\n Permission = GitHubPermission.Pull,\n TargetID = "target_id",\n },\n IntegrationType = EntitlementIntegrationType.Discord,\n Name = "name",\n};\n\nvar entitlement = await client.Entitlements.Create(parameters);\n\nConsole.WriteLine(entitlement);',
6182
+ example: 'EntitlementCreateParams parameters = new()\n{\n IntegrationConfig = new FeatureFlagConfig()\n {\n FeatureID = "feature_id",\n FeatureType = FeatureType.Boolean,\n },\n IntegrationType = EntitlementIntegrationType.Discord,\n Name = "name",\n};\n\nvar entitlement = await client.Entitlements.Create(parameters);\n\nConsole.WriteLine(entitlement);',
6132
6183
  },
6133
6184
  },
6134
6185
  },
@@ -6141,8 +6192,8 @@ const EMBEDDED_METHODS = [
6141
6192
  stainlessPath: '(resource) entitlements > (method) retrieve',
6142
6193
  qualified: 'client.entitlements.retrieve',
6143
6194
  params: ['id: string;'],
6144
- response: "{ id: string; business_id: string; created_at: string; integration_config: { permission: github_permission; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: object; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: time_interval; fulfillment_mode?: 'auto' | 'manual'; }; integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key'; is_active: boolean; metadata: object; name: string; updated_at: string; description?: string; }",
6145
- markdown: "## retrieve\n\n`client.entitlements.retrieve(id: string): { id: string; business_id: string; created_at: string; integration_config: integration_config_response; integration_type: entitlement_integration_type; is_active: boolean; metadata: metadata; name: string; updated_at: string; description?: string; }`\n\n**get** `/entitlements/{id}`\n\nGET /entitlements/{id}\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ id: string; business_id: string; created_at: string; integration_config: { permission: github_permission; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: object; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: time_interval; fulfillment_mode?: 'auto' | 'manual'; }; integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key'; is_active: boolean; metadata: object; name: string; updated_at: string; description?: string; }`\n Detailed view of a single entitlement: identity, integration type,\nintegration-specific configuration, and metadata.\n\n - `id: string`\n - `business_id: string`\n - `created_at: string`\n - `integration_config: { permission: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: { files: { download_url: string; expires_in: number; file_id: string; filename: string; content_type?: string; file_size?: number; }[]; external_url?: string; instructions?: string; }; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: 'Day' | 'Week' | 'Month' | 'Year'; fulfillment_mode?: 'auto' | 'manual'; }`\n - `integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key'`\n - `is_active: boolean`\n - `metadata: object`\n - `name: string`\n - `updated_at: string`\n - `description?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst entitlement = await client.entitlements.retrieve('ent_jt7jcvI79Xh8eehqgWdcm');\n\nconsole.log(entitlement);\n```",
6195
+ response: "{ id: string; business_id: string; created_at: string; integration_config: { feature_id: string; feature_type: feature_type; } | { permission: github_permission; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: object; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: time_interval; fulfillment_mode?: 'auto' | 'manual'; }; integration_type: string; is_active: boolean; metadata: object; name: string; updated_at: string; description?: string; }",
6196
+ markdown: "## retrieve\n\n`client.entitlements.retrieve(id: string): { id: string; business_id: string; created_at: string; integration_config: integration_config_response; integration_type: entitlement_integration_type; is_active: boolean; metadata: metadata; name: string; updated_at: string; description?: string; }`\n\n**get** `/entitlements/{id}`\n\nGET /entitlements/{id}\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ id: string; business_id: string; created_at: string; integration_config: { feature_id: string; feature_type: feature_type; } | { permission: github_permission; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: object; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: time_interval; fulfillment_mode?: 'auto' | 'manual'; }; integration_type: string; is_active: boolean; metadata: object; name: string; updated_at: string; description?: string; }`\n Detailed view of a single entitlement: identity, integration type,\nintegration-specific configuration, and metadata.\n\n - `id: string`\n - `business_id: string`\n - `created_at: string`\n - `integration_config: { feature_id: string; feature_type: 'boolean'; } | { permission: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: { files: { download_url: string; expires_in: number; file_id: string; filename: string; content_type?: string; file_size?: number; }[]; external_url?: string; instructions?: string; }; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: 'Day' | 'Week' | 'Month' | 'Year'; fulfillment_mode?: 'auto' | 'manual'; }`\n - `integration_type: string`\n - `is_active: boolean`\n - `metadata: object`\n - `name: string`\n - `updated_at: string`\n - `description?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst entitlement = await client.entitlements.retrieve('ent_jt7jcvI79Xh8eehqgWdcm');\n\nconsole.log(entitlement);\n```",
6146
6197
  perLanguage: {
6147
6198
  typescript: {
6148
6199
  method: 'client.entitlements.retrieve',
@@ -6240,12 +6291,12 @@ const EMBEDDED_METHODS = [
6240
6291
  params: [
6241
6292
  'id: string;',
6242
6293
  'description?: string;',
6243
- "integration_config?: { permission: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_file_ids: string[]; external_url?: string; instructions?: string; legacy_file_ids?: string[]; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: 'Day' | 'Week' | 'Month' | 'Year'; fulfillment_mode?: 'auto' | 'manual'; };",
6294
+ "integration_config?: { feature_id: string; feature_type: 'boolean'; } | { permission: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_file_ids: string[]; external_url?: string; instructions?: string; legacy_file_ids?: string[]; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: 'Day' | 'Week' | 'Month' | 'Year'; fulfillment_mode?: 'auto' | 'manual'; };",
6244
6295
  'metadata?: object;',
6245
6296
  'name?: string;',
6246
6297
  ],
6247
- response: "{ id: string; business_id: string; created_at: string; integration_config: { permission: github_permission; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: object; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: time_interval; fulfillment_mode?: 'auto' | 'manual'; }; integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key'; is_active: boolean; metadata: object; name: string; updated_at: string; description?: string; }",
6248
- markdown: "## update\n\n`client.entitlements.update(id: string, description?: string, integration_config?: { permission: github_permission; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_file_ids: string[]; external_url?: string; instructions?: string; legacy_file_ids?: string[]; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: time_interval; fulfillment_mode?: 'auto' | 'manual'; }, metadata?: object, name?: string): { id: string; business_id: string; created_at: string; integration_config: integration_config_response; integration_type: entitlement_integration_type; is_active: boolean; metadata: metadata; name: string; updated_at: string; description?: string; }`\n\n**patch** `/entitlements/{id}`\n\nPATCH /entitlements/{id}\n\n### Parameters\n\n- `id: string`\n\n- `description?: string`\n\n- `integration_config?: { permission: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_file_ids: string[]; external_url?: string; instructions?: string; legacy_file_ids?: string[]; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: 'Day' | 'Week' | 'Month' | 'Year'; fulfillment_mode?: 'auto' | 'manual'; }`\n Integration-specific configuration supplied when creating or updating\nan entitlement. The shape required matches the entitlement's\n`integration_type`.\n\n- `metadata?: object`\n\n- `name?: string`\n\n### Returns\n\n- `{ id: string; business_id: string; created_at: string; integration_config: { permission: github_permission; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: object; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: time_interval; fulfillment_mode?: 'auto' | 'manual'; }; integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key'; is_active: boolean; metadata: object; name: string; updated_at: string; description?: string; }`\n Detailed view of a single entitlement: identity, integration type,\nintegration-specific configuration, and metadata.\n\n - `id: string`\n - `business_id: string`\n - `created_at: string`\n - `integration_config: { permission: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: { files: { download_url: string; expires_in: number; file_id: string; filename: string; content_type?: string; file_size?: number; }[]; external_url?: string; instructions?: string; }; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: 'Day' | 'Week' | 'Month' | 'Year'; fulfillment_mode?: 'auto' | 'manual'; }`\n - `integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key'`\n - `is_active: boolean`\n - `metadata: object`\n - `name: string`\n - `updated_at: string`\n - `description?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst entitlement = await client.entitlements.update('ent_jt7jcvI79Xh8eehqgWdcm');\n\nconsole.log(entitlement);\n```",
6298
+ response: "{ id: string; business_id: string; created_at: string; integration_config: { feature_id: string; feature_type: feature_type; } | { permission: github_permission; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: object; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: time_interval; fulfillment_mode?: 'auto' | 'manual'; }; integration_type: string; is_active: boolean; metadata: object; name: string; updated_at: string; description?: string; }",
6299
+ markdown: "## update\n\n`client.entitlements.update(id: string, description?: string, integration_config?: { feature_id: string; feature_type: feature_type; } | { permission: github_permission; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_file_ids: string[]; external_url?: string; instructions?: string; legacy_file_ids?: string[]; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: time_interval; fulfillment_mode?: 'auto' | 'manual'; }, metadata?: object, name?: string): { id: string; business_id: string; created_at: string; integration_config: integration_config_response; integration_type: entitlement_integration_type; is_active: boolean; metadata: metadata; name: string; updated_at: string; description?: string; }`\n\n**patch** `/entitlements/{id}`\n\nPATCH /entitlements/{id}\n\n### Parameters\n\n- `id: string`\n\n- `description?: string`\n\n- `integration_config?: { feature_id: string; feature_type: 'boolean'; } | { permission: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_file_ids: string[]; external_url?: string; instructions?: string; legacy_file_ids?: string[]; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: 'Day' | 'Week' | 'Month' | 'Year'; fulfillment_mode?: 'auto' | 'manual'; }`\n Integration-specific configuration supplied when creating or updating\nan entitlement. The shape required matches the entitlement's\n`integration_type`.\n\nUntagged enum: variants are matched in order. `FeatureFlag` must precede\n`LicenseKey`, whose fields are all optional and would otherwise match a\n`feature_flag` config.\n\n- `metadata?: object`\n Arbitrary key-value metadata. Values can be string, integer, number, or boolean.\n\n- `name?: string`\n\n### Returns\n\n- `{ id: string; business_id: string; created_at: string; integration_config: { feature_id: string; feature_type: feature_type; } | { permission: github_permission; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: object; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: time_interval; fulfillment_mode?: 'auto' | 'manual'; }; integration_type: string; is_active: boolean; metadata: object; name: string; updated_at: string; description?: string; }`\n Detailed view of a single entitlement: identity, integration type,\nintegration-specific configuration, and metadata.\n\n - `id: string`\n - `business_id: string`\n - `created_at: string`\n - `integration_config: { feature_id: string; feature_type: 'boolean'; } | { permission: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: { files: { download_url: string; expires_in: number; file_id: string; filename: string; content_type?: string; file_size?: number; }[]; external_url?: string; instructions?: string; }; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: 'Day' | 'Week' | 'Month' | 'Year'; fulfillment_mode?: 'auto' | 'manual'; }`\n - `integration_type: string`\n - `is_active: boolean`\n - `metadata: object`\n - `name: string`\n - `updated_at: string`\n - `description?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst entitlement = await client.entitlements.update('ent_jt7jcvI79Xh8eehqgWdcm');\n\nconsole.log(entitlement);\n```",
6249
6300
  perLanguage: {
6250
6301
  typescript: {
6251
6302
  method: 'client.entitlements.update',
@@ -6276,7 +6327,7 @@ const EMBEDDED_METHODS = [
6276
6327
  },
6277
6328
  php: {
6278
6329
  method: 'entitlements->update',
6279
- example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(bearerToken: 'My Bearer Token', environment: 'test_mode');\n\n$entitlement = $client->entitlements->update(\n 'ent_jt7jcvI79Xh8eehqgWdcm',\n description: 'description',\n integrationConfig: [\n 'permission' => GitHubPermission::PULL, 'targetID' => 'target_id'\n ],\n metadata: ['foo' => 'string'],\n name: 'name',\n);\n\nvar_dump($entitlement);",
6330
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(bearerToken: 'My Bearer Token', environment: 'test_mode');\n\n$entitlement = $client->entitlements->update(\n 'ent_jt7jcvI79Xh8eehqgWdcm',\n description: 'description',\n integrationConfig: [\n 'featureID' => 'feature_id', 'featureType' => FeatureType::BOOLEAN\n ],\n metadata: ['foo' => 'string'],\n name: 'name',\n);\n\nvar_dump($entitlement);",
6280
6331
  },
6281
6332
  csharp: {
6282
6333
  method: 'Entitlements.Update',
@@ -6396,8 +6447,8 @@ const EMBEDDED_METHODS = [
6396
6447
  'page_size?: number;',
6397
6448
  "status?: 'Pending' | 'Delivered' | 'Failed' | 'Revoked';",
6398
6449
  ],
6399
- response: "{ id: string; brand_id: string; business_id: string; created_at: string; customer_id: string; entitlement_id: string; integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key'; metadata: object; status: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'; updated_at: string; delivered_at?: string; digital_product_delivery?: { files: digital_product_delivery_file[]; external_url?: string; instructions?: string; }; error_code?: string; error_message?: string; license_key?: { activations_used: number; key: string; activations_limit?: number; expires_at?: string; }; oauth_expires_at?: string; oauth_url?: string; payment_id?: string; revocation_reason?: string; revoked_at?: string; subscription_id?: string; }",
6400
- markdown: "## list\n\n`client.entitlements.grants.list(id: string, customer_id?: string, page_number?: number, page_size?: number, status?: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'): { id: string; brand_id: string; business_id: string; created_at: string; customer_id: string; entitlement_id: string; integration_type: entitlement_integration_type; metadata: metadata; status: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'; updated_at: string; delivered_at?: string; digital_product_delivery?: digital_product_delivery; error_code?: string; error_message?: string; license_key?: license_key_grant; oauth_expires_at?: string; oauth_url?: string; payment_id?: string; revocation_reason?: string; revoked_at?: string; subscription_id?: string; }`\n\n**get** `/entitlements/{id}/grants`\n\nGET /entitlements/{id}/grants (public API)\n\n### Parameters\n\n- `id: string`\n\n- `customer_id?: string`\n Filter by customer ID\n\n- `page_number?: number`\n Page number (default 0)\n\n- `page_size?: number`\n Page size (default 10, max 100)\n\n- `status?: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'`\n Filter by grant status\n\n### Returns\n\n- `{ id: string; brand_id: string; business_id: string; created_at: string; customer_id: string; entitlement_id: string; integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key'; metadata: object; status: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'; updated_at: string; delivered_at?: string; digital_product_delivery?: { files: digital_product_delivery_file[]; external_url?: string; instructions?: string; }; error_code?: string; error_message?: string; license_key?: { activations_used: number; key: string; activations_limit?: number; expires_at?: string; }; oauth_expires_at?: string; oauth_url?: string; payment_id?: string; revocation_reason?: string; revoked_at?: string; subscription_id?: string; }`\n Detailed view of a single entitlement grant: who it's for, its\nlifecycle state, and any integration-specific delivery payload.\n\n - `id: string`\n - `brand_id: string`\n - `business_id: string`\n - `created_at: string`\n - `customer_id: string`\n - `entitlement_id: string`\n - `integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key'`\n - `metadata: object`\n - `status: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'`\n - `updated_at: string`\n - `delivered_at?: string`\n - `digital_product_delivery?: { files: { download_url: string; expires_in: number; file_id: string; filename: string; content_type?: string; file_size?: number; }[]; external_url?: string; instructions?: string; }`\n - `error_code?: string`\n - `error_message?: string`\n - `license_key?: { activations_used: number; key: string; activations_limit?: number; expires_at?: string; }`\n - `oauth_expires_at?: string`\n - `oauth_url?: string`\n - `payment_id?: string`\n - `revocation_reason?: string`\n - `revoked_at?: string`\n - `subscription_id?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\n// Automatically fetches more pages as needed.\nfor await (const entitlementGrant of client.entitlements.grants.list('ent_jt7jcvI79Xh8eehqgWdcm')) {\n console.log(entitlementGrant);\n}\n```",
6450
+ response: "{ id: string; brand_id: string; business_id: string; created_at: string; customer_id: string; entitlement_id: string; integration_type: string; metadata: object; status: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'; updated_at: string; delivered_at?: string; digital_product_delivery?: { files: digital_product_delivery_file[]; external_url?: string; instructions?: string; }; error_code?: string; error_message?: string; feature?: { feature_id: string; feature_type: feature_type; }; license_key?: { activations_used: number; key: string; activations_limit?: number; expires_at?: string; }; oauth_expires_at?: string; oauth_url?: string; payment_id?: string; revocation_reason?: string; revoked_at?: string; subscription_id?: string; }",
6451
+ markdown: "## list\n\n`client.entitlements.grants.list(id: string, customer_id?: string, page_number?: number, page_size?: number, status?: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'): { id: string; brand_id: string; business_id: string; created_at: string; customer_id: string; entitlement_id: string; integration_type: entitlement_integration_type; metadata: metadata; status: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'; updated_at: string; delivered_at?: string; digital_product_delivery?: digital_product_delivery; error_code?: string; error_message?: string; feature?: feature; license_key?: license_key_grant; oauth_expires_at?: string; oauth_url?: string; payment_id?: string; revocation_reason?: string; revoked_at?: string; subscription_id?: string; }`\n\n**get** `/entitlements/{id}/grants`\n\nGET /entitlements/{id}/grants (public API)\n\n### Parameters\n\n- `id: string`\n\n- `customer_id?: string`\n Filter by customer ID\n\n- `page_number?: number`\n Page number (default 0)\n\n- `page_size?: number`\n Page size (default 10, max 100)\n\n- `status?: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'`\n Filter by grant status\n\n### Returns\n\n- `{ id: string; brand_id: string; business_id: string; created_at: string; customer_id: string; entitlement_id: string; integration_type: string; metadata: object; status: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'; updated_at: string; delivered_at?: string; digital_product_delivery?: { files: digital_product_delivery_file[]; external_url?: string; instructions?: string; }; error_code?: string; error_message?: string; feature?: { feature_id: string; feature_type: feature_type; }; license_key?: { activations_used: number; key: string; activations_limit?: number; expires_at?: string; }; oauth_expires_at?: string; oauth_url?: string; payment_id?: string; revocation_reason?: string; revoked_at?: string; subscription_id?: string; }`\n Detailed view of a single entitlement grant: who it's for, its\nlifecycle state, and any integration-specific delivery payload.\n\n - `id: string`\n - `brand_id: string`\n - `business_id: string`\n - `created_at: string`\n - `customer_id: string`\n - `entitlement_id: string`\n - `integration_type: string`\n - `metadata: object`\n - `status: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'`\n - `updated_at: string`\n - `delivered_at?: string`\n - `digital_product_delivery?: { files: { download_url: string; expires_in: number; file_id: string; filename: string; content_type?: string; file_size?: number; }[]; external_url?: string; instructions?: string; }`\n - `error_code?: string`\n - `error_message?: string`\n - `feature?: { feature_id: string; feature_type: 'boolean'; }`\n - `license_key?: { activations_used: number; key: string; activations_limit?: number; expires_at?: string; }`\n - `oauth_expires_at?: string`\n - `oauth_url?: string`\n - `payment_id?: string`\n - `revocation_reason?: string`\n - `revoked_at?: string`\n - `subscription_id?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\n// Automatically fetches more pages as needed.\nfor await (const entitlementGrant of client.entitlements.grants.list('ent_jt7jcvI79Xh8eehqgWdcm')) {\n console.log(entitlementGrant);\n}\n```",
6401
6452
  perLanguage: {
6402
6453
  typescript: {
6403
6454
  method: 'client.entitlements.grants.list',
@@ -6445,8 +6496,8 @@ const EMBEDDED_METHODS = [
6445
6496
  stainlessPath: '(resource) entitlements.grants > (method) revoke',
6446
6497
  qualified: 'client.entitlements.grants.revoke',
6447
6498
  params: ['id: string;', 'grant_id: string;'],
6448
- response: "{ id: string; brand_id: string; business_id: string; created_at: string; customer_id: string; entitlement_id: string; integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key'; metadata: object; status: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'; updated_at: string; delivered_at?: string; digital_product_delivery?: { files: digital_product_delivery_file[]; external_url?: string; instructions?: string; }; error_code?: string; error_message?: string; license_key?: { activations_used: number; key: string; activations_limit?: number; expires_at?: string; }; oauth_expires_at?: string; oauth_url?: string; payment_id?: string; revocation_reason?: string; revoked_at?: string; subscription_id?: string; }",
6449
- markdown: "## revoke\n\n`client.entitlements.grants.revoke(id: string, grant_id: string): { id: string; brand_id: string; business_id: string; created_at: string; customer_id: string; entitlement_id: string; integration_type: entitlement_integration_type; metadata: metadata; status: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'; updated_at: string; delivered_at?: string; digital_product_delivery?: digital_product_delivery; error_code?: string; error_message?: string; license_key?: license_key_grant; oauth_expires_at?: string; oauth_url?: string; payment_id?: string; revocation_reason?: string; revoked_at?: string; subscription_id?: string; }`\n\n**delete** `/entitlements/{id}/grants/{grant_id}`\n\nRevoke a single grant. Idempotent: re-revoking an already-revoked\ngrant returns the grant in its current state.\n\n### Parameters\n\n- `id: string`\n\n- `grant_id: string`\n\n### Returns\n\n- `{ id: string; brand_id: string; business_id: string; created_at: string; customer_id: string; entitlement_id: string; integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key'; metadata: object; status: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'; updated_at: string; delivered_at?: string; digital_product_delivery?: { files: digital_product_delivery_file[]; external_url?: string; instructions?: string; }; error_code?: string; error_message?: string; license_key?: { activations_used: number; key: string; activations_limit?: number; expires_at?: string; }; oauth_expires_at?: string; oauth_url?: string; payment_id?: string; revocation_reason?: string; revoked_at?: string; subscription_id?: string; }`\n Detailed view of a single entitlement grant: who it's for, its\nlifecycle state, and any integration-specific delivery payload.\n\n - `id: string`\n - `brand_id: string`\n - `business_id: string`\n - `created_at: string`\n - `customer_id: string`\n - `entitlement_id: string`\n - `integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key'`\n - `metadata: object`\n - `status: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'`\n - `updated_at: string`\n - `delivered_at?: string`\n - `digital_product_delivery?: { files: { download_url: string; expires_in: number; file_id: string; filename: string; content_type?: string; file_size?: number; }[]; external_url?: string; instructions?: string; }`\n - `error_code?: string`\n - `error_message?: string`\n - `license_key?: { activations_used: number; key: string; activations_limit?: number; expires_at?: string; }`\n - `oauth_expires_at?: string`\n - `oauth_url?: string`\n - `payment_id?: string`\n - `revocation_reason?: string`\n - `revoked_at?: string`\n - `subscription_id?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst entitlementGrant = await client.entitlements.grants.revoke('entg_w0ZCJZgNXuNDdMVzvja6p', { id: 'ent_jt7jcvI79Xh8eehqgWdcm' });\n\nconsole.log(entitlementGrant);\n```",
6499
+ response: "{ id: string; brand_id: string; business_id: string; created_at: string; customer_id: string; entitlement_id: string; integration_type: string; metadata: object; status: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'; updated_at: string; delivered_at?: string; digital_product_delivery?: { files: digital_product_delivery_file[]; external_url?: string; instructions?: string; }; error_code?: string; error_message?: string; feature?: { feature_id: string; feature_type: feature_type; }; license_key?: { activations_used: number; key: string; activations_limit?: number; expires_at?: string; }; oauth_expires_at?: string; oauth_url?: string; payment_id?: string; revocation_reason?: string; revoked_at?: string; subscription_id?: string; }",
6500
+ markdown: "## revoke\n\n`client.entitlements.grants.revoke(id: string, grant_id: string): { id: string; brand_id: string; business_id: string; created_at: string; customer_id: string; entitlement_id: string; integration_type: entitlement_integration_type; metadata: metadata; status: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'; updated_at: string; delivered_at?: string; digital_product_delivery?: digital_product_delivery; error_code?: string; error_message?: string; feature?: feature; license_key?: license_key_grant; oauth_expires_at?: string; oauth_url?: string; payment_id?: string; revocation_reason?: string; revoked_at?: string; subscription_id?: string; }`\n\n**delete** `/entitlements/{id}/grants/{grant_id}`\n\nRevoke a single grant. Idempotent: re-revoking an already-revoked\ngrant returns the grant in its current state.\n\n### Parameters\n\n- `id: string`\n\n- `grant_id: string`\n\n### Returns\n\n- `{ id: string; brand_id: string; business_id: string; created_at: string; customer_id: string; entitlement_id: string; integration_type: string; metadata: object; status: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'; updated_at: string; delivered_at?: string; digital_product_delivery?: { files: digital_product_delivery_file[]; external_url?: string; instructions?: string; }; error_code?: string; error_message?: string; feature?: { feature_id: string; feature_type: feature_type; }; license_key?: { activations_used: number; key: string; activations_limit?: number; expires_at?: string; }; oauth_expires_at?: string; oauth_url?: string; payment_id?: string; revocation_reason?: string; revoked_at?: string; subscription_id?: string; }`\n Detailed view of a single entitlement grant: who it's for, its\nlifecycle state, and any integration-specific delivery payload.\n\n - `id: string`\n - `brand_id: string`\n - `business_id: string`\n - `created_at: string`\n - `customer_id: string`\n - `entitlement_id: string`\n - `integration_type: string`\n - `metadata: object`\n - `status: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'`\n - `updated_at: string`\n - `delivered_at?: string`\n - `digital_product_delivery?: { files: { download_url: string; expires_in: number; file_id: string; filename: string; content_type?: string; file_size?: number; }[]; external_url?: string; instructions?: string; }`\n - `error_code?: string`\n - `error_message?: string`\n - `feature?: { feature_id: string; feature_type: 'boolean'; }`\n - `license_key?: { activations_used: number; key: string; activations_limit?: number; expires_at?: string; }`\n - `oauth_expires_at?: string`\n - `oauth_url?: string`\n - `payment_id?: string`\n - `revocation_reason?: string`\n - `revoked_at?: string`\n - `subscription_id?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst entitlementGrant = await client.entitlements.grants.revoke('entg_w0ZCJZgNXuNDdMVzvja6p', { id: 'ent_jt7jcvI79Xh8eehqgWdcm' });\n\nconsole.log(entitlementGrant);\n```",
6450
6501
  perLanguage: {
6451
6502
  typescript: {
6452
6503
  method: 'client.entitlements.grants.revoke',
@@ -6494,8 +6545,8 @@ const EMBEDDED_METHODS = [
6494
6545
  stainlessPath: '(resource) entitlements.grants > (method) fulfill_license_key',
6495
6546
  qualified: 'client.entitlements.grants.fulfillLicenseKey',
6496
6547
  params: ['grant_id: string;', 'key: string;', 'activations_limit?: number;', 'expires_at?: string;'],
6497
- response: "{ id: string; brand_id: string; business_id: string; created_at: string; customer_id: string; entitlement_id: string; integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key'; metadata: object; status: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'; updated_at: string; delivered_at?: string; digital_product_delivery?: { files: digital_product_delivery_file[]; external_url?: string; instructions?: string; }; error_code?: string; error_message?: string; license_key?: { activations_used: number; key: string; activations_limit?: number; expires_at?: string; }; oauth_expires_at?: string; oauth_url?: string; payment_id?: string; revocation_reason?: string; revoked_at?: string; subscription_id?: string; }",
6498
- markdown: "## fulfill_license_key\n\n`client.entitlements.grants.fulfillLicenseKey(grant_id: string, key: string, activations_limit?: number, expires_at?: string): { id: string; brand_id: string; business_id: string; created_at: string; customer_id: string; entitlement_id: string; integration_type: entitlement_integration_type; metadata: metadata; status: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'; updated_at: string; delivered_at?: string; digital_product_delivery?: digital_product_delivery; error_code?: string; error_message?: string; license_key?: license_key_grant; oauth_expires_at?: string; oauth_url?: string; payment_id?: string; revocation_reason?: string; revoked_at?: string; subscription_id?: string; }`\n\n**post** `/grants/{grant_id}/license-key`\n\nFor entitlements whose license-key config uses `manual` fulfillment, grants\nare created in the `pending` state without a key. Call this endpoint to\ndeliver the key: the grant moves to `delivered`, the customer is emailed the\nkey, and the `license_key.created` and `entitlement_grant.delivered` webhook\nevents are sent.\n\n### Parameters\n\n- `grant_id: string`\n\n- `key: string`\n The license key value to deliver to the customer.\n\n- `activations_limit?: number`\n Per-key activation limit. Defaults to the entitlement's license-key configuration.\n\n- `expires_at?: string`\n When the key expires. Defaults to the duration in the entitlement's license-key configuration.\n\n### Returns\n\n- `{ id: string; brand_id: string; business_id: string; created_at: string; customer_id: string; entitlement_id: string; integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key'; metadata: object; status: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'; updated_at: string; delivered_at?: string; digital_product_delivery?: { files: digital_product_delivery_file[]; external_url?: string; instructions?: string; }; error_code?: string; error_message?: string; license_key?: { activations_used: number; key: string; activations_limit?: number; expires_at?: string; }; oauth_expires_at?: string; oauth_url?: string; payment_id?: string; revocation_reason?: string; revoked_at?: string; subscription_id?: string; }`\n Detailed view of a single entitlement grant: who it's for, its\nlifecycle state, and any integration-specific delivery payload.\n\n - `id: string`\n - `brand_id: string`\n - `business_id: string`\n - `created_at: string`\n - `customer_id: string`\n - `entitlement_id: string`\n - `integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key'`\n - `metadata: object`\n - `status: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'`\n - `updated_at: string`\n - `delivered_at?: string`\n - `digital_product_delivery?: { files: { download_url: string; expires_in: number; file_id: string; filename: string; content_type?: string; file_size?: number; }[]; external_url?: string; instructions?: string; }`\n - `error_code?: string`\n - `error_message?: string`\n - `license_key?: { activations_used: number; key: string; activations_limit?: number; expires_at?: string; }`\n - `oauth_expires_at?: string`\n - `oauth_url?: string`\n - `payment_id?: string`\n - `revocation_reason?: string`\n - `revoked_at?: string`\n - `subscription_id?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst entitlementGrant = await client.entitlements.grants.fulfillLicenseKey('entg_w0ZCJZgNXuNDdMVzvja6p', { key: 'key' });\n\nconsole.log(entitlementGrant);\n```",
6548
+ response: "{ id: string; brand_id: string; business_id: string; created_at: string; customer_id: string; entitlement_id: string; integration_type: string; metadata: object; status: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'; updated_at: string; delivered_at?: string; digital_product_delivery?: { files: digital_product_delivery_file[]; external_url?: string; instructions?: string; }; error_code?: string; error_message?: string; feature?: { feature_id: string; feature_type: feature_type; }; license_key?: { activations_used: number; key: string; activations_limit?: number; expires_at?: string; }; oauth_expires_at?: string; oauth_url?: string; payment_id?: string; revocation_reason?: string; revoked_at?: string; subscription_id?: string; }",
6549
+ markdown: "## fulfill_license_key\n\n`client.entitlements.grants.fulfillLicenseKey(grant_id: string, key: string, activations_limit?: number, expires_at?: string): { id: string; brand_id: string; business_id: string; created_at: string; customer_id: string; entitlement_id: string; integration_type: entitlement_integration_type; metadata: metadata; status: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'; updated_at: string; delivered_at?: string; digital_product_delivery?: digital_product_delivery; error_code?: string; error_message?: string; feature?: feature; license_key?: license_key_grant; oauth_expires_at?: string; oauth_url?: string; payment_id?: string; revocation_reason?: string; revoked_at?: string; subscription_id?: string; }`\n\n**post** `/grants/{grant_id}/license-key`\n\nFor entitlements whose license-key config uses `manual` fulfillment, grants\nare created in the `pending` state without a key. Call this endpoint to\ndeliver the key: the grant moves to `delivered`, the customer is emailed the\nkey, and the `license_key.created` and `entitlement_grant.delivered` webhook\nevents are sent.\n\n### Parameters\n\n- `grant_id: string`\n\n- `key: string`\n The license key value to deliver to the customer.\n\n- `activations_limit?: number`\n Per-key activation limit. Defaults to the entitlement's license-key configuration.\n\n- `expires_at?: string`\n When the key expires. Defaults to the duration in the entitlement's license-key configuration.\n\n### Returns\n\n- `{ id: string; brand_id: string; business_id: string; created_at: string; customer_id: string; entitlement_id: string; integration_type: string; metadata: object; status: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'; updated_at: string; delivered_at?: string; digital_product_delivery?: { files: digital_product_delivery_file[]; external_url?: string; instructions?: string; }; error_code?: string; error_message?: string; feature?: { feature_id: string; feature_type: feature_type; }; license_key?: { activations_used: number; key: string; activations_limit?: number; expires_at?: string; }; oauth_expires_at?: string; oauth_url?: string; payment_id?: string; revocation_reason?: string; revoked_at?: string; subscription_id?: string; }`\n Detailed view of a single entitlement grant: who it's for, its\nlifecycle state, and any integration-specific delivery payload.\n\n - `id: string`\n - `brand_id: string`\n - `business_id: string`\n - `created_at: string`\n - `customer_id: string`\n - `entitlement_id: string`\n - `integration_type: string`\n - `metadata: object`\n - `status: 'Pending' | 'Delivered' | 'Failed' | 'Revoked'`\n - `updated_at: string`\n - `delivered_at?: string`\n - `digital_product_delivery?: { files: { download_url: string; expires_in: number; file_id: string; filename: string; content_type?: string; file_size?: number; }[]; external_url?: string; instructions?: string; }`\n - `error_code?: string`\n - `error_message?: string`\n - `feature?: { feature_id: string; feature_type: 'boolean'; }`\n - `license_key?: { activations_used: number; key: string; activations_limit?: number; expires_at?: string; }`\n - `oauth_expires_at?: string`\n - `oauth_url?: string`\n - `payment_id?: string`\n - `revocation_reason?: string`\n - `revoked_at?: string`\n - `subscription_id?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst entitlementGrant = await client.entitlements.grants.fulfillLicenseKey('entg_w0ZCJZgNXuNDdMVzvja6p', { key: 'key' });\n\nconsole.log(entitlementGrant);\n```",
6499
6550
  perLanguage: {
6500
6551
  typescript: {
6501
6552
  method: 'client.entitlements.grants.fulfillLicenseKey',