제휴간편결제 서비스 소개
신용카드를 스마트폰 앱에 미리 등록해 지문인식이나 비밀번호 입력으로 간편하게 결제 할 수 있는 서비스로 NHN KCP에서 제공하는 제휴간편결제 서비스는 다음과 같습니다.
서비스명 | 신용카드 제공여부 | 포인트/머니 결제 제공여부 |
---|---|---|
삼성페이 | O | X |
SSG페이 | O | O |
카카오페이 | O | O |
네이버페이 | O | O |
L.pay | O | O |
애플페이 | O | X |
토스페이 | O | O |
※ L.pay(L.POINT)의 경우 별도 서비스 연동 필요
응답 파라미터 가이드
신용카드 응답 파라미터
card_other_pay_type
제휴간편결제 유형
OT01 – 삼성페이
OT03 – SSG페이
OT13 – 카카오페이
OT16 – 네이버페이
OT11 – L.pay
OT21 – 애플페이
OT23 – 토스페이
머니/포인트 응답 파라미터
pay_method
응답결제수단
카카오머니 - PAKM
네이버페이 포인트 - PANP
SSG 머니 - PASG
토스머니 - PATO
페이코 포인트 - PACP
amount
총 결제금액
easypoint_mny
포인트/머니 결제금액
app_easypoint_time
포인트/머니 승인시간
service_corp_id
제휴간편결제 기관 코드
SSG머니 - SCSM
카카오페이 - SCKA
네이버페이 - SCNA
L.POINT - SCLP
토스페이 - SCTO
app_cash_receipt_yn
현금영수증 발급여부
app_cash_receipt_no
현금영수증 거래번호
* 네이버페이 포인트 현금영수증 발급 시에만 값 리턴
app_cash_receipt_mny
현금영수증 발급 대상 금액
* SSG머니 - 현금영수증 발급 대상 금액(app_cash_receipt_mny)을 참고하여 가맹점에서 직접 현금영수증 발급/취소 처리바랍니다.
* 카카오머니 - 카카오페이에서 현금영수증 발급됩니다. (카카오톡 or 카카오페이 APP내 내역 확인 가능)
※ 카카오페이 포인트(이벤트 등으로 인한 무상으로 지급된 포인트)는 현금영수증 금액에서 제외
※ 가맹점에서 현금영수증 직접 발급 시 당사로 반드시 사전 공유해 주셔야 하며(이중 발급 방지)
현금영수증 발급 대상 금액(app_cash_receipt_mny)을 참고하여 현금영수증 발급/취소 처리바랍니다.
* 토스머니 - 토스페이에서 현금영수증 발급됩니다. (토스 APP내 내역 확인 가능)
※ 토스포인트(이벤트 등으로 인한 무상으로 지급된 포인트)는 현금영수증 금액에서 제외
※ 가맹점에서 현금영수증 직접 발급 시 당사로 반드시 사전 공유해 주셔야 하며(이중 발급 방지)
현금영수증 발급 대상 금액(app_cash_receipt_mny)을 참고하여 현금영수증 발급/취소 처리바랍니다.
* L.POINT - 충전포인트 사용 금액에 대해 다음해 1월 국세청으로 일괄 전송됩니다.
※ 소득공제 관련 문의는 L.POINT 고객센터로 문의 바랍니다. (1899-8900)
* 네이버페이 포인트- NHN KCP에서 현금영수증 발급됩니다.
※ 무상포인트(이벤트, 후기작성 등으로 인한 무상으로 지급된 포인트)는 현금영수증 금액에서 제외
※ 가맹점 직접 발급 필요 시 현금영수증 발급/취소 대상 금액(app_cash_receipt_mny) 필드를 참고하여 발급/취소 처리바랍니다.
응답 처리 예시
...
try
{
URL url = new URL(target_URL);
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
conn.setDoOutput(true);
conn.setRequestMethod("POST");
conn.setRequestProperty("Content-Type", "application/json");
conn.setRequestProperty("Accept-Charset", "UTF-8");
OutputStream os = conn.getOutputStream();
os.write(req_data.getBytes("UTF-8"));
os.flush();
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8"));
while ((inputLine = in.readLine()) != null)
{
outResult.append(inputLine);
}
conn.disconnect();
}
catch(Exception e)
{
e.printStackTrace();
}
String temp_result = outResult.toString();
String res_data = temp_result.replace(",",",\r\n");
// RES JSON DATA Parsing
JSONParser parser = new JSONParser();
JSONObject json_res = (JSONObject) parser.parse(temp_result);
// 신용카드 응답 파라미터
String card_other_pay_type = (String) json_res.get("card_other_pay_type");
// 머니/포인트 응답 파라미터
String amount = (String) json_res.get("amount");
String easypoint_mny = (String) json_res.get("easypoint_mny");
String app_easypoint_time = (String) json_res.get("app_easypoint_time");
String service_corp_id = (String) json_res.get("service_corp_id");
String app_cash_receipt_yn = (String) json_res.get("app_cash_receipt_yn");
String app_cash_receipt_no = (String) json_res.get("app_cash_receipt_no");
String app_cash_receipt_mny = (String) json_res.get("res_cd");
...
$req_data = json_encode($data);
$header_data = array( "Content-Type: application/json", "charset=utf-8" );
// API REQ
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_URL);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header_data);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $req_data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// API RES
$res_data = curl_exec($ch);
// RES JSON DATA Parsing
$json_res = json_decode($res_data, true);
// 신용카드 응답 파라미터
$card_other_pay_type = $json_res["card_other_pay_type"];
// 머니/포인트 응답 파라미터
$amount = $json_res["amount"];
$easypoint_mny = $json_res["easypoint_mny"];
$app_easypoint_time = $json_res["app_easypoint_time"];
$service_corp_id = $json_res["service_corp_id"];
$app_cash_receipt_yn = $json_res["app_cash_receipt_yn"];
$app_cash_receipt_no = $json_res["app_cash_receipt_no"];
$app_cash_receipt_mny = $json_res["app_cash_receipt_mny"];
...
// API RES
HttpWebResponse res = (HttpWebResponse)req.GetResponse();
StreamReader st_read = new StreamReader(res.GetResponseStream(), Encoding.GetEncoding("utf-8"));
res_data = st_read.ReadToEnd();
st_read.Close();
res.Close();
// RES JSON DATA Parsing
JObject json_data = JObject.Parse(res_data);
// 신용카드 응답 파라미터
card_other_pay_type = json_data["card_other_pay_type"].ToString();
// 머니/포인트 응답 파라미터
amount = json_data["amount"].ToString();
easypoint_mny = json_data["easypoint_mny"].ToString();
app_easypoint_time = json_data["app_easypoint_time"].ToString();
service_corp_id = json_data["service_corp_id"].ToString();
app_cash_receipt_yn = json_data["app_cash_receipt_yn"].ToString();
app_cash_receipt_no = json_data["app_cash_receipt_no"].ToString();
app_cash_receipt_mny = json_data["app_cash_receipt_mny"].ToString();
...
'API RES
'요청 성공인 경우
if req.status = 200 then
res_data = req.ResponseText
'요청 실패인 경우
else
res_data = "http error code : " & req.status
end if
set req = nothing
'RES JSON DATA Parsing
set json_data = JSON.parse(res_data)
'신용카드 응답 파라미터
card_other_pay_type = json_data.card_other_pay_type
'머니/포인트 응답 파라미터
amount = json_data.amount
easypoint_mny = json_data.easypoint_mny
app_easypoint_time = json_data.app_easypoint_time
service_corp_id = json_data.service_corp_id
app_cash_receipt_yn = json_data.app_cash_receipt_yn
app_cash_receipt_no = json_data.app_cash_receipt_no
app_cash_receipt_mny = json_data.app_cash_receipt_mny
...
fetch(API_URL, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(req_data),
})
// 결제 API RES
.then(response => {
return response.json();
})
.then(data => {
res.render(API_PAGE, {
card_other_pay_type : data.card_other_pay_type,
amount : data.amount,
easypoint_mny : data.easypoint_mny,
app_easypoint_time : data.app_easypoint_time,
service_corp_id : data.service_corp_id,
app_cash_receipt_yn : data.app_cash_receipt_yn,
app_cash_receipt_no : data.app_cash_receipt_no,
app_cash_receipt_mny : data.app_cash_receipt_mny
});
});
...
res = requests.post(target_URL, headers=headers, data=json.dumps(req_data, ensure_ascii=False, indent="\t").encode('utf8'))
res_data = json.loads(res.text)
// 신용카드 응답 파라미터
card_other_pay_type = res_data.card_other_pay_type
// 머니/포인트 응답 파라미터
amount = res_data.amount
easypoint_mny = res_data.easypoint_mny
app_easypoint_time = res_data.app_easypoint_time
service_corp_id = res_data.service_corp_id
app_cash_receipt_yn = res_data.app_cash_receipt_yn
app_cash_receipt_no = res_data.app_cash_receipt_no
app_cash_receipt_mny = res_data.app_cash_receipt_mny
{"res_cd":"0000",
"res_msg":"정상처리",
"amount":"1000",
"easypoint_mny":"1000",
"app_easypoint_time":"20220101000000",
"service_corp_id":"SCKA",
"app_cash_receipt_yn":"Y",
"app_cash_receipt_no":"",
"app_cash_receipt_mny":"1000"}
머니/포인트 결제 취소 응답 파라미터 가이드
머니/포인트 결제 취소 응답 파라미터에 대해서는 아래 파라미터 참고해주세요
머니/포인트 취소 응답 파라미터
app_cash_receipt_mny
현금영수증 취소 대상 금액
※ 현금영수증 발급/취소에 대해 직접 관리하는 가맹점의 경우 거래 건 취소 시 응답해드리는 현금영수증 취소 대상 금액(app_cash_receipt_mny) 참고하여 현금영수증 취소를 진행해주세요.
현금영수증 전표출력 가이드(네이버페이 포인트만 해당)
네이버페이 포인트 결제가 정상적으로 처리된 후, 충전 포인트 결제 금액에 한해 발급된 현금영수증을 결과처리 페이지에서 바로 확인할 수 있게 연동할 수 있어요.
* 현금영수증 파라미터는 매출전표에서 현금영수증 URL을 참고해주세요.