Skip to main content
Welcome to the Meridian API documentation. This guide covers all endpoints for x402 payments, facilitator-backed settlement, and related organization features.

Base URL

All API requests are made to the following base URL:
https://api.mrdn.finance/v1

Authentication

Meridian Protocol supports API key authentication for server-to-server & client-to-server integrations:
curl -X POST https://api.mrdn.finance/v1/settle \
  -H "Authorization: Bearer pk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "paymentPayload": { "...": "..." },
    "paymentRequirements": { "...": "..." }
  }'

Core Endpoints

x402 Payments

POST /v1/verify is deprecated and should only be used by existing legacy integrations.

Verify Payment (Deprecated)

POST /v1/verify - Legacy x402 payment verification endpoint

Settle Payment

POST /v1/settle - Settle verified payment

Supported Networks

GET /v1/supported - Get supported payment types

Error Handling

All endpoints return consistent error responses:
{
  "success": false,
  "error": {
    "code": "INVALID_SIGNATURE",
    "message": "The provided signature is invalid",
    "details": {}
  }
}

Common Error Codes

  • NOT_AUTHORIZED - Missing or invalid authentication
  • INVALID_SIGNATURE - Signature verification failed
  • PAYMENT_INVALID - Payment verification failed
  • RATE_LIMITED - Too many requests
  • NETWORK_NOT_SUPPORTED - Unsupported network

SDKs and Examples

React Hook (Frontend)

import { useX402Payment } from "@meridian/demo";

const { signAndVerifyPayment } = useX402Payment();

const result = await signAndVerifyPayment({
  amount: "1.00",
  recipient: "0xmeridian_contract",
  network: "base-sepolia",
});

Node.js (Backend)

const response = await fetch("https://api.mrdn.finance/v1/settle", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: `Bearer ${process.env.MERIDIAN_PUBLIC_KEY}`,
  },
  body: JSON.stringify({
    paymentPayload: {
      /* ... */
    },
    paymentRequirements: {
      /* ... */
    },
  }),
});

Webhooks (Coming Soon)

Meridian supports webhooks for payment events:
  • payment.verified - Payment successfully verified
  • payment.failed - Payment verification failed
  • payment.settled - Payment successfully settled
Configure webhooks in your developer dashboard or via API.