Manage Lithic cards — virtual, physical, single-use, and merchant-locked.
Lifecycle
{:ok, card} = Lithic.Cards.create(%{type: "VIRTUAL"})
{:ok, card} = Lithic.Cards.update(card["token"], %{state: "PAUSED"})
{:ok, card} = Lithic.Cards.renew(card["token"], %{shipping_address: addr})
{:ok, card} = Lithic.Cards.reissue(card["token"], %{shipping_address: addr})
{:ok, card} = Lithic.Cards.convert_physical(card["token"], %{shipping_address: addr})Pagination / Streaming
{:ok, page} = Lithic.Cards.list(page_size: 25, state: "OPEN")
Lithic.Cards.stream() |> Enum.take(50)
Summary
Functions
Convert a virtual card to a physical card.
Create a card.
Retrieve a single card by token.
Get the balances for a card.
Get the card program for a card.
Get an embed URL for displaying card PAN/CVV without PCI scope.
Get a financial transaction on a card.
Fetch behavioral signals for a card.
Get the available spend limit for a card.
List cards with cursor-based pagination.
List card programs.
List financial transactions on a card.
Provision a card for a digital wallet (Apple Pay, Google Pay, Samsung Pay).
Reissue a physical card (replace lost/stolen).
Renew a card (generates a new PAN, keeps token).
Search for a card by PAN (primary account number).
Lazily stream all cards across pages.
Update a card.
Web push provision a card.
Functions
@spec convert_physical(String.t(), map(), keyword()) :: {:ok, map()} | {:error, Lithic.Error.t()}
Convert a virtual card to a physical card.
@spec create( map(), keyword() ) :: {:ok, map()} | {:error, Lithic.Error.t()}
Create a card.
Required: type — "VIRTUAL", "PHYSICAL", "MERCHANT_LOCKED", "SINGLE_USE".
@spec get( String.t(), keyword() ) :: {:ok, map()} | {:error, Lithic.Error.t()}
Retrieve a single card by token.
@spec get_balance( String.t(), keyword() ) :: {:ok, map()} | {:error, Lithic.Error.t()}
Get the balances for a card.
@spec get_card_program( String.t(), keyword() ) :: {:ok, map()} | {:error, Lithic.Error.t()}
Get the card program for a card.
@spec get_embed_url(String.t(), map(), keyword()) :: {:ok, map()} | {:error, Lithic.Error.t()}
Get an embed URL for displaying card PAN/CVV without PCI scope.
@spec get_financial_transaction(String.t(), String.t(), keyword()) :: {:ok, map()} | {:error, Lithic.Error.t()}
Get a financial transaction on a card.
@spec get_signals( String.t(), keyword() ) :: {:ok, map()} | {:error, Lithic.Error.t()}
Fetch behavioral signals for a card.
@spec get_spend_limit( String.t(), keyword() ) :: {:ok, map()} | {:error, Lithic.Error.t()}
Get the available spend limit for a card.
@spec list(keyword()) :: {:ok, Lithic.Page.t(map())} | {:error, Lithic.Error.t()}
List cards with cursor-based pagination.
Options: page_size, starting_after, ending_before, state, account_token.
@spec list_card_programs(keyword()) :: {:ok, Lithic.Page.t(map())} | {:error, Lithic.Error.t()}
List card programs.
@spec list_financial_transactions( String.t(), keyword() ) :: {:ok, Lithic.Page.t(map())} | {:error, Lithic.Error.t()}
List financial transactions on a card.
@spec provision(String.t(), map(), keyword()) :: {:ok, map()} | {:error, Lithic.Error.t()}
Provision a card for a digital wallet (Apple Pay, Google Pay, Samsung Pay).
@spec reissue(String.t(), map(), keyword()) :: {:ok, map()} | {:error, Lithic.Error.t()}
Reissue a physical card (replace lost/stolen).
@spec renew(String.t(), map(), keyword()) :: {:ok, map()} | {:error, Lithic.Error.t()}
Renew a card (generates a new PAN, keeps token).
@spec search_by_pan( String.t(), keyword() ) :: {:ok, map()} | {:error, Lithic.Error.t()}
Search for a card by PAN (primary account number).
@spec stream(keyword()) :: Enumerable.t()
Lazily stream all cards across pages.
@spec update(String.t(), map(), keyword()) :: {:ok, map()} | {:error, Lithic.Error.t()}
Update a card.
@spec web_push_provision(String.t(), map(), keyword()) :: {:ok, map()} | {:error, Lithic.Error.t()}
Web push provision a card.