npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@k-stable/sdk

v0.6.0

Published

쇼핑몰 FE에서 Wallet 결제창을 호출하기 위한 SDK입니다.

Readme

@k-stable/sdk

쇼핑몰 FE에서 Wallet 결제창을 호출하기 위한 SDK입니다.

설치

npm i @k-stable/sdk

핵심 API (Toss-style)

import { loadKStablePay, ANONYMOUS } from '@k-stable/sdk';

const kStable = await loadKStablePay('YOUR_CLIENT_KEY');

const widget = kStable.wallet(ANONYMOUS); // 회원이면 customer UUID

widget.setInfo({
  customerName: '홍길동',
  customerPhone: '01012345678',
  productName: '멤버십 구독권',
  amount: 12000,
  checkoutExpiresAt: '2026-03-19T12:30:00.000Z',
});

widget.renderWallet('#wallet-widget');

widget.requestPayment({
  orderId: 'order-001',
  customerId: 'uuid-...',
  customerName: '홍길동',
  customerPhone: '01012345678',
  productName: '멤버십 구독권',
  amount: 12000,
  successUrl: 'https://shop.example.com/pay/success',
  failUrl: 'https://shop.example.com/pay/fail',
  checkoutExpiresAt: '2026-03-19T12:30:00.000Z',
});
  • 회원 결제: customerKey = 회원 UUID
  • 비회원 결제: customerKey = ANONYMOUS
  • SDK 초기화는 clientKey로만 수행합니다.

고급 옵션이 필요한 경우:

await loadKStablePay('YOUR_CLIENT_KEY', {
  checkoutOrigin: 'https://wallet.example.com',
  checkoutPath: '/checkout',
  appDeepLinkBaseUrl: 'kwallet://checkout',
  defaultOpenStrategy: 'APP_FIRST',
  fallbackTimeoutMs: 1200,
});

결제 전략

  • APP_FIRST
    • Wallet 앱 열기 시도
    • 앱 미설치/취소/실패 시 웹 checkout으로 fallback
  • WEB_ONLY
    • 바로 웹 checkout 이동

checkoutExpiresAt이 지난 상태에서 결제 요청 시 SDK가 SESSION_EXPIREDfailUrl 이동 처리합니다.

결과 파싱

import { initWalletSdk, assertSuccessResult } from '@k-stable/sdk';

const sdk = initWalletSdk({
  checkoutOrigin: 'https://wallet.example.com',
  merchantId: 'mrc_demo_001',
});

const result = sdk.parseRedirectResult(window.location.href);
if (result.type === 'SUCCESS') {
  assertSuccessResult(result, { orderId: 'order-001', amount: 12000 });
}

Legacy API (호환)

기존 initWalletSdk().requestPaymentRedirect(...)도 계속 사용 가능합니다.

UI preview (local)

cd /Users/moonyaeyoon/k-stable-pay/wallet/open-sdk
npm run build
python3 -m http.server 5500
  • http://localhost:5500/examples/preview/merchant.html