superbilling
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

Superbilling API SDK

Superbilling API를 쉽게 사용할 수 있는 TypeScript/JavaScript SDK입니다.

설치

npm install superbilling
# 또는
yarn add superbilling
# 또는
pnpm add superbilling

사용 방법

import { SuperBillingClient } from 'superbilling';

// 인증 정보와 함께 인스턴스 생성
// 각 key는 optional 합니다.
const superbilling = new SuperBillingClient({
  clientKey: 'your-client-key',
  secretAccessKey: 'your-secret-access-key'
});

// API 호출
const portalSession = await superbilling.portal_session.create({
  customerId: 'customer-id',
  returnUrl: 'https://your-return-url.com'
});

제공 API

고객 정보 조회 (Customer)

// 고객 정보 조회
const customer = await superbilling.customer.get('customer-id');

포털 세션 생성 (Portal Session)

// 포털 세션 생성
const session = await superbilling.portal_session.create({
  customerId: 'customer-id',
  returnUrl: 'https://your-return-url.com'
});

요금제 목록 조회 (Plan)

// 요금제 목록 조회
const plans = await superbilling.plan.list();

타입 정의

SDK는 TypeScript로 작성되어 있어 모든 API 요청 및 응답에 대한 타입 정의를 제공합니다.

import type { Customer, Plan, PortalSession } from 'superbilling';

Dependents (0)

Package Sidebar

Install

npm i superbilling

Weekly Downloads

120

Version

0.0.1

License

ISC

Unpacked Size

22.6 kB

Total Files

47

Last publish

Collaborators

  • greatsumini