stripity_stripe v2.7.0 Stripe.Issuing.Authorization View Source

Work with Stripe Issuing authorization objects.

You can:

  • Retrieve an authorization
  • Update an authorization
  • Approve an authorization
  • Decline an authorization
  • List all authorizations

Stripe API reference: https://stripe.com/docs/api/issuing/authorizations

Link to this section Summary

Functions

Approve an authorization.

Decline an authorization.

List all authorizations.

Retrieve an authorization.

Update an authorization.

Link to this section Types

Link to this type

request_history() View Source
request_history() :: %{
  approved: boolean(),
  authorized_amount: integer(),
  authorized_currency: String.t(),
  created: Stripe.timestamp(),
  held_amount: integer(),
  held_currency: String.t(),
  reason: String.t()
}

Link to this type

t() View Source
t() :: %Stripe.Issuing.Authorization{
  approved: boolean(),
  authorization_method: String.t(),
  authorized_amount: integer(),
  authorized_currency: String.t() | nil,
  balance_transactions: Stripe.List.t(Stripe.BalanceTransaction.t()),
  card: Stripe.Issuing.Card.t(),
  cardholder: Stripe.id() | Stripe.Issuing.Cardholder.t(),
  created: Stripe.timestamp(),
  held_amount: integer(),
  held_currency: String.t() | nil,
  id: Stripe.id(),
  is_held_amount_controllable: boolean(),
  livemode: boolean(),
  merchant_data: Stripe.Issuing.Types.merchant_data(),
  metadata: Stripe.Types.metadata(),
  object: String.t(),
  pending_authorized_amount: integer(),
  pending_held_amount: integer(),
  request_history: Stripe.List.t(request_history()),
  status: String.t(),
  transactions: Stripe.List.t(Stripe.Issuing.Transaction.t()),
  verification_data: verification_data(),
  wallet_provider: String.t() | nil
}

Link to this type

verification_data() View Source
verification_data() :: %{
  address_line1_check: String.t(),
  address_zip_check: String.t(),
  cvc_check: String.t()
}

Link to this section Functions

Link to this function

approve(id, params \\ %{}, opts \\ []) View Source
approve(Stripe.id() | t(), params, Stripe.options()) ::
  {:ok, t()} | {:error, Stripe.Error.t()}
when params: %{optional(:held_amount) => non_neg_integer()} | %{}

Approve an authorization.

Link to this function

decline(id, opts \\ []) View Source
decline(Stripe.id() | t(), Stripe.options()) ::
  {:ok, t()} | {:error, Stripe.Error.t()}

Decline an authorization.

Link to this function

list(params \\ %{}, opts \\ []) View Source
list(params, Stripe.options()) ::
  {:ok, Stripe.List.t(t())} | {:error, Stripe.Error.t()}
when params:
       %{
         optional(:card) => Stripe.Issuing.Card.t() | Stripe.id(),
         optional(:cardholder) => Stripe.Issuing.Cardholder.t() | Stripe.id(),
         optional(:created) => String.t() | Stripe.date_query(),
         optional(:ending_before) => t() | Stripe.id(),
         optional(:limit) => 1..100,
         optional(:starting_after) => t() | Stripe.id(),
         optional(:status) => String.t()
       }
       | %{}

List all authorizations.

Link to this function

retrieve(id, opts \\ []) View Source
retrieve(Stripe.id() | t(), Stripe.options()) ::
  {:ok, t()} | {:error, Stripe.Error.t()}

Retrieve an authorization.

Link to this function

update(id, params, opts \\ []) View Source
update(Stripe.id() | t(), params, Stripe.options()) ::
  {:ok, t()} | {:error, Stripe.Error.t()}
when params: %{optional(:metadata) => Stripe.Types.metadata()} | %{}

Update an authorization.