x402 (AI agents)

Verify an x402 payment (facilitator)

Called by the seller's x402 middleware with the payment the agent sent. Checks the request against the requirements, that payTo is the vault of extra.p2flux.recipient, the signature (before anything is asked of the chain), every field of the signed authorization, the payer's balance and nonce, and simulates the exact settlement with the fee it would carry. A payment that would fail is answered 200 with isValid: false and the reason string the @x402/evm facilitator uses. Nothing is sent.

post/x402/verify

Request

  • Base URL: https://api.p2flux.com
  • URL: https://api.p2flux.com/x402/verify
  • Auth: none required

Request body

x402Version2 required
paymentPayloadobject required

What the agent sent: {x402Version, accepted, payload, extensions?}. payload is {signature, authorization} (exact, EIP-3009) or {signature, permit2Authorization} (upto).

Example request

{
  "paymentRequirements": {
    "network": "eip155:8453"
  }
}

Response

Verdict

isValidboolean required
invalidReasonstring
invalidMessagestring
payerstring

Example response

{
  "invalidReason": "invalid_exact_evm_signature"
}

Changes

No recorded changes to this operation across all 1 revision of this API.