Stablecoin payment SDKs for Node.js

The public testnet beta uses test USDC on Base Sepolia and Ethereum Sepolia, and test USDT on TRON Nile. There is no real-money charge.

Install the SDKs

Use Node.js 22.20 or newer. The server SDK creates payments and quotes. The fulfillment SDK receives signed events and processes them with PostgreSQL.

npm install @0to1pay/server-sdk @0to1pay/fulfillment-sdk pg

Discover assets with a test key

Issue a project test key in the dashboard. Keep ZERO_TO_ONE_PAY_API_KEY in the server environment. The API origin is https://api.0to1pay.com and the HTTP paths start with /v1.

import { ZeroToOnePayClient } from '@0to1pay/server-sdk';

const apiKey = process.env.ZERO_TO_ONE_PAY_API_KEY;
if (!apiKey) throw new Error('Set ZERO_TO_ONE_PAY_API_KEY');
const client = new ZeroToOnePayClient({
  origin: 'https://api.0to1pay.com', apiKey
});
const assets = await client.call('listChainAssets', {});

From order to access pass

Register single-use merchant recipients, then create a payment and quote. The buyer signs before transferring and again when submitting the transaction hash. Verify the raw signed webhook, persist the command, then grant access in a worker. The Next.js example runs this flow on Base Sepolia.

Integration resources

한국어