PortOne REST API - V1

결제완료된 정보, 결제취소, 상태별 결제목록 조회 등의 기능을 하는 REST API를 제공합니다.
비인증 결제, 정기 자동결제 등 부가기능을 위한 REST API도 제공합니다.

2024년 9월 1일부로 포트원 V1 API에 대해 일부 보안 규격이 지원 종료됩니다.
자세한 사항은TLS 지원 범위를 참고해주세요.

V1 API hostname: api.iamport.kr


인증 관련 API

포트원 API를 호출할 때는 액세스 토큰Authorization 헤더에 넣어주어야 합니다.
액세스 토큰은 access_token 발급 API post/users/getToken를 호출해서 발급받을 수 있습니다.

액세스 토큰 발급 API를 호출하려면 API 키API 시크릿을 인자로 넣어주어야 합니다.

결제 관련 API

결제 금액 사전 등록 관련 API

비인증 결제 관련 API

별도 결제창 호출없이 결제를 진행할 수 있는 비인증 결제 기능을 제공합니다.

정기 결제 관련 API

빌링키 관련 API

get/subscribe/customers

빌링키 정보 복수조회 API

여러 개의 빌링키를 한 번에 조회하는 API입니다.

등록된 카드마다 1개의 customer_uid가 매핑되므로, 고객사 시스템 내에 1명의 고객이 여러 장의 카드를 등록할 수 있는 경우 여러 개의 customer_uid를 가지게 됩니다.
해당 고객이 등록해놓은 카드정보 목록을 한 번에 조회하는데 사용하면 편리합니다.

예시) /subscribe/customers?customer_uid[]=hong_1234_a&customer_uid[]=hong_1234_b

Request

Query

customer_uid[]: string[]
구매자의 결제 수단 식별 고유번호

Response

200

요청된 모든 customer_uid 에 대한 빌키정보 응답완료

code?: integer
응답코드
(Optional)
message?: string
응답메세지
(Optional)
(Optional)
customer_uid: string
구매자의 결제 수단 식별 고유번호
pg_provider: string
PG사 구분코드
pg_id: string
상점아이디(MID)
customer_id?: string
구매자 ID
(Optional)
card_name: string
카드명
card_code?: string
카드사 코드
(Optional)
card_issuer_code?: string
카드 발급사 코드
(Optional)
card_issuer_name?: string
카드 발급사명
(Optional)
card_publisher_code?: string
카드 발행사 코드
(Optional)
card_publisher_name?: string
카드 발행사명
(Optional)
card_number?: string
마스킹 카드번호
(Optional)
card_type?: integer
카드유형
(Optional)

빌링키 발급 한 카드의 유형

customer_name?: string
고객 성함
(Optional)
customer_tel?: string
전화번호
(Optional)
customer_email?: string
Email 주소
(Optional)
customer_addr?: string
주소
(Optional)
customer_postcode?: string
우편번호
(Optional)
inserted: integer
발급 시각
updated: integer
업데이트 시각

207

요청된 customer_uid 중 일부 빌키정보 조회 실패(ex. 접근권한없음 또는 존재하지 않는 customer_uid)

code?: integer
응답코드
(Optional)
message?: string
응답메세지
(Optional)
(Optional)
customer_uid: string
구매자의 결제 수단 식별 고유번호
pg_provider: string
PG사 구분코드
pg_id: string
상점아이디(MID)
customer_id?: string
구매자 ID
(Optional)
card_name: string
카드명
card_code?: string
카드사 코드
(Optional)
card_issuer_code?: string
카드 발급사 코드
(Optional)
card_issuer_name?: string
카드 발급사명
(Optional)
card_publisher_code?: string
카드 발행사 코드
(Optional)
card_publisher_name?: string
카드 발행사명
(Optional)
card_number?: string
마스킹 카드번호
(Optional)
card_type?: integer
카드유형
(Optional)

빌링키 발급 한 카드의 유형

customer_name?: string
고객 성함
(Optional)
customer_tel?: string
전화번호
(Optional)
customer_email?: string
Email 주소
(Optional)
customer_addr?: string
주소
(Optional)
customer_postcode?: string
우편번호
(Optional)
inserted: integer
발급 시각
updated: integer
업데이트 시각

401

인증 Token이 전달되지 않았거나 유효하지 않은 경우

404

유효하지 않은 customer_uid

try
Request
Request Sample
N/A
get/subscribe/customers/{customer_uid}

빌링키 정보 단건조회 API

구매자의 빌링키 정보 조회

Request

Path

customer_uid: string
구매자의 결제 수단 식별 고유번호

Response

200

정상 조회

code?: integer
응답코드
(Optional)
message?: string
응답메세지
(Optional)
response?: CustomerAnnotation
(Optional)
customer_uid: string
구매자의 결제 수단 식별 고유번호
pg_provider: string
PG사 구분코드
pg_id: string
상점아이디(MID)
customer_id?: string
구매자 ID
(Optional)
card_name: string
카드명
card_code?: string
카드사 코드
(Optional)
card_issuer_code?: string
카드 발급사 코드
(Optional)
card_issuer_name?: string
카드 발급사명
(Optional)
card_publisher_code?: string
카드 발행사 코드
(Optional)
card_publisher_name?: string
카드 발행사명
(Optional)
card_number?: string
마스킹 카드번호
(Optional)
card_type?: integer
카드유형
(Optional)

빌링키 발급 한 카드의 유형

customer_name?: string
고객 성함
(Optional)
customer_tel?: string
전화번호
(Optional)
customer_email?: string
Email 주소
(Optional)
customer_addr?: string
주소
(Optional)
customer_postcode?: string
우편번호
(Optional)
inserted: integer
발급 시각
updated: integer
업데이트 시각

401

인증 Token이 전달되지 않았거나 유효하지 않은 경우

404

유효하지 않은 customer_uid

try
Request
Request Sample
N/A
post/subscribe/customers/{customer_uid}

빌링키 발급 API

구매자에 대해 빌링키 발급 및 저장
해당 빌링키 발급 API는 PG사와 협의가 완료된 경우 이용 가능한 서비스입니다.
  • PG사 협의를 통해 카드정보 필수 조건 값 조정이 가능합니다.
  • 민감한 카드정보를 이용하기 때문에 보안에 특히 유의하셔야 합니다.
  • customer_uid 값은 고객 & 카드번호 단위별로 고유하게 발급 관리되어야 합니다

Request

Path

customer_uid: string
구매자의 결제 수단 식별 고유번호

Body

pg?: string
PG 구분코드
(Optional)

customer_id?: string
구매자 ID
(Optional)

card_number: string
카드번호

expiry: string
카드 유효기간

birth?: string
생년월일
(Optional)

생년월일6자리


pwd_2digit?: string
카드비밀번호 앞 2자리
(Optional)

빌링키 발급 하고자 하는 카드비밀번호 앞 2자리


cvc?: string
카드 인증번호
(Optional)

customer_name?: string
카드소유자명
(Optional)

customer_tel?: string
카드소유자 연락처
(Optional)

customer_email?: string
카드소유자 이메일주소
(Optional)

customer_addr?: string
카드소유자 주소
(Optional)

customer_postcode?: string
카드소유자 우편번호
(Optional)

Response

200

정상 등록

code?: integer
응답코드
(Optional)
message?: string
응답메세지
(Optional)
response?: CustomerAnnotation
(Optional)
customer_uid: string
구매자의 결제 수단 식별 고유번호
pg_provider: string
PG사 구분코드
pg_id: string
상점아이디(MID)
customer_id?: string
구매자 ID
(Optional)
card_name: string
카드명
card_code?: string
카드사 코드
(Optional)
card_issuer_code?: string
카드 발급사 코드
(Optional)
card_issuer_name?: string
카드 발급사명
(Optional)
card_publisher_code?: string
카드 발행사 코드
(Optional)
card_publisher_name?: string
카드 발행사명
(Optional)
card_number?: string
마스킹 카드번호
(Optional)
card_type?: integer
카드유형
(Optional)

빌링키 발급 한 카드의 유형

customer_name?: string
고객 성함
(Optional)
customer_tel?: string
전화번호
(Optional)
customer_email?: string
Email 주소
(Optional)
customer_addr?: string
주소
(Optional)
customer_postcode?: string
우편번호
(Optional)
inserted: integer
발급 시각
updated: integer
업데이트 시각

401

인증 Token이 전달되지 않았거나 유효하지 않은 경우

try
Request
Request Sample
N/A
delete/subscribe/customers/{customer_uid}

빌링키 삭제 API

구매자의 빌링키 정보 삭제
빌링키 삭제시 결제예약된 내역이 존재하는지 반드시 확인하셔야 합니다.
삭제된 빌링키는 복구할 수 없습니다.

Request

Path

customer_uid: string
구매자의 결제 수단 식별 고유번호

Query

reason?: string
삭제 사유
(Optional)

extra[requester]?: string
삭제 요청자
(Optional)

Response

200

정상 삭제

code?: integer
응답코드
(Optional)
message?: string
응답메세지
(Optional)
response?: CustomerAnnotation
(Optional)
customer_uid: string
구매자의 결제 수단 식별 고유번호
pg_provider: string
PG사 구분코드
pg_id: string
상점아이디(MID)
customer_id?: string
구매자 ID
(Optional)
card_name: string
카드명
card_code?: string
카드사 코드
(Optional)
card_issuer_code?: string
카드 발급사 코드
(Optional)
card_issuer_name?: string
카드 발급사명
(Optional)
card_publisher_code?: string
카드 발행사 코드
(Optional)
card_publisher_name?: string
카드 발행사명
(Optional)
card_number?: string
마스킹 카드번호
(Optional)
card_type?: integer
카드유형
(Optional)

빌링키 발급 한 카드의 유형

customer_name?: string
고객 성함
(Optional)
customer_tel?: string
전화번호
(Optional)
customer_email?: string
Email 주소
(Optional)
customer_addr?: string
주소
(Optional)
customer_postcode?: string
우편번호
(Optional)
inserted: integer
발급 시각
updated: integer
업데이트 시각

401

인증 Token이 전달되지 않았거나 유효하지 않은 경우

404

유효하지 않은 customer_uid

try
Request
Request Sample
N/A
get/subscribe/customers/{customer_uid}/payments

빌링키 결제 복수조회 API (빌링키 결제 내역 확인)

구매자의 빌링키로 결제된 결제목록을 조회합니다.

Request

Path

customer_uid: string
구매자의 결제 수단 식별 고유번호

Query

page?: integer
조회목록 페이징
(Optional)

Response

200

정상 조회

code?: integer
응답코드
(Optional)
message?: string
응답메세지
(Optional)
(Optional)
total: integer
전체 건수
previous: integer
이전 page숫자
next: integer
다음 page숫자
결제 상세정보 배열
(Optional)

401

인증 Token이 전달되지 않았거나 유효하지 않은 경우

404

유효하지 않은 customer_uid

try
Request
Request Sample
N/A
get/subscribe/customers/{customer_uid}/schedules

빌링키 결제예약 조회 API

결제예약 복수조회(빌키) API와 동일한 동작을 하는 API입니다.

customer_uid별 결제예약목록을 조회할 수 있습니다. 결제예약정보가 (페이징된)목록으로 전달되며, 최대 3개월 단위로 조회가 가능합니다.

결제예약정보가 예약된 시각 기준으로 최신순으로 정렬되어 전달됩니다.

Request

Path

customer_uid: string
구매자의 결제 수단 식별 고유번호

Query

page?: integer
조회목록 페이징
(Optional)

from: integer
조회 시작시각

to: integer
조회 종료시각

schedule-status?: string
예약상태
(Optional)

Response

200

결제예약목록 조회완료

code?: integer
응답코드
(Optional)
message?: string
응답메세지
(Optional)
(Optional)
customer_uid?: string
구매자의 결제 수단 식별 고유번호
(Optional)
merchant_uid?: string
고객사 주문번호
(Optional)
imp_uid?: string
포트원 거래고유번호
(Optional)

예약 결제건의 포트원 거래고유번호

customer_id?: string
구매자 ID
(Optional)
schedule_at?: integer
결제 예정 시각
(Optional)
executed_at?: integer
결제 실행 시각
(Optional)
revoked_at?: integer
결제 실행 철회 시각
(Optional)
amount?: number
결제금액
(Optional)
currency?: string
결제 통화 코드
(Optional)
name?: string
제품명
(Optional)
buyer_name?: string
주문자명
(Optional)
buyer_email?: string
주문자 Email주소
(Optional)
buyer_tel?: string
주문자 전화번호
(Optional)
buyer_addr?: string
주문자 주소
(Optional)
buyer_postcode?: string
주문자 우편번호
(Optional)
custom_data?: string
추가정보
(Optional)
schedule_status?: string
예약상태
(Optional)
payment_status?: string
결제상태
(Optional)
fail_reason?: string
실패사유
(Optional)
promotion_id?: string
프로모션 아이디
(Optional)

400

검색 파라메터가 유효하지 않은 경우

401

인증 Token이 전달되지 않았거나 유효하지 않은 경우

try
Request
Request Sample
N/A

가상계좌 관련 API

PG사 관련 API

PG사 별 추가로 지원하는 기능을 제공합니다.

카카오 관련 API

카카오페이에서 지원하는 기능을 제공합니다.

KCP 퀵페이 관련 API

KCP 퀵페이에서 지원하는 기능을 제공합니다.

네이버페이 관련 API

네이버페이에서 지원하는 기능을 제공합니다.

목차

(주문형-네이버페이) 네이버페이 주문환불 API
post/payments/{imp_uid}/naver/cancel
(주문형-네이버페이) 구매자의 환불요청 승인처리 API
post/payments/{imp_uid}/naver/approve-cancel
(주문형-네이버페이) 상품주문 발송처리 API
post/payments/{imp_uid}/naver/ship
(주문형-네이버페이) 교환승인된 상품 재발송처리 API
post/payments/{imp_uid}/naver/ship-exchanged
(주문형-네이버페이) 교환승인된 상품 수거완료처리 API
post/payments/{imp_uid}/naver/collect-exchanged
(주문형-네이버페이) 상품발주처리 API
post/payments/{imp_uid}/naver/place
(주문형-네이버페이) 상품반품요청 API
post/payments/{imp_uid}/naver/request-return
(주문형-네이버페이) 상품 반품승인 처리 API
post/payments/{imp_uid}/naver/approve-return
(주문형-네이버페이) 상품 반품거절 처리 API
post/payments/{imp_uid}/naver/reject-return
(주문형-네이버페이) 상품 반품보류 처리 API
post/payments/{imp_uid}/naver/withhold-return
(주문형-네이버페이) 반품보류상품 반품보류해제 처리 API
post/payments/{imp_uid}/naver/resolve-return
(결제형-네이버페이) 네이버페이 포인트 적립 API
post/payments/{imp_uid}/naver/point
(결제형-네이버페이) 에스크로 주문 확정 API
post/payments/{imp_uid}/naver/confirm
(주문형-네이버페이) 포트원 거래고유번호 기준 네이버페이 상품주문 조회 API
get/payments/{imp_uid}/naver/product-orders
(주문형-네이버페이) 네이버페이 상품주문번호로 상품주문 상세 조회 API
get/naver/product-orders/{product_order_id}
(주문형-네이버페이) 네이버페이 구매평 조회 API
get/naver/reviews
(결제형-네이버페이) 현금영수증 발급 가용액 조회 API
get/payments/{imp_uid}/naver/cash-amount

페이코 관련 API

페이코에서 지원하는 기능을 제공합니다.

페이먼트월 관련 API

페이먼트월에서 지원하는 기능을 제공합니다.

본인인증 관련 API

현금영수증 관련 API

에스크로 관련 API

고객사 정보 관련 API

고객사 정보를 관리하는 기능을 제공합니다.

고객사의 하위 상점 관련 API

하위 상점 관련 API

하위 상점과 관련된 기능을 제공합니다.

기타 API

부가적인 기능을 제공합니다.

베네피아 포인트 관련 API

베네피아 포인트(복지 포인트)와 관련된 기능을 제공합니다.

결제기관 관련 API

편의점 결제 관련 API

편의점 결제를 위한 수납 번호(barcode)와 관련된 기능을 제공합니다.

타입 정의

API 요청/응답의 각 필드에서 사용되는 타입 정의들을 확인할 수 있습니다