Search
K

핵토파이낸셜

핵토파이낸셜 결제 연동 방법을 안내합니다.
Deprecated
이 문서는 더 이상 관리되지 않습니다.
PortOne 개발자센터를 이용해주세요.

1. 핵토파이낸셜 PG 설정하기

핵토파이낸셜 설정 페이지의 내용을 참고하여 PG 설정을 진행합니다.

2.결제 요청하기

JavaScript SDK IMP.request_pay(param, callback)을 호출하여 핵토파이낸셜 결제창을 호출할 수 있습니다. 결제결과는 PC의 경우 IMP.request_pay(param, callback) 호출 후 callback 으로 수신되 모바일의 경우 m_redirect_url 로 리디렉션됩니다.
인증결제창 요청
비인증 결제창 요청
비인증 API 결제요청
Javascript SDK
IMP.request_pay({
pg : 'settle.{상점 ID}',
pay_method : 'card',
merchant_uid: "order_no_0001", //상점에서 생성한 고유 주문번호
name : '주문명:결제테스트',
amount : 1004,
buyer_email : '[email protected]',
buyer_name : '구매자이름',
buyer_tel : '010-1234-5678', //누락시 오류 발생
buyer_addr : '서울특별시 강남구 삼성동',
company : '포트원', // 가상계좌 발급시 권고사항
buyer_postcode : '123-456'
m_redirect_url : '{모바일에서 결제 완료 후 리디렉션 될 URL}'
}, function(rsp) { // callback 로직
//* ...중략... *//
});
주요 파라미터 설명
pg *string
PG사 구분코드
settle 로 지정하면 됩니다.
pay_method * string
결제수단 구분코드
  • card (신용카드)
  • trans (실시간 계좌이체)
  • vbank(가상계좌)
  • phone (휴대폰소액결제)
merchant_uid * string
주문번호
매번 고유하게 채번되어야 합니다.
buyer_tel * string
구매자 연락처
필수 파라미터 입니다.
amount * integer
결제금액
string 이 아닌점에 유의하세요
company string
회사명
가상계좌 결제 요청인 경우 필수 파라미터
세틀뱅크 카드인증결제 예제
세틀뱅크는 비 인증 결제창을 지원하지 않습니다.
API 방식으로 결제요청,예약결제를 구현할수 있습니다.
일회성 결제 요청하기
REST API POST /subscribe/payments/onetime을 호출하여 일회성 결제를 요청합니다. 요청 시 전달된 카드는 포트원에 등록되지 않습니다.
curl -H "Content-Type: application/json" \
-X POST -d '{"merchant_uid":"order_id_8237352", "card_number":"1234-1234-1234-1234", "expiry":"2019-01", "birth":"123456", "amount":3000}' \
https://api.iamport.kr/subscribe/payments/onetime
빌링키 발급 및 최초 결제 요청하기
REST API POST /subscribe/payments/onetime을 호출하여 빌링키 발급과 최초 결제를 요청합니다.
  • customer_uid : 빌링키 등록을 위해서 지정해야 합니다.
curl -H "Content-Type: application/json" \
-X POST -d '{"customer_uid":"your-customer-unique-id", "merchant_uid":"order_id_8237352", "card_number":"1234-1234-1234-1234", "expiry":"2019-01", "birth":"123456", "amount":3000}' \
https://api.iamport.kr/subscribe/payments/onetime
빌링키로 결제 요청하기
빌링키 발급과 최초 결제가 성공하면 빌링키는 전달된 customer_uid 와 1:1 매칭되어 포트원에 저장됩니다. 보안상의 이유로 서버는 빌링키에 직접 접근할 수 없기 때문에 customer_uid를 이용해서 재결제(POST /subscribe/payments/again) REST API를 다음과 같이 호출합니다.
curl -H "Content-Type: application/json" \
-X POST -d '{"customer_uid":"your-customer-unique-id", "merchant_uid":"order_id_8237352", "amount":3000}' \
https://api.iamport.kr/subscribe/payments/again
세틀뱅크는 빌링키 단독 발급 API가 지원되지 않습니다.
자세한 비 인증 결제 가이드는 아래 링크를 참조하세요