Developers Last updated 2026-05-25

Coin Moebius

A headless payment router for static sites.

One onSuccess callback. Many gateways. We built Coin Moebius because accepting money on static sites without renting a storefront was harder than it should be. The repo is open source and free for anyone to use.

MIT licensedTypeScriptStatic site friendlyHeadless

Overview

Coin Moebius is a thin browser core plus a verifier core, glued together by provider plug-ins. You bring the buy button. The router takes care of talking to the gateway and turning the gateway’s “they paid” signal into one shared shape your fulfillment code can rely on.

It is built for the JAMstack reality: a static front-end, a handful of serverless functions, and one webhook endpoint that handles every payment method you support. No storefront rental. No vendor lock-in. Add a provider when you need one. Remove it when you don’t.

Tiny core
Install only the providers you need
One callback
onSuccess for every gateway
Strict boundary
Browser core, server verifier — never mixed
Subscriptions
Normalized recurring-billing events across fiat providers

Install

Start with the core. The browser core is all you need to build against the API. Add the verifier on the server when you wire up your first webhook. Providers are entirely optional — install them only when you decide how you want to take payment.

1

Install the core

Browser-safe. Zero providers, zero gateway code.

Browsernpm
npm install @aquarian-metals/coin-moebius
2

Add the verifier when you ship a webhook

Server-only. Lives in your serverless function, never in the browser bundle.

Server / serverlessnpm
npm install @aquarian-metals/coin-moebius-server
3

Optional — add a provider

Pick only the gateways you accept. Add more later, remove what you stop using.

Stripe

Card, Apple Pay, Google Pay, hosted Stripe Checkout.

npm install @aquarian-metals/coin-moebius-stripe

Cryptomus

Multi-coin crypto checkout via Cryptomus.

npm install @aquarian-metals/coin-moebius-cryptomus

NOWPayments

Hosted crypto invoices via NOWPayments. US-friendly alternative to Cryptomus.

npm install @aquarian-metals/coin-moebius-nowpayments

Coinbase Business

Coinbase-hosted crypto checkout (replaces Coinbase Commerce). US and Singapore merchants only.

npm install @aquarian-metals/coin-moebius-coinbase-business

PayPal

PayPal Orders v2 redirect flow. Cards, PayPal balance, Venmo, Pay Later.

npm install @aquarian-metals/coin-moebius-paypal

Authorize.Net

Card processing via Authorize.Net Accept Hosted.

npm install @aquarian-metals/coin-moebius-authorizenet

Square (Block)

Card processing via Square Payment Links.

npm install @aquarian-metals/coin-moebius-square

Monero

Self-hosted XMR. No gateway, no API keys, no custodian, runs against your own monero-wallet-rpc.

npm install @aquarian-metals/coin-moebius-monero

Manual / pay by mail

Goldbacks, cash, wire, personal check, barter. Confirmation happens out of band.

npm install @aquarian-metals/coin-moebius-manual

Need something else? Copy packages/providers/template and publish your own under any npm scope.

Quick start

Two files: a tiny browser bootstrap that wires providers and listens for success, and a single webhook endpoint that verifies any provider you register. The README walks the rest of the surface.

In the browserTypeScript
import { createPaymentManager } from '@aquarian-metals/coin-moebius';
import createStripeProvider from '@aquarian-metals/coin-moebius-stripe';
import createCryptomusProvider from '@aquarian-metals/coin-moebius-cryptomus';
import { createMoneroProvider } from '@aquarian-metals/coin-moebius-monero';

const payments = createPaymentManager({
  providers: [
    createStripeProvider({ publishableKey: import.meta.env.VITE_STRIPE_KEY }),
    createCryptomusProvider(),
    createMoneroProvider({
      checkoutEndpoint: '/api/checkout/monero',
      statusEndpoint: '/api/payment-status',
    }),
  ],
});

payments.onSuccess((result) => {
  // Unlock the download. Update your DB. Send the receipt.
  console.log('Paid with', result.provider, result);
});

document.getElementById('buy').onclick = () => {
  payments.initiate({ productId: 'ebook-42', amount: 19.99, currency: 'USD' });
};
On the serverJavaScript
import { createVerifierRegistry } from '@aquarian-metals/coin-moebius-server';
import { createStripeVerifier } from '@aquarian-metals/coin-moebius-stripe/server';
import { createCryptomusVerifier } from '@aquarian-metals/coin-moebius-cryptomus/server';
import { createMoneroVerifier } from '@aquarian-metals/coin-moebius-monero/server';

const verifiers = createVerifierRegistry();

verifiers.register('stripe', createStripeVerifier({
  endpointSecret: process.env.STRIPE_WEBHOOK_SECRET,
}));

verifiers.register('cryptomus', createCryptomusVerifier({
  merchantUuid: process.env.CRYPTOMUS_MERCHANT_UUID,
  paymentApiKey: process.env.CRYPTOMUS_PAYMENT_API_KEY,
}));

verifiers.register('monero', createMoneroVerifier({
  hmacSecret: process.env.MONERO_HMAC_SECRET,
}).verify);

export default async function handler(req) {
  const event = await verifiers.verify(req.body, req.headers);

  if (event?.kind === 'payment' && event.status === 'success') {
    // Fulfill the order with one shared shape.
  }

  if (event?.kind === 'subscription') {
    // Handle lifecycle: created, renewed, canceled, payment_failed, updated.
  }

  return { statusCode: 200 };
}

Architecture

The flow is the same shape no matter which gateway you bolt on. The browser talks to a provider, the provider hands the user off to its checkout, and the gateway POSTs back to your webhook so the verifier can confirm payment and fulfill.

  1. 1

    Your UI

    Render any buy button you like.

  2. 2

    initiate()

    Core hands the order to the right provider.

  3. 3

    Checkout

    Gateway hosts payment; user completes it.

  4. 4

    Webhook

    Gateway POSTs to your verify endpoint.

  5. 5

    verify()

    Server core checks signatures, normalizes payload.

  6. 6

    Fulfill

    One shape. Unlock, ship, log, done.

For payments that take time to confirm like a NOWPayments invoice waiting for block confirmations, subscribeToStatus polls a tiny serverless endpoint until the webhook lands.

Packages

Every package follows the same shape. Browser providers expose initiate(); server providers expose a verifier and (where needed) a creator that holds gateway secrets.

@aquarian-metals/coin-moebius Browser

The browser core. createPaymentManager, register providers, initiate payments, listen for onSuccess / onPending / onError, and subscribe to long-running statuses.

@aquarian-metals/coin-moebius-server Server

The verifier core. createVerifierRegistry returns a registry whose register and verify methods normalize gateway webhooks into one shared payment shape your fulfillment code can trust.

@aquarian-metals/coin-moebius-stripe Both

Reference Stripe provider. Browser entry initiates Stripe Checkout via your serverless session endpoint; server entry verifies Stripe webhook signatures.

@aquarian-metals/coin-moebius-cryptomus Both

Reference Cryptomus provider. Browser entry posts to your Cryptomus creator function; server entry verifies Cryptomus webhooks with Node crypto. Routes BTC, USDT, and other Cryptomus-supported coins through the same callback shape.

@aquarian-metals/coin-moebius-nowpayments Both

NOWPayments hosted-invoice provider. Browser entry calls your NOWPayments creator function; server entry verifies IPN signatures. US-friendly alternative to Cryptomus.

@aquarian-metals/coin-moebius-coinbase-business Both

Coinbase Business Checkout provider (replaces the deprecated Coinbase Commerce surface). Browser entry redirects to the hosted_url returned by the Checkout API; server entry verifies Hook0 v1 webhook signatures via Web Crypto; optional ./subscription helper creates webhook subscriptions programmatically through the CDP API. US and Singapore merchants only.

@aquarian-metals/coin-moebius-paypal Both

PayPal Orders v2 provider. Browser entry redirects to PayPal-hosted approval; server ships two verifier flavors, the REST verify-webhook-signature endpoint (default, cheaper to wire up) and a local RSA-SHA256 verifier with cert URL prefix pinning (faster hot path).

@aquarian-metals/coin-moebius-authorizenet Both

Authorize.Net Accept Hosted provider. Browser entry mints a hosted-form token and form-POSTs to test.authorize.net or accept.authorize.net (consumer API is identical to the redirect providers); server entry verifies HMAC-SHA512 webhook signatures using the merchant Signature Key.

@aquarian-metals/coin-moebius-square Both

Square (Block) Payment Link provider. Browser entry redirects to the hosted checkout URL; server entry verifies HMAC-SHA256 signatures that include the notification URL as part of the signed payload.

@aquarian-metals/coin-moebius-monero Both

Self-hosted Monero (XMR) provider. Browser entry posts to your own checkout endpoint and shows the buyer a subaddress, amount, and QR-friendly URI; server entry exposes createMoneroCreator (subaddress minting), createMoneroVerifier (HMAC indexer webhooks), and createMoneroIndexer (the long-running chain watcher). No third-party gateway.

@aquarian-metals/coin-moebius-manual Both

Manual / async provider for Goldbacks, cash by mail, wire transfer, personal check, or barter. Browser entry shows mailing instructions; server helpers mint reference codes and mark transactions received from your dashboard.

Example project

The fastest way to see Coin Moebius end to end is the static site demo. It ships a Vite front-end with Stripe and Cryptomus providers, the matching Netlify functions, and the webhook glue. Clone it, set the env vars, and you have a working checkout.

Safety

  • API keys for any provider that authorizes spend on your account stay on the server. The browser posts to a function you control.
  • Webhook handlers should always call verify() before doing fulfillment work — signature checks live in the verifier.
  • The SDK ships a PaymentStore interface and an in-memory reference adapter. Implement it against your own backing store for production use.

Contribute

Gateway APIs change. The Stripe, Cryptomus, NOWPayments, Monero, and manual packages are the reference implementations — we expect the community to bring everything else. Want Lightning, Solana, Zano, gold escrow, or a regional processor? Copy the template, write an initiate() and a verifier, publish it under your own scope.

Already shipping with Coin Moebius? Tell us and we will link to the things people are building.