Skip to main content
POST
/
v1
/
x402
/
endpoints
Register endpoint
curl --request POST \
  --url https://api.swiftpay.finance/v1/x402/endpoints \
  --header 'Content-Type: application/json' \
  --header 'X-Swift-Key: <api-key>' \
  --data '
{
  "endpointUrl": "https://api.example.com/v1/analyze",
  "description": "Sentiment analysis — $0.10 per call",
  "asset": "USDC",
  "network": "eip155:8453",
  "amountUsd": 0.1
}
'
{
  "success": true,
  "data": {
    "endpoint": {
      "id": "e1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "merchantId": "m1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "endpointUrl": "https://api.example.com/v1/analyze",
      "description": "Sentiment analysis — $0.10 per call",
      "asset": "USDC",
      "network": "eip155:8453",
      "amountUsd": 0.1,
      "treasuryAddress": "0xYourWallet...",
      "forwarderAddress": "0xForwarderAddress...",
      "active": true,
      "createdAt": "2026-04-27T12:00:00Z",
      "updatedAt": "2026-04-27T12:00:00Z"
    },
    "payment_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.

Body

application/json
endpointUrl
string
required

Full URL of the resource to protect

Example:

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

asset
string
required

Token symbol to accept

Example:

"USDC"

network
string
required

CAIP-2 network identifier

Example:

"eip155:8453"

amountUsd
number<float>
required

Price per request in USD

Required range: x >= 0.01
Example:

0.1

description
string
Example:

"Sentiment analysis endpoint"

Response

Endpoint registered

success
enum<boolean>
Available options:
true
data
object