Skip to main content
Reference for each Prism Gateway API endpoint. See Introduction for base URLs, authentication, and error handling. All authenticated endpoints require the X-API-Key header. Request and response bodies are JSON.

x402 Settlement

Facilitator endpoints for the x402 payment flow. The server-side SDKs call these automatically. Use them directly for custom integrations.

Get Payment Requirements

Generate x402 payment requirements for a resource. Returns the accepted payment methods, token amounts, and settlement addresses.
POST /api/v2/payment/requirements
Request Body
FieldTypeRequiredDescription
resourceUrlstringYesURL of the protected resource
requestedAmountnumberYesAmount to charge (in the resource’s currency)
descriptionstringNoHuman-readable description of the resource
mimeTypestringNoMIME type of the resource content
curl -X POST https://prism-gw.fd.xyz/api/v2/payment/requirements \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "resourceUrl": "https://api.example.com/premium/data",
    "requestedAmount": 0.50,
    "description": "Premium API access"
  }'
Response (PaymentRequiredResponse)
{
  "x402Version": 2,
  "resource": {
    "url": "https://api.example.com/premium/data",
    "description": "Premium API access"
  },
  "accepts": [
    {
      "scheme": "exact",
      "network": "base",
      "amount": "500000",
      "payTo": "0x1234...abcd",
      "maxTimeoutSeconds": 300,
      "asset": "0xUSDC...addr",
      "extra": null,
      "protocolVersion": 2
    }
  ],
  "protocolVersion": 2
}
The accepts array contains one entry per token/chain combination the merchant supports. Clients pick one and construct a signed authorization against it.

Verify Payment

Verify a signed x402 payment authorization without settling it on-chain.
POST /api/v2/payment/verify
Request Body (PaymentSubmissionRequest2)
FieldTypeRequiredDescription
paymentPayloadobjectYesSigned payment authorization (see below)
paymentRequirementsobjectYesThe accepted payment requirement this authorization targets
Response (VerifyResponse2)
{
  "isValid": true,
  "payer": "0xPayerAddress...1234"
}
FieldTypeDescription
isValidbooleanWhether the authorization is valid
payerstringPayer wallet address (if valid)
invalidReasonstringReason for rejection (if invalid)

Settle Payment

Settle a verified payment on-chain. Executes the transferWithAuthorization (ERC-3009) call to move tokens from the payer to the merchant.
POST /api/v2/payment/settle
Request Body (PaymentSubmissionRequest2) Same structure as Verify Payment. Response (SettleResponse)
{
  "success": true,
  "payer": "0xPayerAddress...1234",
  "transaction": "0xTransactionHash...abcd",
  "network": "base"
}
FieldTypeDescription
successbooleanWhether settlement succeeded
payerstringPayer wallet address
transactionstringOn-chain transaction hash
networkstringChain the settlement executed on
errorReasonstringReason for failure (if unsuccessful)
Returns 502 Bad Gateway with a ProblemDetails body if the on-chain transaction fails.

Merchant

Endpoints for UCP merchants to build discovery profiles and prepare checkout sessions.

Get Payment Profile

Returns the payment_handlers block for your UCP discovery profile. Include this in your storefront’s UCP profile so agents can discover your supported payment methods.
GET /api/v2/merchant/payment-profile
curl https://prism-gw.fd.xyz/api/v2/merchant/payment-profile \
  -H "X-API-Key: your-api-key"
Response (PaymentProfileResponse)
{
  "xyz.fd.prism_payment": [
    {
      "id": "xyz.fd.prism_payment",
      "version": "2026-01-23"
    }
  ]
}
Returns 404 if the merchant is not configured in Prism Console.

Prepare Checkout

Convert a fiat amount into x402 payment handler entries with resolved token amounts. Use this when a buyer selects items and you need to build the checkout payment_handlers block with concrete token prices.
POST /api/v2/merchant/checkout-prepare
Request Body
FieldTypeRequiredDescription
amountstringYesFiat amount (e.g. "10.00")
currencystringYesFiat currency code (e.g. "USD")
resourceobjectYesResource being purchased
resource.urlstringYesURL identifying the resource
resource.descriptionstringNoHuman-readable description
curl -X POST https://prism-gw.fd.xyz/api/v2/merchant/checkout-prepare \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": "10.00",
    "currency": "USD",
    "resource": {
      "url": "https://shop.example.com/order/12345",
      "description": "Order #12345"
    }
  }'
Response (CheckoutPrepareResponse)
{
  "xyz.fd.prism_payment": [
    {
      "id": "xyz.fd.prism_payment",
      "version": "2026-01-23",
      "config": {
        "x402Version": 2,
        "resource": {
          "url": "https://shop.example.com/order/12345",
          "description": "Order #12345"
        },
        "accepts": [
          {
            "scheme": "exact",
            "network": "base",
            "payTo": "0xMerchant...addr",
            "maxTimeoutSeconds": 300,
            "asset": "0xUSDC...addr",
            "amount": "10000000"
          },
          {
            "scheme": "exact",
            "network": "base",
            "payTo": "0xMerchant...addr",
            "maxTimeoutSeconds": 300,
            "asset": "0xFDUSD...addr",
            "amount": "10000000"
          }
        ]
      }
    }
  ]
}
The response contains one accepts entry per token/chain combination the merchant supports, with amount resolved from the fiat price. Include this in your UCP checkout response so agents can select a payment option and authorize the transfer. Returns 404 if the merchant is not configured in Prism Console.

Gateway

Public endpoints serving the UCP handler reference. No authentication required.

Handler Schema

Returns the JSON schema for the xyz.fd.prism_payment handler.
GET /ucp/schema.json
curl https://prism-gw.fd.xyz/ucp/schema.json

Handler Specification

Returns the human-readable specification for the xyz.fd.prism_payment handler in Markdown format.
GET /ucp/prism.md
curl https://prism-gw.fd.xyz/ucp/prism.md
Last modified on March 24, 2026