Stripe.Issuing.Authorization (stripity_stripe v2.17.2) 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

Specs

pending_request() :: %{
  amount: integer(),
  currency: String.t(),
  is_amount_controllable: boolean(),
  merchant_amount: integer(),
  merchant_currency: String.t()
}

Specs

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

Specs

t() :: %Stripe.Issuing.Authorization{
  amount: integer(),
  approved: boolean(),
  authorization_method: String.t(),
  balance_transactions: Stripe.List.t(Stripe.BalanceTransaction.t()),
  card: Stripe.Issuing.Card.t(),
  cardholder: Stripe.id() | Stripe.Issuing.Cardholder.t(),
  created: Stripe.timestamp(),
  currency: String.t(),
  id: Stripe.id(),
  livemode: boolean(),
  merchant_amount: integer(),
  merchant_currency: String.t(),
  merchant_data: Stripe.Issuing.Types.merchant_data(),
  metadata: Stripe.Types.metadata(),
  object: String.t(),
  pending_request: pending_request() | nil,
  request_history: Stripe.List.t(request_history()),
  status: String.t(),
  transactions: Stripe.List.t(Stripe.Issuing.Transaction.t()),
  verification_data: verification_data(),
  wallet: String.t() | nil
}

Specs

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

Specs

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

Approve an authorization.

Specs

decline(Stripe.id() | t(), Stripe.options()) ::
  {:ok, t()} | {:error, Stripe.Error.t()}

Decline an authorization.

Link to this function

list(params \\ %{}, opts \\ [])

View Source

Specs

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

Specs

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

Specs

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

Update an authorization.