Documentation
Integrate Claude Pay in a few HTTP calls. Base URL: https://claude-pay.com/api/v1
Getting started
- Create a merchant account and confirm 2FA.
- Add a gateway (your BEP-20 / TRC-20 wallet address, or Binance C2C credentials).
- Create an API key with the
payment-intents:createability. - Register a webhook so your app is notified when a payment is confirmed.
Authentication
Server-to-server calls use a merchant API key as a Bearer token. Each key is scoped to abilities (payment-intents:create, billing:write, webhooks:read, webhooks:write).
Authorization: Bearer cp_live_xxxxxxxxxxxxxxxxxxxxCreate a payment intent
A payment intent is a single invoice. Pass an idempotency-safe custom_id to avoid duplicates.
POST /api/v1/payment-intents
Authorization: Bearer cp_live_…
Content-Type: application/json
{
"method": "bep20",
"asset": "USDT",
"amount": 25.00,
"custom_id": "ORDER-1042",
"customer_email": "[email protected]"
}
# 201 Created
{
"data": {
"id": "pi_…",
"status": "pending",
"receive_address": "0x…",
"amount": "25.000000",
"expires_at": "2026-05-29T12:34:56Z"
}
}Redirect the customer to the hosted checkout at https://claude-pay.com/checkout/?id={id}.
Checkout sessions
Let the customer choose the method. A session fans out one intent per enabled (method, asset) your plan allows.
POST /api/v1/checkout-sessions
{ "amount": 25.00, "customer_email": "[email protected]" }
# → { "data": { "primary": {…}, "options": [ {…}, {…} ] } }Webhooks
Register an HTTPS endpoint. We POST signed JSON on payment_intent.paid, .expired, and .refunded, with retries.
POST {your endpoint}
X-Claude-Pay-Event-Id: evt_…
X-Claude-Pay-Event-Type: payment_intent.paid
X-Claude-Pay-Signature: sha256=…
X-Claude-Pay-Timestamp: 1717000000
{ "id": "pi_…", "status": "paid", "amount": "25.000000", "asset": "USDT", … }Verify a signature
Compute HMAC-SHA256 over {timestamp}.{raw_body} with your signing secret and compare to the header.
// Node.js
import crypto from "crypto";
function verify(req, secret) {
const ts = req.headers["x-claude-pay-timestamp"];
const sig = req.headers["x-claude-pay-signature"];
const expected = "sha256=" + crypto
.createHmac("sha256", secret)
.update(ts + "." + req.rawBody)
.digest("hex");
return crypto.timingSafeEqual(Buffer.from(sig), Buffer.from(expected));
}Dhru Fusion module
Using Dhru Fusion? Download the pre-built module from your dashboard (Dhru setup), drop it into your gateways folder, and paste your API key + webhook secret. It uses the dhru_form webhook format automatically.