coal
coal

Coal Documentation

Coal is a crypto-native payments platform for hosted checkout, payment links, x402 paywalls, and programmable revenue routing. Accept stablecoin payments on Base, keep funds in your own wallet, and plug Coal into apps, agents, and internal tools.

Merchant API requests use x-api-key with coal_live_* keys. Dashboard and /api/console/* routes use Privy Bearer tokens and are for console use, not the primary public merchant surface.

What you can build

🛒

E-commerce checkouts

Issue payment links or hosted checkout sessions that settle instantly to your wallet.

🔒

x402 Paywalls

Gate any URL or API with HTTP 402. Manifests publish to 0G so AI agents discover and pay autonomously.

✂️

Revenue splits

Define split rules once; Coal distributes funds to multiple wallets at settlement.

🤖

AI commerce

Publish your catalog to 0G so AI agents can discover and transact with your store autonomously.

Core concepts

ConceptDescription
SessionA single checkout attempt tied to an amount, currency, and recipient wallet. Expires after 15 minutes.
MerchantAn authenticated account with a Coal API key. Merchants own products, links, and split configs.
ProductA named, priced item in your catalog. Attach a product to a session to auto-populate checkout details.
WebhookAn HTTPS endpoint you register to receive signed event notifications (e.g. payment.confirmed).

Base URL

bash
1https://api.usecoal.xyz/api

All requests must be made over HTTPS. Requests to http:// will be rejected. Merchant API keys are passed via the x-api-key header, and console routes use Authorization: Bearer <Privy JWT>.

bash
1curl https://api.usecoal.xyz/api/checkouts \
2 -H "x-api-key: coal_live_..."

Need help?

Open an issue or start a discussion on GitHub. For urgent production issues, reach out via the Console.