API Reference
Complete REST API documentation with examples for all endpoints.
Learn more
Quickstart
Create invoices over the REST API and redirect customers to hosted checkout.
Learn more
Webhooks
Real-time event notifications for payment status changes.
Learn more
Integrations
Pre-built plugins for popular platforms and frameworks.
Learn more
Agentic installation
Use @mintorio/pay to add x402-style paid routes without rebuilding billing infrastructure. Checkout invoice creation currently uses the REST API, not an advertised @mintory/checkout package.
app/api/premium/route.tsTypeScript
npm install @mintorio/pay
import { paidRoute } from '@mintorio/pay';
export const GET = paidRoute({
apiKey: process.env.MINTORIO_API_KEY!,
resourceId: 'premium-agent-data'
}, async () => {
return Response.json({ alpha: 'paid' });
});Hosted checkout quick start
Create invoices and hosted checkout links for website payments with the same Mintory account.
example.js
JavaScript
// Create an invoice
const invoice = await fetch('https://api.mintory.com/v1/invoices', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
fiatAmount: 99.99,
fiatCurrency: 'USD',
description: 'Premium Plan Subscription',
paymentOptions: [{
walletId: 'wallet_123',
chain: 'ethereum',
token: 'USDC'
}]
}),
});
const { hostedCheckoutSlug } = await invoice.json();
// Redirect customer to: /checkout/{hostedCheckoutSlug}API Endpoints
RESTful API designed for simplicity and consistency
POST
/v1/invoicesGET
/v1/invoices/{id}GET
/v1/invoicesPOST
/v1/invoices/{id}/cancelGET
/v1/settings/walletsPOST
/v1/webhooksSDKs & Libraries
Current package surface and planned SDKs
TS
@mintorio/pay
Published
API
REST API
Available
HN
Hono middleware
Via @mintorio/pay
PY
Python
Planned
GO
Go
Planned
Real-time Events
Webhook notifications
Subscribe to events and receive real-time notifications when payments are received, confirmed, or fail. Build reactive applications with our webhook system.
- Secure signature verification
- Automatic retries with backoff
- Event filtering and routing
- Delivery logs and debugging
Webhook PayloadPOST /webhook
{
"event": "invoice.paid",
"data": {
"invoiceId": "inv_123456",
"status": "paid_final",
"amount": "99.99",
"currency": "USD",
"payment": {
"txHash": "0xabc...",
"chain": "ethereum",
"token": "USDC",
"amount": "100.000000"
},
"metadata": {
"orderId": "order_789"
}
},
"timestamp": "2024-01-15T10:30:00Z"
}