---
title: "Preview Transaction V2"
method: POST
path: "/transaction/preview-v2"
tags: ["Transaction"]
---

# Preview Transaction V2

`POST /transaction/preview-v2`

Previews a transaction against the latest network state, and returns the preview receipt.
If the node has enabled it, you may be able to also preview against recent network state.

This endpoint supports V2 transactions (and beyond). If you still need to preview V1
transactions, you should use the `/preview` endpoint instead.

This endpoint is effectively a proxy towards the Core API `/transaction/preview-v2` endpoint. See the Core API documentation for more details.

## Request body

- TransactionPreviewV2Request
  - `preview_transaction` PreviewTransaction, required
    - `type` 'Compiled', required
  - `flags` PreviewFlags
    - `use_free_credit` boolean — If enabled, a large simulated pool of XRD is marked as locked. This mode can be used to estimate fees. To get a reliable estimate, we recommend that your transaction is as close as possible to the real transaction. For example: - You should still use a lock fee command, but you can set it to lock a fee of 0. - You should include the public keys that will sign the transaction, so the cost of signature verification and payload size can be accounted for.
    - `assume_all_signature_proofs` boolean — If enabled, each manifest processor's auth zone will be given a simulated proof of every signature, which can be used to pass signature access rules. This can be used to preview transactions even if the required signatures are not known ahead of time. See the documentation on [advanced access rules](https://docs.radixdlt.com/docs/advanced-accessrules#signature-requirements) for more information.
    - `skip_epoch_check` boolean — If enabled, the various runtime epoch-related verifications are skipped: - The `start_epoch_inclusive` and `end_epoch_exclusive` parameters, if specified, are ignored. - The duplicate intent checks (which rely on the expiry epoch) are also ignored. However, if the start and end epoch are provided, they must still be statically valid. We recommend using a value of `start_epoch_inclusive = 1` and `end_epoch_exclusive = 2` in this case.
    - `disable_auth_checks` boolean — If enabled, all authorization checks are skipped during execution. This could be used to e.g.: * Preview protocol update style transactions. * Mint resources for previewing trades with resources you don't own. If doing this, be warned: only resources which were potentially mintable/burnable at creation time will be mintable/burnable, due to feature flags on the resource. Warning: this mode of operation is quite a departure from normal operation: * Calculated fees will likely be lower than a standard execution. * This mode can subtly break invariants some dApp code might rely on, or result in unexpected behaviour, so the execution result might not be valid for your needs. For example, if this flag was used to mint pool units to preview a redemption (or some dApp interaction which behind the scenes redeemed them), they'd redeem for less than they're currently worth, because the blueprint code relies on the total supply of the pool units to calculate their redemption worth, and you've just inflated the total supply through the mint operation.
  - `opt_ins` TransactionPreviewV2OptIns — A set of flags to configure the response of the transaction preview v2 endpoint.
    - `core_api_receipt` boolean — This flag controls whether the preview response will include a Core API receipt or not. If not provided, this defaults to `false` and no core api receipt is provided in the response.
    - `radix_engine_toolkit_receipt` boolean — This flag controls whether the preview response will include a Radix Engine Toolkit serializable receipt or not. If not provided, this defaults to `false` and no toolkit receipt is provided in the response.
    - `logs` boolean — This flag controls whether the preview response will include execution logs. If not provided, this defaults to `false` and no logs will be provided in the response.

## Response `200`

Successful Preview

- TransactionPreviewV2Response
  - `at_ledger_state_version` integer, required — A summarized state of the ledger on top of which the preview was performed.
  - `receipt` object — This is provided unless the `core_api_receipt` flag is set to false in the `opt_ins ` property of the request. This type is defined in the Core API as `TransactionReceipt`. See the Core API documentation for more details.
  - `radix_engine_toolkit_receipt` object — An optional field which is only provided if the `radix_engine_toolkit_receipt` flag is set to true in the `opt_ins` property of the request. This receipt is primarily intended for use with the toolkit and may contain information that is already available in the receipt provided in the `receipt` field of this response. A typical client of this API is not expected to use this receipt. The primary clients this receipt is intended for is the Radix wallet or any client that needs to perform execution summaries on their transactions.
  - `logs` object[] — An optional field which is only provided if the `logs` flag is set to true in the `opt_ins` property of the request. If present, it gives the emitted logs from the transaction execution.
    - `level` string, required
    - `message` string, required

## Other responses

- `4XX` — Client-originated request error

---

[API](https://skmtc.net/radixdlt/apis/radix-gateway-api-babylon.md) · [All operations](https://skmtc.net/radixdlt/apis/radix-gateway-api-babylon/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/radixdlt/radix-gateway-api-babylon/revisions/153aecf74342/schema)
