Moov.Cards (Moov v1.0.0)

Copy Markdown View Source

Link and manage cards as payment sources.

See https://docs.moov.io/api/sources/cards/.

Summary

Functions

Disables a linked card.

Retrieves a single linked card.

Links a card to an account.

Lists an account's linked cards.

Updates a card, e.g. its billing address after the card account updater reports a change.

Functions

disable(client, account_id, card_id)

@spec disable(Moov.Client.t(), String.t(), String.t()) ::
  {:ok, term()} | {:error, Moov.Error.t()}

Disables a linked card.

get(client, account_id, card_id)

@spec get(Moov.Client.t(), String.t(), String.t()) ::
  {:ok, map()} | {:error, Moov.Error.t()}

Retrieves a single linked card.

link(client, account_id, params)

@spec link(Moov.Client.t(), String.t(), map()) ::
  {:ok, map()} | {:error, Moov.Error.t()}

Links a card to an account.

params: :card_number, :card_cvv, :expiration (%{month: "01", year: "28"}), :holder_name, :billing_address, or :card_on_file token from Moov.js if you collected card data client-side (recommended, to keep raw PANs out of your servers / PCI scope).

list(client, account_id, opts \\ [])

@spec list(Moov.Client.t(), String.t(), keyword()) ::
  {:ok, [map()]} | {:error, Moov.Error.t()}

Lists an account's linked cards.

update(client, account_id, card_id, params)

@spec update(Moov.Client.t(), String.t(), String.t(), map()) ::
  {:ok, map()} | {:error, Moov.Error.t()}

Updates a card, e.g. its billing address after the card account updater reports a change.