View Source Stripe.Issuing.Authorization (Striped v0.4.0)

When an issued card is used to make a purchase, an Issuing Authorization object is created. Authorizations must be approved for the purchase to be completed successfully.

Related guide: Issued Card Authorizations.

Link to this section Summary

Types

t()

The issuing.authorization type.

Functions

Approves a pending Issuing Authorization object. This request should be made within the timeout window of the real-time authorization flow.

Declines a pending Issuing Authorization object. This request should be made within the timeout window of the real time authorization flow.

Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

Retrieves an Issuing Authorization object.

Updates the specified Issuing Authorization object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Link to this section Types

@type created() :: %{
  optional(:gt) => integer(),
  optional(:gte) => integer(),
  optional(:lt) => integer(),
  optional(:lte) => integer()
}
@type t() :: %Stripe.Issuing.Authorization{
  amount: integer(),
  amount_details: term() | nil,
  approved: boolean(),
  authorization_method: binary(),
  balance_transactions: term(),
  card: Stripe.Issuing.Card.t(),
  cardholder: (binary() | Stripe.Issuing.Cardholder.t()) | nil,
  created: integer(),
  currency: binary(),
  id: binary(),
  livemode: boolean(),
  merchant_amount: integer(),
  merchant_currency: binary(),
  merchant_data: term(),
  metadata: term(),
  network_data: term() | nil,
  object: binary(),
  pending_request: term() | nil,
  request_history: term(),
  status: binary(),
  transactions: term(),
  treasury: term() | nil,
  verification_data: term(),
  wallet: binary() | nil
}

The issuing.authorization type.

  • amount The total amount that was authorized or rejected. This amount is in the card's currency and in the smallest currency unit.
  • amount_details Detailed breakdown of amount components. These amounts are denominated in currency and in the smallest currency unit.
  • approved Whether the authorization has been approved.
  • authorization_method How the card details were provided.
  • balance_transactions List of balance transactions associated with this authorization.
  • card
  • cardholder The cardholder to whom this authorization belongs.
  • created Time at which the object was created. Measured in seconds since the Unix epoch.
  • currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
  • id Unique identifier for the object.
  • livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
  • merchant_amount The total amount that was authorized or rejected. This amount is in the merchant_currency and in the smallest currency unit.
  • merchant_currency The currency that was presented to the cardholder for the authorization. Three-letter ISO currency code, in lowercase. Must be a supported currency.
  • merchant_data
  • metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
  • network_data Details about the authorization, such as identifiers, set by the card network.
  • object String representing the object's type. Objects of the same type share the same value.
  • pending_request The pending authorization request. This field will only be non-null during an issuing_authorization.request webhook.
  • request_history History of every time pending_request was approved/denied, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization.
  • status The current status of the authorization in its lifecycle.
  • transactions List of transactions associated with this authorization.
  • treasury Treasury details related to this authorization if it was created on a FinancialAccount.
  • verification_data
  • wallet The digital wallet used for this authorization. One of apple_pay, google_pay, or samsung_pay.

Link to this section Functions

Link to this function

approve(client, authorization, params \\ %{}, opts \\ [])

View Source
@spec approve(
  client :: Stripe.t(),
  authorization :: binary(),
  params :: %{
    optional(:amount) => integer(),
    optional(:expand) => [binary()],
    optional(:metadata) => %{optional(binary()) => binary()} | binary()
  },
  opts :: Keyword.t()
) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Approves a pending Issuing Authorization object. This request should be made within the timeout window of the real-time authorization flow.

Details

  • Method: post
  • Path: /v1/issuing/authorizations/{authorization}/approve
Link to this function

decline(client, authorization, params \\ %{}, opts \\ [])

View Source
@spec decline(
  client :: Stripe.t(),
  authorization :: binary(),
  params :: %{
    optional(:expand) => [binary()],
    optional(:metadata) => %{optional(binary()) => binary()} | binary()
  },
  opts :: Keyword.t()
) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Declines a pending Issuing Authorization object. This request should be made within the timeout window of the real time authorization flow.

Details

  • Method: post
  • Path: /v1/issuing/authorizations/{authorization}/decline
Link to this function

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

View Source
@spec list(
  client :: Stripe.t(),
  params :: %{
    optional(:card) => binary(),
    optional(:cardholder) => binary(),
    optional(:created) => created() | integer(),
    optional(:ending_before) => binary(),
    optional(:expand) => [binary()],
    optional(:limit) => integer(),
    optional(:starting_after) => binary(),
    optional(:status) => :closed | :pending | :reversed
  },
  opts :: Keyword.t()
) ::
  {:ok, Stripe.List.t(t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

Details

  • Method: get
  • Path: /v1/issuing/authorizations
Link to this function

retrieve(client, authorization, params \\ %{}, opts \\ [])

View Source
@spec retrieve(
  client :: Stripe.t(),
  authorization :: binary(),
  params :: %{optional(:expand) => [binary()]},
  opts :: Keyword.t()
) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Retrieves an Issuing Authorization object.

Details

  • Method: get
  • Path: /v1/issuing/authorizations/{authorization}
Link to this function

update(client, authorization, params \\ %{}, opts \\ [])

View Source
@spec update(
  client :: Stripe.t(),
  authorization :: binary(),
  params :: %{
    optional(:expand) => [binary()],
    optional(:metadata) => %{optional(binary()) => binary()} | binary()
  },
  opts :: Keyword.t()
) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Updates the specified Issuing Authorization object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Details

  • Method: post
  • Path: /v1/issuing/authorizations/{authorization}