bootpaydevelopers
관리자

SDK 본인인증

프론트엔드에서 requestAuthentication()으로 PG 인증창(통신사 선택·OTP 입력)을 띄워 receipt_id를 받고, 서버에서 그 receipt_id로 결과를 조회해 이름·CI/DI 같은 값을 확정합니다. 프론트엔드 결과만으로 실명·성인 여부를 확정하면 안 됩니다.


1. 인증창 호출 (프론트엔드)

import { Bootpay } from '@bootpay/client-js'

async function requestAuthentication() {
    try {
        const response = await Bootpay.requestAuthentication({
            client_key: '[ Client Key ]',
            pg: '다날',
            order_name: '본인인증',                        // 인증창에 표시될 이름
            authentication_id: 'auth_' + Date.now(),       // 가맹점이 부여하는 고유 본인인증 ID
            user: {
                username: '홍길동',     // 선입력 시 사용자가 다시 입력하지 않아도 됨 (선택)
                phone: '01012345678'
            }
        })

        // 인증 완료 → receipt_id를 서버로 보내 결과를 확정
        if (response.event === 'done') {
            await confirmIdentity(response.data.receipt_id)
        }
    } catch (e) {
        console.log(e.message)   // 사용자가 인증창을 닫거나 인증에 실패한 경우
    }
}

async function confirmIdentity(receiptId) {
    await fetch('/api/identity/confirm', {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify({ receipt_id: receiptId })
    })
}

요청 파라미터

요청 파라미터

파라미터타입필수설명
client_keyStringYClient Key. 관리자 > 개발자 설정 > API 연동키에서 확인
pgStringY본인인증 PG사. 다날 또는 KCP 의 PG 코드를 넣습니다 (예: 다날, kcp). 값은 PG 코드에 있습니다
order_nameStringY인증창에 표시할 이름
authentication_idStringY가맹점이 부여하는 본인인증 고유 ID (중복 요청 추적용)
methodStringN인증 수단. 생략하면 본인인증으로 처리됩니다
user.usernameStringN이름 선입력값
user.phoneStringN휴대폰번호 선입력값
metadataObjectN가맹점 커스텀 데이터. 결과 조회 응답에 그대로 되돌아옵니다
extraObjectN추가 옵션. extra.carrier로 다날 인증창의 통신사를 고정할 수 있습니다

인증 완료 이벤트 데이터

done 이벤트로 받는 데이터는 결과 조회를 위한 최소 정보입니다. 실명·CI/DI 같은 값은 들어있지 않으므로 서버 조회가 필요합니다.

JSON
{
  "event": "done",
  "data": {
    "receipt_id": "624ce9d31fc19202e4746f3b",
    "authentication_id": "1649207763202",
    "gateway_url": "https://gw.bootpay.co.kr",
    "metadata": {},
    "pg": "다날",
    "method": "인증",
    "method_symbol": "auth",
    "method_origin": "인증",
    "method_origin_symbol": "auth",
    "authenticated_at": "2026-04-06T10:16:20+09:00",
    "requested_at": "2026-04-06T10:16:03+09:00",
    "status_locale": "본인인증완료",
    "status": 12
  }
}

2. 결과 조회 (서버)

프론트엔드에서 받은 receipt_id로 서버에서 인증 결과를 조회합니다. 이 응답의 authenticate_data가 신뢰할 수 있는 최종 결과입니다.

요청 파라미터

파라미터위치필수설명
receipt_idPathY프론트엔드 done 이벤트에서 받은 본인인증 영수증 ID

서버 SDK 7개 언어 조회 · 검증 코드와 응답 필드 전체는 인증 정보 조회·검증에 있습니다. 응답의 status 가 12(본인인증완료)일 때만 완료로 처리하고, 필요한 값만 저장합니다.

GET/v2/certificate/{receipt_id}
Base URLhttps://api.bootpay.co.kr
인증Basic Auth

에러 코드

결과 조회에서 나는 에러(AUTH_NOT_FOUND · AUTH_NOT_CONFIRMED · AUTH_EXPIRED · RC_NOT_AUTH 등)와 응답 본문 형식은 인증 정보 조회·검증 › 에러 코드에 있습니다. 인증·권한 관련 공통 에러는 에러 코드표를 참고합니다.

함께 보기