Stripe.SetupIntent (stripity_stripe v2.17.3) View Source
A SetupIntent guides you through the process of setting up a customer's payment credentials for future payments.
You can:
Link to this section Summary
Functions
A SetupIntent object can be canceled when it is in one of these statuses:
requires_payment_method
, requires_capture
, requires_confirmation
, requires_action
.
See the Stripe docs.
Confirm that your customer intends to set up the current or provided payment method. See the Stripe docs.
Creates a SetupIntent object. See the Stripe docs.
Returns a list of SetupIntents. See the Stripe docs.
Retrieves the details of a SetupIntent that has previously been created. See the Stripe docs.
Updates a SetupIntent object. See the Stripe docs.
Link to this section Types
Specs
Specs
next_action() :: %{ redirect_to_url: redirect_to_url() | nil, type: String.t(), use_stripe_sdk: map() | nil }
Specs
payment_method_options() :: %{card: payment_method_options_card() | nil}
Specs
payment_method_options_card() :: %{request_three_d_secure: String.t()}
Specs
Specs
t() :: %Stripe.SetupIntent{ application: Stripe.id() | nil, cancellation_reason: String.t() | nil, client_secret: String.t(), created: Stripe.timestamp(), customer: Stripe.id() | Stripe.Customer.t() | nil, description: String.t() | nil, id: Stripe.id(), last_setup_error: last_setup_error() | nil, latest_attempt: String.t(), livemode: boolean(), mandate: Stripe.id() | Stripe.Mandate.t() | nil, metadata: Stripe.Types.metadata(), next_action: next_action() | nil, object: String.t(), on_behalf_of: Stripe.id() | Stripe.Account.t() | nil, payment_method: Stripe.id() | Stripe.PaymentMethod.t() | nil, payment_method_options: payment_method_options() | nil, payment_method_types: [String.t()], single_use_mandate: Stripe.id() | Stripe.Mandate.t() | nil, status: String.t(), usage: String.t() }
Link to this section Functions
Specs
cancel(Stripe.id() | t(), params, Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()} when params: %{optional(:cancellation_reason) => String.t()} | %{}
A SetupIntent object can be canceled when it is in one of these statuses:
requires_payment_method
, requires_capture
, requires_confirmation
, requires_action
.
See the Stripe docs.
Specs
confirm(Stripe.id() | t(), params, Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()} when params: %{ optional(:payment_method) => Stripe.id(), optional(:payment_method_options) => payment_method_options(), optional(:return_url) => String.t() } | %{}
Confirm that your customer intends to set up the current or provided payment method. See the Stripe docs.
Specs
create(params, Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()} when params: %{ optional(:confirm) => boolean(), optional(:customer) => Stripe.id() | Stripe.Customer.t(), optional(:description) => String.t(), optional(:metadata) => map(), optional(:on_behalf_of) => Stripe.id() | Stripe.Account.t(), optional(:payment_method) => Stripe.id(), optional(:payment_method_options) => payment_method_options(), optional(:payment_method_types) => [String.t()], optional(:return_url) => String.t(), optional(:usage) => String.t() } | %{}
Creates a SetupIntent object. See the Stripe docs.
Specs
list(params, Stripe.options()) :: {:ok, Stripe.List.t(t())} | {:error, Stripe.Error.t()} when params: %{ optional(:created) => Stripe.date_query(), optional(:customer) => Stripe.id() | Stripe.Customer.t(), optional(:ending_before) => t() | Stripe.id(), optional(:limit) => 1..100, optional(:starting_after) => t() | Stripe.id() }
Returns a list of SetupIntents. See the Stripe docs.
Specs
retrieve(Stripe.id() | t(), params, Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()} when params: %{optional(:client_secret) => String.t()} | %{}
Retrieves the details of a SetupIntent that has previously been created. See the Stripe docs.
Specs
update(Stripe.id() | t(), params, Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()} when params: %{ optional(:customer) => Stripe.id() | Stripe.Customer.t(), optional(:description) => String.t(), optional(:metadata) => map(), optional(:payment_method) => Stripe.id(), optional(:payment_method_types) => [String.t()] } | %{}
Updates a SetupIntent object. See the Stripe docs.