Unit.Resource.Authorization (Unit v1.0.0)

Copy Markdown View Source

Represents a card authorization — a pending card transaction that has been authorized by the card network but not yet settled.

Authorizations are created when a card is used at a merchant. They transition to a purchaseTransaction on settlement, or are reversed if declined/expired.

Statuses

  • Authorized — pending settlement
  • Completed — settled (transaction created)
  • Canceled — authorization voided
  • Declined — declined at the network level

Summary

Types

t()

@type t() :: %Unit.Resource.Authorization{
  account_id: String.t() | nil,
  amount: integer(),
  approved: boolean(),
  card_id: String.t() | nil,
  card_verification_data: map() | nil,
  created_at: DateTime.t() | nil,
  customer_id: String.t() | nil,
  digital_wallet: String.t() | nil,
  id: String.t(),
  interchange: integer() | nil,
  merchant: map() | nil,
  partial_approval_amount: integer() | nil,
  payment_id: String.t() | nil,
  payment_method: String.t() | nil,
  recurring: boolean(),
  status: String.t() | nil,
  tags: map(),
  type: String.t(),
  updated_at: DateTime.t() | nil
}