dodopayments-mcp 2.44.0 → 2.45.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.
- package/local-docs-search.js +24 -24
- package/local-docs-search.js.map +1 -1
- package/local-docs-search.mjs +24 -24
- package/local-docs-search.mjs.map +1 -1
- package/package.json +2 -2
- package/server.js +1 -1
- package/server.mjs +1 -1
- package/src/local-docs-search.ts +24 -24
- package/src/server.ts +1 -1
package/local-docs-search.js
CHANGED
|
@@ -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; next_billing_date?: string; 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; trial_amount?: number; trial_period_days?: 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_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; next_billing_date?: string; recurring_breakup?: object; tax_id_business_name?: string; tax_id_err_msg?: string; tax_id_format_name?: string; total_tax?: number; trial_amount?: number; trial_period_days?: 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; next_billing_date?: string; 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; trial_amount?: number; trial_period_days?: 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 - `next_billing_date?: string`\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 - `trial_amount?: number`\n - `trial_period_days?: 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; next_billing_date?: string; recurring_breakup?: object; tax_id_business_name?: string; tax_id_err_msg?: string; tax_id_format_name?: string; total_tax?: number; trial_amount?: number; trial_period_days?: 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' | 'live_tutoring'; 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; single_quantity_price: 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; next_billing_date?: string; 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; trial_amount?: number; trial_period_days?: 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' | 'live_tutoring'; 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; single_quantity_price: number; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech' | 'live_tutoring'; 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 - `next_billing_date?: string`\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 - `trial_amount?: number`\n - `trial_period_days?: 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',
|
|
@@ -962,7 +962,7 @@ const EMBEDDED_METHODS = [
|
|
|
962
962
|
"on_payment_failure?: 'prevent_change' | 'apply_change';",
|
|
963
963
|
],
|
|
964
964
|
response: '{ immediate_charge: { effective_at: string; line_items: object | object | object[]; summary: object; }; new_plan: object; }',
|
|
965
|
-
markdown: "## preview_change_plan\n\n`client.subscriptions.previewChangePlan(subscription_id: string, product_id: string, proration_billing_mode: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill', quantity: number, adaptive_currency_fees_inclusive?: boolean, addons?: { addon_id: string; quantity: number; }[], discount_code?: string, discount_codes?: string[], effective_at?: 'immediately' | 'next_billing_date', metadata?: object, on_payment_failure?: 'prevent_change' | 'apply_change'): { immediate_charge: object; new_plan: subscription; }`\n\n**post** `/subscriptions/{subscription_id}/change-plan/preview`\n\n### Parameters\n\n- `subscription_id: string`\n\n- `product_id: string`\n Unique identifier of the product to subscribe to\n\n- `proration_billing_mode: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill'`\n Proration Billing Mode\n\n- `quantity: number`\n Number of units to subscribe for. Must be at least 1.\n\n- `adaptive_currency_fees_inclusive?: boolean`\n Whether adaptive currency fees should be included in the price (true) or added on top (false).\nIf not specified, uses the subscription's stored setting.\n\n- `addons?: { addon_id: string; quantity: number; }[]`\n Addons for the new plan.\nNote : Leaving this empty would remove any existing addons\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 to the new plan. Max 20.\nCannot be used together with discount_code.\nIf provided, replaces any existing discount codes.\nEmpty array removes all discounts.\nIf not provided (None), existing discounts with preserve_on_plan_change=true are preserved.\n\n- `effective_at?: 'immediately' | 'next_billing_date'`\n When to apply the plan change.\n- `immediately` (default): Apply the plan change right away\n- `next_billing_date`: Schedule the change for the next billing date\n\n- `metadata?: object`\n Metadata for the payment. If not passed, the metadata of the subscription will be taken\n\n- `on_payment_failure?: 'prevent_change' | 'apply_change'`\n Controls behavior when the plan change payment fails.\n- `prevent_change`: Keep subscription on current plan until payment succeeds\n- `apply_change` (default): Apply plan change immediately regardless of payment outcome\n\nIf not specified, uses the business-level default setting.\n\n### Returns\n\n- `{ immediate_charge: { effective_at: string; line_items: { id: string; currency: currency; product_id: string; proration_factor: number; quantity: number; tax_inclusive: boolean; type: 'subscription'; unit_price: number; description?: string; name?: string; tax?: number; tax_rate?: number; } | { id: string; currency: currency; name: string; proration_factor: number; quantity: number; tax_category: tax_category; tax_inclusive: boolean; tax_rate: number; type: 'addon'; unit_price: number; description?: string; tax?: number; } | { id: string; chargeable_units: string; currency: currency; free_threshold: number; name: string; price_per_unit: string; subtotal: number; tax_inclusive: boolean; tax_rate: number; type: 'meter'; units_consumed: string; description?: string; tax?: number; }[]; summary: { currency: currency; customer_credits: number; settlement_amount: number; settlement_currency: currency; total_amount: number; settlement_tax?: number; tax?: number; }; }; new_plan: { 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; trial_amount?: number; }; }`\n\n - `immediate_charge: { effective_at: string; line_items: { id: string; currency: string; product_id: string; proration_factor: number; quantity: number; tax_inclusive: boolean; type: 'subscription'; unit_price: number; description?: string; name?: string; tax?: number; tax_rate?: number; } | { id: string; currency: string; name: string; proration_factor: number; quantity: number; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; tax_inclusive: boolean; tax_rate: number; type: 'addon'; unit_price: number; description?: string; tax?: number; } | { id: string; chargeable_units: string; currency: string; free_threshold: number; name: string; price_per_unit: string; subtotal: number; tax_inclusive: boolean; tax_rate: number; type: 'meter'; units_consumed: string; description?: string; tax?: number; }[]; summary: { currency: string; customer_credits: number; settlement_amount: number; settlement_currency: string; total_amount: number; settlement_tax?: number; tax?: number; }; }`\n - `new_plan: { 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; trial_amount?: number; }`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst response = await client.subscriptions.previewChangePlan('sub_Iuaq622bbmmfOGrVTqdXv', {\n product_id: 'product_id',\n proration_billing_mode: 'prorated_immediately',\n quantity: 0,\n});\n\nconsole.log(response);\n```",
|
|
965
|
+
markdown: "## preview_change_plan\n\n`client.subscriptions.previewChangePlan(subscription_id: string, product_id: string, proration_billing_mode: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill', quantity: number, adaptive_currency_fees_inclusive?: boolean, addons?: { addon_id: string; quantity: number; }[], discount_code?: string, discount_codes?: string[], effective_at?: 'immediately' | 'next_billing_date', metadata?: object, on_payment_failure?: 'prevent_change' | 'apply_change'): { immediate_charge: object; new_plan: subscription; }`\n\n**post** `/subscriptions/{subscription_id}/change-plan/preview`\n\n### Parameters\n\n- `subscription_id: string`\n\n- `product_id: string`\n Unique identifier of the product to subscribe to\n\n- `proration_billing_mode: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill'`\n Proration Billing Mode\n\n- `quantity: number`\n Number of units to subscribe for. Must be at least 1.\n\n- `adaptive_currency_fees_inclusive?: boolean`\n Whether adaptive currency fees should be included in the price (true) or added on top (false).\nIf not specified, uses the subscription's stored setting.\n\n- `addons?: { addon_id: string; quantity: number; }[]`\n Addons for the new plan.\nNote : Leaving this empty would remove any existing addons\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 to the new plan. Max 20.\nCannot be used together with discount_code.\nIf provided, replaces any existing discount codes.\nEmpty array removes all discounts.\nIf not provided (None), existing discounts with preserve_on_plan_change=true are preserved.\n\n- `effective_at?: 'immediately' | 'next_billing_date'`\n When to apply the plan change.\n- `immediately` (default): Apply the plan change right away\n- `next_billing_date`: Schedule the change for the next billing date\n\n- `metadata?: object`\n Metadata for the payment. If not passed, the metadata of the subscription will be taken\n\n- `on_payment_failure?: 'prevent_change' | 'apply_change'`\n Controls behavior when the plan change payment fails.\n- `prevent_change`: Keep subscription on current plan until payment succeeds\n- `apply_change` (default): Apply plan change immediately regardless of payment outcome\n\nIf not specified, uses the business-level default setting.\n\n### Returns\n\n- `{ immediate_charge: { effective_at: string; line_items: { id: string; currency: currency; product_id: string; proration_factor: number; quantity: number; tax_inclusive: boolean; type: 'subscription'; unit_price: number; description?: string; name?: string; tax?: number; tax_rate?: number; } | { id: string; currency: currency; name: string; proration_factor: number; quantity: number; tax_category: tax_category; tax_inclusive: boolean; tax_rate: number; type: 'addon'; unit_price: number; description?: string; tax?: number; } | { id: string; chargeable_units: string; currency: currency; free_threshold: number; name: string; price_per_unit: string; subtotal: number; tax_inclusive: boolean; tax_rate: number; type: 'meter'; units_consumed: string; description?: string; tax?: number; }[]; summary: { currency: currency; customer_credits: number; settlement_amount: number; settlement_currency: currency; total_amount: number; settlement_tax?: number; tax?: number; }; }; new_plan: { 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; trial_amount?: number; }; }`\n\n - `immediate_charge: { effective_at: string; line_items: { id: string; currency: string; product_id: string; proration_factor: number; quantity: number; tax_inclusive: boolean; type: 'subscription'; unit_price: number; description?: string; name?: string; tax?: number; tax_rate?: number; } | { id: string; currency: string; name: string; proration_factor: number; quantity: number; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech' | 'live_tutoring'; tax_inclusive: boolean; tax_rate: number; type: 'addon'; unit_price: number; description?: string; tax?: number; } | { id: string; chargeable_units: string; currency: string; free_threshold: number; name: string; price_per_unit: string; subtotal: number; tax_inclusive: boolean; tax_rate: number; type: 'meter'; units_consumed: string; description?: string; tax?: number; }[]; summary: { currency: string; customer_credits: number; settlement_amount: number; settlement_currency: string; total_amount: number; settlement_tax?: number; tax?: number; }; }`\n - `new_plan: { 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; trial_amount?: number; }`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst response = await client.subscriptions.previewChangePlan('sub_Iuaq622bbmmfOGrVTqdXv', {\n product_id: 'product_id',\n proration_billing_mode: 'prorated_immediately',\n quantity: 0,\n});\n\nconsole.log(response);\n```",
|
|
966
966
|
perLanguage: {
|
|
967
967
|
typescript: {
|
|
968
968
|
method: 'client.subscriptions.previewChangePlan',
|
|
@@ -2897,8 +2897,8 @@ const EMBEDDED_METHODS = [
|
|
|
2897
2897
|
'page_size?: number;',
|
|
2898
2898
|
'recurring?: boolean;',
|
|
2899
2899
|
],
|
|
2900
|
-
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; }",
|
|
2901
|
-
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_amount?: number; trial_apply_discounts?: 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_amount?: number; trial_apply_discounts?: 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```",
|
|
2900
|
+
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' | 'live_tutoring'; 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; }",
|
|
2901
|
+
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' | 'live_tutoring'; 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_amount?: number; trial_apply_discounts?: 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' | 'live_tutoring'`\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_amount?: number; trial_apply_discounts?: 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```",
|
|
2902
2902
|
perLanguage: {
|
|
2903
2903
|
typescript: {
|
|
2904
2904
|
method: 'client.products.list',
|
|
@@ -2948,7 +2948,7 @@ const EMBEDDED_METHODS = [
|
|
|
2948
2948
|
params: [
|
|
2949
2949
|
'name: string;',
|
|
2950
2950
|
"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_amount?: number; trial_apply_discounts?: 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; };",
|
|
2951
|
-
"tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech';",
|
|
2951
|
+
"tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech' | 'live_tutoring';",
|
|
2952
2952
|
'addons?: string[];',
|
|
2953
2953
|
'brand_id?: string;',
|
|
2954
2954
|
"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; }[];",
|
|
@@ -2962,8 +2962,8 @@ const EMBEDDED_METHODS = [
|
|
|
2962
2962
|
'metadata?: object;',
|
|
2963
2963
|
"pricing_mode?: 'by_currency' | 'by_country';",
|
|
2964
2964
|
],
|
|
2965
|
-
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; }",
|
|
2966
|
-
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_amount?: number; trial_apply_discounts?: 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_amount?: number; trial_apply_discounts?: 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_amount?: number; trial_apply_discounts?: 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_amount?: number; trial_apply_discounts?: 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```",
|
|
2965
|
+
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' | 'live_tutoring'; 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; }",
|
|
2966
|
+
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_amount?: number; trial_apply_discounts?: 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' | 'live_tutoring', 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_amount?: number; trial_apply_discounts?: 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' | 'live_tutoring'`\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_amount?: number; trial_apply_discounts?: 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' | 'live_tutoring'; 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_amount?: number; trial_apply_discounts?: 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' | 'live_tutoring'`\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```",
|
|
2967
2967
|
perLanguage: {
|
|
2968
2968
|
typescript: {
|
|
2969
2969
|
method: 'client.products.create',
|
|
@@ -3011,8 +3011,8 @@ const EMBEDDED_METHODS = [
|
|
|
3011
3011
|
stainlessPath: '(resource) products > (method) retrieve',
|
|
3012
3012
|
qualified: 'client.products.retrieve',
|
|
3013
3013
|
params: ['id: string;'],
|
|
3014
|
-
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; }",
|
|
3015
|
-
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_amount?: number; trial_apply_discounts?: 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_amount?: number; trial_apply_discounts?: 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```",
|
|
3014
|
+
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' | 'live_tutoring'; 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; }",
|
|
3015
|
+
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_amount?: number; trial_apply_discounts?: 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' | 'live_tutoring'; 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_amount?: number; trial_apply_discounts?: 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' | 'live_tutoring'`\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```",
|
|
3016
3016
|
perLanguage: {
|
|
3017
3017
|
typescript: {
|
|
3018
3018
|
method: 'client.products.retrieve',
|
|
@@ -3076,9 +3076,9 @@ const EMBEDDED_METHODS = [
|
|
|
3076
3076
|
'name?: string;',
|
|
3077
3077
|
"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_amount?: number; trial_apply_discounts?: 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; };",
|
|
3078
3078
|
"pricing_mode?: 'by_currency' | 'by_country';",
|
|
3079
|
-
"tax_category?: 'digital_products' | 'saas' | 'e_book' | 'edtech';",
|
|
3079
|
+
"tax_category?: 'digital_products' | 'saas' | 'e_book' | 'edtech' | 'live_tutoring';",
|
|
3080
3080
|
],
|
|
3081
|
-
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_amount?: number; trial_apply_discounts?: 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_amount?: number; trial_apply_discounts?: 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```",
|
|
3081
|
+
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_amount?: number; trial_apply_discounts?: 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' | 'live_tutoring'): 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_amount?: number; trial_apply_discounts?: 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' | 'live_tutoring'`\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```",
|
|
3082
3082
|
perLanguage: {
|
|
3083
3083
|
typescript: {
|
|
3084
3084
|
method: 'client.products.update',
|
|
@@ -4041,8 +4041,8 @@ const EMBEDDED_METHODS = [
|
|
|
4041
4041
|
stainlessPath: '(resource) addons > (method) list',
|
|
4042
4042
|
qualified: 'client.addons.list',
|
|
4043
4043
|
params: ['page_number?: number;', 'page_size?: number;'],
|
|
4044
|
-
response: "{ id: string; business_id: string; created_at: string; currency: string; name: string; price: number; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; updated_at: string; description?: string; image?: string; }",
|
|
4045
|
-
markdown: "## list\n\n`client.addons.list(page_number?: number, page_size?: number): { id: string; business_id: string; created_at: string; currency: currency; name: string; price: number; tax_category: tax_category; updated_at: string; description?: string; image?: string; }`\n\n**get** `/addons`\n\n### Parameters\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### Returns\n\n- `{ id: string; business_id: string; created_at: string; currency: string; name: string; price: number; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; updated_at: string; description?: string; image?: string; }`\n\n - `id: string`\n - `business_id: string`\n - `created_at: string`\n - `currency: string`\n - `name: string`\n - `price: number`\n - `tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'`\n - `updated_at: string`\n - `description?: string`\n - `image?: 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 addonResponse of client.addons.list()) {\n console.log(addonResponse);\n}\n```",
|
|
4044
|
+
response: "{ id: string; business_id: string; created_at: string; currency: string; name: string; price: number; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech' | 'live_tutoring'; updated_at: string; description?: string; image?: string; }",
|
|
4045
|
+
markdown: "## list\n\n`client.addons.list(page_number?: number, page_size?: number): { id: string; business_id: string; created_at: string; currency: currency; name: string; price: number; tax_category: tax_category; updated_at: string; description?: string; image?: string; }`\n\n**get** `/addons`\n\n### Parameters\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### Returns\n\n- `{ id: string; business_id: string; created_at: string; currency: string; name: string; price: number; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech' | 'live_tutoring'; updated_at: string; description?: string; image?: string; }`\n\n - `id: string`\n - `business_id: string`\n - `created_at: string`\n - `currency: string`\n - `name: string`\n - `price: number`\n - `tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech' | 'live_tutoring'`\n - `updated_at: string`\n - `description?: string`\n - `image?: 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 addonResponse of client.addons.list()) {\n console.log(addonResponse);\n}\n```",
|
|
4046
4046
|
perLanguage: {
|
|
4047
4047
|
typescript: {
|
|
4048
4048
|
method: 'client.addons.list',
|
|
@@ -4093,11 +4093,11 @@ const EMBEDDED_METHODS = [
|
|
|
4093
4093
|
'currency: string;',
|
|
4094
4094
|
'name: string;',
|
|
4095
4095
|
'price: number;',
|
|
4096
|
-
"tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech';",
|
|
4096
|
+
"tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech' | 'live_tutoring';",
|
|
4097
4097
|
'description?: string;',
|
|
4098
4098
|
],
|
|
4099
|
-
response: "{ id: string; business_id: string; created_at: string; currency: string; name: string; price: number; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; updated_at: string; description?: string; image?: string; }",
|
|
4100
|
-
markdown: "## create\n\n`client.addons.create(currency: string, name: string, price: number, tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech', description?: string): { id: string; business_id: string; created_at: string; currency: currency; name: string; price: number; tax_category: tax_category; updated_at: string; description?: string; image?: string; }`\n\n**post** `/addons`\n\n### Parameters\n\n- `currency: string`\n The currency of the Addon\n\n- `name: string`\n Name of the Addon\n\n- `price: number`\n Amount of the addon\n\n- `tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'`\n Tax category applied to this Addon\n\n- `description?: string`\n Optional description of the Addon\n\n### Returns\n\n- `{ id: string; business_id: string; created_at: string; currency: string; name: string; price: number; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; updated_at: string; description?: string; image?: string; }`\n\n - `id: string`\n - `business_id: string`\n - `created_at: string`\n - `currency: string`\n - `name: string`\n - `price: number`\n - `tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'`\n - `updated_at: string`\n - `description?: string`\n - `image?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst addonResponse = await client.addons.create({\n currency: 'AED',\n name: 'name',\n price: 0,\n tax_category: 'digital_products',\n});\n\nconsole.log(addonResponse);\n```",
|
|
4099
|
+
response: "{ id: string; business_id: string; created_at: string; currency: string; name: string; price: number; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech' | 'live_tutoring'; updated_at: string; description?: string; image?: string; }",
|
|
4100
|
+
markdown: "## create\n\n`client.addons.create(currency: string, name: string, price: number, tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech' | 'live_tutoring', description?: string): { id: string; business_id: string; created_at: string; currency: currency; name: string; price: number; tax_category: tax_category; updated_at: string; description?: string; image?: string; }`\n\n**post** `/addons`\n\n### Parameters\n\n- `currency: string`\n The currency of the Addon\n\n- `name: string`\n Name of the Addon\n\n- `price: number`\n Amount of the addon\n\n- `tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech' | 'live_tutoring'`\n Tax category applied to this Addon\n\n- `description?: string`\n Optional description of the Addon\n\n### Returns\n\n- `{ id: string; business_id: string; created_at: string; currency: string; name: string; price: number; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech' | 'live_tutoring'; updated_at: string; description?: string; image?: string; }`\n\n - `id: string`\n - `business_id: string`\n - `created_at: string`\n - `currency: string`\n - `name: string`\n - `price: number`\n - `tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech' | 'live_tutoring'`\n - `updated_at: string`\n - `description?: string`\n - `image?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst addonResponse = await client.addons.create({\n currency: 'AED',\n name: 'name',\n price: 0,\n tax_category: 'digital_products',\n});\n\nconsole.log(addonResponse);\n```",
|
|
4101
4101
|
perLanguage: {
|
|
4102
4102
|
typescript: {
|
|
4103
4103
|
method: 'client.addons.create',
|
|
@@ -4145,8 +4145,8 @@ const EMBEDDED_METHODS = [
|
|
|
4145
4145
|
stainlessPath: '(resource) addons > (method) retrieve',
|
|
4146
4146
|
qualified: 'client.addons.retrieve',
|
|
4147
4147
|
params: ['id: string;'],
|
|
4148
|
-
response: "{ id: string; business_id: string; created_at: string; currency: string; name: string; price: number; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; updated_at: string; description?: string; image?: string; }",
|
|
4149
|
-
markdown: "## retrieve\n\n`client.addons.retrieve(id: string): { id: string; business_id: string; created_at: string; currency: currency; name: string; price: number; tax_category: tax_category; updated_at: string; description?: string; image?: string; }`\n\n**get** `/addons/{id}`\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ id: string; business_id: string; created_at: string; currency: string; name: string; price: number; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; updated_at: string; description?: string; image?: string; }`\n\n - `id: string`\n - `business_id: string`\n - `created_at: string`\n - `currency: string`\n - `name: string`\n - `price: number`\n - `tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'`\n - `updated_at: string`\n - `description?: string`\n - `image?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst addonResponse = await client.addons.retrieve('adn_NX1zdqW4Hbivsqz8vI9dc');\n\nconsole.log(addonResponse);\n```",
|
|
4148
|
+
response: "{ id: string; business_id: string; created_at: string; currency: string; name: string; price: number; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech' | 'live_tutoring'; updated_at: string; description?: string; image?: string; }",
|
|
4149
|
+
markdown: "## retrieve\n\n`client.addons.retrieve(id: string): { id: string; business_id: string; created_at: string; currency: currency; name: string; price: number; tax_category: tax_category; updated_at: string; description?: string; image?: string; }`\n\n**get** `/addons/{id}`\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ id: string; business_id: string; created_at: string; currency: string; name: string; price: number; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech' | 'live_tutoring'; updated_at: string; description?: string; image?: string; }`\n\n - `id: string`\n - `business_id: string`\n - `created_at: string`\n - `currency: string`\n - `name: string`\n - `price: number`\n - `tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech' | 'live_tutoring'`\n - `updated_at: string`\n - `description?: string`\n - `image?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst addonResponse = await client.addons.retrieve('adn_NX1zdqW4Hbivsqz8vI9dc');\n\nconsole.log(addonResponse);\n```",
|
|
4150
4150
|
perLanguage: {
|
|
4151
4151
|
typescript: {
|
|
4152
4152
|
method: 'client.addons.retrieve',
|
|
@@ -4200,10 +4200,10 @@ const EMBEDDED_METHODS = [
|
|
|
4200
4200
|
'image_id?: string;',
|
|
4201
4201
|
'name?: string;',
|
|
4202
4202
|
'price?: number;',
|
|
4203
|
-
"tax_category?: 'digital_products' | 'saas' | 'e_book' | 'edtech';",
|
|
4203
|
+
"tax_category?: 'digital_products' | 'saas' | 'e_book' | 'edtech' | 'live_tutoring';",
|
|
4204
4204
|
],
|
|
4205
|
-
response: "{ id: string; business_id: string; created_at: string; currency: string; name: string; price: number; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; updated_at: string; description?: string; image?: string; }",
|
|
4206
|
-
markdown: "## update\n\n`client.addons.update(id: string, currency?: string, description?: string, image_id?: string, name?: string, price?: number, tax_category?: 'digital_products' | 'saas' | 'e_book' | 'edtech'): { id: string; business_id: string; created_at: string; currency: currency; name: string; price: number; tax_category: tax_category; updated_at: string; description?: string; image?: string; }`\n\n**patch** `/addons/{id}`\n\n### Parameters\n\n- `id: string`\n\n- `currency?: string`\n The currency of the Addon\n\n- `description?: string`\n Description of the Addon, optional and must be at most 1000 characters.\n\n- `image_id?: string`\n Addon image id after its uploaded to S3.\nPass `null` to remove the existing image, omit to keep it unchanged.\n\n- `name?: string`\n Name of the Addon, optional and must be at most 100 characters.\n\n- `price?: number`\n Amount of the addon\n\n- `tax_category?: 'digital_products' | 'saas' | 'e_book' | 'edtech'`\n Tax category of the Addon.\n\n### Returns\n\n- `{ id: string; business_id: string; created_at: string; currency: string; name: string; price: number; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; updated_at: string; description?: string; image?: string; }`\n\n - `id: string`\n - `business_id: string`\n - `created_at: string`\n - `currency: string`\n - `name: string`\n - `price: number`\n - `tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'`\n - `updated_at: string`\n - `description?: string`\n - `image?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst addonResponse = await client.addons.update('adn_NX1zdqW4Hbivsqz8vI9dc');\n\nconsole.log(addonResponse);\n```",
|
|
4205
|
+
response: "{ id: string; business_id: string; created_at: string; currency: string; name: string; price: number; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech' | 'live_tutoring'; updated_at: string; description?: string; image?: string; }",
|
|
4206
|
+
markdown: "## update\n\n`client.addons.update(id: string, currency?: string, description?: string, image_id?: string, name?: string, price?: number, tax_category?: 'digital_products' | 'saas' | 'e_book' | 'edtech' | 'live_tutoring'): { id: string; business_id: string; created_at: string; currency: currency; name: string; price: number; tax_category: tax_category; updated_at: string; description?: string; image?: string; }`\n\n**patch** `/addons/{id}`\n\n### Parameters\n\n- `id: string`\n\n- `currency?: string`\n The currency of the Addon\n\n- `description?: string`\n Description of the Addon, optional and must be at most 1000 characters.\n\n- `image_id?: string`\n Addon image id after its uploaded to S3.\nPass `null` to remove the existing image, omit to keep it unchanged.\n\n- `name?: string`\n Name of the Addon, optional and must be at most 100 characters.\n\n- `price?: number`\n Amount of the addon\n\n- `tax_category?: 'digital_products' | 'saas' | 'e_book' | 'edtech' | 'live_tutoring'`\n Tax category of the Addon.\n\n### Returns\n\n- `{ id: string; business_id: string; created_at: string; currency: string; name: string; price: number; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech' | 'live_tutoring'; updated_at: string; description?: string; image?: string; }`\n\n - `id: string`\n - `business_id: string`\n - `created_at: string`\n - `currency: string`\n - `name: string`\n - `price: number`\n - `tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech' | 'live_tutoring'`\n - `updated_at: string`\n - `description?: string`\n - `image?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst addonResponse = await client.addons.update('adn_NX1zdqW4Hbivsqz8vI9dc');\n\nconsole.log(addonResponse);\n```",
|
|
4207
4207
|
perLanguage: {
|
|
4208
4208
|
typescript: {
|
|
4209
4209
|
method: 'client.addons.update',
|
|
@@ -6975,7 +6975,7 @@ const EMBEDDED_METHODS = [
|
|
|
6975
6975
|
'status?: boolean;',
|
|
6976
6976
|
],
|
|
6977
6977
|
response: '{ group_id: string; products: { id: string; addons_count: number; files_count: number; has_credit_entitlements: boolean; is_recurring: boolean; license_key_enabled: boolean; meters_count: number; product_id: string; status: boolean; currency?: currency; description?: string; name?: string; price?: number; price_detail?: price; tax_category?: tax_category; tax_inclusive?: boolean; }[]; status: boolean; group_name?: string; }',
|
|
6978
|
-
markdown: "## create\n\n`client.productCollections.groups.create(id: string, products: { product_id: string; status?: boolean; }[], group_name?: string, status?: boolean): { group_id: string; products: product_collection_product[]; status: boolean; group_name?: string; }`\n\n**post** `/product-collections/{id}/groups`\n\n### Parameters\n\n- `id: string`\n\n- `products: { product_id: string; status?: boolean; }[]`\n Products in this group\n\n- `group_name?: string`\n Optional group name. Multiple groups can have null names, but named groups must be unique per collection\n\n- `status?: boolean`\n Status of the group (defaults to true if not provided)\n\n### Returns\n\n- `{ group_id: string; products: { id: string; addons_count: number; files_count: number; has_credit_entitlements: boolean; is_recurring: boolean; license_key_enabled: boolean; meters_count: number; product_id: string; status: boolean; currency?: currency; description?: string; name?: string; price?: number; price_detail?: price; tax_category?: tax_category; tax_inclusive?: boolean; }[]; status: boolean; group_name?: string; }`\n\n - `group_id: string`\n - `products: { id: string; addons_count: number; files_count: number; has_credit_entitlements: boolean; is_recurring: boolean; license_key_enabled: boolean; meters_count: number; product_id: string; status: boolean; currency?: string; description?: 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_amount?: number; trial_apply_discounts?: 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'; tax_inclusive?: boolean; }[]`\n - `status: boolean`\n - `group_name?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst productCollectionGroupResponse = await client.productCollections.groups.create('pdc_8BWv0hojwUH7iCDabr0NI', { products: [{ product_id: 'product_id' }] });\n\nconsole.log(productCollectionGroupResponse);\n```",
|
|
6978
|
+
markdown: "## create\n\n`client.productCollections.groups.create(id: string, products: { product_id: string; status?: boolean; }[], group_name?: string, status?: boolean): { group_id: string; products: product_collection_product[]; status: boolean; group_name?: string; }`\n\n**post** `/product-collections/{id}/groups`\n\n### Parameters\n\n- `id: string`\n\n- `products: { product_id: string; status?: boolean; }[]`\n Products in this group\n\n- `group_name?: string`\n Optional group name. Multiple groups can have null names, but named groups must be unique per collection\n\n- `status?: boolean`\n Status of the group (defaults to true if not provided)\n\n### Returns\n\n- `{ group_id: string; products: { id: string; addons_count: number; files_count: number; has_credit_entitlements: boolean; is_recurring: boolean; license_key_enabled: boolean; meters_count: number; product_id: string; status: boolean; currency?: currency; description?: string; name?: string; price?: number; price_detail?: price; tax_category?: tax_category; tax_inclusive?: boolean; }[]; status: boolean; group_name?: string; }`\n\n - `group_id: string`\n - `products: { id: string; addons_count: number; files_count: number; has_credit_entitlements: boolean; is_recurring: boolean; license_key_enabled: boolean; meters_count: number; product_id: string; status: boolean; currency?: string; description?: 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_amount?: number; trial_apply_discounts?: 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' | 'live_tutoring'; tax_inclusive?: boolean; }[]`\n - `status: boolean`\n - `group_name?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst productCollectionGroupResponse = await client.productCollections.groups.create('pdc_8BWv0hojwUH7iCDabr0NI', { products: [{ product_id: 'product_id' }] });\n\nconsole.log(productCollectionGroupResponse);\n```",
|
|
6979
6979
|
perLanguage: {
|
|
6980
6980
|
typescript: {
|
|
6981
6981
|
method: 'client.productCollections.groups.create',
|
|
@@ -7125,8 +7125,8 @@ const EMBEDDED_METHODS = [
|
|
|
7125
7125
|
stainlessPath: '(resource) product_collections.groups.items > (method) create',
|
|
7126
7126
|
qualified: 'client.productCollections.groups.items.create',
|
|
7127
7127
|
params: ['id: string;', 'group_id: string;', 'products: { product_id: string; status?: boolean; }[];'],
|
|
7128
|
-
response: "{ id: string; addons_count: number; files_count: number; has_credit_entitlements: boolean; is_recurring: boolean; license_key_enabled: boolean; meters_count: number; product_id: string; status: boolean; currency?: string; description?: string; name?: string; price?: number; price_detail?: object | object | object; tax_category?: 'digital_products' | 'saas' | 'e_book' | 'edtech'; tax_inclusive?: boolean; }[]",
|
|
7129
|
-
markdown: "## create\n\n`client.productCollections.groups.items.create(id: string, group_id: string, products: { product_id: string; status?: boolean; }[]): object[]`\n\n**post** `/product-collections/{id}/groups/{group_id}/items`\n\n### Parameters\n\n- `id: string`\n\n- `group_id: string`\n\n- `products: { product_id: string; status?: boolean; }[]`\n Products to add to the group\n\n### Returns\n\n- `{ id: string; addons_count: number; files_count: number; has_credit_entitlements: boolean; is_recurring: boolean; license_key_enabled: boolean; meters_count: number; product_id: string; status: boolean; currency?: string; description?: string; name?: string; price?: number; price_detail?: object | object | object; tax_category?: 'digital_products' | 'saas' | 'e_book' | 'edtech'; tax_inclusive?: boolean; }[]`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst productCollectionProducts = await client.productCollections.groups.items.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { id: 'pdc_8BWv0hojwUH7iCDabr0NI', products: [{ product_id: 'product_id' }] });\n\nconsole.log(productCollectionProducts);\n```",
|
|
7128
|
+
response: "{ id: string; addons_count: number; files_count: number; has_credit_entitlements: boolean; is_recurring: boolean; license_key_enabled: boolean; meters_count: number; product_id: string; status: boolean; currency?: string; description?: string; name?: string; price?: number; price_detail?: object | object | object; tax_category?: 'digital_products' | 'saas' | 'e_book' | 'edtech' | 'live_tutoring'; tax_inclusive?: boolean; }[]",
|
|
7129
|
+
markdown: "## create\n\n`client.productCollections.groups.items.create(id: string, group_id: string, products: { product_id: string; status?: boolean; }[]): object[]`\n\n**post** `/product-collections/{id}/groups/{group_id}/items`\n\n### Parameters\n\n- `id: string`\n\n- `group_id: string`\n\n- `products: { product_id: string; status?: boolean; }[]`\n Products to add to the group\n\n### Returns\n\n- `{ id: string; addons_count: number; files_count: number; has_credit_entitlements: boolean; is_recurring: boolean; license_key_enabled: boolean; meters_count: number; product_id: string; status: boolean; currency?: string; description?: string; name?: string; price?: number; price_detail?: object | object | object; tax_category?: 'digital_products' | 'saas' | 'e_book' | 'edtech' | 'live_tutoring'; tax_inclusive?: boolean; }[]`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst productCollectionProducts = await client.productCollections.groups.items.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { id: 'pdc_8BWv0hojwUH7iCDabr0NI', products: [{ product_id: 'product_id' }] });\n\nconsole.log(productCollectionProducts);\n```",
|
|
7130
7130
|
perLanguage: {
|
|
7131
7131
|
typescript: {
|
|
7132
7132
|
method: 'client.productCollections.groups.items.create',
|