Payment creation and inspection.
Summary
Types
Parameters for payments_create. Exact fields use atom keys; string-keyed and mixed-key maps remain supported. Source: locked upstream resources/payments.ts declaration PaymentCreateParams.
Parameters for payments_list. Exact fields use atom keys; string-keyed and mixed-key maps remain supported. Source: locked upstream resources/payments.ts declaration PaymentListParams.
Functions
Calls Dodo operation payments_create (POST /payments). Required parameters: :billing, :customer, :product_cart.
Calls Dodo operation payments_create (POST /payments). Required parameters: :billing, :customer, :product_cart.
Calls Dodo operation payments_list (GET /payments). Required parameters: none. Numbered pagination is zero-based.
Calls Dodo operation payments_list (GET /payments). Required parameters: none. Numbered pagination is zero-based.
Calls Dodo operation payments_list (GET /payments). Required parameters: none. Numbered pagination is zero-based.
Calls Dodo operation payment_line_items_list (GET /payments/{payment_id}/line-items). Required parameters: none.
Calls Dodo operation payments_retrieve (GET /payments/{payment_id}). Required parameters: none.
Types
@type create_params() :: %{ :billing => DodoPayments.RequestTypes.billing_address(), :customer => DodoPayments.RequestTypes.customer_request(), :product_cart => [DodoPayments.RequestTypes.one_time_product_cart_item()], optional(:adaptive_currency_fees_inclusive) => boolean(), optional(:allowed_payment_method_types) => [ DodoPayments.Enums.payment_method_type() ], optional(:billing_currency) => DodoPayments.Enums.currency(), optional(:customer_business_name) => String.t(), optional(:discount_code) => String.t(), optional(:discount_codes) => [String.t()], optional(:force_3ds) => boolean(), optional(:metadata) => DodoPayments.RequestTypes.flat_metadata(), optional(:payment_link) => boolean(), optional(:payment_method_id) => String.t(), optional(:redirect_immediately) => boolean(), optional(:require_phone_number) => boolean(), optional(:return_url) => String.t(), optional(:short_link) => boolean(), optional(:show_saved_payment_methods) => boolean(), optional(:tax_id) => String.t(), optional(String.t()) => DodoPayments.RequestTypes.input_value() } | DodoPayments.RequestTypes.compatibility_params()
Parameters for payments_create. Exact fields use atom keys; string-keyed and mixed-key maps remain supported. Source: locked upstream resources/payments.ts declaration PaymentCreateParams.
@type list_params() :: %{ optional(:page_number) => number(), optional(:page_size) => number(), optional(:brand_id) => String.t(), optional(:created_at_gte) => String.t(), optional(:created_at_lte) => String.t(), optional(:currency) => DodoPayments.Enums.currency(), optional(:customer_id) => String.t(), optional(:product_id) => String.t(), optional(:status) => DodoPayments.Enums.intent_status(), optional(:subscription_id) => String.t(), optional(String.t()) => DodoPayments.RequestTypes.input_value() } | DodoPayments.RequestTypes.compatibility_params()
Parameters for payments_list. Exact fields use atom keys; string-keyed and mixed-key maps remain supported. Source: locked upstream resources/payments.ts declaration PaymentListParams.
Functions
@spec create(DodoPayments.Client.t(), create_params()) :: {:ok, DodoPayments.PaymentCreateResponse.t()} | {:error, Exception.t()}
Calls Dodo operation payments_create (POST /payments). Required parameters: :billing, :customer, :product_cart.
API parameters must be supplied as a map.
@spec create(DodoPayments.Client.t(), create_params(), keyword()) :: {:ok, DodoPayments.PaymentCreateResponse.t() | DodoPayments.Response.t(DodoPayments.PaymentCreateResponse.t())} | {:error, Exception.t()}
Calls Dodo operation payments_create (POST /payments). Required parameters: :billing, :customer, :product_cart.
The final argument contains request-local options.
@spec list(DodoPayments.Client.t()) :: {:ok, DodoPayments.Page.Numbered.t(DodoPayments.Payment.t())} | {:error, Exception.t()}
Calls Dodo operation payments_list (GET /payments). Required parameters: none. Numbered pagination is zero-based.
Calls the operation with an empty parameter map.
@spec list(DodoPayments.Client.t(), list_params() | nil | keyword()) :: {:ok, DodoPayments.Page.Numbered.t(DodoPayments.Payment.t()) | DodoPayments.Response.t( DodoPayments.Page.Numbered.t(DodoPayments.Payment.t()) )} | {:error, Exception.t()}
Calls Dodo operation payments_list (GET /payments). Required parameters: none. Numbered pagination is zero-based.
Pass a map for Dodo parameters or a keyword list for request-local options.
@spec list(DodoPayments.Client.t(), list_params() | nil, keyword()) :: {:ok, DodoPayments.Page.Numbered.t(DodoPayments.Payment.t()) | DodoPayments.Response.t( DodoPayments.Page.Numbered.t(DodoPayments.Payment.t()) )} | {:error, Exception.t()}
Calls Dodo operation payments_list (GET /payments). Required parameters: none. Numbered pagination is zero-based.
Accepts both a Dodo parameter map and request-local options.
@spec list_line_items(DodoPayments.Client.t(), String.t() | integer(), keyword()) :: {:ok, DodoPayments.PaymentLineItemsResponse.t() | DodoPayments.Response.t(DodoPayments.PaymentLineItemsResponse.t())} | {:error, Exception.t()}
Calls Dodo operation payment_line_items_list (GET /payments/{payment_id}/line-items). Required parameters: none.
Options are request-local.
@spec retrieve(DodoPayments.Client.t(), String.t() | integer(), keyword()) :: {:ok, DodoPayments.Payment.t() | DodoPayments.Response.t(DodoPayments.Payment.t())} | {:error, Exception.t()}
Calls Dodo operation payments_retrieve (GET /payments/{payment_id}). Required parameters: none.
Options are request-local.