Marqeta.TokenizationAsAService (marqeta v1.0.0)

Copy Markdown View Source

Use Marqeta's tokenization infrastructure even when Marqeta is not your issuer-processor (TaaS).

Summary

Functions

Creates a new TaaS token.

Creates a new TaaS token. Raises Marqeta.Error on failure.

Retrieves a TaaS token by token.

Retrieves a TaaS token by token. Raises Marqeta.Error on failure.

Lists TaaS token resources.

Lists TaaS token resources. Raises Marqeta.Error on failure.

Retrieves tokenization status for a token.

Returns a lazy Stream that auto-paginates TaaS token resources.

Submits a tokenization request.

Functions

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

@spec create(
  map(),
  keyword()
) :: {:ok, map()} | {:error, Marqeta.Error.t()}

Creates a new TaaS token.

Returns {:ok, map()} on success, {:error, %Marqeta.Error{}} on failure.

create!(params \\ %{}, opts \\ [])

@spec create!(
  map(),
  keyword()
) :: map()

Creates a new TaaS token. Raises Marqeta.Error on failure.

get(token, opts \\ [])

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

Retrieves a TaaS token by token.

Returns {:ok, map()} on success, {:error, %Marqeta.Error{}} on failure.

get!(token, opts \\ [])

@spec get!(
  String.t(),
  keyword()
) :: map()

Retrieves a TaaS token by token. Raises Marqeta.Error on failure.

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

@spec list(
  map(),
  keyword()
) :: {:ok, map()} | {:error, Marqeta.Error.t()}

Lists TaaS token resources.

Accepts standard Marqeta pagination params: count, start_index, sort_by, sort_order, fields.

Use stream/2 to lazily iterate all pages automatically.

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

@spec list!(
  map(),
  keyword()
) :: map()

Lists TaaS token resources. Raises Marqeta.Error on failure.

status(token, opts \\ [])

@spec status(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, Marqeta.Error.t()}

Retrieves tokenization status for a token.

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

@spec stream(
  map(),
  keyword()
) :: Enumerable.t()

Returns a lazy Stream that auto-paginates TaaS token resources.

tokenize(params, opts \\ [])

@spec tokenize(
  map(),
  keyword()
) :: {:ok, map()} | {:error, Marqeta.Error.t()}

Submits a tokenization request.

update_token(token, params, opts \\ [])

@spec update_token(String.t(), map(), keyword()) ::
  {:ok, map()} | {:error, Marqeta.Error.t()}

Updates a TaaS token.