Compile-time request type metadata for the public resource API.
The field catalogue is extracted from the declarations in the source-locked
dodopayments 2.47.0 npm package. It describes the parameter map
accepted by each operation; path parameters are removed when a public
endpoint type is emitted.
Elixir typespecs cannot express a required literal string key. Generated endpoint types therefore expose the exact atom-keyed fields for editor and Dialyzer help and include a compatibility branch for the string and mixed atom/string maps accepted by the runtime.
Summary
Types
Subscription add-on request.
Billing address used by payment and subscription creation.
Credit entitlement override on a checkout product item.
A custom field collected during checkout.
Checkout page customization.
Product cart item used by checkout session creation and preview.
Feature switches accepted by checkout session creation and preview.
Subscription overrides supplied to a checkout session.
Custom light/dark theme configuration for checkout.
Color values for one checkout theme mode.
A product group supplied while creating a product collection.
A product membership entry inside a product-collection group.
Compatibility shape for string-keyed and mixed-key parameter maps.
Controls whether customer credit may be used or purchased for a charge.
Existing- or new-customer request used by checkout flows.
Request to disable on-demand charging at a future billing date.
Per-currency option for a discount.
Integration-specific entitlement configuration.
Flat metadata object declared by the upstream request schemas.
A nested request object key accepted by the request codec.
A recursively encodable request object.
A value accepted by the request codec.
Fixed validity period for deprecated product-level license keys.
Meter aggregation configuration.
Recursive meter filter; Dodo accepts at most three nesting levels.
One leaf condition in a meter filter.
On-demand subscription authorization and initial-charge settings.
One-time product cart item used by payment and subscription creation.
One-time product price configuration.
Credit-entitlement settings attached to a product.
Deprecated digital-delivery settings accepted on product creation.
Deprecated digital-delivery settings accepted on product update.
An entitlement attached to a product.
One usage meter attached to a usage-based product price.
Product price union accepted by product create and update.
Recurring product price configuration.
One line item in a partial-refund request.
String-valued object used for webhook data and static checkout parameters.
Credit-entitlement settings updated on a subscription.
New or existing payment method selection for a subscription.
Usage-based product price configuration.
One usage event accepted by the bulk ingest endpoint.
Types
@type attach_addon() :: %{ :addon_id => String.t(), :quantity => number(), optional(String.t()) => input_value() } | compatibility_params()
Subscription add-on request.
@type billing_address() :: %{ :country => DodoPayments.Enums.country_code(), optional(:city) => String.t(), optional(:state) => String.t(), optional(:street) => String.t(), optional(:zipcode) => String.t(), optional(String.t()) => input_value() } | compatibility_params()
Billing address used by payment and subscription creation.
@type checkout_credit_entitlement() :: %{ :credit_entitlement_id => String.t(), :credits_amount => String.t(), optional(String.t()) => input_value() } | compatibility_params()
Credit entitlement override on a checkout product item.
@type checkout_custom_field() :: %{ :field_type => DodoPayments.Enums.custom_field_type(), :key => String.t(), :label => String.t(), optional(:options) => [String.t()], optional(:placeholder) => String.t(), optional(:required) => boolean(), optional(String.t()) => input_value() } | compatibility_params()
A custom field collected during checkout.
@type checkout_customization() :: %{ optional(:force_language) => String.t(), optional(:show_on_demand_tag) => boolean(), optional(:show_order_details) => boolean(), optional(:theme) => DodoPayments.Enums.checkout_theme(), optional(:theme_config) => checkout_theme_config(), optional(String.t()) => input_value() } | compatibility_params()
Checkout page customization.
@type checkout_product_item() :: %{ :product_id => String.t(), :quantity => number(), optional(:addons) => [attach_addon()], optional(:amount) => number(), optional(:credit_entitlements) => [checkout_credit_entitlement()], optional(String.t()) => input_value() } | compatibility_params()
Product cart item used by checkout session creation and preview.
@type checkout_session_flags() :: %{ optional(:allow_currency_selection) => boolean(), optional(:allow_customer_editing_business_name) => boolean(), optional(:allow_customer_editing_city) => boolean(), optional(:allow_customer_editing_country) => boolean(), optional(:allow_customer_editing_email) => boolean(), optional(:allow_customer_editing_name) => boolean(), optional(:allow_customer_editing_state) => boolean(), optional(:allow_customer_editing_street) => boolean(), optional(:allow_customer_editing_tax_id) => boolean(), optional(:allow_customer_editing_zipcode) => boolean(), optional(:allow_discount_code) => boolean(), optional(:allow_editing_addons) => boolean(), optional(:allow_phone_number_collection) => boolean(), optional(:allow_tax_id) => boolean(), optional(:always_create_new_customer) => boolean(), optional(:redirect_immediately) => boolean(), optional(:require_phone_number) => boolean(), optional(:single_page) => boolean(), optional(String.t()) => input_value() } | compatibility_params()
Feature switches accepted by checkout session creation and preview.
@type checkout_subscription_data() :: %{ optional(:on_demand) => on_demand_subscription(), optional(:trial_period_days) => number(), optional(String.t()) => input_value() } | compatibility_params()
Subscription overrides supplied to a checkout session.
@type checkout_theme_config() :: %{ optional(:dark) => checkout_theme_mode(), optional(:font_primary_url) => String.t(), optional(:font_secondary_url) => String.t(), optional(:font_size) => DodoPayments.Enums.font_size(), optional(:font_weight) => DodoPayments.Enums.font_weight(), optional(:light) => checkout_theme_mode(), optional(:pay_button_text) => String.t(), optional(:radius) => String.t(), optional(String.t()) => input_value() } | compatibility_params()
Custom light/dark theme configuration for checkout.
@type checkout_theme_mode() :: %{ optional(:bg_primary) => String.t(), optional(:bg_secondary) => String.t(), optional(:border_primary) => String.t(), optional(:border_secondary) => String.t(), optional(:button_primary) => String.t(), optional(:button_primary_hover) => String.t(), optional(:button_secondary) => String.t(), optional(:button_secondary_hover) => String.t(), optional(:button_text_primary) => String.t(), optional(:button_text_secondary) => String.t(), optional(:input_focus_border) => String.t(), optional(:text_error) => String.t(), optional(:text_placeholder) => String.t(), optional(:text_primary) => String.t(), optional(:text_secondary) => String.t(), optional(:text_success) => String.t(), optional(String.t()) => input_value() } | compatibility_params()
Color values for one checkout theme mode.
@type collection_group() :: %{ :products => [collection_group_product()], optional(:group_name) => String.t(), optional(:status) => boolean(), optional(String.t()) => input_value() } | compatibility_params()
A product group supplied while creating a product collection.
@type collection_group_product() :: %{ :product_id => String.t(), optional(:status) => boolean(), optional(String.t()) => input_value() } | compatibility_params()
A product membership entry inside a product-collection group.
@type compatibility_params() :: %{optional(atom() | String.t()) => input_value()}
Compatibility shape for string-keyed and mixed-key parameter maps.
@type customer_balance_config() :: %{ optional(:allow_customer_credits_purchase) => boolean(), optional(:allow_customer_credits_usage) => boolean(), optional(String.t()) => input_value() } | compatibility_params()
Controls whether customer credit may be used or purchased for a charge.
@type customer_request() :: %{:customer_id => String.t(), optional(String.t()) => input_value()} | %{ :email => String.t(), optional(:name) => String.t(), optional(:phone_number) => String.t(), optional(String.t()) => input_value() } | compatibility_params()
Existing- or new-customer request used by checkout flows.
@type disable_on_demand() :: %{:next_billing_date => String.t(), optional(String.t()) => input_value()} | compatibility_params()
Request to disable on-demand charging at a future billing date.
@type discount_currency_option() :: %{ :currency => DodoPayments.Enums.currency(), optional(:is_default) => boolean(), optional(:max_amount_possible) => number(), optional(:minimum_subtotal) => number(), optional(String.t()) => input_value() } | compatibility_params()
Per-currency option for a discount.
@type entitlement_integration_config() :: %{ :feature_id => String.t(), :feature_type => DodoPayments.Enums.feature_type(), optional(String.t()) => input_value() } | %{ :permission => DodoPayments.Enums.github_permission(), :target_id => String.t(), optional(String.t()) => input_value() } | %{ :guild_id => String.t(), optional(:role_id) => String.t(), optional(String.t()) => input_value() } | %{:chat_id => String.t(), optional(String.t()) => input_value()} | %{:figma_file_id => String.t(), optional(String.t()) => input_value()} | %{:framer_template_id => String.t(), optional(String.t()) => input_value()} | %{:notion_template_id => String.t(), optional(String.t()) => input_value()} | %{ :digital_file_ids => [String.t()], optional(:external_url) => String.t(), optional(:instructions) => String.t(), optional(:legacy_file_ids) => [String.t()], optional(String.t()) => input_value() } | %{ optional(:activation_message) => String.t(), optional(:activations_limit) => number(), optional(:duration_count) => number(), optional(:duration_interval) => DodoPayments.Enums.time_interval(), optional(:fulfillment_mode) => DodoPayments.Enums.license_fulfillment_mode(), optional(String.t()) => input_value() } | compatibility_params()
Integration-specific entitlement configuration.
Flat metadata object declared by the upstream request schemas.
A nested request object key accepted by the request codec.
@type input_object() :: %{optional(input_key()) => input_value()}
A recursively encodable request object.
@type input_value() :: nil | boolean() | number() | String.t() | atom() | Date.t() | DateTime.t() | NaiveDateTime.t() | Decimal.t() | [input_value()] | input_object()
A value accepted by the request codec.
Date, DateTime, NaiveDateTime, and Decimal values are encoded to
their wire representations before sending. Endpoint fields retain the
semantic primitive declared upstream; this broader type documents the
transport-compatible string-key and nested-map fallback.
@type license_key_duration() :: %{ :count => number(), :interval => DodoPayments.Enums.time_interval(), optional(String.t()) => input_value() } | compatibility_params()
Fixed validity period for deprecated product-level license keys.
@type meter_aggregation() :: %{ :type => DodoPayments.Enums.meter_aggregation(), optional(:key) => String.t(), optional(String.t()) => input_value() } | compatibility_params()
Meter aggregation configuration.
@type meter_filter() :: %{ :clauses => [meter_filter_condition()] | [meter_filter()], :conjunction => DodoPayments.Enums.meter_conjunction(), optional(String.t()) => input_value() } | compatibility_params()
Recursive meter filter; Dodo accepts at most three nesting levels.
@type meter_filter_condition() :: %{ :key => String.t(), :operator => DodoPayments.Enums.meter_filter_operator(), :value => String.t() | number() | boolean(), optional(String.t()) => input_value() } | compatibility_params()
One leaf condition in a meter filter.
@type on_demand_subscription() :: %{ :mandate_only => boolean(), optional(:adaptive_currency_fees_inclusive) => boolean(), optional(:product_currency) => DodoPayments.Enums.currency(), optional(:product_description) => String.t(), optional(:product_price) => number(), optional(String.t()) => input_value() } | compatibility_params()
On-demand subscription authorization and initial-charge settings.
@type one_time_product_cart_item() :: %{ :product_id => String.t(), :quantity => number(), optional(:amount) => number(), optional(String.t()) => input_value() } | compatibility_params()
One-time product cart item used by payment and subscription creation.
@type one_time_product_price() :: %{ :currency => DodoPayments.Enums.currency(), :discount => number(), :price => number(), :purchasing_power_parity => boolean(), :type => :one_time_price, optional(:pay_what_you_want) => boolean(), optional(:suggested_price) => number(), optional(:tax_inclusive) => boolean(), optional(String.t()) => input_value() } | compatibility_params()
One-time product price configuration.
@type product_credit_entitlement() :: %{ :credit_entitlement_id => String.t(), :credits_amount => String.t(), optional(:currency) => DodoPayments.Enums.currency(), optional(:expires_after_days) => number(), optional(:low_balance_threshold_percent) => number(), optional(:max_rollover_count) => number(), optional(:overage_behavior) => DodoPayments.Enums.cbb_overage_behavior(), optional(:overage_enabled) => boolean(), optional(:overage_limit) => String.t(), optional(:price_per_unit) => String.t(), optional(:proration_behavior) => DodoPayments.Enums.cbb_proration_behavior(), optional(:rollover_enabled) => boolean(), optional(:rollover_percentage) => number(), optional(:rollover_timeframe_count) => number(), optional(:rollover_timeframe_interval) => DodoPayments.Enums.time_interval(), optional(:trial_credits) => String.t(), optional(:trial_credits_expire_after_trial) => boolean(), optional(String.t()) => input_value() } | compatibility_params()
Credit-entitlement settings attached to a product.
@type product_digital_delivery_create() :: %{ optional(:external_url) => String.t(), optional(:instructions) => String.t(), optional(String.t()) => input_value() } | compatibility_params()
Deprecated digital-delivery settings accepted on product creation.
@type product_digital_delivery_update() :: %{ optional(:external_url) => String.t(), optional(:files) => [String.t()], optional(:instructions) => String.t(), optional(String.t()) => input_value() } | compatibility_params()
Deprecated digital-delivery settings accepted on product update.
@type product_entitlement() :: %{:entitlement_id => String.t(), optional(String.t()) => input_value()} | compatibility_params()
An entitlement attached to a product.
@type product_meter() :: %{ :meter_id => String.t(), optional(:credit_entitlement_id) => String.t(), optional(:description) => String.t(), optional(:free_threshold) => number(), optional(:measurement_unit) => String.t(), optional(:meter_units_per_credit) => String.t(), optional(:name) => String.t(), optional(:price_per_unit) => String.t(), optional(String.t()) => input_value() } | compatibility_params()
One usage meter attached to a usage-based product price.
@type product_price() :: one_time_product_price() | recurring_product_price() | usage_based_product_price()
Product price union accepted by product create and update.
@type recurring_product_price() :: %{ :currency => DodoPayments.Enums.currency(), :discount => number(), :payment_frequency_count => number(), :payment_frequency_interval => DodoPayments.Enums.time_interval(), :price => number(), :purchasing_power_parity => boolean(), :subscription_period_count => number(), :subscription_period_interval => DodoPayments.Enums.time_interval(), :type => :recurring_price, optional(:tax_inclusive) => boolean(), optional(:trial_amount) => number(), optional(:trial_apply_discounts) => boolean(), optional(:trial_period_days) => number(), optional(String.t()) => input_value() } | compatibility_params()
Recurring product price configuration.
@type refund_item() :: %{ :item_id => String.t(), optional(:amount) => number(), optional(:tax_inclusive) => boolean(), optional(String.t()) => input_value() } | compatibility_params()
One line item in a partial-refund request.
String-valued object used for webhook data and static checkout parameters.
@type subscription_credit_entitlement() :: %{ :credit_entitlement_id => String.t(), optional(:credits_amount) => String.t(), optional(:expires_after_days) => number(), optional(:low_balance_threshold_percent) => number(), optional(:max_rollover_count) => number(), optional(:overage_enabled) => boolean(), optional(:overage_limit) => String.t(), optional(:rollover_enabled) => boolean(), optional(:rollover_percentage) => number(), optional(:rollover_timeframe_count) => number(), optional(:rollover_timeframe_interval) => DodoPayments.Enums.time_interval(), optional(String.t()) => input_value() } | compatibility_params()
Credit-entitlement settings updated on a subscription.
@type subscription_payment_method() :: %{ :type => DodoPayments.Enums.subscription_payment_method_selection(), optional(:allowed_payment_method_types) => [ DodoPayments.Enums.payment_method_type() ], optional(:return_url) => String.t(), optional(String.t()) => input_value() } | %{ :payment_method_id => String.t(), :type => DodoPayments.Enums.subscription_payment_method_selection(), optional(String.t()) => input_value() } | compatibility_params()
New or existing payment method selection for a subscription.
@type usage_based_product_price() :: %{ :currency => DodoPayments.Enums.currency(), :discount => number(), :fixed_price => number(), :payment_frequency_count => number(), :payment_frequency_interval => DodoPayments.Enums.time_interval(), :purchasing_power_parity => boolean(), :subscription_period_count => number(), :subscription_period_interval => DodoPayments.Enums.time_interval(), :type => :usage_based_price, optional(:meters) => [product_meter()], optional(:tax_inclusive) => boolean(), optional(String.t()) => input_value() } | compatibility_params()
Usage-based product price configuration.
@type usage_event_input() :: %{ :customer_id => String.t(), :event_id => String.t(), :event_name => String.t(), optional(:metadata) => flat_metadata(), optional(:timestamp) => String.t(), optional(String.t()) => input_value() } | compatibility_params()
One usage event accepted by the bulk ingest endpoint.