QianPay
QianPay turns a wallet address into a payment business: links, embedded checkout, invoices and subscriptions, all settled in USDC on-chain with no custody. You keep your keys; the money goes straight to you.
Everything below lives at pay.qian.ag. Payments run on Base today, with Arc support ready for its mainnet.
Payment links
Create a link at pay.qian.ag/new for a fixed USDC amount. Anyone with the link can pay in USDC directly or in ETH (swapped to USDC in the same transaction). The page becomes the receipt once paid.
Creating a link costs nothing and needs no account: one wallet signature proves you control the payout address.
Dashboard and API keys
Sign in at pay.qian.ag/dashboard with one wallet signature. You get link stats (views, unique visitors, settlement), a display name shown to payers, and API keys.
API keys create links programmatically:
curl -X POST https://api.qian.ag/pay/intents \
-H "Authorization: Bearer qp_your_key" \
-H "Content-Type: application/json" \
-d '{"chain":"base","usdcAmount":"5000000","memo":"Order #1042"}'Amounts are raw 6-decimal USDC units (5000000 = $5). The payout address is pinned to the key's owner, so a key can mint links payable to you and nothing else. That makes it safe to embed in a public page. Keys cannot touch account settings.
Checkout button
Drop one script tag into any site:
<script src="https://pay.qian.ag/checkout.js"
data-key="qp_your_key"
data-amount="5.00"
data-memo="Coffee"></script>That renders a "Pay with USDC" button. Clicking it creates the payment and opens the hosted payment page in a popup; when it settles, the button flips to paid and a qianpay:paid event fires on the script tag.
For your own UI, call the SDK directly:
QianPay.open({
key: 'qp_your_key',
amount: '5.00',
memo: 'Coffee',
onPaid: ({ ref }) => unlockTheThing(ref),
})Webhooks
Set a webhook URL in the dashboard and generate a signing secret. The moment a payment settles on-chain, we POST it to your server:
{ "type": "intent.paid", "ref": "0x…", "chain": "base",
"txHash": "0x…", "usdcAmount": "5000000", "payer": "0x…", "paidAt": 1789000000 }Every request carries an x-qianpay-signature header: HMAC-SHA256 of the raw body, keyed with your secret. Verify it before trusting the payload. Failed deliveries retry at 5s, 30s and 5m; the dashboard shows delivery health. Event types: intent.paid, invoice.paid, subscription.charged, subscription.canceled, subscription.delinquent.
Invoices
An invoice is a payment link with paperwork: line items, a due date, a "billed to" label and a note. Create one in the dashboard or over the API:
curl -X POST https://api.qian.ag/pay/invoices \
-H "Authorization: Bearer qp_your_key" \
-H "Content-Type: application/json" \
-d '{"chain":"base","items":[{"desc":"Design work","qty":3,"unitUsdc":"25000000"}],
"dueDate":1790000000,"payerLabel":"ACME Corp"}'The payment page renders the full invoice and doubles as the receipt after settlement. It prints cleanly, so "save as PDF" in the browser is the PDF export.
Subscriptions
Recurring USDC pulls, on-chain. You create an offer (name, amount, period) in the dashboard and share the subscribe link. The subscriber approves a USDC allowance of three periods — never unlimited — and the first period charges in the subscribe transaction itself.
After that, charge is permissionless: our keeper triggers due charges automatically, but anyone (including you) can call it, and the funds always flow subscriber → merchant regardless of who calls. Missed periods lapse rather than stack, so a dormant subscription can never be charged repeatedly to catch up.
Subscribers manage everything at pay.qian.ag/subs: cancel is one transaction, effective immediately, and revoking the USDC allowance ends charging just as hard. Merchants see active subscribers, MRR and failing payments in the dashboard; three consecutive failed charges mark a subscription delinquent and fire a webhook.
The contract is QianSubscriptions — no owner, no setters, no held balances. Addresses are on the contracts page.
x402 for agents
Our x402 endpoints let AI agents pay $0.01 USDC per API call instead of managing keys. Payments verify and settle through our own facilitator, which is also public — spec-shaped verify and settle endpoints any x402 seller can point at:
POST https://api.qian.ag/x402/facilitator/verify
POST https://api.qian.ag/x402/facilitator/settleIt accepts base and arc-testnet networks and settles EIP-3009 transferWithAuthorization payloads. Free to use, rate-limited by IP. Client tooling ships in @qianexchange/mcp.
