인증창 없이 연동
부트페이 인증창 없이 가맹점이 직접 만든 화면에서 본인인증을 합니다(REST API 본인인증). 서버가 사용자 정보로 인증을 요청하면 사용자 휴대폰으로 인증번호(OTP)가 전송되거나 PASS 앱 푸시가 가고, 사용자가 입력한 번호로 승인합니다. 모든 호출은 서버에서 Basic Auth로 인증합니다.
전체 흐름
| 단계 | API | 설명 |
|---|---|---|
| ① 인증 요청 | POST /v2/request/authentication | 이름·생년월일·통신사·휴대폰 번호로 인증 요청. SMS 인증번호 발송 또는 PASS 앱 푸시 |
| ② 인증 승인 | POST /v2/authenticate/confirm | 사용자가 입력한 OTP로 인증 승인 |
| ③ 인증번호 재전송 | POST /v2/authenticate/realarm | (선택) 인증번호를 받지 못한 경우 SMS 재전송 |
| ④ 인증 정보 조회 | GET /v2/certificate/{receipt_id} | 승인 응답 외에 다시 확인이 필요할 때(인증 정보 조회·검증) |
① 인증 요청
요청 파라미터
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
| authentication_id | String | Y | 가맹점 고유 인증번호. 유니크한 값으로 생성하고 DB에 저장합니다 |
| pg | String | Y | 인증 PG. 인증창 없는 REST 방식은 다날만 지원하며, 다날 계약에 REST 본인인증이 열려 있어야 합니다. 다른 PG를 보내면 AUTH_CONFIRM_METHOD_NOT_FOUND(2406, HTTP 404)가 반환됩니다 |
| method | String | Y | 본인인증 |
| username | String | Y | 사용자 이름 |
| identity_no | String | Y | 생년월일 6자리(YYMMDD) + 주민등록번호 뒤 첫 1자리 = 항상 7자리 (예: 9001011). 7자 미만이면 PG 호출 전에 거부됩니다 |
| carrier | String | Y | 통신사. SKT / KT / LGT / SKT_MVNO / KT_MVNO / LGT_MVNO 6개 값만 허용됩니다 (_MVNO는 알뜰폰) |
| phone | String | Y | 휴대폰 번호 (하이픈 없이) |
| client_ip | String | N | 인증을 요청한 사용자의 IP. 생략하면 API를 호출한 서버의 IP가 대신 쓰입니다 |
| order_name | String | Y | 인증 요청명 (예: "회원가입 본인인증") |
| authenticate_type | String | N | sms(문자 인증) 또는 pass(PASS 앱 인증). 미입력 시 sms. 두 값 외에는 요청이 거부됩니다 |
| site_url | String | N | 본인인증을 진행하는 사이트 URL 또는 앱 이름. 부트페이가 검사하지는 않지만 다날 인증창 표기값(CPTITLE)으로 사용됩니다 |
| user | Object | N | 추가 사용자 정보. 최상위 username · phone 을 생략하면 user.username · user.phone 이 대신 쓰입니다 |
| extra | Object | N | 추가 옵션. extra.timeout 은 본인인증에 적용되지 않습니다(아래) |
| metadata | Object | N | 전달할 추가 데이터. 결과에 그대로 반환됩니다 |
응답 예시
status: 51은 SMS/PASS 발송이 끝나고 OTP 승인을 기다리는 상태입니다. receipt_id를 보관했다가 승인 단계에서 사용합니다.
51은 상태 한글 라벨이 정의돼 있지 않아 status_locale 키 자체가 응답에서 빠집니다.
POST
/v2/request/authenticationBase URLhttps://api.bootpay.co.kr
인증Basic Auth
import { Bootpay } from '@bootpay/backend-js'
Bootpay.setConfiguration({
client_key: '[ Client Key ]',
secret_key: '[ Secret Key ]'
})
// 사용자 휴대폰으로 인증번호가 전송된다.
const requested = await Bootpay.requestAuthentication({
authentication_id: 'auth_' + Date.now(),
pg: '다날',
method: '본인인증',
order_name: '회원가입 본인인증',
authenticate_type: 'sms',
username: '홍길동',
identity_no: '9001011', // 생년월일 6자리 + 주민등록번호 뒤 첫 1자리 = 7자리
carrier: 'SKT',
phone: '01012345678',
client_ip: req.headers['x-forwarded-for']?.split(',')[0] ?? req.socket.remoteAddress
})
// receipt_id를 세션·DB에 보관했다가 승인 단계에서 사용한다.
console.log(requested.receipt_id)import time
from bootpay_backend import BootpayBackend
bootpay = BootpayBackend(client_key='[ Client Key ]', secret_key='[ Secret Key ]')
# 사용자 휴대폰으로 인증번호가 전송된다.
requested = bootpay.request_authentication(
authentication_id=f'auth_{int(time.time())}',
pg='다날',
method='본인인증',
order_name='회원가입 본인인증',
authenticate_type='sms',
username='홍길동',
identity_no='9001011', # 생년월일 6자리 + 주민등록번호 뒤 첫 1자리 = 7자리
carrier='SKT',
phone='01012345678',
client_ip=request.headers.get('X-Forwarded-For', request.remote_addr).split(',')[0]
)
# receipt_id를 세션·DB에 보관했다가 승인 단계에서 사용한다.
print(requested.get('receipt_id'))BootpayApi::setClientKeyConfiguration('[ Client Key ]', '[ Secret Key ]');
// 사용자 휴대폰으로 인증번호가 전송된다.
$requested = BootpayApi::requestAuthentication([
'authentication_id' => 'auth_' . time(),
'pg' => '다날',
'method' => '본인인증',
'order_name' => '회원가입 본인인증',
'authenticate_type' => 'sms',
'username' => '홍길동',
'identity_no' => '9001011', // 생년월일 6자리 + 주민등록번호 뒤 첫 1자리 = 7자리
'carrier' => 'SKT',
'phone' => '01012345678',
'client_ip' => $_SERVER['HTTP_X_FORWARDED_FOR'] ?? $_SERVER['REMOTE_ADDR']
]);
// receipt_id를 세션·DB에 보관했다가 승인 단계에서 사용한다.
echo $requested->receipt_id;import java.util.HashMap;
import kr.co.bootpay.pg.Bootpay;
import kr.co.bootpay.pg.model.request.Authentication;
Bootpay bootpay = Bootpay.withClientKey("[ Client Key ]", "[ Secret Key ]");
Authentication auth = new Authentication();
auth.authenticationId = "auth_" + System.currentTimeMillis();
auth.pg = "다날";
auth.method = "본인인증";
auth.orderName = "회원가입 본인인증";
auth.authenticateType = "sms";
auth.username = "홍길동";
auth.identityNo = "9001011"; // 생년월일 6자리 + 주민등록번호 뒤 첫 1자리 = 7자리
auth.carrier = "SKT";
auth.phone = "01012345678";
auth.clientIp = clientIp;
// 사용자 휴대폰으로 인증번호가 전송된다.
HashMap<String, Object> requested = bootpay.requestAuthentication(auth);
// receipt_id를 세션·DB에 보관했다가 승인 단계에서 사용한다.
String receiptId = (String) requested.get("receipt_id");bootpay = Bootpay::RestClient.new(client_key: '[ Client Key ]', secret_key: '[ Secret Key ]')
# 사용자 휴대폰으로 인증번호가 전송된다.
requested = bootpay.request_authentication(
authentication_id: "auth_#{Time.now.to_i}",
pg: '다날',
method: '본인인증',
order_name: '회원가입 본인인증',
authenticate_type: 'sms',
username: '홍길동',
identity_no: '9001011', # 생년월일 6자리 + 주민등록번호 뒤 첫 1자리 = 7자리
carrier: 'SKT',
phone: '01012345678',
site_url: 'https://example.com', # gem 에서는 필수 키워드 인자
client_ip: request.env['HTTP_X_FORWARDED_FOR'] || request.ip
)
# receipt_id를 세션·DB에 보관했다가 승인 단계에서 사용한다. 응답 키는 심볼이다.
receipt_id = requested.data[:receipt_id]api := bootpay.NewAPIWithClientKey("[ Client Key ]", "[ Secret Key ]", nil, "")
authData := bootpay.Authentication{
AuthenticationId: fmt.Sprintf("auth_%d", time.Now().UnixMilli()),
Pg: "다날",
Method: "본인인증",
OrderName: "회원가입 본인인증",
AuthenticateType: "sms",
Username: "홍길동",
IdentityNo: "9001011", // 생년월일 6자리 + 주민등록번호 뒤 첫 1자리 = 7자리
Carrier: "SKT",
Phone: "01012345678",
ClientIp: clientIp,
}
// 사용자 휴대폰으로 인증번호가 전송된다.
requested, err := api.RequestAuthentication(authData)
if err != nil {
return err
}
// 요청 실패는 err 가 아니라 error_code 가 담긴 응답으로 온다 (err 는 네트워크 오류일 때만).
receiptId, ok := requested["receipt_id"].(string)
if !ok {
return fmt.Errorf("본인인증 요청 실패: %v", requested["error_code"])
}
// receipt_id를 세션·DB에 보관했다가 승인 단계에서 사용한다.using Bootpay;
using Bootpay.models;
using Newtonsoft.Json;
var api = BootpayApi.WithClientKey("[ Client Key ]", "[ Secret Key ]");
var auth = new Authentication
{
authenticationId = $"auth_{DateTimeOffset.Now.ToUnixTimeMilliseconds()}",
pg = "다날",
method = "본인인증",
orderName = "회원가입 본인인증",
authenticateType = "sms",
username = "홍길동",
identityNo = "9001011", // 생년월일 6자리 + 주민등록번호 뒤 첫 1자리 = 7자리
carrier = "SKT",
phone = "01012345678",
clientIp = clientIp
};
// 사용자 휴대폰으로 인증번호가 전송된다.
var response = await api.RequestAuthentication(auth);
var requested = JsonConvert.DeserializeObject<Dictionary<string, object>>(
await response.Content.ReadAsStringAsync()
);
// receipt_id를 세션·DB에 보관했다가 승인 단계에서 사용한다.
var receiptId = requested["receipt_id"].ToString();JSON
{
"receipt_id": "636375501fc19203724b3ad8",
"authentication_id": "1667462479",
"metadata": {},
"pg": "다날",
"method": "인증",
"method_symbol": "auth",
"method_origin": "인증",
"method_origin_symbol": "auth",
"requested_at": "2026-04-03T17:01:20+09:00",
"status": 51,
"authenticate_data": {
"tid": "202211031701204002337011",
"number_of_realarms": 0
}
}② 인증 승인
사용자가 화면에 입력한 인증번호(OTP)를 서버로 받아 승인합니다. 응답의 status가 12면 인증 완료입니다.
요청 파라미터
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
| receipt_id | String | Y | ① 인증 요청 응답으로 받은 값 |
| otp | String | N | 사용자가 입력한 6자리 인증번호. sms 방식에서는 필수이고, PASS 앱 방식은 빈 값(null)입니다 |
응답 예시
승인 응답의 구조는 인증 정보 조회와 같습니다. 응답 필드 전체는 인증 정보 조회·검증에서 확인합니다.
POST
/v2/authenticate/confirmBase URLhttps://api.bootpay.co.kr
인증Basic Auth
const confirmed = await Bootpay.confirmAuthentication(receipt_id, otp)
// status 12(본인인증완료)일 때만 인증 완료로 처리한다.
if (confirmed.status !== 12) {
throw new Error('본인인증이 완료되지 않았습니다.')
}
const data = confirmed.authenticate_data
await saveVerifiedUser({
name: data.name,
birth: data.birth,
ci: data.unique, // unique = CI(연계정보). 기관 공통 식별값
di: data.di // di = DI(중복가입 확인정보). 가맹점별 식별값
})confirmed = bootpay.confirm_authentication(receipt_id=receipt_id, otp=otp)
# status 12(본인인증완료)일 때만 인증 완료로 처리한다.
if confirmed.get('status') != 12:
raise Exception('본인인증이 완료되지 않았습니다.')
# unique = CI(연계정보, 기관 공통), di = DI(중복가입 확인정보, 가맹점별)
data = confirmed.get('authenticate_data')
save_verified_user(
name=data.get('name'),
birth=data.get('birth'),
ci=data.get('unique'),
di=data.get('di')
)$confirmed = BootpayApi::confirmAuthentication($receiptId, $otp);
// status 12(본인인증완료)일 때만 인증 완료로 처리한다.
if ($confirmed->status !== 12) {
throw new Exception('본인인증이 완료되지 않았습니다.');
}
// unique = CI(연계정보, 기관 공통), di = DI(중복가입 확인정보, 가맹점별)
$data = $confirmed->authenticate_data;
saveVerifiedUser($data->name, $data->birth, $data->unique, $data->di);HashMap<String, Object> confirmed = bootpay.confirmAuthentication(receiptId, otp);
// status 12(본인인증완료)일 때만 인증 완료로 처리한다.
if (((Number) confirmed.get("status")).intValue() != 12) {
throw new IllegalStateException("본인인증이 완료되지 않았습니다.");
}
// unique = CI(연계정보, 기관 공통), di = DI(중복가입 확인정보, 가맹점별)
@SuppressWarnings("unchecked")
Map<String, Object> data = (Map<String, Object>) confirmed.get("authenticate_data");
saveVerifiedUser(data.get("name"), data.get("birth"), data.get("unique"), data.get("di"));confirmed = bootpay.confirm_authentication(receipt_id: receipt_id, otp: otp).data
# status 12(본인인증완료)일 때만 인증 완료로 처리한다.
raise '본인인증이 완료되지 않았습니다.' if confirmed[:status] != 12
# unique = CI(연계정보, 기관 공통), di = DI(중복가입 확인정보, 가맹점별)
data = confirmed[:authenticate_data]
save_verified_user(name: data[:name], birth: data[:birth], ci: data[:unique], di: data[:di])confirmed, err := api.ConfirmAuthentication(bootpay.AuthenticationParams{
ReceiptId: receiptId,
Otp: otp,
})
if err != nil {
return err
}
// status 12(본인인증완료)일 때만 인증 완료로 처리한다. 실패 응답에는 status 가 없으므로 comma-ok 로 읽는다.
status, _ := confirmed["status"].(float64)
if int(status) != 12 {
return errors.New("본인인증이 완료되지 않았습니다.")
}
// unique = CI(연계정보, 기관 공통), di = DI(중복가입 확인정보, 가맹점별)
data := confirmed["authenticate_data"].(map[string]interface{})
saveVerifiedUser(data["name"], data["birth"], data["unique"], data["di"])var confirmResponse = await api.ConfirmAuthentication(new AuthenticationParams
{
receiptId = receiptId,
otp = otp
});
var confirmed = JsonConvert.DeserializeObject<Dictionary<string, object>>(
await confirmResponse.Content.ReadAsStringAsync()
);
// status 12(본인인증완료)일 때만 인증 완료로 처리한다.
if (Convert.ToInt32(confirmed["status"]) != 12)
{
throw new InvalidOperationException("본인인증이 완료되지 않았습니다.");
}
// unique = CI(연계정보, 기관 공통), di = DI(중복가입 확인정보, 가맹점별)
var data = (JObject)confirmed["authenticate_data"];
SaveVerifiedUser(data["name"], data["birth"], data["unique"], data["di"]);JSON
{
"receipt_id": "624d2e531fc19202e4746f40",
"authentication_id": "1649225299700",
"gateway_url": "https://gw.bootpay.co.kr",
"metadata": {},
"pg": "다날",
"method": "인증",
"method_symbol": "auth",
"method_origin": "인증",
"method_origin_symbol": "auth",
"authenticated_at": "2026-04-06T15:08:42+09:00",
"requested_at": "2026-04-06T15:07:58+09:00",
"status_locale": "본인인증완료",
"status": 12,
"authenticate_data": {
"phone": "01012345678",
"name": "홍길동",
"birth": "19911212",
"gender": 0,
"foreigner": "0",
"carrier": "SKT",
"unique": "[ CI 값 ]",
"di": "[ DI 값 ]",
"tid": "202204061508210451927011"
}
}③ 인증번호 재전송
사용자가 인증번호를 받지 못했을 때 재전송합니다. 재전송 횟수는 재전송 API 응답의 authenticate_data.number_of_realarms로 확인합니다. 인증 정보 조회 응답에는 이 값이 들어 있지 않습니다.
요청 파라미터
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
| receipt_id | String | Y | ① 인증 요청 응답으로 받은 값 |
POST
/v2/authenticate/realarmBase URLhttps://api.bootpay.co.kr
인증Basic Auth
await Bootpay.realarmAuthentication(receipt_id)bootpay.realarm_authentication(receipt_id=receipt_id)BootpayApi::realarmAuthentication($receiptId);bootpay.realarmAuthentication(receiptId);bootpay.realarm_authentication(receipt_id)if _, err := api.RealarmAuthentication(bootpay.AuthenticationParams{ReceiptId: receiptId}); err != nil {
return err
}await api.RealarmAuthentication(new AuthenticationParams { receiptId = receiptId });PASS 앱 인증 (authenticate_type: pass)
authenticate_type을 pass로 보내면 SMS 대신 PASS 앱으로 인증을 요청합니다. 사용자는 PASS 앱에서 인증을 완료하고, 서버는 승인 API로 결과를 확인합니다.
지원 여부는 인증 PG·계약 조건에 따라 다르므로, 사용 전에 관리자 설정과 계약 스펙을 확인합니다.
에러 코드
요청값
오류 코드
| 코드 | 의미 | 대처 방법 |
|---|---|---|
AUTH_NEED_PG_METHOD (2400) | pg 또는 method가 비어 있습니다 | pg, method: '본인인증'을 채웁니다 |
RC_NOT_FOUND (2000) | receipt_id에 해당하는 인증 건이 없습니다 | receipt_id를 확인합니다 |
RC_NAME_BLANK (2003) | order_name이 비어 있습니다 | 인증 요청명을 채웁니다 |
RC_O_ID_BLANK (2005) | authentication_id가 비어 있습니다 (메시지도 authentication_id를 입력하라고 안내합니다) | 가맹점 고유 인증 ID를 채웁니다 |
PG·계정 설정
오류 코드
| 코드 | 의미 | 대처 방법 |
|---|---|---|
AUTH_CONFIRM_METHOD_NOT_FOUND (2406) | 해당 PG에 REST 본인인증 처리 로직이 없습니다 (HTTP 404) | REST 방식은 다날만 지원합니다 |
RC_PG_NOT_FOUND (2001) | 요청한 PG를 찾을 수 없습니다 | 관리자에서 본인인증 PG가 등록·활성화돼 있는지 확인합니다 |
PM_NOT_FOUND_OR_UNIT_INVALID (2107) | 요청한 결제수단(method)을 찾을 수 없습니다 (HTTP 404) | method: '본인인증'이 해당 PG에 열려 있는지 확인합니다 |
RC_RESOURCE_NOT_CONFIG (2017) | PG 연동 설정이 사용 가능한 상태가 아닙니다 | 관리자에서 본인인증 PG 설정을 확인합니다 |
API_ONLY_SELLER (600) | 판매점 계정만 호출할 수 있습니다 | 연동키가 판매점 프로젝트의 것인지 확인합니다 |
인증 진행
오류 코드
| 코드 | 의미 | 대처 방법 |
|---|---|---|
AUTH_REQUEST_FAILED (2401) | 본인인증 요청 생성에 실패했습니다 | order_name·authentication_id 등 필수값과 identity_no·carrier 를 확인 후 재시도합니다 |
AUTH_CONFIRM_READY_FAILED (2402) | PG로의 SMS/PASS 발송에 실패했습니다 | identity_no·phone·carrier 형식과 PG 활성화 여부를 확인합니다. PG 응답 실패면 pg_error_code에 다날 코드가 들어오지만, carrier·identity_no·authenticate_type 로컬 검증에서 걸린 경우에는 pg_error_code가 없고 사유가 payload.message에만 담깁니다 |
AUTH_NOT_READY (2404) | 승인 대기(status: 51) 상태가 아닙니다. 이미 승인 완료(status: 12)된 건을 다시 승인·재전송해도 같은 코드가 나옵니다 | ① 인증 요청부터 다시 진행합니다 |
AUTH_CONFIRM_FAILED (2405) | OTP 승인에 실패했습니다 (OTP 불일치·만료 포함). HTTP 500으로 응답됩니다 | message/pg_error_code를 확인하고 재전송하거나 다시 요청합니다 |
AUTH_REALARM_NOT_ABLE (2412) | SMS 방식이 아니어서 재전송할 수 없습니다 | PASS 방식은 재전송이 없습니다 |
AUTH_REALARM_FAILED (2411) | SMS 재전송에 실패했습니다. HTTP 500으로 응답됩니다 | 처음부터 다시 요청합니다 |
인증 정보 조회
오류 코드
| 코드 | 의미 | 대처 방법 |
|---|---|---|
AUTH_NOT_CONFIRMED (2408) | 아직 승인되지 않은 인증 건입니다 | 사용자 인증 완료 후 다시 조회합니다 |
AUTH_EXPIRED (2409) | 인증 확인 유효시간(30분)이 지났습니다 | 인증을 처음부터 다시 요청합니다 |
AUTH_NOT_FOUND (2407) | 인증 정보를 찾지 못했습니다 | receipt_id를 확인합니다 |