TrueLayer Merchant Accounts API.
Provides access to merchant accounts, ledger transactions, sweeping configuration, and payment sources.
Summary
Functions
Disable sweeping (DELETE /v3/merchant-accounts/{id}/sweeping).
Get a merchant account by ID (GET /v3/merchant-accounts/{id}).
Get payment sources for a merchant account.
Get sweeping configuration (GET /v3/merchant-accounts/{id}/sweeping).
Get paginated ledger transactions for a merchant account (GET /v3/merchant-accounts/{id}/transactions).
List all merchant accounts (GET /v3/merchant-accounts).
Configure sweeping for a merchant account (POST /v3/merchant-accounts/{id}/sweeping).
Functions
@spec disable_sweeping(TruelayerClient.t(), String.t()) :: :ok | {:error, TruelayerClient.Error.t()}
Disable sweeping (DELETE /v3/merchant-accounts/{id}/sweeping).
@spec get_account(TruelayerClient.t(), String.t()) :: {:ok, map()} | {:error, TruelayerClient.Error.t()}
Get a merchant account by ID (GET /v3/merchant-accounts/{id}).
@spec get_payment_sources(TruelayerClient.t(), String.t()) :: {:ok, [map()]} | {:error, TruelayerClient.Error.t()}
Get payment sources for a merchant account.
@spec get_sweeping(TruelayerClient.t(), String.t()) :: {:ok, map()} | {:error, TruelayerClient.Error.t()}
Get sweeping configuration (GET /v3/merchant-accounts/{id}/sweeping).
@spec get_transactions(TruelayerClient.t(), String.t(), keyword()) :: {:ok, map()} | {:error, TruelayerClient.Error.t()}
Get paginated ledger transactions for a merchant account (GET /v3/merchant-accounts/{id}/transactions).
Options
:from- ISO 8601 start datetime string:to- ISO 8601 end datetime string:type- filter by transaction type (e.g."payout","refund"):cursor- pagination cursor from previous response
@spec list_accounts(TruelayerClient.t()) :: {:ok, [map()]} | {:error, TruelayerClient.Error.t()}
List all merchant accounts (GET /v3/merchant-accounts).
@spec setup_sweeping(TruelayerClient.t(), String.t(), map()) :: {:ok, map()} | {:error, TruelayerClient.Error.t()}
Configure sweeping for a merchant account (POST /v3/merchant-accounts/{id}/sweeping).