Book transfers — instant transfers between two accounts at the same bank (no ACH/wire rails involved, so they settle immediately and have no network fees). Common uses: moving money between a customer's sub-accounts, or from a customer account to your own operating/reserve account at the same bank.
Creating a transfer
{:ok, book} =
TreasuryPrime.Book.create(client, %{
sender_account_id: "acct_123456",
receiver_account_id: "acct_654321",
amount: "50.00"
}, idempotency_key: TreasuryPrime.Idempotency.generate_key())
Summary
Functions
Creates a book transfer. Required: sender_account_id,
receiver_account_id, amount. Both accounts must be at the same bank.
Fetches a single book transfer by id.
Lists book transfers.
Updates a book transfer.
Types
@type t() :: %TreasuryPrime.Book{ amount: String.t() | nil, created_at: String.t() | nil, description: String.t() | nil, error: String.t() | nil, id: String.t() | nil, org_id: String.t() | nil, receiver_account_id: String.t() | nil, sender_account_id: String.t() | nil, status: String.t() | nil, updated_at: String.t() | nil, userdata: map() | nil }
Functions
@spec create(TreasuryPrime.Client.t(), map(), keyword()) :: {:ok, t()} | {:error, TreasuryPrime.Error.t()}
Creates a book transfer. Required: sender_account_id,
receiver_account_id, amount. Both accounts must be at the same bank.
@spec create!(TreasuryPrime.Client.t(), map(), keyword()) :: t()
@spec get(TreasuryPrime.Client.t(), String.t()) :: {:ok, t()} | {:error, TreasuryPrime.Error.t()}
Fetches a single book transfer by id.
@spec get!(TreasuryPrime.Client.t(), String.t()) :: t()
@spec list(TreasuryPrime.Client.t(), map()) :: {:ok, TreasuryPrime.Page.t()} | {:error, TreasuryPrime.Error.t()}
Lists book transfers.
Filterable params
sender_account_id, receiver_account_id, status.
@spec list!(TreasuryPrime.Client.t(), map()) :: TreasuryPrime.Page.t()
@spec update(TreasuryPrime.Client.t(), String.t(), map()) :: {:ok, t()} | {:error, TreasuryPrime.Error.t()}
Updates a book transfer.
@spec update!(TreasuryPrime.Client.t(), String.t(), map()) :: t()