---
title: "Settle payment"
method: POST
path: "/v1/payments/x402/settle"
tags: ["x402"]
---

# Settle payment

`POST /v1/payments/x402/settle`

Settle an x402 payment. Compatible with any standard x402 middleware.

## Request body

- object — Request body for x402 facilitator 'settle'
  - `paymentPayload` union, required — Exact x402 payment payload to settle
    - object — EVM exact payment payload for settlement
      - `x402Version` union
        - 1
        - 2
      - `scheme` union
        - 'exact'
        - 'upto'
      - `network` union, required — CAIP-2 blockchain identifier (e.g., 'eip155:1' for Ethereum, 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp' for Solana mainnet). Also accepts numeric EVM chain IDs (e.g., 1, 137) or aliases ('solana:mainnet', 'solana:devnet') for backward compatibility.
        - string
        - integer
      - `payload` object, required
        - `signature` string, required — The signature of the payment
        - `authorization` object, required
          - `from` string, required — The from address of the payment
          - `to` string, required — The to address of the payment
          - `value` string, required — The value of the payment
          - `validAfter` string, required — The valid after timestamp of the payment
          - `validBefore` string, required — The valid before timestamp of the payment
          - `nonce` string, required — The nonce of the payment
    - object — Solana exact payment payload for settlement
      - `x402Version` union
        - 1
        - 2
      - `scheme` union
        - 'exact'
        - 'upto'
      - `network` union, required — CAIP-2 blockchain identifier (e.g., 'eip155:1' for Ethereum, 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp' for Solana mainnet). Also accepts numeric EVM chain IDs (e.g., 1, 137) or aliases ('solana:mainnet', 'solana:devnet') for backward compatibility.
        - string
        - integer
      - `payload` object, required
        - `transaction` string, required — Base64-encoded Solana transaction
  - `paymentRequirements` object, required
    - `scheme` union
      - 'exact'
      - 'upto'
    - `network` union, required — CAIP-2 blockchain identifier (e.g., 'eip155:1' for Ethereum, 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp' for Solana mainnet). Also accepts numeric EVM chain IDs (e.g., 1, 137) or aliases ('solana:mainnet', 'solana:devnet') for backward compatibility.
      - string
      - integer
    - `maxAmountRequired` string, required
    - `resource` string, uri, required
    - `description` string, required
    - `mimeType` string, required
    - `outputSchema` object
    - `payTo` union, required
      - string
      - string
    - `maxTimeoutSeconds` integer, required
    - `asset` union, required
      - string
      - string
    - `extra` object
    - `x402Version` union
      - 1
      - 2
  - `waitUntil` 'simulated' | 'submitted' | 'confirmed' — The event to wait for to determina a transaction confirmation. 'simulated' will only simulate the transaction (fastest), 'submitted' will wait till the transaction is submitted, and 'confirmed' will wait for the transaction to be fully confirmed on chain (slowest). Defaults to 'confirmed'.

## Response `200`

Settlement successful

- object — Response returned by x402 facilitator 'settle'
  - `success` boolean, required
  - `errorReason` 'insufficient_funds' | 'invalid_exact_evm_payload_authorization_valid_after' | 'invalid_exact_evm_payload_authorization_valid_before' | 'invalid_exact_evm_payload_authorization_value' | 'invalid_exact_evm_payload_signature' | 'invalid_exact_evm_payload_recipient_mismatch' | 'invalid_exact_svm_payload_transaction' | 'invalid_exact_svm_payload_transaction_amount_mismatch' | 'invalid_exact_svm_payload_transaction_create_ata_instruction' | 'invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_payee' | 'invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_asset' | 'invalid_exact_svm_payload_transaction_instructions' | 'invalid_exact_svm_payload_transaction_instructions_length' | 'invalid_exact_svm_payload_transaction_instructions_compute_limit_instruction' | 'invalid_exact_svm_payload_transaction_instructions_compute_price_instruction' | 'invalid_exact_svm_payload_transaction_instructions_compute_price_instruction_too_high' | 'invalid_exact_svm_payload_transaction_instruction_not_spl_token_transfer_checked' | 'invalid_exact_svm_payload_transaction_instruction_not_token_2022_transfer_checked' | 'invalid_exact_svm_payload_transaction_not_a_transfer_instruction' | 'invalid_exact_svm_payload_transaction_receiver_ata_not_found' | 'invalid_exact_svm_payload_transaction_sender_ata_not_found' | 'invalid_exact_svm_payload_transaction_simulation_failed' | 'invalid_exact_svm_payload_transaction_transfer_to_incorrect_ata' | 'invalid_network' | 'invalid_payload' | 'invalid_payment_requirements' | 'invalid_scheme' | 'invalid_payment' | 'payment_expired' | 'unsupported_scheme' | 'invalid_x402_version' | 'invalid_transaction_state' | 'invalid_x402_version' | 'settle_exact_svm_block_height_exceeded' | 'settle_exact_svm_transaction_confirmation_timed_out' | 'unsupported_scheme' | 'unexpected_settle_error' | 'unexpected_verify_error'
  - `payer` union
    - string
    - string
  - `transaction` string, required
  - `network` 'base-sepolia' | 'base' | 'avalanche-fuji' | 'avalanche' | 'iotex' | 'solana-devnet' | 'solana' | 'sei' | 'sei-testnet' | 'polygon' | 'polygon-amoy' | 'peaq', required
  - `errorMessage` string
  - `fundWalletLink` string

## Other responses

- `400` — Invalid request parameters
- `401` — Authentication required. For backend usage, include `x-secret-key` header.
- `500` — Internal server error

---

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