The CRYPTOMENTS Widget SDK is a JavaScript library that lets you embed a crypto payment UI into partner websites with minimal effort. Deposits, withdrawals, Axim Pay, payment links — all available as iframes or popups.
Doc version: 2.0Last updated: March 30, 2026CDN: https://widget.cryptoments.cc/sdk/widget.cryptoments.js
1Overview
CryptoPaymentsWidget is a JavaScript SDK that lets you embed a crypto payment UI into partner websites with minimal effort.
Screen flows per widget type and the features of each view.
Deposit
The widget where users deposit USDT. The user picks a payment method (Axim Pay / Direct crypto deposit / KRW Top-up TORQ), receives a deposit address, and sends.
JavaScript
await widget.openDeposit('user_001', {
// Amount
presetAmount: 50000, // Preset amount
presetAmountCurrency: 'KRW', // preset unit: 'KRW' | 'USD' (default 'USD')
minAmount: 10, // Minimum amount (USDT basis, default 10)
maxAmount: 100000, // Maximum amount (USDT basis, default 100000)
allowAmountEdit: true, // Allow manual amount edit (default true)
amountOptions: [10000, 50000, 100000], // Quick amount buttons (KRW)
fixedRateKrw: 1400, // Fixed FX rate (defaults to live rate if unset)// Network
chainType: 'BSC', // Pin network (defaults to user choice if unset)// UX
skipInput: false, // true: skip the amount-input screen (presetAmount required)// Payment method
torqEnabled: true, // Show the KRW Top-up (TORQ) payment card (default true)
});
Deposit Flow Overview:
Enter amount→Choose payment method→[ Axim Pay ]→App connect & proceed→Success/Failure
Enter amount→Choose payment method→[ Direct crypto payment ]→Pick network + address→Awaiting deposit
Enter amount→Choose payment method→[ KRW Top-up ]→App connect & KYC check→Quote→Bank transfer / Contact transfer→Awaiting verification→Success/Failure/Dispute
Axim Pay
Enter amount→Choose payment method→[ Axim Pay ]→App connect & proceed→Success/Failure
① Enter Amount
The first screen, where the user enters the KRW amount to deposit. The USDT amount is computed from the exchange rate.
KRW ↔ USDT two-way input (changing one auto-updates the other)
Live rate (1 USDT = N KRW)
Quick amount buttons shown when amountOptions is set
Min/max amount guide (from API or parameters)
If allowAmountEdit: false, the amount input is disabled
With presetAmount + skipInput: true, this screen is skipped
② Choose Payment Method
The screen where the user picks a payment method.
Axim Pay (recommended): pay via the Axim Wallet app, no gas fees Shown only when aximEnabled: true
Direct crypto payment: send directly from a personal wallet or exchange
KRW Top-up (TORQ): top up USDT via KRW bank transfer, then pay Shown when torqEnabled: true (default). Requires a KRW amount input (minimum 10,000 KRW)
Fixed Amount Mode skipInput + presetAmount
If skipInput: true and presetAmount is valid, the amount card is shown together
The [ ① Enter Amount ] screen is skipped and this screen is shown instead
If amount is not set (skipInput: true, no presetAmount), the button is disabled and an error is shown
③ Axim Pay App Connect
After picking Axim Pay, the screen varies by user environment.
Mobile: "Please confirm in the Axim Wallet app" — the app launches automatically; the screen advances on approval
Desktop: QR code shown — scan with the Axim Wallet app and approve
If Axim Wallet is not installed, the "About Axim Pay" link opens the install guide
④ Axim Pay Payment Request
The screen where the user confirms the amount and network, then sends a payment request to the Axim Wallet app.
Shows the amount (KRW/USDT) and the applied rate
Payment network dropdown (chain can be changed)
Clicking "Request Payment" sends a payment notification to the Axim Wallet app
"Change Payment Method" returns to the previous step
⑤ Axim Pay Awaiting Approval / Result
After sending the payment notification, the widget waits for the user's approval and transitions to success/failure based on the result.
Awaits approval after sending the payment notification (axim-wallet-confirm)
Success: "Payment complete", auto-closes
Failure/Rejected: shows reason, "Retry" button
"Open in app" deep-link button (mobile); "Cancel Payment" stops the payment
Events:
aximPaymentSuccess: fired on approval in the app
aximPaymentFailed: fired on rejection or timeout
depositCompleted: fired on final deposit completion
Direct Crypto Payment
Enter amount→Choose payment method→[ Direct crypto payment ]→Pick network + address→Awaiting deposit
Pick Network + Deposit Address
When the user picks Direct Crypto Payment, this screen shows the network choice and the deposit address.
After picking a network, click "Show Deposit Address" → QR code + address text
Address copy button
If a deposit was reserved, a countdown is shown (expired notice on timeout)
Warning shown at the bottom about network mismatch
The chainType parameter can pin the network
Events:
depositCompleted: final deposit completion
KRW Top-up Payment
Enter amount→Choose payment method→[ KRW Top-up ]→App connect & KYC check→Quote→Bank transfer / Contact transfer→Awaiting verification→Success/Failure/Dispute
The deposit branch entered when the user picks KRW Top-up on the payment method screen. The user tops up USDT via KRW bank transfer and the payment completes. This payment method is exposed via the torqEnabled option.
① Axim Pay App Connect
After picking Axim Pay, the screen varies by user environment.
Mobile: "Please confirm in the Axim Wallet app" — the app launches automatically; the screen advances on approval
Desktop: QR code shown — scan with the Axim Wallet app and approve
If Axim Wallet is not installed, the "About Axim Pay" link opens the install guide
② Axim KYC Check
Checks the KYC status inside Axim Wallet.
Settings → My Info → Verify
The verification status is polled; the screen advances automatically once complete.
③ Quote
Shows the exchange rate, fee, and resulting USDT for the entered KRW amount.
Live KRW ↔ USDT conversion, applied rate and premium
Minimum 10,000 KRW (LaaS host limit) — quotes below this are rejected
The KRW amount entered on the deposit widget is passed through to the quote step
④ Transfer Instructions
The seller (LP) information is displayed; the user sends KRW to the indicated account / contact.
Bank transfer: send to the displayed bank/account/holder
Contact transfer: in the displayed bank app, send via phone-number-based contact transfer (phone copy / contact save provided)
Transfer deadline countdown (on expiry before transfer, an expired notice with "Retry" is shown)
⑤ Report Transfer → Awaiting Verification
When the user clicks "Transfer Complete", the widget waits for the LP's deposit confirmation.
Once the LP confirms the deposit, the flow auto-completes
If the deadline passes after the transfer report, the screen transitions to dispute reporting (the user who sent funds is not expired)
Complete: the topped-up USDT amount, escrowId, and txHash are shown; the torqTopupCompleted event fires
The widget where the user requests a USDT withdrawal to an external wallet. Withdrawals are processed after partner-side approval.
JavaScript
await widget.openWithdrawal('user_001', {
// Amount
presetAmount: 50000, // Preset amount
presetAmountCurrency: 'KRW', // preset unit: 'KRW' | 'USD' (default 'USD')
minAmount: 10, // Minimum amount (USDT basis, default 10)
maxAmount: 100000, // Maximum amount (USDT basis, default 100000)
allowAmountEdit: true, // Allow manual amount edit (default true)
fixedRateKrw: 1400, // Fixed FX rate (defaults to live rate if unset)// Network
chainType: 'BSC', // Pin network (defaults to user choice if unset)// UX
skipInput: false, // true: skip the amount input (presetAmount required)
showBalance: true, // Show available balance (default true)// Withdrawal request callback (required)
reqWithdraw: async (data) => {
// data: { userId, chainType, currencyType, toAddress, amountCrypto, amountKrw, exchangeRate }const res = awaitfetch('/api/withdraw', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(data)
});
const result = await res.json();
return result.success === true; // return true on success, false/throw to show the failure screen
}
});
⚠️
The reqWithdraw callback is required. Without it, the widget will not open.
Returning true → success screen + onSuccess callback. Returning false or throwing → failure screen.
The SDK manages tokens automatically. You don't need to implement a token-refresh path of your own.
9FAQ & Troubleshooting
Common issues and how to resolve them.
The widget doesn't open
Verify the SDK loaded successfully
Verify the CryptoPaymentsWidget object exists
Check the browser console (F12) for errors
Verify the partnerApiUrl server is responding normally
Events don't fire
Verify the listener is registered via addEventListener
Verify the event name is correct (case-sensitive)
Verify the listener is registered before opening the widget
Inspect the full flow via the message event
JavaScript
// For debugging (see all events)
widget.addEventListener('message', (e) => {
console.log('EVENT:', e);
});
Token-related errors
Verify the server's partnerApiUrl endpoint is operating correctly
Verify the API Key / Secret are correct
Verify the server time is accurate (to avoid timestamp errors)
ℹ️
The SDK requests and manages tokens automatically. You don't need to handle tokens manually on the client.
CORS errors
Verify the current domain is in the allowed Whitelist
Verify the protocol is included (https://)
After configuration changes, allow some propagation time
Deposits aren't being detected
Verify you sent on the correct network (chain)
Verify the deposit address is correct
Verify the amount meets the minimum
Allow on-chain confirmation time (typically 1–5 minutes)
Withdrawals fail
Verify reqWithdraw is implemented
Verify your server API is responding normally
Verify the balance is sufficient
Verify the wallet address is correct
KRW Top-up (TORQ) doesn't proceed
If the "KRW Top-up" card isn't visible in the payment methods, verify that openDeposit's torqEnabled option is not false (default true)
If the card is disabled (un-clickable), verify a KRW amount has been entered — the card requires an amount to be active
When the quote step looks like a "CORS error": it's usually not actually CORS but a 502 from upstream because the amount is below the 10,000 KRW minimum. Enter 10,000 KRW or more.
If "Verifying" persists after reporting a transfer, you're waiting for the seller (LP) to confirm the deposit (test transfers don't actually arrive and won't complete)