dodopayments-mcp 2.40.0 → 2.40.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -64,7 +64,7 @@ const EMBEDDED_METHODS = [
64
64
  "customization?: { force_language?: string; show_on_demand_tag?: boolean; show_order_details?: boolean; theme?: 'dark' | 'light' | 'system'; theme_config?: { dark?: theme_mode_config; font_primary_url?: string; font_secondary_url?: string; font_size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'; font_weight?: 'normal' | 'medium' | 'bold' | 'extraBold'; light?: theme_mode_config; pay_button_text?: string; radius?: string; }; };",
65
65
  'discount_code?: string;',
66
66
  'discount_codes?: string[];',
67
- 'feature_flags?: { allow_currency_selection?: boolean; allow_customer_editing_business_name?: boolean; allow_customer_editing_city?: boolean; allow_customer_editing_country?: boolean; allow_customer_editing_email?: boolean; allow_customer_editing_name?: boolean; allow_customer_editing_state?: boolean; allow_customer_editing_street?: boolean; allow_customer_editing_tax_id?: boolean; allow_customer_editing_zipcode?: boolean; allow_discount_code?: boolean; allow_phone_number_collection?: boolean; allow_tax_id?: boolean; always_create_new_customer?: boolean; redirect_immediately?: boolean; require_phone_number?: boolean; };',
67
+ 'feature_flags?: { allow_currency_selection?: boolean; allow_customer_editing_business_name?: boolean; allow_customer_editing_city?: boolean; allow_customer_editing_country?: boolean; allow_customer_editing_email?: boolean; allow_customer_editing_name?: boolean; allow_customer_editing_state?: boolean; allow_customer_editing_street?: boolean; allow_customer_editing_tax_id?: boolean; allow_customer_editing_zipcode?: boolean; allow_discount_code?: boolean; allow_editing_addons?: boolean; allow_phone_number_collection?: boolean; allow_tax_id?: boolean; always_create_new_customer?: boolean; redirect_immediately?: boolean; require_phone_number?: boolean; };',
68
68
  'force_3ds?: boolean;',
69
69
  'mandate_min_amount_inr_paise?: number;',
70
70
  'metadata?: object;',
@@ -78,7 +78,7 @@ const EMBEDDED_METHODS = [
78
78
  'tax_id?: string;',
79
79
  ],
80
80
  response: '{ session_id: string; checkout_url?: string; client_secret?: string; payment_id?: string; publishable_key?: string; }',
81
- markdown: "## create\n\n`client.checkoutSessions.create(product_cart: { product_id: string; quantity: number; addons?: attach_addon[]; amount?: number; credit_entitlements?: object[]; }[], allowed_payment_method_types?: string[], billing_address?: { country: country_code; city?: string; state?: string; street?: string; zipcode?: string; }, billing_currency?: string, cancel_url?: string, confirm?: boolean, custom_fields?: { field_type: 'text' | 'number' | 'email' | 'url' | 'date' | 'dropdown' | 'boolean'; key: string; label: string; options?: string[]; placeholder?: string; required?: boolean; }[], customer?: object | object, customer_business_name?: string, customization?: { force_language?: string; show_on_demand_tag?: boolean; show_order_details?: boolean; theme?: 'dark' | 'light' | 'system'; theme_config?: theme_config; }, discount_code?: string, discount_codes?: string[], feature_flags?: { allow_currency_selection?: boolean; allow_customer_editing_business_name?: boolean; allow_customer_editing_city?: boolean; allow_customer_editing_country?: boolean; allow_customer_editing_email?: boolean; allow_customer_editing_name?: boolean; allow_customer_editing_state?: boolean; allow_customer_editing_street?: boolean; allow_customer_editing_tax_id?: boolean; allow_customer_editing_zipcode?: boolean; allow_discount_code?: boolean; allow_phone_number_collection?: boolean; allow_tax_id?: boolean; always_create_new_customer?: boolean; redirect_immediately?: boolean; require_phone_number?: boolean; }, force_3ds?: boolean, mandate_min_amount_inr_paise?: number, metadata?: object, minimal_address?: boolean, payment_method_id?: string, product_collection_id?: string, return_url?: string, short_link?: boolean, show_saved_payment_methods?: boolean, subscription_data?: { on_demand?: on_demand_subscription; trial_period_days?: number; }, tax_id?: string): { session_id: string; checkout_url?: string; client_secret?: string; payment_id?: string; publishable_key?: string; }`\n\n**post** `/checkouts`\n\n### Parameters\n\n- `product_cart: { product_id: string; quantity: number; addons?: { addon_id: string; quantity: number; }[]; amount?: number; credit_entitlements?: { credit_entitlement_id: string; credits_amount: string; }[]; }[]`\n\n- `allowed_payment_method_types?: string[]`\n Customers will never see payment methods that are not in this list.\nHowever, adding a method here does not guarantee customers will see it.\nAvailability still depends on other factors (e.g., customer location, merchant settings).\n\nDisclaimar: Always provide 'credit' and 'debit' as a fallback.\nIf all payment methods are unavailable, checkout session will fail.\n\n- `billing_address?: { country: string; city?: string; state?: string; street?: string; zipcode?: string; }`\n Billing address information for the session\n - `country: string`\n Two-letter ISO country code (ISO 3166-1 alpha-2)\n - `city?: string`\n City name\n - `state?: string`\n State or province name\n - `street?: string`\n Street address including house number and unit/apartment if applicable\n - `zipcode?: string`\n Postal code or ZIP code\n\n- `billing_currency?: string`\n This field is ingored if adaptive pricing is disabled\n\n- `cancel_url?: string`\n The URL to redirect the customer if they cancel or go back from the checkout.\nIf not provided, the back button will not be displayed.\n\n- `confirm?: boolean`\n If confirm is true, all the details will be finalized. If required data is missing, an API error is thrown.\n\n- `custom_fields?: { field_type: 'text' | 'number' | 'email' | 'url' | 'date' | 'dropdown' | 'boolean'; key: string; label: string; options?: string[]; placeholder?: string; required?: boolean; }[]`\n Custom fields to collect from customer during checkout (max 5 fields)\n\n- `customer?: { customer_id: string; } | { email: string; name?: string; phone_number?: string; }`\n Customer details for the session\n\n- `customer_business_name?: string`\n Optional business / legal name associated with the tax id. When provided\ntogether with a valid tax id for a B2B purchase, this name is rendered\non the invoice instead of the customer's personal name.\n\n- `customization?: { force_language?: string; show_on_demand_tag?: boolean; show_order_details?: boolean; theme?: 'dark' | 'light' | 'system'; theme_config?: { dark?: theme_mode_config; font_primary_url?: string; font_secondary_url?: string; font_size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'; font_weight?: 'normal' | 'medium' | 'bold' | 'extraBold'; light?: theme_mode_config; pay_button_text?: string; radius?: string; }; }`\n Customization for the checkout session page\n - `force_language?: string`\n Force the checkout interface to render in a specific language (e.g. `en`, `es`)\n - `show_on_demand_tag?: boolean`\n Show on demand tag\n\nDefault is true\n - `show_order_details?: boolean`\n Show order details by default\n\nDefault is true\n - `theme?: 'dark' | 'light' | 'system'`\n Theme of the page (determines which mode - light/dark/system - to use)\n\nIf not provided, uses the business-configured theme from business_themes table.\n - `theme_config?: { dark?: { bg_primary?: string; bg_secondary?: string; border_primary?: string; border_secondary?: string; button_primary?: string; button_primary_hover?: string; button_secondary?: string; button_secondary_hover?: string; button_text_primary?: string; button_text_secondary?: string; input_focus_border?: string; text_error?: string; text_placeholder?: string; text_primary?: string; text_secondary?: string; text_success?: string; }; font_primary_url?: string; font_secondary_url?: string; font_size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'; font_weight?: 'normal' | 'medium' | 'bold' | 'extraBold'; light?: { bg_primary?: string; bg_secondary?: string; border_primary?: string; border_secondary?: string; button_primary?: string; button_primary_hover?: string; button_secondary?: string; button_secondary_hover?: string; button_text_primary?: string; button_text_secondary?: string; input_focus_border?: string; text_error?: string; text_placeholder?: string; text_primary?: string; text_secondary?: string; text_success?: string; }; pay_button_text?: string; radius?: string; }`\n Optional custom theme configuration with colors for light and dark modes\n\n- `discount_code?: string`\n DEPRECATED: Use discount_codes instead. Cannot be used together with discount_codes.\n\n- `discount_codes?: string[]`\n Stacked discount codes to apply, in order. Max 20.\nCannot be used together with discount_code.\n\n- `feature_flags?: { allow_currency_selection?: boolean; allow_customer_editing_business_name?: boolean; allow_customer_editing_city?: boolean; allow_customer_editing_country?: boolean; allow_customer_editing_email?: boolean; allow_customer_editing_name?: boolean; allow_customer_editing_state?: boolean; allow_customer_editing_street?: boolean; allow_customer_editing_tax_id?: boolean; allow_customer_editing_zipcode?: boolean; allow_discount_code?: boolean; allow_phone_number_collection?: boolean; allow_tax_id?: boolean; always_create_new_customer?: boolean; redirect_immediately?: boolean; require_phone_number?: boolean; }`\n - `allow_currency_selection?: boolean`\n if customer is allowed to change currency, set it to true\n\nDefault is true\n - `allow_customer_editing_business_name?: boolean`\n If true, the customer can supply or edit the business name associated\nwith the tax id during checkout. Works independently of\n`allow_customer_editing_tax_id` — either flag (or `allow_tax_id`) is\nsufficient to let the customer override the session's business name.\nTypically set together with `allow_customer_editing_tax_id`.\n\nDefault is false\n - `allow_customer_editing_city?: boolean`\n - `allow_customer_editing_country?: boolean`\n - `allow_customer_editing_email?: boolean`\n - `allow_customer_editing_name?: boolean`\n - `allow_customer_editing_state?: boolean`\n - `allow_customer_editing_street?: boolean`\n - `allow_customer_editing_tax_id?: boolean`\n - `allow_customer_editing_zipcode?: boolean`\n - `allow_discount_code?: boolean`\n If the customer is allowed to apply discount code, set it to true.\n\nDefault is true\n - `allow_phone_number_collection?: boolean`\n If phone number is collected from customer, set it to rue\n\nDefault is true\n - `allow_tax_id?: boolean`\n If the customer is allowed to add tax id, set it to true\n\nDefault is true\n - `always_create_new_customer?: boolean`\n Set to true if a new customer object should be created.\nBy default email is used to find an existing customer to attach the session to\n\nDefault is false\n - `redirect_immediately?: boolean`\n If true, redirects the customer immediately after payment completion\n\nDefault is false\n - `require_phone_number?: boolean`\n If true, the customer must provide a phone number to complete checkout.\nRequires `allow_phone_number_collection` to also be true.\n\nDefault is false\n\n- `force_3ds?: boolean`\n Override merchant default 3DS behaviour for this session\n\n- `mandate_min_amount_inr_paise?: number`\n Override the merchant-level mandate floor (in INR paise) for INR\ne-mandates on Indian-card recurring payments. The mandate amount sent to\nthe processor is `max(this_floor, actual_billing_amount)`, so this is\neffectively the customer-facing authorization ceiling whenever billing is\nlower. When unset, the merchant setting applies; when that's also unset,\nthe system default of ₹15,000 applies.\n\n- `metadata?: object`\n Additional metadata associated with the payment. Defaults to empty if not provided.\n\n- `minimal_address?: boolean`\n If true, only zipcode is required when confirm is true; other address fields remain optional\n\n- `payment_method_id?: string`\n Optional payment method ID to use for this checkout session.\nOnly allowed when `confirm` is true.\nIf provided, existing customer id must also be provided.\n\n- `product_collection_id?: string`\n Product collection ID for collection-based checkout flow\n\n- `return_url?: string`\n The url to redirect after payment failure or success.\n\n- `short_link?: boolean`\n If true, returns a shortened checkout URL.\nDefaults to false if not specified.\n\n- `show_saved_payment_methods?: boolean`\n Display saved payment methods of a returning customer False by default\n\n- `subscription_data?: { on_demand?: { mandate_only: boolean; adaptive_currency_fees_inclusive?: boolean; product_currency?: currency; product_description?: string; product_price?: number; }; trial_period_days?: number; }`\n - `on_demand?: { mandate_only: boolean; adaptive_currency_fees_inclusive?: boolean; product_currency?: string; product_description?: string; product_price?: number; }`\n - `trial_period_days?: number`\n Optional trial period in days If specified, this value overrides the trial period set in the product's price Must be between 0 and 10000 days\n\n- `tax_id?: string`\n Tax ID for the customer (e.g. VAT number). Requires billing_address with country.\n\n### Returns\n\n- `{ session_id: string; checkout_url?: string; client_secret?: string; payment_id?: string; publishable_key?: string; }`\n\n - `session_id: string`\n - `checkout_url?: string`\n - `client_secret?: string`\n - `payment_id?: string`\n - `publishable_key?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst checkoutSessionResponse = await client.checkoutSessions.create({ product_cart: [{ product_id: 'product_id', quantity: 0 }] });\n\nconsole.log(checkoutSessionResponse);\n```",
81
+ markdown: "## create\n\n`client.checkoutSessions.create(product_cart: { product_id: string; quantity: number; addons?: attach_addon[]; amount?: number; credit_entitlements?: object[]; }[], allowed_payment_method_types?: string[], billing_address?: { country: country_code; city?: string; state?: string; street?: string; zipcode?: string; }, billing_currency?: string, cancel_url?: string, confirm?: boolean, custom_fields?: { field_type: 'text' | 'number' | 'email' | 'url' | 'date' | 'dropdown' | 'boolean'; key: string; label: string; options?: string[]; placeholder?: string; required?: boolean; }[], customer?: object | object, customer_business_name?: string, customization?: { force_language?: string; show_on_demand_tag?: boolean; show_order_details?: boolean; theme?: 'dark' | 'light' | 'system'; theme_config?: theme_config; }, discount_code?: string, discount_codes?: string[], feature_flags?: { allow_currency_selection?: boolean; allow_customer_editing_business_name?: boolean; allow_customer_editing_city?: boolean; allow_customer_editing_country?: boolean; allow_customer_editing_email?: boolean; allow_customer_editing_name?: boolean; allow_customer_editing_state?: boolean; allow_customer_editing_street?: boolean; allow_customer_editing_tax_id?: boolean; allow_customer_editing_zipcode?: boolean; allow_discount_code?: boolean; allow_editing_addons?: boolean; allow_phone_number_collection?: boolean; allow_tax_id?: boolean; always_create_new_customer?: boolean; redirect_immediately?: boolean; require_phone_number?: boolean; }, force_3ds?: boolean, mandate_min_amount_inr_paise?: number, metadata?: object, minimal_address?: boolean, payment_method_id?: string, product_collection_id?: string, return_url?: string, short_link?: boolean, show_saved_payment_methods?: boolean, subscription_data?: { on_demand?: on_demand_subscription; trial_period_days?: number; }, tax_id?: string): { session_id: string; checkout_url?: string; client_secret?: string; payment_id?: string; publishable_key?: string; }`\n\n**post** `/checkouts`\n\n### Parameters\n\n- `product_cart: { product_id: string; quantity: number; addons?: { addon_id: string; quantity: number; }[]; amount?: number; credit_entitlements?: { credit_entitlement_id: string; credits_amount: string; }[]; }[]`\n\n- `allowed_payment_method_types?: string[]`\n Customers will never see payment methods that are not in this list.\nHowever, adding a method here does not guarantee customers will see it.\nAvailability still depends on other factors (e.g., customer location, merchant settings).\n\nDisclaimar: Always provide 'credit' and 'debit' as a fallback.\nIf all payment methods are unavailable, checkout session will fail.\n\n- `billing_address?: { country: string; city?: string; state?: string; street?: string; zipcode?: string; }`\n Billing address information for the session\n - `country: string`\n Two-letter ISO country code (ISO 3166-1 alpha-2)\n - `city?: string`\n City name\n - `state?: string`\n State or province name\n - `street?: string`\n Street address including house number and unit/apartment if applicable\n - `zipcode?: string`\n Postal code or ZIP code\n\n- `billing_currency?: string`\n This field is ingored if adaptive pricing is disabled\n\n- `cancel_url?: string`\n The URL to redirect the customer if they cancel or go back from the checkout.\nIf not provided, the back button will not be displayed.\n\n- `confirm?: boolean`\n If confirm is true, all the details will be finalized. If required data is missing, an API error is thrown.\n\n- `custom_fields?: { field_type: 'text' | 'number' | 'email' | 'url' | 'date' | 'dropdown' | 'boolean'; key: string; label: string; options?: string[]; placeholder?: string; required?: boolean; }[]`\n Custom fields to collect from customer during checkout (max 5 fields)\n\n- `customer?: { customer_id: string; } | { email: string; name?: string; phone_number?: string; }`\n Customer details for the session\n\n- `customer_business_name?: string`\n Optional business / legal name associated with the tax id. When provided\ntogether with a valid tax id for a B2B purchase, this name is rendered\non the invoice instead of the customer's personal name.\n\n- `customization?: { force_language?: string; show_on_demand_tag?: boolean; show_order_details?: boolean; theme?: 'dark' | 'light' | 'system'; theme_config?: { dark?: theme_mode_config; font_primary_url?: string; font_secondary_url?: string; font_size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'; font_weight?: 'normal' | 'medium' | 'bold' | 'extraBold'; light?: theme_mode_config; pay_button_text?: string; radius?: string; }; }`\n Customization for the checkout session page\n - `force_language?: string`\n Force the checkout interface to render in a specific language (e.g. `en`, `es`)\n - `show_on_demand_tag?: boolean`\n Show on demand tag\n\nDefault is true\n - `show_order_details?: boolean`\n Show order details by default\n\nDefault is true\n - `theme?: 'dark' | 'light' | 'system'`\n Theme of the page (determines which mode - light/dark/system - to use)\n\nIf not provided, uses the business-configured theme from business_themes table.\n - `theme_config?: { dark?: { bg_primary?: string; bg_secondary?: string; border_primary?: string; border_secondary?: string; button_primary?: string; button_primary_hover?: string; button_secondary?: string; button_secondary_hover?: string; button_text_primary?: string; button_text_secondary?: string; input_focus_border?: string; text_error?: string; text_placeholder?: string; text_primary?: string; text_secondary?: string; text_success?: string; }; font_primary_url?: string; font_secondary_url?: string; font_size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'; font_weight?: 'normal' | 'medium' | 'bold' | 'extraBold'; light?: { bg_primary?: string; bg_secondary?: string; border_primary?: string; border_secondary?: string; button_primary?: string; button_primary_hover?: string; button_secondary?: string; button_secondary_hover?: string; button_text_primary?: string; button_text_secondary?: string; input_focus_border?: string; text_error?: string; text_placeholder?: string; text_primary?: string; text_secondary?: string; text_success?: string; }; pay_button_text?: string; radius?: string; }`\n Optional custom theme configuration with colors for light and dark modes\n\n- `discount_code?: string`\n DEPRECATED: Use discount_codes instead. Cannot be used together with discount_codes.\n\n- `discount_codes?: string[]`\n Stacked discount codes to apply, in order. Max 20.\nCannot be used together with discount_code.\n\n- `feature_flags?: { allow_currency_selection?: boolean; allow_customer_editing_business_name?: boolean; allow_customer_editing_city?: boolean; allow_customer_editing_country?: boolean; allow_customer_editing_email?: boolean; allow_customer_editing_name?: boolean; allow_customer_editing_state?: boolean; allow_customer_editing_street?: boolean; allow_customer_editing_tax_id?: boolean; allow_customer_editing_zipcode?: boolean; allow_discount_code?: boolean; allow_editing_addons?: boolean; allow_phone_number_collection?: boolean; allow_tax_id?: boolean; always_create_new_customer?: boolean; redirect_immediately?: boolean; require_phone_number?: boolean; }`\n - `allow_currency_selection?: boolean`\n if customer is allowed to change currency, set it to true\n\nDefault is true\n - `allow_customer_editing_business_name?: boolean`\n If true, the customer can supply or edit the business name associated\nwith the tax id during checkout. Works independently of\n`allow_customer_editing_tax_id` — either flag (or `allow_tax_id`) is\nsufficient to let the customer override the session's business name.\nTypically set together with `allow_customer_editing_tax_id`.\n\nDefault is false\n - `allow_customer_editing_city?: boolean`\n - `allow_customer_editing_country?: boolean`\n - `allow_customer_editing_email?: boolean`\n - `allow_customer_editing_name?: boolean`\n - `allow_customer_editing_state?: boolean`\n - `allow_customer_editing_street?: boolean`\n - `allow_customer_editing_tax_id?: boolean`\n - `allow_customer_editing_zipcode?: boolean`\n - `allow_discount_code?: boolean`\n If the customer is allowed to apply discount code, set it to true.\n\nDefault is true\n - `allow_editing_addons?: boolean`\n If true, the customer can add or remove addons on a subscription product\nduring checkout.\n\nDefault is false\n - `allow_phone_number_collection?: boolean`\n If phone number is collected from customer, set it to rue\n\nDefault is true\n - `allow_tax_id?: boolean`\n If the customer is allowed to add tax id, set it to true\n\nDefault is true\n - `always_create_new_customer?: boolean`\n Set to true if a new customer object should be created.\nBy default email is used to find an existing customer to attach the session to\n\nDefault is false\n - `redirect_immediately?: boolean`\n If true, redirects the customer immediately after payment completion\n\nDefault is false\n - `require_phone_number?: boolean`\n If true, the customer must provide a phone number to complete checkout.\nRequires `allow_phone_number_collection` to also be true.\n\nDefault is false\n\n- `force_3ds?: boolean`\n Override merchant default 3DS behaviour for this session\n\n- `mandate_min_amount_inr_paise?: number`\n Override the merchant-level mandate floor (in INR paise) for INR\ne-mandates on Indian-card recurring payments. The mandate amount sent to\nthe processor is `max(this_floor, actual_billing_amount)`, so this is\neffectively the customer-facing authorization ceiling whenever billing is\nlower. When unset, the merchant setting applies; when that's also unset,\nthe system default of ₹15,000 applies.\n\n- `metadata?: object`\n Additional metadata associated with the payment. Defaults to empty if not provided.\n\n- `minimal_address?: boolean`\n If true, only zipcode is required when confirm is true; other address fields remain optional\n\n- `payment_method_id?: string`\n Optional payment method ID to use for this checkout session.\nOnly allowed when `confirm` is true.\nIf provided, existing customer id must also be provided.\n\n- `product_collection_id?: string`\n Product collection ID for collection-based checkout flow\n\n- `return_url?: string`\n The url to redirect after payment failure or success.\n\n- `short_link?: boolean`\n If true, returns a shortened checkout URL.\nDefaults to false if not specified.\n\n- `show_saved_payment_methods?: boolean`\n Display saved payment methods of a returning customer False by default\n\n- `subscription_data?: { on_demand?: { mandate_only: boolean; adaptive_currency_fees_inclusive?: boolean; product_currency?: currency; product_description?: string; product_price?: number; }; trial_period_days?: number; }`\n - `on_demand?: { mandate_only: boolean; adaptive_currency_fees_inclusive?: boolean; product_currency?: string; product_description?: string; product_price?: number; }`\n - `trial_period_days?: number`\n Optional trial period in days If specified, this value overrides the trial period set in the product's price Must be between 0 and 10000 days\n\n- `tax_id?: string`\n Tax ID for the customer (e.g. VAT number). Requires billing_address with country.\n\n### Returns\n\n- `{ session_id: string; checkout_url?: string; client_secret?: string; payment_id?: string; publishable_key?: string; }`\n\n - `session_id: string`\n - `checkout_url?: string`\n - `client_secret?: string`\n - `payment_id?: string`\n - `publishable_key?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst checkoutSessionResponse = await client.checkoutSessions.create({ product_cart: [{ product_id: 'product_id', quantity: 0 }] });\n\nconsole.log(checkoutSessionResponse);\n```",
82
82
  perLanguage: {
83
83
  typescript: {
84
84
  method: 'client.checkoutSessions.create',
@@ -109,7 +109,7 @@ const EMBEDDED_METHODS = [
109
109
  },
110
110
  php: {
111
111
  method: 'checkoutSessions->create',
112
- example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(bearerToken: 'My Bearer Token', environment: 'test_mode');\n\n$checkoutSessionResponse = $client->checkoutSessions->create(\n productCart: [\n [\n 'productID' => 'product_id',\n 'quantity' => 0,\n 'addons' => [['addonID' => 'addon_id', 'quantity' => 0]],\n 'amount' => 0,\n 'creditEntitlements' => [\n [\n 'creditEntitlementID' => 'credit_entitlement_id',\n 'creditsAmount' => 'credits_amount',\n ],\n ],\n ],\n ],\n allowedPaymentMethodTypes: [PaymentMethodTypes::ACH],\n billingAddress: [\n 'country' => CountryCode::AF,\n 'city' => 'city',\n 'state' => 'state',\n 'street' => 'street',\n 'zipcode' => 'zipcode',\n ],\n billingCurrency: Currency::AED,\n cancelURL: 'cancel_url',\n confirm: true,\n customFields: [\n [\n 'fieldType' => 'text',\n 'key' => 'key',\n 'label' => 'label',\n 'options' => ['string'],\n 'placeholder' => 'placeholder',\n 'required' => true,\n ],\n ],\n customer: ['customerID' => 'customer_id'],\n customerBusinessName: 'customer_business_name',\n customization: [\n 'forceLanguage' => 'force_language',\n 'showOnDemandTag' => true,\n 'showOrderDetails' => true,\n 'theme' => 'dark',\n 'themeConfig' => [\n 'dark' => [\n 'bgPrimary' => 'bg_primary',\n 'bgSecondary' => 'bg_secondary',\n 'borderPrimary' => 'border_primary',\n 'borderSecondary' => 'border_secondary',\n 'buttonPrimary' => 'button_primary',\n 'buttonPrimaryHover' => 'button_primary_hover',\n 'buttonSecondary' => 'button_secondary',\n 'buttonSecondaryHover' => 'button_secondary_hover',\n 'buttonTextPrimary' => 'button_text_primary',\n 'buttonTextSecondary' => 'button_text_secondary',\n 'inputFocusBorder' => 'input_focus_border',\n 'textError' => 'text_error',\n 'textPlaceholder' => 'text_placeholder',\n 'textPrimary' => 'text_primary',\n 'textSecondary' => 'text_secondary',\n 'textSuccess' => 'text_success',\n ],\n 'fontPrimaryURL' => 'font_primary_url',\n 'fontSecondaryURL' => 'font_secondary_url',\n 'fontSize' => 'xs',\n 'fontWeight' => 'normal',\n 'light' => [\n 'bgPrimary' => 'bg_primary',\n 'bgSecondary' => 'bg_secondary',\n 'borderPrimary' => 'border_primary',\n 'borderSecondary' => 'border_secondary',\n 'buttonPrimary' => 'button_primary',\n 'buttonPrimaryHover' => 'button_primary_hover',\n 'buttonSecondary' => 'button_secondary',\n 'buttonSecondaryHover' => 'button_secondary_hover',\n 'buttonTextPrimary' => 'button_text_primary',\n 'buttonTextSecondary' => 'button_text_secondary',\n 'inputFocusBorder' => 'input_focus_border',\n 'textError' => 'text_error',\n 'textPlaceholder' => 'text_placeholder',\n 'textPrimary' => 'text_primary',\n 'textSecondary' => 'text_secondary',\n 'textSuccess' => 'text_success',\n ],\n 'payButtonText' => 'pay_button_text',\n 'radius' => 'radius',\n ],\n ],\n discountCode: 'discount_code',\n discountCodes: ['string'],\n featureFlags: [\n 'allowCurrencySelection' => true,\n 'allowCustomerEditingBusinessName' => true,\n 'allowCustomerEditingCity' => true,\n 'allowCustomerEditingCountry' => true,\n 'allowCustomerEditingEmail' => true,\n 'allowCustomerEditingName' => true,\n 'allowCustomerEditingState' => true,\n 'allowCustomerEditingStreet' => true,\n 'allowCustomerEditingTaxID' => true,\n 'allowCustomerEditingZipcode' => true,\n 'allowDiscountCode' => true,\n 'allowPhoneNumberCollection' => true,\n 'allowTaxID' => true,\n 'alwaysCreateNewCustomer' => true,\n 'redirectImmediately' => true,\n 'requirePhoneNumber' => true,\n ],\n force3DS: true,\n mandateMinAmountInrPaise: 0,\n metadata: ['foo' => 'string'],\n minimalAddress: true,\n paymentMethodID: 'payment_method_id',\n productCollectionID: 'product_collection_id',\n returnURL: 'return_url',\n shortLink: true,\n showSavedPaymentMethods: true,\n subscriptionData: [\n 'onDemand' => [\n 'mandateOnly' => true,\n 'adaptiveCurrencyFeesInclusive' => true,\n 'productCurrency' => Currency::AED,\n 'productDescription' => 'product_description',\n 'productPrice' => 0,\n ],\n 'trialPeriodDays' => 0,\n ],\n taxID: 'tax_id',\n);\n\nvar_dump($checkoutSessionResponse);",
112
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(bearerToken: 'My Bearer Token', environment: 'test_mode');\n\n$checkoutSessionResponse = $client->checkoutSessions->create(\n productCart: [\n [\n 'productID' => 'product_id',\n 'quantity' => 0,\n 'addons' => [['addonID' => 'addon_id', 'quantity' => 0]],\n 'amount' => 0,\n 'creditEntitlements' => [\n [\n 'creditEntitlementID' => 'credit_entitlement_id',\n 'creditsAmount' => 'credits_amount',\n ],\n ],\n ],\n ],\n allowedPaymentMethodTypes: [PaymentMethodTypes::ACH],\n billingAddress: [\n 'country' => CountryCode::AF,\n 'city' => 'city',\n 'state' => 'state',\n 'street' => 'street',\n 'zipcode' => 'zipcode',\n ],\n billingCurrency: Currency::AED,\n cancelURL: 'cancel_url',\n confirm: true,\n customFields: [\n [\n 'fieldType' => 'text',\n 'key' => 'key',\n 'label' => 'label',\n 'options' => ['string'],\n 'placeholder' => 'placeholder',\n 'required' => true,\n ],\n ],\n customer: ['customerID' => 'customer_id'],\n customerBusinessName: 'customer_business_name',\n customization: [\n 'forceLanguage' => 'force_language',\n 'showOnDemandTag' => true,\n 'showOrderDetails' => true,\n 'theme' => 'dark',\n 'themeConfig' => [\n 'dark' => [\n 'bgPrimary' => 'bg_primary',\n 'bgSecondary' => 'bg_secondary',\n 'borderPrimary' => 'border_primary',\n 'borderSecondary' => 'border_secondary',\n 'buttonPrimary' => 'button_primary',\n 'buttonPrimaryHover' => 'button_primary_hover',\n 'buttonSecondary' => 'button_secondary',\n 'buttonSecondaryHover' => 'button_secondary_hover',\n 'buttonTextPrimary' => 'button_text_primary',\n 'buttonTextSecondary' => 'button_text_secondary',\n 'inputFocusBorder' => 'input_focus_border',\n 'textError' => 'text_error',\n 'textPlaceholder' => 'text_placeholder',\n 'textPrimary' => 'text_primary',\n 'textSecondary' => 'text_secondary',\n 'textSuccess' => 'text_success',\n ],\n 'fontPrimaryURL' => 'font_primary_url',\n 'fontSecondaryURL' => 'font_secondary_url',\n 'fontSize' => 'xs',\n 'fontWeight' => 'normal',\n 'light' => [\n 'bgPrimary' => 'bg_primary',\n 'bgSecondary' => 'bg_secondary',\n 'borderPrimary' => 'border_primary',\n 'borderSecondary' => 'border_secondary',\n 'buttonPrimary' => 'button_primary',\n 'buttonPrimaryHover' => 'button_primary_hover',\n 'buttonSecondary' => 'button_secondary',\n 'buttonSecondaryHover' => 'button_secondary_hover',\n 'buttonTextPrimary' => 'button_text_primary',\n 'buttonTextSecondary' => 'button_text_secondary',\n 'inputFocusBorder' => 'input_focus_border',\n 'textError' => 'text_error',\n 'textPlaceholder' => 'text_placeholder',\n 'textPrimary' => 'text_primary',\n 'textSecondary' => 'text_secondary',\n 'textSuccess' => 'text_success',\n ],\n 'payButtonText' => 'pay_button_text',\n 'radius' => 'radius',\n ],\n ],\n discountCode: 'discount_code',\n discountCodes: ['string'],\n featureFlags: [\n 'allowCurrencySelection' => true,\n 'allowCustomerEditingBusinessName' => true,\n 'allowCustomerEditingCity' => true,\n 'allowCustomerEditingCountry' => true,\n 'allowCustomerEditingEmail' => true,\n 'allowCustomerEditingName' => true,\n 'allowCustomerEditingState' => true,\n 'allowCustomerEditingStreet' => true,\n 'allowCustomerEditingTaxID' => true,\n 'allowCustomerEditingZipcode' => true,\n 'allowDiscountCode' => true,\n 'allowEditingAddons' => true,\n 'allowPhoneNumberCollection' => true,\n 'allowTaxID' => true,\n 'alwaysCreateNewCustomer' => true,\n 'redirectImmediately' => true,\n 'requirePhoneNumber' => true,\n ],\n force3DS: true,\n mandateMinAmountInrPaise: 0,\n metadata: ['foo' => 'string'],\n minimalAddress: true,\n paymentMethodID: 'payment_method_id',\n productCollectionID: 'product_collection_id',\n returnURL: 'return_url',\n shortLink: true,\n showSavedPaymentMethods: true,\n subscriptionData: [\n 'onDemand' => [\n 'mandateOnly' => true,\n 'adaptiveCurrencyFeesInclusive' => true,\n 'productCurrency' => Currency::AED,\n 'productDescription' => 'product_description',\n 'productPrice' => 0,\n ],\n 'trialPeriodDays' => 0,\n ],\n taxID: 'tax_id',\n);\n\nvar_dump($checkoutSessionResponse);",
113
113
  },
114
114
  csharp: {
115
115
  method: 'CheckoutSessions.Create',
@@ -187,7 +187,7 @@ const EMBEDDED_METHODS = [
187
187
  "customization?: { force_language?: string; show_on_demand_tag?: boolean; show_order_details?: boolean; theme?: 'dark' | 'light' | 'system'; theme_config?: { dark?: theme_mode_config; font_primary_url?: string; font_secondary_url?: string; font_size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'; font_weight?: 'normal' | 'medium' | 'bold' | 'extraBold'; light?: theme_mode_config; pay_button_text?: string; radius?: string; }; };",
188
188
  'discount_code?: string;',
189
189
  'discount_codes?: string[];',
190
- 'feature_flags?: { allow_currency_selection?: boolean; allow_customer_editing_business_name?: boolean; allow_customer_editing_city?: boolean; allow_customer_editing_country?: boolean; allow_customer_editing_email?: boolean; allow_customer_editing_name?: boolean; allow_customer_editing_state?: boolean; allow_customer_editing_street?: boolean; allow_customer_editing_tax_id?: boolean; allow_customer_editing_zipcode?: boolean; allow_discount_code?: boolean; allow_phone_number_collection?: boolean; allow_tax_id?: boolean; always_create_new_customer?: boolean; redirect_immediately?: boolean; require_phone_number?: boolean; };',
190
+ 'feature_flags?: { allow_currency_selection?: boolean; allow_customer_editing_business_name?: boolean; allow_customer_editing_city?: boolean; allow_customer_editing_country?: boolean; allow_customer_editing_email?: boolean; allow_customer_editing_name?: boolean; allow_customer_editing_state?: boolean; allow_customer_editing_street?: boolean; allow_customer_editing_tax_id?: boolean; allow_customer_editing_zipcode?: boolean; allow_discount_code?: boolean; allow_editing_addons?: boolean; allow_phone_number_collection?: boolean; allow_tax_id?: boolean; always_create_new_customer?: boolean; redirect_immediately?: boolean; require_phone_number?: boolean; };',
191
191
  'force_3ds?: boolean;',
192
192
  'mandate_min_amount_inr_paise?: number;',
193
193
  'metadata?: object;',
@@ -201,7 +201,7 @@ const EMBEDDED_METHODS = [
201
201
  'tax_id?: string;',
202
202
  ],
203
203
  response: '{ billing_country: string; currency: string; current_breakup: { discount: number; subtotal: number; total_amount: number; tax?: number; }; is_byop: boolean; product_cart: { credit_entitlements: object[]; currency: currency; discounted_price: number; is_subscription: boolean; is_usage_based: boolean; meters: object[]; og_currency: currency; og_price: number; product_id: string; quantity: number; tax_category: tax_category; tax_inclusive: boolean; tax_rate: number; addons?: object[]; description?: string; discount_amount?: number; discount_cycle?: number; name?: string; tax?: number; }[]; total_price: number; recurring_breakup?: { discount: number; subtotal: number; total_amount: number; tax?: number; }; tax_id_business_name?: string; tax_id_err_msg?: string; tax_id_format_name?: string; total_tax?: number; }',
204
- markdown: "## preview\n\n`client.checkoutSessions.preview(product_cart: { product_id: string; quantity: number; addons?: attach_addon[]; amount?: number; credit_entitlements?: object[]; }[], allowed_payment_method_types?: string[], billing_address?: { country: country_code; city?: string; state?: string; street?: string; zipcode?: string; }, billing_currency?: string, cancel_url?: string, confirm?: boolean, custom_fields?: { field_type: 'text' | 'number' | 'email' | 'url' | 'date' | 'dropdown' | 'boolean'; key: string; label: string; options?: string[]; placeholder?: string; required?: boolean; }[], customer?: object | object, customer_business_name?: string, customization?: { force_language?: string; show_on_demand_tag?: boolean; show_order_details?: boolean; theme?: 'dark' | 'light' | 'system'; theme_config?: theme_config; }, discount_code?: string, discount_codes?: string[], feature_flags?: { allow_currency_selection?: boolean; allow_customer_editing_business_name?: boolean; allow_customer_editing_city?: boolean; allow_customer_editing_country?: boolean; allow_customer_editing_email?: boolean; allow_customer_editing_name?: boolean; allow_customer_editing_state?: boolean; allow_customer_editing_street?: boolean; allow_customer_editing_tax_id?: boolean; allow_customer_editing_zipcode?: boolean; allow_discount_code?: boolean; allow_phone_number_collection?: boolean; allow_tax_id?: boolean; always_create_new_customer?: boolean; redirect_immediately?: boolean; require_phone_number?: boolean; }, force_3ds?: boolean, mandate_min_amount_inr_paise?: number, metadata?: object, minimal_address?: boolean, payment_method_id?: string, product_collection_id?: string, return_url?: string, short_link?: boolean, show_saved_payment_methods?: boolean, subscription_data?: { on_demand?: on_demand_subscription; trial_period_days?: number; }, tax_id?: string): { billing_country: country_code; currency: currency; current_breakup: object; is_byop: boolean; product_cart: object[]; total_price: number; recurring_breakup?: object; tax_id_business_name?: string; tax_id_err_msg?: string; tax_id_format_name?: string; total_tax?: number; }`\n\n**post** `/checkouts/preview`\n\n### Parameters\n\n- `product_cart: { product_id: string; quantity: number; addons?: { addon_id: string; quantity: number; }[]; amount?: number; credit_entitlements?: { credit_entitlement_id: string; credits_amount: string; }[]; }[]`\n\n- `allowed_payment_method_types?: string[]`\n Customers will never see payment methods that are not in this list.\nHowever, adding a method here does not guarantee customers will see it.\nAvailability still depends on other factors (e.g., customer location, merchant settings).\n\nDisclaimar: Always provide 'credit' and 'debit' as a fallback.\nIf all payment methods are unavailable, checkout session will fail.\n\n- `billing_address?: { country: string; city?: string; state?: string; street?: string; zipcode?: string; }`\n Billing address information for the session\n - `country: string`\n Two-letter ISO country code (ISO 3166-1 alpha-2)\n - `city?: string`\n City name\n - `state?: string`\n State or province name\n - `street?: string`\n Street address including house number and unit/apartment if applicable\n - `zipcode?: string`\n Postal code or ZIP code\n\n- `billing_currency?: string`\n This field is ingored if adaptive pricing is disabled\n\n- `cancel_url?: string`\n The URL to redirect the customer if they cancel or go back from the checkout.\nIf not provided, the back button will not be displayed.\n\n- `confirm?: boolean`\n If confirm is true, all the details will be finalized. If required data is missing, an API error is thrown.\n\n- `custom_fields?: { field_type: 'text' | 'number' | 'email' | 'url' | 'date' | 'dropdown' | 'boolean'; key: string; label: string; options?: string[]; placeholder?: string; required?: boolean; }[]`\n Custom fields to collect from customer during checkout (max 5 fields)\n\n- `customer?: { customer_id: string; } | { email: string; name?: string; phone_number?: string; }`\n Customer details for the session\n\n- `customer_business_name?: string`\n Optional business / legal name associated with the tax id. When provided\ntogether with a valid tax id for a B2B purchase, this name is rendered\non the invoice instead of the customer's personal name.\n\n- `customization?: { force_language?: string; show_on_demand_tag?: boolean; show_order_details?: boolean; theme?: 'dark' | 'light' | 'system'; theme_config?: { dark?: theme_mode_config; font_primary_url?: string; font_secondary_url?: string; font_size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'; font_weight?: 'normal' | 'medium' | 'bold' | 'extraBold'; light?: theme_mode_config; pay_button_text?: string; radius?: string; }; }`\n Customization for the checkout session page\n - `force_language?: string`\n Force the checkout interface to render in a specific language (e.g. `en`, `es`)\n - `show_on_demand_tag?: boolean`\n Show on demand tag\n\nDefault is true\n - `show_order_details?: boolean`\n Show order details by default\n\nDefault is true\n - `theme?: 'dark' | 'light' | 'system'`\n Theme of the page (determines which mode - light/dark/system - to use)\n\nIf not provided, uses the business-configured theme from business_themes table.\n - `theme_config?: { dark?: { bg_primary?: string; bg_secondary?: string; border_primary?: string; border_secondary?: string; button_primary?: string; button_primary_hover?: string; button_secondary?: string; button_secondary_hover?: string; button_text_primary?: string; button_text_secondary?: string; input_focus_border?: string; text_error?: string; text_placeholder?: string; text_primary?: string; text_secondary?: string; text_success?: string; }; font_primary_url?: string; font_secondary_url?: string; font_size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'; font_weight?: 'normal' | 'medium' | 'bold' | 'extraBold'; light?: { bg_primary?: string; bg_secondary?: string; border_primary?: string; border_secondary?: string; button_primary?: string; button_primary_hover?: string; button_secondary?: string; button_secondary_hover?: string; button_text_primary?: string; button_text_secondary?: string; input_focus_border?: string; text_error?: string; text_placeholder?: string; text_primary?: string; text_secondary?: string; text_success?: string; }; pay_button_text?: string; radius?: string; }`\n Optional custom theme configuration with colors for light and dark modes\n\n- `discount_code?: string`\n DEPRECATED: Use discount_codes instead. Cannot be used together with discount_codes.\n\n- `discount_codes?: string[]`\n Stacked discount codes to apply, in order. Max 20.\nCannot be used together with discount_code.\n\n- `feature_flags?: { allow_currency_selection?: boolean; allow_customer_editing_business_name?: boolean; allow_customer_editing_city?: boolean; allow_customer_editing_country?: boolean; allow_customer_editing_email?: boolean; allow_customer_editing_name?: boolean; allow_customer_editing_state?: boolean; allow_customer_editing_street?: boolean; allow_customer_editing_tax_id?: boolean; allow_customer_editing_zipcode?: boolean; allow_discount_code?: boolean; allow_phone_number_collection?: boolean; allow_tax_id?: boolean; always_create_new_customer?: boolean; redirect_immediately?: boolean; require_phone_number?: boolean; }`\n - `allow_currency_selection?: boolean`\n if customer is allowed to change currency, set it to true\n\nDefault is true\n - `allow_customer_editing_business_name?: boolean`\n If true, the customer can supply or edit the business name associated\nwith the tax id during checkout. Works independently of\n`allow_customer_editing_tax_id` — either flag (or `allow_tax_id`) is\nsufficient to let the customer override the session's business name.\nTypically set together with `allow_customer_editing_tax_id`.\n\nDefault is false\n - `allow_customer_editing_city?: boolean`\n - `allow_customer_editing_country?: boolean`\n - `allow_customer_editing_email?: boolean`\n - `allow_customer_editing_name?: boolean`\n - `allow_customer_editing_state?: boolean`\n - `allow_customer_editing_street?: boolean`\n - `allow_customer_editing_tax_id?: boolean`\n - `allow_customer_editing_zipcode?: boolean`\n - `allow_discount_code?: boolean`\n If the customer is allowed to apply discount code, set it to true.\n\nDefault is true\n - `allow_phone_number_collection?: boolean`\n If phone number is collected from customer, set it to rue\n\nDefault is true\n - `allow_tax_id?: boolean`\n If the customer is allowed to add tax id, set it to true\n\nDefault is true\n - `always_create_new_customer?: boolean`\n Set to true if a new customer object should be created.\nBy default email is used to find an existing customer to attach the session to\n\nDefault is false\n - `redirect_immediately?: boolean`\n If true, redirects the customer immediately after payment completion\n\nDefault is false\n - `require_phone_number?: boolean`\n If true, the customer must provide a phone number to complete checkout.\nRequires `allow_phone_number_collection` to also be true.\n\nDefault is false\n\n- `force_3ds?: boolean`\n Override merchant default 3DS behaviour for this session\n\n- `mandate_min_amount_inr_paise?: number`\n Override the merchant-level mandate floor (in INR paise) for INR\ne-mandates on Indian-card recurring payments. The mandate amount sent to\nthe processor is `max(this_floor, actual_billing_amount)`, so this is\neffectively the customer-facing authorization ceiling whenever billing is\nlower. When unset, the merchant setting applies; when that's also unset,\nthe system default of ₹15,000 applies.\n\n- `metadata?: object`\n Additional metadata associated with the payment. Defaults to empty if not provided.\n\n- `minimal_address?: boolean`\n If true, only zipcode is required when confirm is true; other address fields remain optional\n\n- `payment_method_id?: string`\n Optional payment method ID to use for this checkout session.\nOnly allowed when `confirm` is true.\nIf provided, existing customer id must also be provided.\n\n- `product_collection_id?: string`\n Product collection ID for collection-based checkout flow\n\n- `return_url?: string`\n The url to redirect after payment failure or success.\n\n- `short_link?: boolean`\n If true, returns a shortened checkout URL.\nDefaults to false if not specified.\n\n- `show_saved_payment_methods?: boolean`\n Display saved payment methods of a returning customer False by default\n\n- `subscription_data?: { on_demand?: { mandate_only: boolean; adaptive_currency_fees_inclusive?: boolean; product_currency?: currency; product_description?: string; product_price?: number; }; trial_period_days?: number; }`\n - `on_demand?: { mandate_only: boolean; adaptive_currency_fees_inclusive?: boolean; product_currency?: string; product_description?: string; product_price?: number; }`\n - `trial_period_days?: number`\n Optional trial period in days If specified, this value overrides the trial period set in the product's price Must be between 0 and 10000 days\n\n- `tax_id?: string`\n Tax ID for the customer (e.g. VAT number). Requires billing_address with country.\n\n### Returns\n\n- `{ billing_country: string; currency: string; current_breakup: { discount: number; subtotal: number; total_amount: number; tax?: number; }; is_byop: boolean; product_cart: { credit_entitlements: { credit_entitlement_id: string; credit_entitlement_name: string; credit_entitlement_unit: string; credits_amount: string; }[]; currency: string; discounted_price: number; is_subscription: boolean; is_usage_based: boolean; meters: { measurement_unit: string; name: string; price_per_unit: string; description?: string; free_threshold?: number; }[]; og_currency: string; og_price: number; product_id: string; quantity: number; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; tax_inclusive: boolean; tax_rate: number; addons?: { addon_id: string; currency: currency; discounted_price: number; name: string; og_currency: currency; og_price: number; quantity: number; tax_category: tax_category; tax_inclusive: boolean; tax_rate: number; description?: string; discount_amount?: number; tax?: number; }[]; description?: string; discount_amount?: number; discount_cycle?: number; name?: string; tax?: number; }[]; total_price: number; recurring_breakup?: { discount: number; subtotal: number; total_amount: number; tax?: number; }; tax_id_business_name?: string; tax_id_err_msg?: string; tax_id_format_name?: string; total_tax?: number; }`\n Data returned by the calculate checkout session API\n\n - `billing_country: string`\n - `currency: string`\n - `current_breakup: { discount: number; subtotal: number; total_amount: number; tax?: number; }`\n - `is_byop: boolean`\n - `product_cart: { credit_entitlements: { credit_entitlement_id: string; credit_entitlement_name: string; credit_entitlement_unit: string; credits_amount: string; }[]; currency: string; discounted_price: number; is_subscription: boolean; is_usage_based: boolean; meters: { measurement_unit: string; name: string; price_per_unit: string; description?: string; free_threshold?: number; }[]; og_currency: string; og_price: number; product_id: string; quantity: number; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; tax_inclusive: boolean; tax_rate: number; addons?: { addon_id: string; currency: string; discounted_price: number; name: string; og_currency: string; og_price: number; quantity: number; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; tax_inclusive: boolean; tax_rate: number; description?: string; discount_amount?: number; tax?: number; }[]; description?: string; discount_amount?: number; discount_cycle?: number; name?: string; tax?: number; }[]`\n - `total_price: number`\n - `recurring_breakup?: { discount: number; subtotal: number; total_amount: number; tax?: number; }`\n - `tax_id_business_name?: string`\n - `tax_id_err_msg?: string`\n - `tax_id_format_name?: string`\n - `total_tax?: number`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst response = await client.checkoutSessions.preview({ product_cart: [{ product_id: 'product_id', quantity: 0 }] });\n\nconsole.log(response);\n```",
204
+ markdown: "## preview\n\n`client.checkoutSessions.preview(product_cart: { product_id: string; quantity: number; addons?: attach_addon[]; amount?: number; credit_entitlements?: object[]; }[], allowed_payment_method_types?: string[], billing_address?: { country: country_code; city?: string; state?: string; street?: string; zipcode?: string; }, billing_currency?: string, cancel_url?: string, confirm?: boolean, custom_fields?: { field_type: 'text' | 'number' | 'email' | 'url' | 'date' | 'dropdown' | 'boolean'; key: string; label: string; options?: string[]; placeholder?: string; required?: boolean; }[], customer?: object | object, customer_business_name?: string, customization?: { force_language?: string; show_on_demand_tag?: boolean; show_order_details?: boolean; theme?: 'dark' | 'light' | 'system'; theme_config?: theme_config; }, discount_code?: string, discount_codes?: string[], feature_flags?: { allow_currency_selection?: boolean; allow_customer_editing_business_name?: boolean; allow_customer_editing_city?: boolean; allow_customer_editing_country?: boolean; allow_customer_editing_email?: boolean; allow_customer_editing_name?: boolean; allow_customer_editing_state?: boolean; allow_customer_editing_street?: boolean; allow_customer_editing_tax_id?: boolean; allow_customer_editing_zipcode?: boolean; allow_discount_code?: boolean; allow_editing_addons?: boolean; allow_phone_number_collection?: boolean; allow_tax_id?: boolean; always_create_new_customer?: boolean; redirect_immediately?: boolean; require_phone_number?: boolean; }, force_3ds?: boolean, mandate_min_amount_inr_paise?: number, metadata?: object, minimal_address?: boolean, payment_method_id?: string, product_collection_id?: string, return_url?: string, short_link?: boolean, show_saved_payment_methods?: boolean, subscription_data?: { on_demand?: on_demand_subscription; trial_period_days?: number; }, tax_id?: string): { billing_country: country_code; currency: currency; current_breakup: object; is_byop: boolean; product_cart: object[]; total_price: number; recurring_breakup?: object; tax_id_business_name?: string; tax_id_err_msg?: string; tax_id_format_name?: string; total_tax?: number; }`\n\n**post** `/checkouts/preview`\n\n### Parameters\n\n- `product_cart: { product_id: string; quantity: number; addons?: { addon_id: string; quantity: number; }[]; amount?: number; credit_entitlements?: { credit_entitlement_id: string; credits_amount: string; }[]; }[]`\n\n- `allowed_payment_method_types?: string[]`\n Customers will never see payment methods that are not in this list.\nHowever, adding a method here does not guarantee customers will see it.\nAvailability still depends on other factors (e.g., customer location, merchant settings).\n\nDisclaimar: Always provide 'credit' and 'debit' as a fallback.\nIf all payment methods are unavailable, checkout session will fail.\n\n- `billing_address?: { country: string; city?: string; state?: string; street?: string; zipcode?: string; }`\n Billing address information for the session\n - `country: string`\n Two-letter ISO country code (ISO 3166-1 alpha-2)\n - `city?: string`\n City name\n - `state?: string`\n State or province name\n - `street?: string`\n Street address including house number and unit/apartment if applicable\n - `zipcode?: string`\n Postal code or ZIP code\n\n- `billing_currency?: string`\n This field is ingored if adaptive pricing is disabled\n\n- `cancel_url?: string`\n The URL to redirect the customer if they cancel or go back from the checkout.\nIf not provided, the back button will not be displayed.\n\n- `confirm?: boolean`\n If confirm is true, all the details will be finalized. If required data is missing, an API error is thrown.\n\n- `custom_fields?: { field_type: 'text' | 'number' | 'email' | 'url' | 'date' | 'dropdown' | 'boolean'; key: string; label: string; options?: string[]; placeholder?: string; required?: boolean; }[]`\n Custom fields to collect from customer during checkout (max 5 fields)\n\n- `customer?: { customer_id: string; } | { email: string; name?: string; phone_number?: string; }`\n Customer details for the session\n\n- `customer_business_name?: string`\n Optional business / legal name associated with the tax id. When provided\ntogether with a valid tax id for a B2B purchase, this name is rendered\non the invoice instead of the customer's personal name.\n\n- `customization?: { force_language?: string; show_on_demand_tag?: boolean; show_order_details?: boolean; theme?: 'dark' | 'light' | 'system'; theme_config?: { dark?: theme_mode_config; font_primary_url?: string; font_secondary_url?: string; font_size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'; font_weight?: 'normal' | 'medium' | 'bold' | 'extraBold'; light?: theme_mode_config; pay_button_text?: string; radius?: string; }; }`\n Customization for the checkout session page\n - `force_language?: string`\n Force the checkout interface to render in a specific language (e.g. `en`, `es`)\n - `show_on_demand_tag?: boolean`\n Show on demand tag\n\nDefault is true\n - `show_order_details?: boolean`\n Show order details by default\n\nDefault is true\n - `theme?: 'dark' | 'light' | 'system'`\n Theme of the page (determines which mode - light/dark/system - to use)\n\nIf not provided, uses the business-configured theme from business_themes table.\n - `theme_config?: { dark?: { bg_primary?: string; bg_secondary?: string; border_primary?: string; border_secondary?: string; button_primary?: string; button_primary_hover?: string; button_secondary?: string; button_secondary_hover?: string; button_text_primary?: string; button_text_secondary?: string; input_focus_border?: string; text_error?: string; text_placeholder?: string; text_primary?: string; text_secondary?: string; text_success?: string; }; font_primary_url?: string; font_secondary_url?: string; font_size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'; font_weight?: 'normal' | 'medium' | 'bold' | 'extraBold'; light?: { bg_primary?: string; bg_secondary?: string; border_primary?: string; border_secondary?: string; button_primary?: string; button_primary_hover?: string; button_secondary?: string; button_secondary_hover?: string; button_text_primary?: string; button_text_secondary?: string; input_focus_border?: string; text_error?: string; text_placeholder?: string; text_primary?: string; text_secondary?: string; text_success?: string; }; pay_button_text?: string; radius?: string; }`\n Optional custom theme configuration with colors for light and dark modes\n\n- `discount_code?: string`\n DEPRECATED: Use discount_codes instead. Cannot be used together with discount_codes.\n\n- `discount_codes?: string[]`\n Stacked discount codes to apply, in order. Max 20.\nCannot be used together with discount_code.\n\n- `feature_flags?: { allow_currency_selection?: boolean; allow_customer_editing_business_name?: boolean; allow_customer_editing_city?: boolean; allow_customer_editing_country?: boolean; allow_customer_editing_email?: boolean; allow_customer_editing_name?: boolean; allow_customer_editing_state?: boolean; allow_customer_editing_street?: boolean; allow_customer_editing_tax_id?: boolean; allow_customer_editing_zipcode?: boolean; allow_discount_code?: boolean; allow_editing_addons?: boolean; allow_phone_number_collection?: boolean; allow_tax_id?: boolean; always_create_new_customer?: boolean; redirect_immediately?: boolean; require_phone_number?: boolean; }`\n - `allow_currency_selection?: boolean`\n if customer is allowed to change currency, set it to true\n\nDefault is true\n - `allow_customer_editing_business_name?: boolean`\n If true, the customer can supply or edit the business name associated\nwith the tax id during checkout. Works independently of\n`allow_customer_editing_tax_id` — either flag (or `allow_tax_id`) is\nsufficient to let the customer override the session's business name.\nTypically set together with `allow_customer_editing_tax_id`.\n\nDefault is false\n - `allow_customer_editing_city?: boolean`\n - `allow_customer_editing_country?: boolean`\n - `allow_customer_editing_email?: boolean`\n - `allow_customer_editing_name?: boolean`\n - `allow_customer_editing_state?: boolean`\n - `allow_customer_editing_street?: boolean`\n - `allow_customer_editing_tax_id?: boolean`\n - `allow_customer_editing_zipcode?: boolean`\n - `allow_discount_code?: boolean`\n If the customer is allowed to apply discount code, set it to true.\n\nDefault is true\n - `allow_editing_addons?: boolean`\n If true, the customer can add or remove addons on a subscription product\nduring checkout.\n\nDefault is false\n - `allow_phone_number_collection?: boolean`\n If phone number is collected from customer, set it to rue\n\nDefault is true\n - `allow_tax_id?: boolean`\n If the customer is allowed to add tax id, set it to true\n\nDefault is true\n - `always_create_new_customer?: boolean`\n Set to true if a new customer object should be created.\nBy default email is used to find an existing customer to attach the session to\n\nDefault is false\n - `redirect_immediately?: boolean`\n If true, redirects the customer immediately after payment completion\n\nDefault is false\n - `require_phone_number?: boolean`\n If true, the customer must provide a phone number to complete checkout.\nRequires `allow_phone_number_collection` to also be true.\n\nDefault is false\n\n- `force_3ds?: boolean`\n Override merchant default 3DS behaviour for this session\n\n- `mandate_min_amount_inr_paise?: number`\n Override the merchant-level mandate floor (in INR paise) for INR\ne-mandates on Indian-card recurring payments. The mandate amount sent to\nthe processor is `max(this_floor, actual_billing_amount)`, so this is\neffectively the customer-facing authorization ceiling whenever billing is\nlower. When unset, the merchant setting applies; when that's also unset,\nthe system default of ₹15,000 applies.\n\n- `metadata?: object`\n Additional metadata associated with the payment. Defaults to empty if not provided.\n\n- `minimal_address?: boolean`\n If true, only zipcode is required when confirm is true; other address fields remain optional\n\n- `payment_method_id?: string`\n Optional payment method ID to use for this checkout session.\nOnly allowed when `confirm` is true.\nIf provided, existing customer id must also be provided.\n\n- `product_collection_id?: string`\n Product collection ID for collection-based checkout flow\n\n- `return_url?: string`\n The url to redirect after payment failure or success.\n\n- `short_link?: boolean`\n If true, returns a shortened checkout URL.\nDefaults to false if not specified.\n\n- `show_saved_payment_methods?: boolean`\n Display saved payment methods of a returning customer False by default\n\n- `subscription_data?: { on_demand?: { mandate_only: boolean; adaptive_currency_fees_inclusive?: boolean; product_currency?: currency; product_description?: string; product_price?: number; }; trial_period_days?: number; }`\n - `on_demand?: { mandate_only: boolean; adaptive_currency_fees_inclusive?: boolean; product_currency?: string; product_description?: string; product_price?: number; }`\n - `trial_period_days?: number`\n Optional trial period in days If specified, this value overrides the trial period set in the product's price Must be between 0 and 10000 days\n\n- `tax_id?: string`\n Tax ID for the customer (e.g. VAT number). Requires billing_address with country.\n\n### Returns\n\n- `{ billing_country: string; currency: string; current_breakup: { discount: number; subtotal: number; total_amount: number; tax?: number; }; is_byop: boolean; product_cart: { credit_entitlements: { credit_entitlement_id: string; credit_entitlement_name: string; credit_entitlement_unit: string; credits_amount: string; }[]; currency: string; discounted_price: number; is_subscription: boolean; is_usage_based: boolean; meters: { measurement_unit: string; name: string; price_per_unit: string; description?: string; free_threshold?: number; }[]; og_currency: string; og_price: number; product_id: string; quantity: number; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; tax_inclusive: boolean; tax_rate: number; addons?: { addon_id: string; currency: currency; discounted_price: number; name: string; og_currency: currency; og_price: number; quantity: number; tax_category: tax_category; tax_inclusive: boolean; tax_rate: number; description?: string; discount_amount?: number; tax?: number; }[]; description?: string; discount_amount?: number; discount_cycle?: number; name?: string; tax?: number; }[]; total_price: number; recurring_breakup?: { discount: number; subtotal: number; total_amount: number; tax?: number; }; tax_id_business_name?: string; tax_id_err_msg?: string; tax_id_format_name?: string; total_tax?: number; }`\n Data returned by the calculate checkout session API\n\n - `billing_country: string`\n - `currency: string`\n - `current_breakup: { discount: number; subtotal: number; total_amount: number; tax?: number; }`\n - `is_byop: boolean`\n - `product_cart: { credit_entitlements: { credit_entitlement_id: string; credit_entitlement_name: string; credit_entitlement_unit: string; credits_amount: string; }[]; currency: string; discounted_price: number; is_subscription: boolean; is_usage_based: boolean; meters: { measurement_unit: string; name: string; price_per_unit: string; description?: string; free_threshold?: number; }[]; og_currency: string; og_price: number; product_id: string; quantity: number; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; tax_inclusive: boolean; tax_rate: number; addons?: { addon_id: string; currency: string; discounted_price: number; name: string; og_currency: string; og_price: number; quantity: number; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; tax_inclusive: boolean; tax_rate: number; description?: string; discount_amount?: number; tax?: number; }[]; description?: string; discount_amount?: number; discount_cycle?: number; name?: string; tax?: number; }[]`\n - `total_price: number`\n - `recurring_breakup?: { discount: number; subtotal: number; total_amount: number; tax?: number; }`\n - `tax_id_business_name?: string`\n - `tax_id_err_msg?: string`\n - `tax_id_format_name?: string`\n - `total_tax?: number`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst response = await client.checkoutSessions.preview({ product_cart: [{ product_id: 'product_id', quantity: 0 }] });\n\nconsole.log(response);\n```",
205
205
  perLanguage: {
206
206
  typescript: {
207
207
  method: 'client.checkoutSessions.preview',
@@ -232,7 +232,7 @@ const EMBEDDED_METHODS = [
232
232
  },
233
233
  php: {
234
234
  method: 'checkoutSessions->preview',
235
- example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(bearerToken: 'My Bearer Token', environment: 'test_mode');\n\n$response = $client->checkoutSessions->preview(\n productCart: [\n [\n 'productID' => 'product_id',\n 'quantity' => 0,\n 'addons' => [['addonID' => 'addon_id', 'quantity' => 0]],\n 'amount' => 0,\n 'creditEntitlements' => [\n [\n 'creditEntitlementID' => 'credit_entitlement_id',\n 'creditsAmount' => 'credits_amount',\n ],\n ],\n ],\n ],\n allowedPaymentMethodTypes: [PaymentMethodTypes::ACH],\n billingAddress: [\n 'country' => CountryCode::AF,\n 'city' => 'city',\n 'state' => 'state',\n 'street' => 'street',\n 'zipcode' => 'zipcode',\n ],\n billingCurrency: Currency::AED,\n cancelURL: 'cancel_url',\n confirm: true,\n customFields: [\n [\n 'fieldType' => 'text',\n 'key' => 'key',\n 'label' => 'label',\n 'options' => ['string'],\n 'placeholder' => 'placeholder',\n 'required' => true,\n ],\n ],\n customer: ['customerID' => 'customer_id'],\n customerBusinessName: 'customer_business_name',\n customization: [\n 'forceLanguage' => 'force_language',\n 'showOnDemandTag' => true,\n 'showOrderDetails' => true,\n 'theme' => 'dark',\n 'themeConfig' => [\n 'dark' => [\n 'bgPrimary' => 'bg_primary',\n 'bgSecondary' => 'bg_secondary',\n 'borderPrimary' => 'border_primary',\n 'borderSecondary' => 'border_secondary',\n 'buttonPrimary' => 'button_primary',\n 'buttonPrimaryHover' => 'button_primary_hover',\n 'buttonSecondary' => 'button_secondary',\n 'buttonSecondaryHover' => 'button_secondary_hover',\n 'buttonTextPrimary' => 'button_text_primary',\n 'buttonTextSecondary' => 'button_text_secondary',\n 'inputFocusBorder' => 'input_focus_border',\n 'textError' => 'text_error',\n 'textPlaceholder' => 'text_placeholder',\n 'textPrimary' => 'text_primary',\n 'textSecondary' => 'text_secondary',\n 'textSuccess' => 'text_success',\n ],\n 'fontPrimaryURL' => 'font_primary_url',\n 'fontSecondaryURL' => 'font_secondary_url',\n 'fontSize' => 'xs',\n 'fontWeight' => 'normal',\n 'light' => [\n 'bgPrimary' => 'bg_primary',\n 'bgSecondary' => 'bg_secondary',\n 'borderPrimary' => 'border_primary',\n 'borderSecondary' => 'border_secondary',\n 'buttonPrimary' => 'button_primary',\n 'buttonPrimaryHover' => 'button_primary_hover',\n 'buttonSecondary' => 'button_secondary',\n 'buttonSecondaryHover' => 'button_secondary_hover',\n 'buttonTextPrimary' => 'button_text_primary',\n 'buttonTextSecondary' => 'button_text_secondary',\n 'inputFocusBorder' => 'input_focus_border',\n 'textError' => 'text_error',\n 'textPlaceholder' => 'text_placeholder',\n 'textPrimary' => 'text_primary',\n 'textSecondary' => 'text_secondary',\n 'textSuccess' => 'text_success',\n ],\n 'payButtonText' => 'pay_button_text',\n 'radius' => 'radius',\n ],\n ],\n discountCode: 'discount_code',\n discountCodes: ['string'],\n featureFlags: [\n 'allowCurrencySelection' => true,\n 'allowCustomerEditingBusinessName' => true,\n 'allowCustomerEditingCity' => true,\n 'allowCustomerEditingCountry' => true,\n 'allowCustomerEditingEmail' => true,\n 'allowCustomerEditingName' => true,\n 'allowCustomerEditingState' => true,\n 'allowCustomerEditingStreet' => true,\n 'allowCustomerEditingTaxID' => true,\n 'allowCustomerEditingZipcode' => true,\n 'allowDiscountCode' => true,\n 'allowPhoneNumberCollection' => true,\n 'allowTaxID' => true,\n 'alwaysCreateNewCustomer' => true,\n 'redirectImmediately' => true,\n 'requirePhoneNumber' => true,\n ],\n force3DS: true,\n mandateMinAmountInrPaise: 0,\n metadata: ['foo' => 'string'],\n minimalAddress: true,\n paymentMethodID: 'payment_method_id',\n productCollectionID: 'product_collection_id',\n returnURL: 'return_url',\n shortLink: true,\n showSavedPaymentMethods: true,\n subscriptionData: [\n 'onDemand' => [\n 'mandateOnly' => true,\n 'adaptiveCurrencyFeesInclusive' => true,\n 'productCurrency' => Currency::AED,\n 'productDescription' => 'product_description',\n 'productPrice' => 0,\n ],\n 'trialPeriodDays' => 0,\n ],\n taxID: 'tax_id',\n);\n\nvar_dump($response);",
235
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(bearerToken: 'My Bearer Token', environment: 'test_mode');\n\n$response = $client->checkoutSessions->preview(\n productCart: [\n [\n 'productID' => 'product_id',\n 'quantity' => 0,\n 'addons' => [['addonID' => 'addon_id', 'quantity' => 0]],\n 'amount' => 0,\n 'creditEntitlements' => [\n [\n 'creditEntitlementID' => 'credit_entitlement_id',\n 'creditsAmount' => 'credits_amount',\n ],\n ],\n ],\n ],\n allowedPaymentMethodTypes: [PaymentMethodTypes::ACH],\n billingAddress: [\n 'country' => CountryCode::AF,\n 'city' => 'city',\n 'state' => 'state',\n 'street' => 'street',\n 'zipcode' => 'zipcode',\n ],\n billingCurrency: Currency::AED,\n cancelURL: 'cancel_url',\n confirm: true,\n customFields: [\n [\n 'fieldType' => 'text',\n 'key' => 'key',\n 'label' => 'label',\n 'options' => ['string'],\n 'placeholder' => 'placeholder',\n 'required' => true,\n ],\n ],\n customer: ['customerID' => 'customer_id'],\n customerBusinessName: 'customer_business_name',\n customization: [\n 'forceLanguage' => 'force_language',\n 'showOnDemandTag' => true,\n 'showOrderDetails' => true,\n 'theme' => 'dark',\n 'themeConfig' => [\n 'dark' => [\n 'bgPrimary' => 'bg_primary',\n 'bgSecondary' => 'bg_secondary',\n 'borderPrimary' => 'border_primary',\n 'borderSecondary' => 'border_secondary',\n 'buttonPrimary' => 'button_primary',\n 'buttonPrimaryHover' => 'button_primary_hover',\n 'buttonSecondary' => 'button_secondary',\n 'buttonSecondaryHover' => 'button_secondary_hover',\n 'buttonTextPrimary' => 'button_text_primary',\n 'buttonTextSecondary' => 'button_text_secondary',\n 'inputFocusBorder' => 'input_focus_border',\n 'textError' => 'text_error',\n 'textPlaceholder' => 'text_placeholder',\n 'textPrimary' => 'text_primary',\n 'textSecondary' => 'text_secondary',\n 'textSuccess' => 'text_success',\n ],\n 'fontPrimaryURL' => 'font_primary_url',\n 'fontSecondaryURL' => 'font_secondary_url',\n 'fontSize' => 'xs',\n 'fontWeight' => 'normal',\n 'light' => [\n 'bgPrimary' => 'bg_primary',\n 'bgSecondary' => 'bg_secondary',\n 'borderPrimary' => 'border_primary',\n 'borderSecondary' => 'border_secondary',\n 'buttonPrimary' => 'button_primary',\n 'buttonPrimaryHover' => 'button_primary_hover',\n 'buttonSecondary' => 'button_secondary',\n 'buttonSecondaryHover' => 'button_secondary_hover',\n 'buttonTextPrimary' => 'button_text_primary',\n 'buttonTextSecondary' => 'button_text_secondary',\n 'inputFocusBorder' => 'input_focus_border',\n 'textError' => 'text_error',\n 'textPlaceholder' => 'text_placeholder',\n 'textPrimary' => 'text_primary',\n 'textSecondary' => 'text_secondary',\n 'textSuccess' => 'text_success',\n ],\n 'payButtonText' => 'pay_button_text',\n 'radius' => 'radius',\n ],\n ],\n discountCode: 'discount_code',\n discountCodes: ['string'],\n featureFlags: [\n 'allowCurrencySelection' => true,\n 'allowCustomerEditingBusinessName' => true,\n 'allowCustomerEditingCity' => true,\n 'allowCustomerEditingCountry' => true,\n 'allowCustomerEditingEmail' => true,\n 'allowCustomerEditingName' => true,\n 'allowCustomerEditingState' => true,\n 'allowCustomerEditingStreet' => true,\n 'allowCustomerEditingTaxID' => true,\n 'allowCustomerEditingZipcode' => true,\n 'allowDiscountCode' => true,\n 'allowEditingAddons' => true,\n 'allowPhoneNumberCollection' => true,\n 'allowTaxID' => true,\n 'alwaysCreateNewCustomer' => true,\n 'redirectImmediately' => true,\n 'requirePhoneNumber' => true,\n ],\n force3DS: true,\n mandateMinAmountInrPaise: 0,\n metadata: ['foo' => 'string'],\n minimalAddress: true,\n paymentMethodID: 'payment_method_id',\n productCollectionID: 'product_collection_id',\n returnURL: 'return_url',\n shortLink: true,\n showSavedPaymentMethods: true,\n subscriptionData: [\n 'onDemand' => [\n 'mandateOnly' => true,\n 'adaptiveCurrencyFeesInclusive' => true,\n 'productCurrency' => Currency::AED,\n 'productDescription' => 'product_description',\n 'productPrice' => 0,\n ],\n 'trialPeriodDays' => 0,\n ],\n taxID: 'tax_id',\n);\n\nvar_dump($response);",
236
236
  },
237
237
  csharp: {
238
238
  method: 'CheckoutSessions.Preview',
@@ -2904,7 +2904,7 @@ const EMBEDDED_METHODS = [
2904
2904
  "pricing_mode?: 'by_currency' | 'by_country';",
2905
2905
  ],
2906
2906
  response: "{ brand_id: string; business_id: string; created_at: string; credit_entitlements: object[]; entitlements: object[]; is_recurring: boolean; license_key_enabled: boolean; metadata: object; price: object | object | object; product_id: string; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; updated_at: string; addons?: string[]; description?: string; digital_product_delivery?: object; image?: string; license_key_activation_message?: string; license_key_activations_limit?: number; license_key_duration?: object; name?: string; pricing_mode?: 'by_currency' | 'by_country'; product_collection_id?: string; }",
2907
- markdown: "## create\n\n`client.products.create(name: string, price: { currency: currency; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: currency; discount: number; payment_frequency_count: number; payment_frequency_interval: time_interval; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: currency; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: time_interval; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'usage_based_price'; meters?: add_meter_to_price[]; tax_inclusive?: boolean; }, tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech', addons?: string[], brand_id?: string, credit_entitlements?: { credit_entitlement_id: string; credits_amount: string; currency?: currency; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_behavior?: cbb_overage_behavior; overage_enabled?: boolean; overage_limit?: string; price_per_unit?: string; proration_behavior?: cbb_proration_behavior; rollover_enabled?: boolean; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: time_interval; trial_credits?: string; trial_credits_expire_after_trial?: boolean; }[], description?: string, digital_product_delivery?: { external_url?: string; instructions?: string; }, entitlements?: { entitlement_id: string; }[], license_key_activation_message?: string, license_key_activations_limit?: number, license_key_duration?: { count: number; interval: time_interval; }, license_key_enabled?: boolean, metadata?: object, pricing_mode?: 'by_currency' | 'by_country'): { brand_id: string; business_id: string; created_at: string; credit_entitlements: credit_entitlement_mapping_response[]; entitlements: product_entitlement_summary[]; is_recurring: boolean; license_key_enabled: boolean; metadata: metadata; price: price; product_id: string; tax_category: tax_category; updated_at: string; addons?: string[]; description?: string; digital_product_delivery?: digital_product_delivery; image?: string; license_key_activation_message?: string; license_key_activations_limit?: number; license_key_duration?: license_key_duration; name?: string; pricing_mode?: pricing_mode; product_collection_id?: string; }`\n\n**post** `/products`\n\n### Parameters\n\n- `name: string`\n Name of the product\n\n- `price: { currency: string; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: string; discount: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: string; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'usage_based_price'; meters?: { meter_id: string; credit_entitlement_id?: string; description?: string; free_threshold?: number; measurement_unit?: string; meter_units_per_credit?: string; name?: string; price_per_unit?: string; }[]; tax_inclusive?: boolean; }`\n Price configuration for the product\n\n- `tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'`\n Tax category applied to this product\n\n- `addons?: string[]`\n Addons available for subscription product\n\n- `brand_id?: string`\n Brand id for the product, if not provided will default to primary brand\n\n- `credit_entitlements?: { credit_entitlement_id: string; credits_amount: string; currency?: string; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_behavior?: 'forgive_at_reset' | 'invoice_at_billing' | 'carry_deficit' | 'carry_deficit_auto_repay'; overage_enabled?: boolean; overage_limit?: string; price_per_unit?: string; proration_behavior?: 'prorate' | 'no_prorate'; rollover_enabled?: boolean; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: 'Day' | 'Week' | 'Month' | 'Year'; trial_credits?: string; trial_credits_expire_after_trial?: boolean; }[]`\n Optional credit entitlements to attach (max 5)\n\n- `description?: string`\n Optional description of the product\n\n- `digital_product_delivery?: { external_url?: string; instructions?: string; }`\n Choose how you would like you digital product delivered\n\ndeprecated: use entitlements instead\n - `external_url?: string`\n External URL to digital product\n - `instructions?: string`\n Instructions to download and use the digital product\n\n- `entitlements?: { entitlement_id: string; }[]`\n Optional entitlements to attach to this product (max 50)\n\n- `license_key_activation_message?: string`\n Optional message displayed during license key activation\n\ndeprecated: use entitlements instead. Ignored when a `license_key`\nentitlement is attached via the `entitlements` field.\n\n- `license_key_activations_limit?: number`\n The number of times the license key can be activated.\nMust be 0 or greater\n\ndeprecated: use entitlements instead. Ignored when a `license_key`\nentitlement is attached via the `entitlements` field.\n\n- `license_key_duration?: { count: number; interval: 'Day' | 'Week' | 'Month' | 'Year'; }`\n Duration configuration for the license key.\nSet to null if you don't want the license key to expire.\nFor subscriptions, the lifetime of the license key is tied to the subscription period\n\ndeprecated: use entitlements instead. Ignored when a `license_key`\nentitlement is attached via the `entitlements` field.\n - `count: number`\n - `interval: 'Day' | 'Week' | 'Month' | 'Year'`\n\n- `license_key_enabled?: boolean`\n When true, generates and sends a license key to your customer.\nDefaults to false\n\ndeprecated: use entitlements instead. If a `license_key` entitlement is\nalso attached via the `entitlements` field, the `license_key_*` config\nfields below are ignored — the attached entitlement's config is the\nsource of truth.\n\n- `metadata?: object`\n Additional metadata for the product\n\n- `pricing_mode?: 'by_currency' | 'by_country'`\n Pricing mode for localized pricing. When set, rules from\n/products/{id}/localized-prices apply at checkout. NULL means base-only\n(existing behavior).\n\n### Returns\n\n- `{ brand_id: string; business_id: string; created_at: string; credit_entitlements: { id: string; credit_entitlement_id: string; credit_entitlement_name: string; credit_entitlement_unit: string; credits_amount: string; overage_behavior: cbb_overage_behavior; overage_enabled: boolean; proration_behavior: cbb_proration_behavior; rollover_enabled: boolean; trial_credits_expire_after_trial: boolean; currency?: currency; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_limit?: string; price_per_unit?: string; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: time_interval; trial_credits?: string; }[]; entitlements: { id: string; integration_config: integration_config_response; integration_type: entitlement_integration_type; name: string; description?: string; }[]; is_recurring: boolean; license_key_enabled: boolean; metadata: object; price: { currency: currency; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: currency; discount: number; payment_frequency_count: number; payment_frequency_interval: time_interval; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: currency; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: time_interval; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'usage_based_price'; meters?: add_meter_to_price[]; tax_inclusive?: boolean; }; product_id: string; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; updated_at: string; addons?: string[]; description?: string; digital_product_delivery?: { files: digital_product_delivery_file[]; external_url?: string; instructions?: string; }; image?: string; license_key_activation_message?: string; license_key_activations_limit?: number; license_key_duration?: { count: number; interval: time_interval; }; name?: string; pricing_mode?: 'by_currency' | 'by_country'; product_collection_id?: string; }`\n\n - `brand_id: string`\n - `business_id: string`\n - `created_at: string`\n - `credit_entitlements: { id: string; credit_entitlement_id: string; credit_entitlement_name: string; credit_entitlement_unit: string; credits_amount: string; overage_behavior: 'forgive_at_reset' | 'invoice_at_billing' | 'carry_deficit' | 'carry_deficit_auto_repay'; overage_enabled: boolean; proration_behavior: 'prorate' | 'no_prorate'; rollover_enabled: boolean; trial_credits_expire_after_trial: boolean; currency?: string; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_limit?: string; price_per_unit?: string; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: 'Day' | 'Week' | 'Month' | 'Year'; trial_credits?: string; }[]`\n - `entitlements: { id: string; integration_config: { permission: github_permission; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: object; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: time_interval; fulfillment_mode?: 'auto' | 'manual'; }; integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key'; name: string; description?: string; }[]`\n - `is_recurring: boolean`\n - `license_key_enabled: boolean`\n - `metadata: object`\n - `price: { currency: string; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: string; discount: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: string; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'usage_based_price'; meters?: { meter_id: string; credit_entitlement_id?: string; description?: string; free_threshold?: number; measurement_unit?: string; meter_units_per_credit?: string; name?: string; price_per_unit?: string; }[]; tax_inclusive?: boolean; }`\n - `product_id: string`\n - `tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'`\n - `updated_at: string`\n - `addons?: string[]`\n - `description?: string`\n - `digital_product_delivery?: { files: { download_url: string; expires_in: number; file_id: string; filename: string; content_type?: string; file_size?: number; }[]; external_url?: string; instructions?: string; }`\n - `image?: string`\n - `license_key_activation_message?: string`\n - `license_key_activations_limit?: number`\n - `license_key_duration?: { count: number; interval: 'Day' | 'Week' | 'Month' | 'Year'; }`\n - `name?: string`\n - `pricing_mode?: 'by_currency' | 'by_country'`\n - `product_collection_id?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst product = await client.products.create({\n name: 'name',\n price: {\n currency: 'AED',\n discount: 0,\n price: 0,\n purchasing_power_parity: true,\n type: 'one_time_price',\n},\n tax_category: 'digital_products',\n});\n\nconsole.log(product);\n```",
2907
+ markdown: "## create\n\n`client.products.create(name: string, price: { currency: currency; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: currency; discount: number; payment_frequency_count: number; payment_frequency_interval: time_interval; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: currency; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: time_interval; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'usage_based_price'; meters?: add_meter_to_price[]; tax_inclusive?: boolean; }, tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech', addons?: string[], brand_id?: string, credit_entitlements?: { credit_entitlement_id: string; credits_amount: string; currency?: currency; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_behavior?: cbb_overage_behavior; overage_enabled?: boolean; overage_limit?: string; price_per_unit?: string; proration_behavior?: cbb_proration_behavior; rollover_enabled?: boolean; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: time_interval; trial_credits?: string; trial_credits_expire_after_trial?: boolean; }[], description?: string, digital_product_delivery?: { external_url?: string; instructions?: string; }, entitlements?: { entitlement_id: string; }[], license_key_activation_message?: string, license_key_activations_limit?: number, license_key_duration?: { count: number; interval: time_interval; }, license_key_enabled?: boolean, metadata?: object, pricing_mode?: 'by_currency' | 'by_country'): { brand_id: string; business_id: string; created_at: string; credit_entitlements: credit_entitlement_mapping_response[]; entitlements: product_entitlement_summary[]; is_recurring: boolean; license_key_enabled: boolean; metadata: metadata; price: price; product_id: string; tax_category: tax_category; updated_at: string; addons?: string[]; description?: string; digital_product_delivery?: digital_product_delivery; image?: string; license_key_activation_message?: string; license_key_activations_limit?: number; license_key_duration?: license_key_duration; name?: string; pricing_mode?: pricing_mode; product_collection_id?: string; }`\n\n**post** `/products`\n\n### Parameters\n\n- `name: string`\n Name of the product\n\n- `price: { currency: string; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: string; discount: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: string; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'usage_based_price'; meters?: { meter_id: string; credit_entitlement_id?: string; description?: string; free_threshold?: number; measurement_unit?: string; meter_units_per_credit?: string; name?: string; price_per_unit?: string; }[]; tax_inclusive?: boolean; }`\n Price configuration for the product\n\n- `tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'`\n Tax category applied to this product\n\n- `addons?: string[]`\n Addons available for subscription product\n\n- `brand_id?: string`\n Brand id for the product, if not provided will default to primary brand\n\n- `credit_entitlements?: { credit_entitlement_id: string; credits_amount: string; currency?: string; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_behavior?: 'forgive_at_reset' | 'invoice_at_billing' | 'carry_deficit' | 'carry_deficit_auto_repay'; overage_enabled?: boolean; overage_limit?: string; price_per_unit?: string; proration_behavior?: 'prorate' | 'no_prorate'; rollover_enabled?: boolean; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: 'Day' | 'Week' | 'Month' | 'Year'; trial_credits?: string; trial_credits_expire_after_trial?: boolean; }[]`\n Optional credit entitlements to attach (max 5)\n\n- `description?: string`\n Optional description of the product\n\n- `digital_product_delivery?: { external_url?: string; instructions?: string; }`\n Choose how you would like you digital product delivered\n\ndeprecated: use entitlements instead\n - `external_url?: string`\n External URL to digital product\n - `instructions?: string`\n Instructions to download and use the digital product\n\n- `entitlements?: { entitlement_id: string; }[]`\n Optional entitlements to attach to this product (max 50)\n\n- `license_key_activation_message?: string`\n Optional message displayed during license key activation\n\ndeprecated: use entitlements instead. Ignored when a `license_key`\nentitlement is attached via the `entitlements` field.\n\n- `license_key_activations_limit?: number`\n The number of times the license key can be activated.\nMust be 0 or greater\n\ndeprecated: use entitlements instead. Ignored when a `license_key`\nentitlement is attached via the `entitlements` field.\n\n- `license_key_duration?: { count: number; interval: 'Day' | 'Week' | 'Month' | 'Year'; }`\n Duration configuration for the license key.\nSet to null if you don't want the license key to expire.\nFor subscriptions, the lifetime of the license key is tied to the subscription period\n\ndeprecated: use entitlements instead. Ignored when a `license_key`\nentitlement is attached via the `entitlements` field.\n - `count: number`\n - `interval: 'Day' | 'Week' | 'Month' | 'Year'`\n Unit of a duration count (e.g. license-key validity period).\n\n- `license_key_enabled?: boolean`\n When true, generates and sends a license key to your customer.\nDefaults to false\n\ndeprecated: use entitlements instead. If a `license_key` entitlement is\nalso attached via the `entitlements` field, the `license_key_*` config\nfields below are ignored — the attached entitlement's config is the\nsource of truth.\n\n- `metadata?: object`\n Additional metadata for the product\n\n- `pricing_mode?: 'by_currency' | 'by_country'`\n Pricing mode for localized pricing. When set, rules from\n/products/{id}/localized-prices apply at checkout. NULL means base-only\n(existing behavior).\n\n### Returns\n\n- `{ brand_id: string; business_id: string; created_at: string; credit_entitlements: { id: string; credit_entitlement_id: string; credit_entitlement_name: string; credit_entitlement_unit: string; credits_amount: string; overage_behavior: cbb_overage_behavior; overage_enabled: boolean; proration_behavior: cbb_proration_behavior; rollover_enabled: boolean; trial_credits_expire_after_trial: boolean; currency?: currency; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_limit?: string; price_per_unit?: string; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: time_interval; trial_credits?: string; }[]; entitlements: { id: string; integration_config: integration_config_response; integration_type: entitlement_integration_type; name: string; description?: string; }[]; is_recurring: boolean; license_key_enabled: boolean; metadata: object; price: { currency: currency; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: currency; discount: number; payment_frequency_count: number; payment_frequency_interval: time_interval; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: currency; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: time_interval; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'usage_based_price'; meters?: add_meter_to_price[]; tax_inclusive?: boolean; }; product_id: string; tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'; updated_at: string; addons?: string[]; description?: string; digital_product_delivery?: { files: digital_product_delivery_file[]; external_url?: string; instructions?: string; }; image?: string; license_key_activation_message?: string; license_key_activations_limit?: number; license_key_duration?: { count: number; interval: time_interval; }; name?: string; pricing_mode?: 'by_currency' | 'by_country'; product_collection_id?: string; }`\n\n - `brand_id: string`\n - `business_id: string`\n - `created_at: string`\n - `credit_entitlements: { id: string; credit_entitlement_id: string; credit_entitlement_name: string; credit_entitlement_unit: string; credits_amount: string; overage_behavior: 'forgive_at_reset' | 'invoice_at_billing' | 'carry_deficit' | 'carry_deficit_auto_repay'; overage_enabled: boolean; proration_behavior: 'prorate' | 'no_prorate'; rollover_enabled: boolean; trial_credits_expire_after_trial: boolean; currency?: string; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_limit?: string; price_per_unit?: string; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: 'Day' | 'Week' | 'Month' | 'Year'; trial_credits?: string; }[]`\n - `entitlements: { id: string; integration_config: { permission: github_permission; target_id: string; } | { guild_id: string; role_id?: string; } | { chat_id: string; } | { figma_file_id: string; } | { framer_template_id: string; } | { notion_template_id: string; } | { digital_files: object; } | { activation_message?: string; activations_limit?: number; duration_count?: number; duration_interval?: time_interval; fulfillment_mode?: 'auto' | 'manual'; }; integration_type: 'discord' | 'telegram' | 'github' | 'figma' | 'framer' | 'notion' | 'digital_files' | 'license_key'; name: string; description?: string; }[]`\n - `is_recurring: boolean`\n - `license_key_enabled: boolean`\n - `metadata: object`\n - `price: { currency: string; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: string; discount: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: string; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'usage_based_price'; meters?: { meter_id: string; credit_entitlement_id?: string; description?: string; free_threshold?: number; measurement_unit?: string; meter_units_per_credit?: string; name?: string; price_per_unit?: string; }[]; tax_inclusive?: boolean; }`\n - `product_id: string`\n - `tax_category: 'digital_products' | 'saas' | 'e_book' | 'edtech'`\n - `updated_at: string`\n - `addons?: string[]`\n - `description?: string`\n - `digital_product_delivery?: { files: { download_url: string; expires_in: number; file_id: string; filename: string; content_type?: string; file_size?: number; }[]; external_url?: string; instructions?: string; }`\n - `image?: string`\n - `license_key_activation_message?: string`\n - `license_key_activations_limit?: number`\n - `license_key_duration?: { count: number; interval: 'Day' | 'Week' | 'Month' | 'Year'; }`\n - `name?: string`\n - `pricing_mode?: 'by_currency' | 'by_country'`\n - `product_collection_id?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst product = await client.products.create({\n name: 'name',\n price: {\n currency: 'AED',\n discount: 0,\n price: 0,\n purchasing_power_parity: true,\n type: 'one_time_price',\n},\n tax_category: 'digital_products',\n});\n\nconsole.log(product);\n```",
2908
2908
  perLanguage: {
2909
2909
  typescript: {
2910
2910
  method: 'client.products.create',
@@ -3019,7 +3019,7 @@ const EMBEDDED_METHODS = [
3019
3019
  "pricing_mode?: 'by_currency' | 'by_country';",
3020
3020
  "tax_category?: 'digital_products' | 'saas' | 'e_book' | 'edtech';",
3021
3021
  ],
3022
- markdown: "## update\n\n`client.products.update(id: string, addons?: string[], brand_id?: string, credit_entitlements?: { credit_entitlement_id: string; credits_amount: string; currency?: currency; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_behavior?: cbb_overage_behavior; overage_enabled?: boolean; overage_limit?: string; price_per_unit?: string; proration_behavior?: cbb_proration_behavior; rollover_enabled?: boolean; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: time_interval; trial_credits?: string; trial_credits_expire_after_trial?: boolean; }[], description?: string, digital_product_delivery?: { external_url?: string; files?: string[]; instructions?: string; }, entitlements?: { entitlement_id: string; }[], image_id?: string, license_key_activation_message?: string, license_key_activations_limit?: number, license_key_duration?: { count: number; interval: time_interval; }, license_key_enabled?: boolean, metadata?: object, name?: string, price?: { currency: currency; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: currency; discount: number; payment_frequency_count: number; payment_frequency_interval: time_interval; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: currency; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: time_interval; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'usage_based_price'; meters?: add_meter_to_price[]; tax_inclusive?: boolean; }, pricing_mode?: 'by_currency' | 'by_country', tax_category?: 'digital_products' | 'saas' | 'e_book' | 'edtech'): void`\n\n**patch** `/products/{id}`\n\n### Parameters\n\n- `id: string`\n\n- `addons?: string[]`\n Available Addons for subscription products\n\n- `brand_id?: string`\n\n- `credit_entitlements?: { credit_entitlement_id: string; credits_amount: string; currency?: string; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_behavior?: 'forgive_at_reset' | 'invoice_at_billing' | 'carry_deficit' | 'carry_deficit_auto_repay'; overage_enabled?: boolean; overage_limit?: string; price_per_unit?: string; proration_behavior?: 'prorate' | 'no_prorate'; rollover_enabled?: boolean; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: 'Day' | 'Week' | 'Month' | 'Year'; trial_credits?: string; trial_credits_expire_after_trial?: boolean; }[]`\n Credit entitlements to update (replaces all existing when present)\nSend empty array to remove all, omit field to leave unchanged\n\n- `description?: string`\n Description of the product, optional and must be at most 1000 characters.\n\n- `digital_product_delivery?: { external_url?: string; files?: string[]; instructions?: string; }`\n Choose how you would like you digital product delivered\n\ndeprecated: use entitlements instead\n - `external_url?: string`\n External URL to digital product\n - `files?: string[]`\n Uploaded files ids of digital product\n - `instructions?: string`\n Instructions to download and use the digital product\n\n- `entitlements?: { entitlement_id: string; }[]`\n Entitlements to attach (replaces all existing when present)\nSend empty array to remove all, omit field to leave unchanged\n\n- `image_id?: string`\n Product image id after its uploaded to S3\n\n- `license_key_activation_message?: string`\n Message sent to the customer upon license key activation.\n\nOnly applicable if `license_key_enabled` is `true`. This message contains instructions for\nactivating the license key.\n\ndeprecated: use entitlements instead\n\n- `license_key_activations_limit?: number`\n Limit for the number of activations for the license key.\n\nOnly applicable if `license_key_enabled` is `true`. Represents the maximum number of times\nthe license key can be activated.\n\ndeprecated: use entitlements instead\n\n- `license_key_duration?: { count: number; interval: 'Day' | 'Week' | 'Month' | 'Year'; }`\n Duration of the license key if enabled.\n\nOnly applicable if `license_key_enabled` is `true`. Represents the duration in days for which\nthe license key is valid.\n\ndeprecated: use entitlements instead\n - `count: number`\n - `interval: 'Day' | 'Week' | 'Month' | 'Year'`\n\n- `license_key_enabled?: boolean`\n Whether the product requires a license key.\n\nIf `true`, additional fields related to license key (duration, activations limit, activation message)\nbecome applicable.\n\ndeprecated: use entitlements instead\n\n- `metadata?: object`\n Additional metadata for the product\n\n- `name?: string`\n Name of the product, optional and must be at most 100 characters.\n\n- `price?: { currency: string; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: string; discount: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: string; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'usage_based_price'; meters?: { meter_id: string; credit_entitlement_id?: string; description?: string; free_threshold?: number; measurement_unit?: string; meter_units_per_credit?: string; name?: string; price_per_unit?: string; }[]; tax_inclusive?: boolean; }`\n Price details of the product.\n\n- `pricing_mode?: 'by_currency' | 'by_country'`\n Update the pricing mode. Omit to leave unchanged; set to null to clear\n(which archives all active localized rules for this product). Changing\nto a different non-null mode also archives any rules whose mode doesn't\nmatch the new mode.\n\n- `tax_category?: 'digital_products' | 'saas' | 'e_book' | 'edtech'`\n Tax category of the product.\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nawait client.products.update('pdt_R8AWMPiV8RyJElcCKvAID')\n```",
3022
+ markdown: "## update\n\n`client.products.update(id: string, addons?: string[], brand_id?: string, credit_entitlements?: { credit_entitlement_id: string; credits_amount: string; currency?: currency; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_behavior?: cbb_overage_behavior; overage_enabled?: boolean; overage_limit?: string; price_per_unit?: string; proration_behavior?: cbb_proration_behavior; rollover_enabled?: boolean; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: time_interval; trial_credits?: string; trial_credits_expire_after_trial?: boolean; }[], description?: string, digital_product_delivery?: { external_url?: string; files?: string[]; instructions?: string; }, entitlements?: { entitlement_id: string; }[], image_id?: string, license_key_activation_message?: string, license_key_activations_limit?: number, license_key_duration?: { count: number; interval: time_interval; }, license_key_enabled?: boolean, metadata?: object, name?: string, price?: { currency: currency; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: currency; discount: number; payment_frequency_count: number; payment_frequency_interval: time_interval; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: currency; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: time_interval; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: time_interval; type: 'usage_based_price'; meters?: add_meter_to_price[]; tax_inclusive?: boolean; }, pricing_mode?: 'by_currency' | 'by_country', tax_category?: 'digital_products' | 'saas' | 'e_book' | 'edtech'): void`\n\n**patch** `/products/{id}`\n\n### Parameters\n\n- `id: string`\n\n- `addons?: string[]`\n Available Addons for subscription products\n\n- `brand_id?: string`\n\n- `credit_entitlements?: { credit_entitlement_id: string; credits_amount: string; currency?: string; expires_after_days?: number; low_balance_threshold_percent?: number; max_rollover_count?: number; overage_behavior?: 'forgive_at_reset' | 'invoice_at_billing' | 'carry_deficit' | 'carry_deficit_auto_repay'; overage_enabled?: boolean; overage_limit?: string; price_per_unit?: string; proration_behavior?: 'prorate' | 'no_prorate'; rollover_enabled?: boolean; rollover_percentage?: number; rollover_timeframe_count?: number; rollover_timeframe_interval?: 'Day' | 'Week' | 'Month' | 'Year'; trial_credits?: string; trial_credits_expire_after_trial?: boolean; }[]`\n Credit entitlements to update (replaces all existing when present)\nSend empty array to remove all, omit field to leave unchanged\n\n- `description?: string`\n Description of the product, optional and must be at most 1000 characters.\n\n- `digital_product_delivery?: { external_url?: string; files?: string[]; instructions?: string; }`\n Choose how you would like you digital product delivered\n\ndeprecated: use entitlements instead\n - `external_url?: string`\n External URL to digital product\n - `files?: string[]`\n Uploaded files ids of digital product\n - `instructions?: string`\n Instructions to download and use the digital product\n\n- `entitlements?: { entitlement_id: string; }[]`\n Entitlements to attach (replaces all existing when present)\nSend empty array to remove all, omit field to leave unchanged\n\n- `image_id?: string`\n Product image id after its uploaded to S3\n\n- `license_key_activation_message?: string`\n Message sent to the customer upon license key activation.\n\nOnly applicable if `license_key_enabled` is `true`. This message contains instructions for\nactivating the license key.\n\ndeprecated: use entitlements instead\n\n- `license_key_activations_limit?: number`\n Limit for the number of activations for the license key.\n\nOnly applicable if `license_key_enabled` is `true`. Represents the maximum number of times\nthe license key can be activated.\n\ndeprecated: use entitlements instead\n\n- `license_key_duration?: { count: number; interval: 'Day' | 'Week' | 'Month' | 'Year'; }`\n Duration of the license key if enabled.\n\nOnly applicable if `license_key_enabled` is `true`. Represents the duration in days for which\nthe license key is valid.\n\ndeprecated: use entitlements instead\n - `count: number`\n - `interval: 'Day' | 'Week' | 'Month' | 'Year'`\n Unit of a duration count (e.g. license-key validity period).\n\n- `license_key_enabled?: boolean`\n Whether the product requires a license key.\n\nIf `true`, additional fields related to license key (duration, activations limit, activation message)\nbecome applicable.\n\ndeprecated: use entitlements instead\n\n- `metadata?: object`\n Additional metadata for the product\n\n- `name?: string`\n Name of the product, optional and must be at most 100 characters.\n\n- `price?: { currency: string; discount: number; price: number; purchasing_power_parity: boolean; type: 'one_time_price'; pay_what_you_want?: boolean; suggested_price?: number; tax_inclusive?: boolean; } | { currency: string; discount: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; price: number; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'recurring_price'; tax_inclusive?: boolean; trial_period_days?: number; } | { currency: string; discount: number; fixed_price: number; payment_frequency_count: number; payment_frequency_interval: 'Day' | 'Week' | 'Month' | 'Year'; purchasing_power_parity: boolean; subscription_period_count: number; subscription_period_interval: 'Day' | 'Week' | 'Month' | 'Year'; type: 'usage_based_price'; meters?: { meter_id: string; credit_entitlement_id?: string; description?: string; free_threshold?: number; measurement_unit?: string; meter_units_per_credit?: string; name?: string; price_per_unit?: string; }[]; tax_inclusive?: boolean; }`\n Price details of the product.\n\n- `pricing_mode?: 'by_currency' | 'by_country'`\n Update the pricing mode. Omit to leave unchanged; set to null to clear\n(which archives all active localized rules for this product). Changing\nto a different non-null mode also archives any rules whose mode doesn't\nmatch the new mode.\n\n- `tax_category?: 'digital_products' | 'saas' | 'e_book' | 'edtech'`\n Tax category of the product.\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nawait client.products.update('pdt_R8AWMPiV8RyJElcCKvAID')\n```",
3023
3023
  perLanguage: {
3024
3024
  typescript: {
3025
3025
  method: 'client.products.update',