Documentation
get started

Aelith Pay API Docs

Everything you need to accept Solana payments, send invoices, manage subscriptions, and reward customers — all via a clean REST API.

Base URLhttps://pay.aelith.ai/api

Build in minutes

Get your first payment link live with 3 API calls.

Get an API key

Sign up free, go to API Keys, and create a key.

Create a payment link

POST /api/payment-links with your price and token.

Accept payments

Share the link or embed it. We handle the rest.

Authentication

All requests need an API key or a wallet signature.

Option 1 — API Key (recommended)

x-api-key: YOUR_API_KEY
Content-Type: application/json

Option 2 — Wallet Signature

// Step 1: Request a server-issued nonce
GET /api/auth/nonce?walletAddress=YOUR_WALLET
// → { "nonce": "SERVER_ISSUED_NONCE" }

// Step 2: Sign this exact message with your Solana wallet
"Aelith Pay Authentication\n\nWallet: YOUR_WALLET\nNonce: SERVER_ISSUED_NONCE\nTimestamp: 1700000000000"

// Step 3: Include signed headers on every request
x-wallet-address: YOUR_WALLET
x-wallet-signature: BASE58_SIGNATURE
x-auth-timestamp: 1700000000000
x-auth-nonce: SERVER_ISSUED_NONCE

Quickstart example

Create a payment link and share it with your customer.

// 1. Create a payment link
const res = await fetch("https://pay.aelith.ai/api/payment-links", {
  method: "POST",
  headers: {
    "x-api-key": "YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    name: "Pro Plan — Monthly",
    amount: 49,
    token: "USDC",
    successUrl: "https://yoursite.com/thank-you",
  }),
})

const { link } = await res.json()
// link.checkoutUrl → "https://pay.aelith.ai/p/abc123"

// 2. Send this URL to your customer
// 3. Listen for payment.completed via webhooks

Supported tokens

Fees: Free 5% · Pro 2.5% · Pro+ 1.5%.

USDC

USDT

SOL

Hosted checkout pages

No auth required — share directly with your customers.

Payment Link

https://pay.aelith.ai/p/{shortCode}

Invoice

https://pay.aelith.ai/i/{publicId}
<!-- Drop into any email or page -->
<a href="https://pay.aelith.ai/p/abc123">
  Pay with Crypto
</a>

Error codes

Standard HTTP status codes used across all endpoints.

400Invalid request parameters
401Missing or invalid auth
403Not allowed for your plan
404Resource not found
429Rate limit or monthly usage exceeded
500Server error

Ready to build?

Create a free account, grab an API key, and have your first payment link live in minutes.