Transactions

Payment verification and settlement

Verify payment validity

post
Body
paymentPayloadall ofRequired

Payment payload from client

paymentRequirementsall ofRequired

Payment requirements selected by client

Responses
200

Payment verification completed

application/json
post
/v1/verify
POST /v1/verify HTTP/1.1
Host: facilitator.x444.io
Content-Type: application/json
Accept: */*
Content-Length: 554

{
  "paymentPayload": {
    "x402Version": 1,
    "scheme": "exact",
    "network": "base-sepolia",
    "payload": null
  },
  "paymentRequirements": {
    "scheme": "exact",
    "network": "base-sepolia",
    "maxAmountRequired": "1000000",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "payTo": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb8",
    "resource": "https://api.example.com/weather",
    "description": "Weather data API call",
    "mimeType": "application/json",
    "outputSchema": {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "maxTimeoutSeconds": 300,
    "extra": {
      "feePayer": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"
    }
  }
}
{
  "isValid": true,
  "payer": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb8",
  "invalidReason": "Insufficient balance"
}

Settle payment on blockchain

post
Body
paymentPayloadall ofRequired

Payment payload from client

paymentRequirementsall ofRequired

Payment requirements for settlement

Responses
200

Payment settlement completed

application/json
post
/v1/settle
POST /v1/settle HTTP/1.1
Host: facilitator.x444.io
Content-Type: application/json
Accept: */*
Content-Length: 554

{
  "paymentPayload": {
    "x402Version": 1,
    "scheme": "exact",
    "network": "base-sepolia",
    "payload": null
  },
  "paymentRequirements": {
    "scheme": "exact",
    "network": "base-sepolia",
    "maxAmountRequired": "1000000",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "payTo": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb8",
    "resource": "https://api.example.com/weather",
    "description": "Weather data API call",
    "mimeType": "application/json",
    "outputSchema": {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "maxTimeoutSeconds": 300,
    "extra": {
      "feePayer": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"
    }
  }
}
{
  "success": true,
  "txHash": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb7...",
  "errorReason": "Insufficient balance"
}

Last updated