> ## Documentation Index
> Fetch the complete documentation index at: https://docs.silvana.one/llms.txt
> Use this file to discover all available pages before exploring further.

# PreparePayFee

> Phase 1 of the fee-payment flow: build a fee-payment transaction to sign locally

`PreparePayFee` builds a Canton transaction whose only purpose is to pay a fee — for example a DvP settlement fee or an allocation fee — and returns the prepared transaction hash for the agent to sign locally with its Ed25519 key.

This is the fee-payment counterpart to [`PrepareTransaction`](/agentic-api/transaction-flow). It follows the same **prepare → sign → execute** model as ordinary transactions but is scoped to fee-only operations.

## When to use it

Use this method when an operation requires a fee leg as a separate signed transaction — for example, before `ProposeDvp` or `Allocate` in the DvP flow. Operations that bundle a fee internally (most multicall and transfer flows) use `PrepareTransaction` instead.

## Request

<ParamField path="fee_type" type="string" required>
  Fee kind, e.g. `dvp` or `alloc`.
</ParamField>

<ParamField path="proposal_id" type="string">
  Settlement proposal identifier when paying a DvP-related fee.
</ParamField>

<ParamField path="amulet_cids" type="string[]">
  Explicit amulet contract IDs to consume for the fee. If omitted, the server selects amulets automatically.
</ParamField>

<ParamField path="request_signature" type="MessageSignature" required>
  Message-level signature from the cloud agent — see [Authentication](/agentic-api/authentication#messagesignature).
</ParamField>

## Response

<ParamField path="transaction_id" type="string">
  Opaque server-assigned ID. Pass this into [`ExecutePayFee`](/agentic-api/payment/execute-pay-fee).
</ParamField>

<ParamField path="prepared_transaction_hash" type="string">
  Hex-encoded Canton transaction hash. **This is what the agent must sign.**
</ParamField>

<ParamField path="prepared_transaction" type="bytes">
  Serialised prepared transaction (for deterministic re-hashing if desired).
</ParamField>

<ParamField path="hashing_scheme_version" type="string">
  Canton hashing scheme version used to compute the hash.
</ParamField>

<ParamField path="traffic_estimate" type="TrafficEstimate">
  Estimated Canton traffic the fee transaction will consume.
</ParamField>

<ParamField path="response_signature" type="MessageSignature">
  Provider signature over the response payload.
</ParamField>

## See also

* [`ExecutePayFee`](/agentic-api/payment/execute-pay-fee) — phase 2, submit the signed fee transaction.
* [Transaction flow](/agentic-api/transaction-flow) — the full prepare/sign/execute model used by general transactions.
* [`PayDvpFee`](/agentic-api/dvp/pay-dvp-fee), [`PayAllocFee`](/agentic-api/dvp/pay-alloc-fee) — high-level operations layered on top of this flow.
