Developer Tools

Add crypto payments to your website

Use the REST API to create wallet-bound invoices, redirect customers to hosted checkout, and receive signed webhook updates. Live checkout rails are limited to Ethereum and Polygon stablecoin options in the current deployment.

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/invoices
GET/v1/invoices/{id}
GET/v1/invoices
POST/v1/invoices/{id}/cancel
GET/v1/settings/wallets
POST/v1/webhooks

SDKs & 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"
}

REST-first hosted checkout

Use the REST API for hosted checkout invoices. @mintorio/pay is only for x402-style paid routes; do not install @mintory/checkout because it is not the current public integration path.

Start building today

Get your test key, protect a paid route, or add checkout in minutes.