Socket
Book a DemoInstallSign in
Socket

toss-node-api

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

toss-node-api

Node.js 용 Toss API 구현체입니다

latest
Source
npmnpm
Version
1.0.5
Version published
Maintainers
1
Created
Source

TOSS API for Node

TOSS API

TOSS 공식문서를 보고 만들었습니다.

사용방법

npm install --save toss-node-api
const TossAPI = require('toss-node-api')
const Toss = TossAPI.Toss

// 직접 발급받은 API 키를 사용하세요
const apiKey = 'sk_test_apikey1234567890a'
const tossObject = new Toss({ apiKey })
const requiredInfo = {} // 생략
const optionalInfo = {} // 생략

const main = async () => {
  try {
    const data = await tossObject.makePayment(requiredInfo, optionalInfo)
    console.log(data)
  } catch (e) {
    // 에러 핸들링
  }
}

main()

할 일

  • 엔드포인트 정의
  • 결제 생성
  • 결제 승인
  • 결제 취소
  • 환불
  • 환불 상태
  • 결제 상태
  • 에스크로
  • API 요청 HTTP Client
  • Body 검증 룰 추가
  • 문서화
  • dist 버전 빌드
  • npm 배포

Keywords

payment

FAQs

Package last updated on 27 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts