The Myaza POS SDK is a production-grade JavaScript library that lets merchants accept cryptocurrency payments without requiring webhook setup or Web3 knowledge. It works with React, Next.js, Vue, Svelte, and plain JavaScript.
How It Works
The SDK handles the entire payment flow:
Initialize the SDK with your merchant ID
Call checkout() with a fiat amount
The SDK opens a payment modal where the customer selects a chain and token
The SDK generates a deposit address and QR code
It polls for on-chain confirmation automatically
Your app receives events as the payment progresses
Your App Myaza POS SDK Myaza API
│ │ │
│ new MyazaPOS(config) │ │
│─────────────────────────────>│ │
│ │ │
│ pos.init() │ GET /merchant │
│─────────────────────────────>│──────────────────────────────>│
│ │ merchant profile │
│ │<──────────────────────────────│
│ │ │
│ pos.checkout({ amount }) │ GET /networks │
│─────────────────────────────>│──────────────────────────────>│
│ │ supported chains + tokens │
│ │<──────────────────────────────│
│ │ │
│ │ Opens payment modal │
│ │ Customer selects chain │
│ │ │
│ │ POST /sessions │
│ │──────────────────────────────>│
│ │ session + deposit address │
│ │<──────────────────────────────│
│ │ │
│ Event: payment.created │ Polls session status │
│<─────────────────────────────│──────────────────────────────>│
│ │ │
│ Event: payment.confirmed │ Payment confirmed │
│<─────────────────────────────│<──────────────────────────────│
│ │ │
Features
Zero Web3 knowledge required - no wallets, gas, or chain configuration needed
Built-in payment UI - modal with network selector, QR code, and status tracking
Event-driven - subscribe to payment lifecycle events
Framework agnostic - works with React, Next.js, Vue, Svelte, or vanilla JS
Theming - customize colors, fonts, logo, and border radius
Plugin system - extend with analytics, Shopify, or custom plugins
Fraud detection - built-in fraud engine with velocity checks and address blocking
Sandbox mode - test without real funds
TypeScript first - full type definitions included
Zero runtime dependencies
Installation
npm install @myazahq/pos-sdk
Quick Example
import { MyazaPOS } from '@myazahq/pos-sdk' ;
const pos = new MyazaPOS ({
merchantId: 'your-merchant-id' ,
isSandbox: true ,
});
await pos . init ();
pos . on ( 'payment.confirmed' , ( event ) => {
console . log ( 'Payment confirmed!' , event . session );
});
await pos . checkout ({ amount: 25.00 , currency: 'USD' });
Always verify payment status from your server before fulfilling an order.
Never trust client-side events alone.
Next Steps
Quickstart Get your first payment working in 5 minutes
Configuration Theming, sandbox mode, and advanced options
Events Full event reference for payment lifecycle
Framework Guides React, Next.js, Vue, Svelte examples