Welcome

Welcome to the Meridian API documentation. This guide covers all endpoints for x402 payments and receiver wallet 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 -H "Authorization: Bearer pk_..." \
  https://api.mrdn.finance/v1/verify

Core Endpoints

x402 Payments

Verify Payment

POST /v1/verify - Verify x402 payment authorization

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/verify", {
  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.