---
title: "Swap rejected"
method: POST
path: "wallet_action.swap.rejected"
---

# Swap rejected

`POST wallet_action.swap.rejected` (webhook)

Fired when a wallet action fails before any onchain effects (e.g. policy rejection, simulation failure). Safe to retry.

## Payload

- WalletActionSwapRejectedWebhookPayload — Payload for the wallet_action.swap.rejected webhook event.
  - `action_type` 'swap' | 'transfer' | 'earn_deposit' | 'earn_withdraw' | 'earn_incentive_claim' | 'earn_fee_collect', required — Type of wallet action
  - `caip2` string, required — Chain identifier.
  - `created_at` string, required — ISO 8601 timestamp of when the wallet action was created.
  - `failure_reason` FailureReason, required — A description of why a wallet action (or a step within a wallet action) failed.
    - `details` unknown
    - `message` string, required — Human-readable failure message.
  - `input_amount` string, nullable, required — Amount of input token in base units. Populated after onchain confirmation.
  - `input_token` string, required — Token address being sold.
  - `output_token` string, required — Token address being bought.
  - `rejected_at` string, required — ISO 8601 timestamp of when the wallet action was rejected.
  - `status` 'rejected', required — The status of the wallet action.
  - `steps` WalletActionStep[], required — The steps of the wallet action at the time of rejection.
    - union — A step within a wallet action, representing a single onchain action.
      - object — A wallet action step consisting of an EVM transaction.
        - `caip2` string, required — CAIP-2 chain identifier of the transaction, containing the chain ID.
        - `failure_reason` FailureReason — A description of why a wallet action (or a step within a wallet action) failed.
          - `details` unknown
          - `message` string, required — Human-readable failure message.
        - `finalized` boolean — Whether this step has reached on-chain finality. Absent until finality is confirmed.
        - `status` 'preparing' | 'queued' | 'pending' | 'retrying' | 'confirmed' | 'rejected' | 'reverted' | 'replaced' | 'abandoned', required — EVM transaction status.
        - `transaction_hash` string, nullable, required — The transaction hash for this step. May change while the step status is non-terminal.
        - `type` 'evm_transaction', required
      - object — A wallet action step consisting of an EVM user operation.
        - `bundle_transaction_hash` string, nullable, required — Transaction hash of the bundle in which this user operation was included. Null until included by a bundler.
        - `caip2` string, required — CAIP-2 network identifier, containing the chain ID of the user operation.
        - `entrypoint_version` '0.6' | '0.7' | '0.8' | '0.9', required — The entrypoint version of the user operation.
        - `failure_reason` FailureReason — A description of why a wallet action (or a step within a wallet action) failed.
          - `details` unknown
          - `message` string, required — Human-readable failure message.
        - `finalized` boolean — Whether this step has reached on-chain finality. Absent until finality is confirmed.
        - `gas_credits_charged_usd` string — Amount charged in USD for gas sponsorship on this step.
        - `status` 'preparing' | 'queued' | 'pending' | 'retrying' | 'confirmed' | 'rejected' | 'reverted' | 'replaced' | 'abandoned', required — User operation status.
        - `type` 'evm_user_operation', required
        - `user_operation_hash` string, nullable, required — The user operation hash for this step. May change while the step status is non-terminal.
      - object — A wallet action step consisting of an SVM (Solana) transaction.
        - `caip2` string, required — CAIP-2 chain identifier for the Solana network.
        - `failure_reason` FailureReason — A description of why a wallet action (or a step within a wallet action) failed.
          - `details` unknown
          - `message` string, required — Human-readable failure message.
        - `finalized` boolean — Whether this step has reached on-chain finality. Absent until finality is confirmed.
        - `gas_credits_charged_usd` string — Amount charged in USD for gas sponsorship on this step.
        - `status` 'preparing' | 'queued' | 'pending' | 'confirmed' | 'rejected' | 'reverted' | 'failed', required — SVM transaction status.
        - `transaction_signature` string, nullable, required — The Solana transaction signature (base58-encoded). Null until broadcast.
        - `type` 'svm_transaction', required
      - object — A wallet action step consisting of a TVM (Tron) transaction.
        - `caip2` string, required — CAIP-2 chain identifier for the Tron network.
        - `failure_reason` FailureReason — A description of why a wallet action (or a step within a wallet action) failed.
          - `details` unknown
          - `message` string, required — Human-readable failure message.
        - `status` 'preparing' | 'queued' | 'pending' | 'confirmed' | 'rejected' | 'reverted' | 'failed', required — TVM transaction status.
        - `transaction_id` string, nullable, required — The Tron transaction ID. Null until broadcast.
        - `type` 'tvm_transaction', required
      - object — A wallet action step representing a cross-chain/cross-asset fill by an external provider.
        - `failure_reason` FailureReason — A description of why a wallet action (or a step within a wallet action) failed.
          - `details` unknown
          - `message` string, required — Human-readable failure message.
        - `status` 'preparing' | 'queued' | 'pending' | 'confirmed' | 'rejected' | 'failed', required — External transaction step status.
        - `type` 'external_transaction', required
      - object — A wallet action step representing a transaction executed by a custodian (e.g. Bridge).
        - `custodian` string, required — Identifier of the custodian executing this transaction (e.g. "bridge").
        - `failure_reason` FailureReason — A description of why a wallet action (or a step within a wallet action) failed.
          - `details` unknown
          - `message` string, required — Human-readable failure message.
        - `status` 'preparing' | 'queued' | 'custodian_reviewing' | 'pending' | 'confirmed' | 'rejected' | 'failed', required — Custodian transaction step status.
        - `type` 'custodian_transaction', required
  - `type` 'wallet_action.swap.rejected', required — The type of webhook event.
  - `wallet_action_id` string, required — The ID of the wallet action.
  - `wallet_id` string, required — The ID of the wallet involved in the action.

## Acknowledgement `200`

Return a 200 status to indicate that the webhook was received successfully.

---

[API](https://skmtc.net/privy-io/apis/privy-api.md) · [All operations](https://skmtc.net/privy-io/apis/privy-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/privy-io/privy-api/revisions/bb2eb34156cc/schema)
