---
title: "Check one unsigned Solana transaction and pay $0.01 in USDC (x402), no account"
method: POST
path: "/api/x402/preflight"
tags: ["Preflight"]
---

# Check one unsigned Solana transaction and pay $0.01 in USDC (x402), no account

`POST /api/x402/preflight`

## Request

- Base URL: `https://overwing.ai`
- URL: `https://overwing.ai/api/x402/preflight`
- Auth: none required

## Request body

- PreflightRequest
  - `transaction` string, required: The serialized Solana transaction in base64, legacy or v0, signed or not. Signatures are ignored
  - `policy` object, required
    - `wallet` string, required: The address to protect. It must sign the transaction
    - `max_sol_out` number: Required unless max_sol_out_lamports is given. The most SOL the transaction may take from the wallet, fees included
    - `max_sol_out_lamports` union: The same limit as a whole number of lamports
      - integer
      - string
    - `max_token_out` object: Atomic units that may leave, by mint. A mint not listed may not leave at all
    - `min_token_in` object: Atomic units that must arrive, by mint
    - `allowed_programs` string[]: When given, every program the transaction runs, top-level or inner, must be listed
    - `allow_delegation` boolean: Whether a spending approval on the wallet's token accounts is acceptable

## Response `200`

The verdict

- PreflightVerdict
  - `id` string
  - `decision` 'allow' | 'refuse': The one field to branch on. Sign only on allow
  - `reasons` object[]: Every reason to refuse. Empty on an allow. Codes are listed at GET /api/v1/preflight
    - `code` string
    - `detail` string
  - `effects` object, nullable: What the simulation says would happen to the wallet: sol_out_lamports, token_out, token_in (atomic units as strings, by mint) and control changes. Null when it could not be simulated
  - `programs` string[]: Every program the transaction would run
  - `digest` string: sha256 of the message with its blockhash zeroed
  - `slot` integer, nullable
  - `covered` boolean: Whether the guarantee applies: an allow made only of programs Overwing names
  - `decided_at` string, date-time
  - `valid_for_seconds` integer: A verdict covers a transaction that lands within this many seconds
  - `receipt` object: The published payload, its hash, and an Ed25519 signature over the hash
  - `record_url` string

## Other responses

- `400`: transaction or policy is missing or malformed; not charged
- `402`: Payment required
- `502`: The Solana node could not be reached; not charged

---

[API](https://skmtc.dev/overwing/apis/overwing-api.md) · [All operations](https://skmtc.dev/overwing/apis/overwing-api/llms.txt) · [OpenAPI document](https://skmtc.dev/overwing/apis/overwing-api/revisions/ff1282d31438?raw)
