Skip to main content
GET
/
v1
/
x402
/
endpoints
/
requirements
Get requirements by URL
curl --request GET \
  --url https://api.swiftpay.finance/v1/x402/endpoints/requirements \
  --header 'X-Swift-Key: <api-key>'
{
  "success": true,
  "data": {
    "x402Version": 2,
    "requirements": {
      "scheme": "exact",
      "network": "eip155:8453",
      "amount": "100000",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "payTo": "0xForwarderAddress...",
      "maxTimeoutSeconds": 300,
      "extra": {
        "name": "USDC",
        "version": "2",
        "merchantId": "m1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "endpointId": "e1b2c3d4-e5f6-7890-abcd-ef1234567890"
      },
      "description": "Sentiment analysis — $0.10 per call"
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.swiftpay.finance/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-Swift-Key
string
header
required

Your secret API key (sk_live_*). Keep this server-side only.

Query Parameters

url
string
required

Full URL of the protected endpoint (URL-encoded)

Example:

"https://api.example.com/v1/analyze"

Response

Payment requirements for the endpoint

success
enum<boolean>
Available options:
true
data
object

Envelope returned by both requirements endpoints. Clients use x402Version when constructing the 402 body and the settle request — no hardcoding required.