stripity_stripe v2.2.3 Stripe.Session View Source
Work with Stripe Checkout Session objects.
You can:
- Create a new session
Stripe API reference: https://stripe.com/docs/api/checkout/sessions
Link to this section Summary
Link to this section Types
Link to this type
capture_method()
View Source
capture_method()
View Source
capture_method() :: :automatic | :manual
capture_method() :: :automatic | :manual
Link to this type
create_params()
View Source
create_params()
View Source
create_params() :: %{
:cancel_url => String.t(),
:payment_method_types => [String.t()],
:success_url => String.t(),
optional(:client_reference_id) => String.t(),
optional(:customer_email) => String.t(),
optional(:line_items) => [line_item()],
optional(:locale) => String.t(),
optional(:payment_intent_data) => payment_intent_data(),
optional(:subscription_data) => subscription_data()
}
create_params() :: %{
:cancel_url => String.t(),
:payment_method_types => [String.t()],
:success_url => String.t(),
optional(:client_reference_id) => String.t(),
optional(:customer_email) => String.t(),
optional(:line_items) => [line_item()],
optional(:locale) => String.t(),
optional(:payment_intent_data) => payment_intent_data(),
optional(:subscription_data) => subscription_data()
}
Link to this type
item() View Source
Link to this type
line_item() View Source
Link to this type
payment_intent_data()
View Source
payment_intent_data()
View Source
payment_intent_data() :: %{
optional(:application_fee_amount) => integer(),
optional(:capture_method) => capture_method(),
optional(:description) => String.t(),
optional(:metadata) => Stripe.Types.metadata(),
optional(:on_behalf_of) => String.t(),
optional(:receipt_email) => String.t(),
optional(:shipping) => Stripe.Types.shipping(),
optional(:statement_descriptor) => String.t(),
optional(:transfer_data) => transfer_data()
}
payment_intent_data() :: %{
optional(:application_fee_amount) => integer(),
optional(:capture_method) => capture_method(),
optional(:description) => String.t(),
optional(:metadata) => Stripe.Types.metadata(),
optional(:on_behalf_of) => String.t(),
optional(:receipt_email) => String.t(),
optional(:shipping) => Stripe.Types.shipping(),
optional(:statement_descriptor) => String.t(),
optional(:transfer_data) => transfer_data()
}
Link to this type
subscription_data()
View Source
subscription_data()
View Source
subscription_data() :: %{
items: [item()],
metadata: Stripe.Types.metadata(),
trial_end: integer(),
trial_period_days: integer()
}
subscription_data() :: %{
items: [item()],
metadata: Stripe.Types.metadata(),
trial_end: integer(),
trial_period_days: integer()
}
Link to this type
transfer_data()
View Source
transfer_data()
View Source
transfer_data() :: %{destination: String.t()}
transfer_data() :: %{destination: String.t()}
Link to this section Functions
Link to this function
create(params, opts \\ [])
View Source
create(params, opts \\ [])
View Source
create(create_params(), Stripe.options()) ::
{:ok, t()} | {:error, Stripe.Error.t()}
create(create_params(), Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()}