Retrieve transaction records. Transactions are read-only — they are created by Marqeta when cardholders transact.
Transaction Types
authorization, authorization.clearing, authorization.reversal,
pindebit, pindebit.reversal, refund, refund.clearing,
gpa.credit, gpa.credit.reversal, gpa.debit, transfer.peer,
fee.charge, msa.credit, msa.debit, account.funding
Transaction States
PENDING, COMPLETION, DECLINED, ERROR
For large datasets, use Marqeta.DiVA.Authorizations or
Marqeta.DiVA.Settlements which are optimised for bulk reads.
Summary
Functions
Retrieves a transaction by token.
Retrieves a transaction by token. Raises Marqeta.Error on failure.
Lists transaction resources.
Lists transaction resources. Raises Marqeta.Error on failure.
Lists transactions for a business.
Lists transactions for a card.
Lists transactions for a user.
Lists related transactions (e.g. reversals, clearings) for a transaction.
Returns a lazy Stream that auto-paginates transaction resources.
Streams transactions for a business.
Streams transactions for a card.
Streams transactions for a user.
Functions
@spec get( String.t(), keyword() ) :: {:ok, map()} | {:error, Marqeta.Error.t()}
Retrieves a transaction by token.
Returns {:ok, map()} on success, {:error, %Marqeta.Error{}} on failure.
Retrieves a transaction by token. Raises Marqeta.Error on failure.
@spec list( map(), keyword() ) :: {:ok, map()} | {:error, Marqeta.Error.t()}
Lists transaction resources.
Accepts standard Marqeta pagination params:
count, start_index, sort_by, sort_order, fields.
Use stream/2 to lazily iterate all pages automatically.
Lists transaction resources. Raises Marqeta.Error on failure.
@spec list_by_business(String.t(), map(), keyword()) :: {:ok, map()} | {:error, Marqeta.Error.t()}
Lists transactions for a business.
@spec list_by_card(String.t(), map(), keyword()) :: {:ok, map()} | {:error, Marqeta.Error.t()}
Lists transactions for a card.
@spec list_by_user(String.t(), map(), keyword()) :: {:ok, map()} | {:error, Marqeta.Error.t()}
Lists transactions for a user.
@spec stream( map(), keyword() ) :: Enumerable.t()
Returns a lazy Stream that auto-paginates transaction resources.
@spec stream_by_business(String.t(), map()) :: Enumerable.t()
Streams transactions for a business.
@spec stream_by_card(String.t(), map()) :: Enumerable.t()
Streams transactions for a card.
@spec stream_by_user(String.t(), map()) :: Enumerable.t()
Streams transactions for a user.