diff --git a/src/content/api-section-description/v1auth.mdx b/src/content/api-section-description/v1auth.mdx index 75f97ef72..2c2fc474f 100644 --- a/src/content/api-section-description/v1auth.mdx +++ b/src/content/api-section-description/v1auth.mdx @@ -1,7 +1,13 @@ -import ApiLink from "~/layouts/rest-api/misc/ApiLink"; -import Details from "~/components/gitbook/Details.astro"; import Figure from "~/components/Figure.astro"; +import Details from "~/components/gitbook/Details.astro"; import Hint from "~/components/Hint.astro"; +import ApiLink from "~/layouts/rest-api/misc/ApiLink"; + +import getTokenImage from "./_assets/v1auth/get-token.png"; +import merchantInfoImage from "./_assets/v1auth/merchant-info.png"; +import reuseImage from "./_assets/v1auth/reuse.svg"; +import tierImage from "./_assets/v1auth/tier.png"; +import useImage from "./_assets/v1auth/use.png"; 포트원 API를 호출할 때는 **액세스 토큰**을 `Authorization` 헤더에 넣어주어야 합니다.\ 액세스 토큰은 를 호출해서 발급받을 수 있습니다. @@ -9,106 +15,75 @@ import Hint from "~/components/Hint.astro"; 액세스 토큰 발급 API를 호출하려면 **API 키**와 **API 시크릿**을 인자로 넣어주어야 합니다.
-

API 키와 API 시크릿 확인하기

- -1. [관리자 콘솔 `상점・계정 관리` 화면](https://admin.portone.io/merchant) 접속 -2. `내 식별코드・API Keys` 버튼 클릭 - -import merchantInfoImage from "./_assets/v1auth/merchant-info.png"; - -
+

API 키와 API 시크릿 확인하기

- -**API 시크릿은 절대로 외부에 노출되어서는 안되는 값**입니다.\ -실제 구현에서 액세스 토큰 발급은 꼭 서버사이드에서 해주세요. + 1. [관리자 콘솔 `상점・계정 관리` 화면](https://admin.portone.io/merchant) 접속 + 2. `내 식별코드・API Keys` 버튼 클릭 - +
+ + **API 시크릿은 절대로 외부에 노출되어서는 안 되는 값**입니다.\ + 실제 구현에서 액세스 토큰 발급은 꼭 서버 사이드에서 해주세요. +
-

액세스 토큰 발급 받기

+

액세스 토큰 발급 받기

- 호출 + 호출 -import getTokenImage from "./_assets/v1auth/get-token.png"; - -
- - -포트원 REST API 서버는 **Google Public NTP**의 시간과 동기화되고 있습니다. - - +
- -하위 상점 연동을 할 경우 액세스 토큰을 발급받을 때 **Agent 계정**의 **API 키** 와 **API 시크릿**을 사용해야 합니다. + + 포트원 REST API 서버는 **Google Public NTP**의 시간과 동기화되고 있습니다. + -[Agency & Tier 란?](/docs/ko/tip/agency-and-tier) - - + + 하위 상점 연동을 할 경우 액세스 토큰을 발급받을 때 **Agent 계정**의 **API 키** 와 **API 시크릿**을 사용해야 합니다. + [Agency & Tier 란?](/docs/ko/tip/agency-and-tier) +
-

액세스 토큰 사용하기

- -발급받은 액세스 토큰은 다른 API를 호출할 때\ -`Authorization` 헤더에 `Bearer <액세스 토큰>` 형식의 값을 넣어주면 됩니다. - -자세한 내용은 [MDN - HTTP 인증 문서](https://developer.mozilla.org/ko/docs/Web/HTTP/Authentication)를 참고해주세요. +

액세스 토큰 사용하기

-import useImage from "./_assets/v1auth/use.png"; - -
+ 발급받은 액세스 토큰은 다른 API를 호출할 때\ + `Authorization` 헤더에 `Bearer <액세스 토큰>` 형식의 값을 넣어주면 됩니다. - -하위 상점 연동을 할 경우 포트원 API 호출시 `Tier` 헤더에 하위 상점 티어 코드를 입력해야 합니다. + 자세한 내용은 [MDN - HTTP 인증 문서](https://developer.mozilla.org/ko/docs/Web/HTTP/Authentication)를 참고해주세요. -[Agency & Tier 란?](/docs/ko/tip/agency-and-tier) - -import tierImage from "./_assets/v1auth/tier.png"; +
-
+ + 하위 상점 연동을 할 경우 포트원 API 호출시 `Tier` 헤더에 하위 상점 티어 코드를 입력해야 합니다. - + [Agency & Tier 란?](/docs/ko/tip/agency-and-tier) +
+
-

액세스 토큰 만료기한 연장

+

액세스 토큰 만료기한 연장

-만료된 액세스 토큰으로 API를 호출하면 `401 Unauthorized` 응답을 받습니다.\ -액세스 토큰의 만료기한은 발행시간부터 **30분**입니다. - -- 기존 액세스 토큰이 만료되기 전 를 다시 호출했을 경우 - - 기존 액세스 토큰이 반환됩니다.\ - **만료기한이 1분 안쪽으로 남았을 때** 요청했다면 기존 액세스 토큰의 만료시간이 **5분 연장**됩니다. -- 기존 액세스 토큰이 만료된 다음 를 다시 호출했을 경우 - - 새로운 액세스 토큰이 반환됩니다. - -import reuseImage from "./_assets/v1auth/reuse.svg"; + 만료된 액세스 토큰으로 API를 호출하면 `401 Unauthorized` 응답을 받습니다.\ + 액세스 토큰의 만료 기한은 발행시간부터 **30분**입니다. -
+ - 기존 액세스 토큰이 만료되기 전 를 다시 호출했을 경우 + - 기존 액세스 토큰이 반환됩니다.\ + **만료 기한이 1분 안쪽으로 남았을 때** 요청했다면 기존 액세스 토큰의 만료 기한이 **5분 연장**됩니다. - -액세스 토큰의 재사용과 만료기한 5분 연장 동작방식은 다음과 같은 상황을 고려해서 설계되었습니다. + - 기존 액세스 토큰이 만료된 다음 를 다시 호출했을 경우 + - 새로운 액세스 토큰이 반환됩니다. -- 한 고객사에서 여러 대의 웹서버가 동시에 경쟁적으로 REST API(`/users/getToken`)를 호출하는 상황 -- 한 고객사에서 여러 대의 웹서버가 시간 동기화 되어있지 않은 상황 +
- + + 액세스 토큰의 재사용과 만료기한 5분 연장 동작방식은 다음과 같은 상황을 고려해서 설계되었습니다. + - 한 고객사에서 여러 대의 웹서버가 동시에 경쟁적으로 REST API(`/users/getToken`)를 호출하는 상황 + - 한 고객사에서 여러 대의 웹서버가 시간 동기화 되어있지 않은 상황 +
diff --git a/src/content/blog/2024-02/v2-oom.mdx b/src/content/blog/2024-02/v2-oom.mdx index bbd107127..731d71661 100644 --- a/src/content/blog/2024-02/v2-oom.mdx +++ b/src/content/blog/2024-02/v2-oom.mdx @@ -8,6 +8,7 @@ thumbnail: ./_assets/v2-oom/0.png --- import Figure from "~/components/Figure.astro"; + import image0 from "./_assets/v2-oom/0.png"; import image1 from "./_assets/v2-oom/1.png"; import image2 from "./_assets/v2-oom/2.png"; diff --git a/src/content/blog/2024-02/v2-zio.mdx b/src/content/blog/2024-02/v2-zio.mdx index e89cc844f..12989e76e 100644 --- a/src/content/blog/2024-02/v2-zio.mdx +++ b/src/content/blog/2024-02/v2-zio.mdx @@ -519,12 +519,12 @@ ZIO는 그러한 조건에 잘 부합하는 Effect System이었고 현재까지 이러한 요구사항을 만족하기 위해 신중한 고민을 거쳐 의사결정을 했고, 그렇게 탄생한 포트원 V2 모듈은 수많은 디지털 커머스 회사들과 함께할 준비를 마쳤습니다. 포트원 V2에서는 커머스 회사들이 결제와 관련된 고민을 덜 수 있도록 멋진 기능들을 많이 출시할 예정이니, 앞으로 포트원 V2 모듈의 행보를 지켜봐주세요! -[scala]: \(https://scala-lang.org/\) +[scala]: https://scala-lang.org/ -[why-fp-matters]: \(https://www.cs.kent.ac.uk/people/staff/dat/miranda/whyfp90.pdf\) +[why-fp-matters]: https://www.cs.kent.ac.uk/people/staff/dat/miranda/whyfp90.pdf -[for-comprehension]: \(https://docs.scala-lang.org/tour/for-comprehensions.html\) +[for-comprehension]: https://docs.scala-lang.org/tour/for-comprehensions.html -[ast]: \(https://en.wikipedia.org/wiki/Abstract_syntax_tree\) +[ast]: https://en.wikipedia.org/wiki/Abstract_syntax_tree -[zio]: \(https://zio.dev/\) +[zio]: https://zio.dev/ diff --git a/src/content/blog/2024-03/tgs.mdx b/src/content/blog/2024-03/tgs.mdx index e181c5aaf..2b8d0ee23 100644 --- a/src/content/blog/2024-03/tgs.mdx +++ b/src/content/blog/2024-03/tgs.mdx @@ -35,45 +35,45 @@ V1을 완전히 버리고 V2로 넘어가는 것이 아니기 때문에 하나 - 카카오페이 결제 파라미터 -|Name |타입 |필수여부|설명 | +| Name | 타입 |필수여부| 설명 | |:----------------:|:--------:|:------:|:--------------------------------------------------------------------------------------------------------------------:| -|cid |String |O |가맹점 코드, 10자 | -|cid\_secret |String |X |가맹점 코드 인증키, 24자, 숫자와 영문 소문자 조합 | -|partner\_order\_id|String |O |가맹점 주문번호, 최대 100자 | -|partner\_user\_id |String |O |가맹점 회원 id, 최대 100자 | -|item\_name |String |O |상품명, 최대 100자 | -|item\_code |String |X |상품코드, 최대 100자 | -|quantity |Integer |O |상품 수량 | -|total\_amount |Integer |O |상품 총액 | -|tax\_free\_amount |Integer |O |상품 비과세 금액 | -|vat\_amount |Integer |X |상품 부가세 금액 값을 보내지 않을 경우 다음과 같이 VAT 자동 계산 (상품총액 - 상품 비과세 금액)/11 : 소숫점 이하 반올림| -|green\_deposit |Integer |X |컵 보증금 | -|approval\_url |String |O |결제 성공 시 redirect url, 최대 255자 | -|cancel\_url |String |O |결제 취소 시 redirect url, 최대 255자 | -|fail\_url |String |O |결제 실패 시 redirect url, 최대 255자 | -|available\_cards |JSON Array|X |결제 수단으로써 사용 허가할 카드사를 지정해야 하는 경우 사용 | +| cid | String | O | 가맹점 코드, 10자 | +| cid\_secret | String | X | 가맹점 코드 인증키, 24자, 숫자와 영문 소문자 조합 | +|partner\_order\_id| String | O | 가맹점 주문번호, 최대 100자 | +| partner\_user\_id| String | O | 가맹점 회원 id, 최대 100자 | +| item\_name | String | O | 상품명, 최대 100자 | +| item\_code | String | X | 상품코드, 최대 100자 | +| quantity | Integer | O | 상품 수량 | +| total\_amount | Integer | O | 상품 총액 | +| tax\_free\_amount| Integer | O | 상품 비과세 금액 | +| vat\_amount | Integer | X |상품 부가세 금액 값을 보내지 않을 경우 다음과 같이 VAT 자동 계산 (상품총액 - 상품 비과세 금액)/11 : 소숫점 이하 반올림| +| green\_deposit | Integer | X | 컵 보증금 | +| approval\_url | String | O | 결제 성공 시 redirect url, 최대 255자 | +| cancel\_url | String | O | 결제 취소 시 redirect url, 최대 255자 | +| fail\_url | String | O | 결제 실패 시 redirect url, 최대 255자 | +| available\_cards |JSON Array| X | 결제 수단으로써 사용 허가할 카드사를 지정해야 하는 경우 사용 | - 네이버페이 결제 파라미터 -|Name |타입 |필수여부|설명 | +| Name | 타입 |필수여부| 설명 | |:-----------------------:|:-----:|:------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| -|merchantPayKey |String |O |가맹점 주문내역 확인 가능한 가맹점 결제번호 또는 주문번호를 전달해야 합니다 | -|merchantPayTransactionKey|String | |가맹점 주문내역 히스토리 확인이 가능한 가맹점 결제 트랜잭션 번호 또는 주문 트랜잭션 번호를 전달해야 합니다. | -|merchantUserKey |String | |가맹점의 사용자 키(개인 아이디와 같은 개인정보 데이터는 제외하여 전달해야 합니다) | -|productName |String |O |대표 상품명. 예: 장미의 이름 외 1건(X), 장미의 이름(O) | -|productCount |Number |O |상품 수량 예: A 상품 2개 + B 상품 1개의 경우 productCount 3으로 전달 | -|totalPayAmount |Number |O |총 결제 금액. 최소 결제금액은 10원 | -|taxScopeAmount |Number |O |과세 대상 금액. 과세 대상 금액 + 면세 대상 금액 + 컵 보증금 금액 (옵션) = 총 결제 금액 | -|taxExScopeAmount |Number |O |면세 대상 금액. 과세 대상 금액 + 면세 대상 금액 + 컵 보증금 금액 (옵션) = 총 결제 금액 | -|environmentDepositAmount |Number | |1회용 컵에 담은 상품의 결제건인 경우에만 필수값이며, 그 외에는 전달할 필요가 없습니다. 컵 보증금 금액. 과세 대상 금액 + 면세 대상 금액 + 컵 보증금 금액 (옵션) = 총 결제 금액 | -|returnUrl |String |O |결제 인증 결과 전달 URL, 결제 완료 후 이동할 URL(returnUrl + 가맹점 파라미터 전달이 가능합니다) 네이버페이는 결제 작업 완료 후, 고객사가 등록한 returnUrl로 리디렉션을 수행합니다 고객사는 이를 활용하여 내부 처리를 수행하거나 구매자에게 결제 결과 화면을 노출할 수 있습니다 | -|purchaserName |String | |구매자 성명. 결제 상품이 보험 및 위험 업종 등인 경우에만 필수 값입니다. 그 외에는 전달할 필요가 없습니다 | -|purchaserBirthday |String | |구매자 생년월일(yyyymmdd). 결제 상품이 보험 및 위험 업종 등인 경우에만 필수 값입니다. 그 외에는 전달할 필요가 없습니다 | -|extraDeduction |Boolean| |도서 / 공연 / 영화 소득공제 대상 여부. 문화체육관광부에서 인증한 소득공제 제공 사업자가 대상 상품을 판매하는 경우 필수 값입니다. 해당 파라미터를 사용하기 위해서는 별도 요청을 주셔야 합니다. true : 대상, false : 비 대상 | -|useCfmYmdt |String | |이용완료일(yyyymmdd) 가맹점 타입이 이용완료일 정산 또는 이용완료일 포인트 적립인 경우 필수 해당 값을 기준으로 이용완료일 정산의 경우 '정산기준일' 또는 이용완료일 포인트 적립인 경우 '포인트적립 기준일'이 지정됩니다. 이용완료일은 반드시 결제일과 같거나 결제일 이후여야 하며, 이용완료일이 결제일자 이전으로 적용될 경우 에러(InvalidUseCfmYmdt)가 발생됩니다. 이용완료일이 결제일자 기준으로 1년을 초과할 경우 별도 에러가 발생되지는 않으나 전달한 이용완료일(useCfmYmdt) 값이 결제일자 +365일로 조정 처리됩니다.| -|merchantExtraParameter |String | |가맹점 자체적으로 추가 구분값으로 활용 가능한 별도의 예비 필드 (개인 아이디와 같은 개인정보 데이터는 제외하여 전달해야 합니다) | -|productItems |Array |O |productItem 배열 | -|subMerchantInfo |Object | |하부가맹점 정보. PG 업종 가맹점인 경우에만 필수값입니다 | +| merchantPayKey | String| O | 가맹점 주문내역 확인 가능한 가맹점 결제번호 또는 주문번호를 전달해야 합니다 | +|merchantPayTransactionKey| String| | 가맹점 주문내역 히스토리 확인이 가능한 가맹점 결제 트랜잭션 번호 또는 주문 트랜잭션 번호를 전달해야 합니다. | +| merchantUserKey | String| | 가맹점의 사용자 키(개인 아이디와 같은 개인정보 데이터는 제외하여 전달해야 합니다) | +| productName | String| O | 대표 상품명. 예: 장미의 이름 외 1건(X), 장미의 이름(O) | +| productCount | Number| O | 상품 수량 예: A 상품 2개 + B 상품 1개의 경우 productCount 3으로 전달 | +| totalPayAmount | Number| O | 총 결제 금액. 최소 결제금액은 10원 | +| taxScopeAmount | Number| O | 과세 대상 금액. 과세 대상 금액 + 면세 대상 금액 + 컵 보증금 금액 (옵션) = 총 결제 금액 | +| taxExScopeAmount | Number| O | 면세 대상 금액. 과세 대상 금액 + 면세 대상 금액 + 컵 보증금 금액 (옵션) = 총 결제 금액 | +| environmentDepositAmount| Number| | 1회용 컵에 담은 상품의 결제건인 경우에만 필수값이며, 그 외에는 전달할 필요가 없습니다. 컵 보증금 금액. 과세 대상 금액 + 면세 대상 금액 + 컵 보증금 금액 (옵션) = 총 결제 금액 | +| returnUrl | String| O | 결제 인증 결과 전달 URL, 결제 완료 후 이동할 URL(returnUrl + 가맹점 파라미터 전달이 가능합니다) 네이버페이는 결제 작업 완료 후, 가맹점이 등록한 returnUrl로 리디렉션을 수행합니다 가맹점은 이를 활용하여 내부 처리를 수행하거나 구매자에게 결제 결과 화면을 노출할 수 있습니다 | +| purchaserName | String| | 구매자 성명. 결제 상품이 보험 및 위험 업종 등인 경우에만 필수 값입니다. 그 외에는 전달할 필요가 없습니다 | +| purchaserBirthday | String| | 구매자 생년월일(yyyymmdd). 결제 상품이 보험 및 위험 업종 등인 경우에만 필수 값입니다. 그 외에는 전달할 필요가 없습니다 | +| extraDeduction |Boolean| | 도서 / 공연 / 영화 소득공제 대상 여부. 문화체육관광부에서 인증한 소득공제 제공 사업자가 대상 상품을 판매하는 경우 필수 값입니다. 해당 파라미터를 사용하기 위해서는 별도 요청을 주셔야 합니다. true : 대상, false : 비 대상 | +| useCfmYmdt | String| |이용완료일(yyyymmdd) 가맹점 타입이 이용완료일 정산 또는 이용완료일 포인트 적립인 경우 필수 해당 값을 기준으로 이용완료일 정산의 경우 '정산기준일' 또는 이용완료일 포인트 적립인 경우 '포인트적립 기준일'이 지정됩니다. 이용완료일은 반드시 결제일과 같거나 결제일 이후여야 하며, 이용완료일이 결제일자 이전으로 적용될 경우 에러(InvalidUseCfmYmdt)가 발생됩니다. 이용완료일이 결제일자 기준으로 1년을 초과할 경우 별도 에러가 발생되지는 않으나 전달한 이용완료일(useCfmYmdt) 값이 결제일자 +365일로 조정 처리됩니다.| +| merchantExtraParameter | String| | 가맹점 자체적으로 추가 구분값으로 활용 가능한 별도의 예비 필드 (개인 아이디와 같은 개인정보 데이터는 제외하여 전달해야 합니다) | +| productItems | Array | O | productItem 배열 | +| subMerchantInfo | Object| | 하부가맹점 정보. PG 업종 가맹점인 경우에만 필수값입니다 | 위처럼 같은 기능을 하는 인터페이스임에도 PG사에 따라 파라미터 명과 파라미터 타입, 필수 파라미터 목록 모두 상이한 것을 볼 수 있습니다. 심지어 사용하는 통신 프로토콜마저 PG사마다 상이하죠. @@ -214,7 +214,7 @@ Typed error를 적용함으로써 예시 코드의 `pay()` 함수에선 `AmountT ```kotlin interface Example { fun pay(): Effect - + sealed interface PayError { data object AmountTooBig: PayError data object InvalidCardInfo: PayError diff --git a/src/content/docs/en/api/api/api.mdx b/src/content/docs/en/api/api/api.mdx index 8d3526591..13cdab12b 100644 --- a/src/content/docs/en/api/api/api.mdx +++ b/src/content/docs/en/api/api/api.mdx @@ -4,406 +4,386 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Requests a payment by billing key (customer\_uid). +## Requests a payment by billing key (customer\_uid). - -You can use the + + You can use the -**customer_uid** + **customer\_uid** - obtained via Get billing key API or PG payment window to request a non-authenticated payment. + obtained via Get billing key API or PG payment window to request a non-authenticated payment. + - + ### Parameters -### Parameters + #### Body -#### Body + + + **Billing key** + + - - + + + **Order ID** + + -**Billing key** + + **Currency** + - + + + **Payment amount** + + - - - + + **Tax free amount** + -**Order ID** + + + **Product name** + + - + + **Customer name** + - - -**Currency** + + **Customer email** + - - - + + **Customer phone** + -**Payment amount** + + **Customer address** + - + + **Customer zip code** + - - -**Tax free amount** + + **Number of installment months** + - - - + + **Whether or not there are interest-free installments paid by merchants** + -**Product name** + + **Option to use credit card points** + - + + **Custom data** + - - -**Customer name** + + **Webhook URL for success notification** + - - -**Customer email** + + **Customer's browser (PC) IP** + - - -**Customer phone** + ### Responses - - -**Customer address** + + + + **`code`** **\*** **integer** - - -**Customer zip code** + **Response code** - - -**Number of installment months** + 0: success, Not 0: check the message - + **`message`** **\*** **string** - - -**Whether or not there are interest-free installments paid by merchants** + **Response message** - - -**Option to use credit card points** + A non-zero code includes a message like 'Invalid payment info'. - - -**Custom data** + **`response`** **(PaymentAnnotation, optional)** + + - - -**Webhook URL for success notification** + + + **`code`** **\*** **integer** - + **`Response code`** - - -**Customer's browser (PC) IP** + 0: success, Not 0: check the message - + **`message`** **\*** **string** -### Responses + **Response message** - - - -**`code`** **\***** ****integer** + A non-zero code includes a message like 'Invalid payment info. -**Response code** + **`imp_uid`** \* **string** -0: success, Not 0: check the message + **i'mport payment transaction UID** -**`message`** **\***** ****string** + **`merchant_uid`** **\*** **string** -**Response message** + **Order ID** -A non-zero code includes a message like 'Invalid payment info'. + **`pay_method`** **\*** **string** -**`response`** **(PaymentAnnotation, optional)** + **Payment method code** - - + **`channel`** **\*** **string** - - -**`code`** **\***** ****integer** + **Payment environment code** -**`Response code`** + - pc: (authenticated) PC + - mobile: (authenticated) mobile + - api: recurring or non-authenticated -0: success, Not 0: check the message + **`pg_provider`** **\*** **string** -**`message`** **\***** ****string** + **PG code** -**Response message** + --- -A non-zero code includes a message like 'Invalid payment info. + **`emb_pg_provider`** **\*** **string** -**`imp_uid`** \* **string** + **Hub-type PG code** -**i'mport payment transaction UID** + **`pg_tid`** **\*** **string** -**`merchant_uid`** **\***** ****string** + **PG transaction ID** -**Order ID** + **`pg_id`** **\*** **string** -**`pay_method`** **\***** ****string** + **PG MID** -**Payment method code** + **`escrow`** **boolean** -**`channel`** **\***** ****string** + **Indicates an escrow payment** -**Payment environment code** + **`apply_num`** **string** -- pc**:** (authenticated) PC -- mobile: (authenticated) mobile -- api: recurring or non-authenticated + **Credit card approval number** -**`pg_provider`** **\***** ****string** + **`bank_code`** **string** -**PG code** + **Bank code** ---- + **`bank_name`** **string** -**`emb_pg_provider`** **\***** ****string** + **Bank name** -**Hub-type PG code** + --- -**`pg_tid`** **\*** **string** + **`card_code`** **string** -**PG transaction ID** + **Credit card code (KFTC Credit Card Codes:** [**link**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) ) -**`pg_id`** **\***** ****string** + **`card_name`** **string** -**PG MID** + **Credit card name** -**`escrow`** **boolean** + **`card_quota`** **integer** -**Indicates an escrow payment** + **Number of installments (0 means one-off)** -**`apply_num`** **string** + **`card_number`** **string** -**Credit card approval number** + **Masked credit card number** -**`bank_code`** **string** + --- -**Bank code** + **`card_type`** **string** -**`bank_name`** **string** + **Credit card type code** -**Bank name** + - 0: credit + - 1: check ---- + **`vbank_code`** **string** -**`card_code`** **string** + **Virtual account bank code (refer to image below)** -**Credit card code (KFTC Credit Card Codes:** [**link**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) ) + --- -**`card_name`** **string** + **`vbank_name`** **string** -**Credit card name** + **Refund virtual account** -**`card_quota`** **integer** + **`vbank_holder`** **string** -**Number of installments (0 means one-off)** + **Refund virtual account holder** -**`card_number`** **string** + **`vbank_date`** **string** -**Masked credit card number** + **Refund virtual account expiration (UNIX timestamp)** ---- + **`vbank_issued_at`** **string** -**`card_type`** **string** + **Refund virtual account created at (UNIX timestamp)** -**Credit card type code** + **`name`** **string** -- 0: credit -- 1: check + **Product name** -**`vbank_code`** **string** + **`amount`** **\*** **integer** -**Virtual account bank code (refer to image below)** + **Order (payment) amount** ---- + **`cancel_amount`** **integer** -**`vbank_name`** **string** + **Cancelled amount** -**Refund virtual account** + **`currency`** **string** -**`vbank_holder`** **string** + **Currency** -**Refund virtual account holder** + - USD + - KRW + - EUR -**`vbank_date`** **string** + --- -**Refund virtual account expiration (UNIX timestamp)** + **`buyer_name`** **string** -**`vbank_issued_at`** **string** + **Customer name** -**Refund virtual account created at (UNIX timestamp)** + **`buyer_email`** **string** -**`name`** **string** + **Customer email** -**Product name** + **`buyer_tel`** **string** -**`amount`** **\*** **integer** + **Customer phone** -**Order (payment) amount** - -**`cancel_amount`** **integer** - -**Cancelled amount** - -**`currency`** **string** - -**Currency** - -- USD -- KRW -- EUR - ---- + **`buyer_addr`** **string** -**`buyer_name`** **string** + **Customer address** -**Customer name** + **`buyer_postcode`** **string** -**`buyer_email`** **string** + **Customer zip code** -**Customer email**\ + **`custom_data`** **string** -**`buyer_tel`** **string** + **echo data as JSON string** -**Customer phone** + **`user_agent`** **string** -**`buyer_addr`** **string** + **UserAgent of the device where payment is initiated** -**Customer address** + **`status`** **\*** **string** -**`buyer_postcode`** **string** + **Payment status code** -**Customer zip code** + - ready + - paid + - cancelled + - failed -**`custom_data`** **string** + **`started_at`** **\*** **string** -**echo data as JSON string** + **Payment started at (UNIX timestamp)** -**`user_agent`** **string** + **`paid_at`** **\*** **string** -**UserAgent of the device where payment is initiated** + **Payment completed at (UNIX timestamp)** -**`status`** **\***** ****string** + **`failed_at`** **\*** **string** -**Payment status code** + **Payment failed at (UNIX timestamp)** -- ready -- paid -- cancelled -- failed + **`cancelled_at`** **\*** **string** -**`started_at`** **\*** **string** + **Payment cancelled at (UNIX timestamp)** -**Payment started at (UNIX timestamp)** + **`fail_reason`** **string** -**`paid_at`** **\***** ****string** + **Reason for failure** -**Payment completed at (UNIX timestamp)**\ + **`cancel_reason`** **string** -**`failed_at`** **\***** ****string** + **Reason for cancellation** -**Payment failed at (UNIX timestamp)** + **`receipt_url`** **string** -**`cancelled_at`** **\***** ****string** + **Credit card receipt URL** -**Payment cancelled at (UNIX timestamp)** + **`cash_receipt_issued`** **boolean** -**`fail_reason`** **string** + **Option to automatically issue cash receipt** -**Reason for failure** + **`customer_uid`** **string** -**`cancel_reason`** **string** + **customer\_uid related to the payment transaction** -**Reason for cancellation** + **`customer_uid_usage`** **string** -**`receipt_url`** **string** + **customer\_uid use code** -**Credit card receipt URL** + - payment.scheduled: scheduled payment + - payment: payment + - issue: billing key issuance -**`cash_receipt_issued` ****boolean** + **`cancel_history`** **(Array\[PaymentCancelAnnotation], optional):** -**Option to automatically issue cash receipt** + **`Cancellation/partial cancellation history`** + + -**`customer_uid`** **string** + + + **cancel\_history array \[]** -**customer\_uid related to the payment transaction** + **`pg_tid`** **\*** **string** -**`customer_uid_usage`** **string** + **PG cancellation transaction ID** -**customer\_uid use code** + **`amount`** **\*** **integer** -- payment.scheduled: scheduled payment -- payment: payment -- issue**: billing key issuance** + **Cancelled amount** -**`cancel_history`** **(Array\[PaymentCancelAnnotation], optional):** + **`cancelled_at`** **\*** **string** -**`Cancellation/partial cancellation history`** + **Cancelled at (UNIX timestamp)** - - + **`reason`** **\*** **string(256)** - - -**cancel\_history array \[]** + **Reason for cancellation** -**`pg_tid`** **\***** ****string** + **`receipt_url`** **\*** **string(300)** -**PG cancellation transaction ID** - -**`amount`** **\*** **integer** - -**Cancelled amount** - -**`cancelled_at`** **\*** **string** - -**Cancelled at (UNIX timestamp)** - -**`reason`** **\*** **string(256)** - -**Reason for cancellation** - -**`receipt_url`** **\***** ****string(300)** - -**Cancellation receipt URL. Availability varies by PG.** - - - - - - - -```javascript -{ - // Response -} -``` - - + **Cancellation receipt URL. Availability varies by PG.** + + + + + ```ts + { + // Response + } + ``` + ### **Key request parameter description** @@ -429,7 +409,7 @@ A non-zero code includes a message like 'Invalid payment info. > > Required for Paymentwall PG -> **`buyer_name` ****string** +> **`buyer_name`** **string** > > **Customer name** > @@ -442,79 +422,77 @@ A non-zero code includes a message like 'Invalid payment info. > Required for Paymentwall PG
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": { - "imp_uid": "string", - "merchant_uid": "string", - "pay_method": "string", - "channel": "pc", - "pg_provider": "string", - "emb_pg_provider": "string", - "pg_tid": "string", - "pg_id": "string", - "escrow": true, - "apply_num": "string", - "bank_code": "string", - "bank_name": "string", - "card_code": "string", - "card_name": "string", - "card_quota": 0, - "card_number": "string", - "card_type": "null", - "vbank_code": "string", - "vbank_name": "string", - "vbank_num": "string", - "vbank_holder": "string", - "vbank_date": 0, - "vbank_issued_at": 0, - "name": "string", - "amount": 0, - "cancel_amount": 0, - "currency": "string", - "buyer_name": "string", - "buyer_email": "string", - "buyer_tel": "string", - "buyer_addr": "string", - "buyer_postcode": "string", - "custom_data": "string", - "user_agent": "string", - "status": "ready", - "started_at": 0, - "paid_at": 0, - "failed_at": 0, - "cancelled_at": 0, - "fail_reason": "string", - "cancel_reason": "string", - "receipt_url": "string", - "cancel_history": [ - { - "pg_tid": "string", - "amount": 0, - "cancelled_at": 0, - "reason": "string", - "receipt_url": "string" - } - ], - "cancel_receipt_urls": [ - "string" - ], - "cash_receipt_issued": true, - "customer_uid": "string", - "customer_uid_usage": "issue" +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "imp_uid": "string", + "merchant_uid": "string", + "pay_method": "string", + "channel": "pc", + "pg_provider": "string", + "emb_pg_provider": "string", + "pg_tid": "string", + "pg_id": "string", + "escrow": true, + "apply_num": "string", + "bank_code": "string", + "bank_name": "string", + "card_code": "string", + "card_name": "string", + "card_quota": 0, + "card_number": "string", + "card_type": "null", + "vbank_code": "string", + "vbank_name": "string", + "vbank_num": "string", + "vbank_holder": "string", + "vbank_date": 0, + "vbank_issued_at": 0, + "name": "string", + "amount": 0, + "cancel_amount": 0, + "currency": "string", + "buyer_name": "string", + "buyer_email": "string", + "buyer_tel": "string", + "buyer_addr": "string", + "buyer_postcode": "string", + "custom_data": "string", + "user_agent": "string", + "status": "ready", + "started_at": 0, + "paid_at": 0, + "failed_at": 0, + "cancelled_at": 0, + "fail_reason": "string", + "cancel_reason": "string", + "receipt_url": "string", + "cancel_history": [ + { + "pg_tid": "string", + "amount": 0, + "cancelled_at": 0, + "reason": "string", + "receipt_url": "string" + } + ], + "cancel_receipt_urls": [ + "string" + ], + "cash_receipt_issued": true, + "customer_uid": "string", + "customer_uid_usage": "issue" + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/subscribe/again**](https://api.iamport.kr/#!/subscribe/again) + **Swagger Test Link** + [**https://api.iamport.kr/#!/subscribe/again**](https://api.iamport.kr/#!/subscribe/again) diff --git a/src/content/docs/en/api/api/request-non-authenticated-payment-one-time-api.mdx b/src/content/docs/en/api/api/request-non-authenticated-payment-one-time-api.mdx index b23ca8f3d..6953d9f7f 100644 --- a/src/content/docs/en/api/api/request-non-authenticated-payment-one-time-api.mdx +++ b/src/content/docs/en/api/api/request-non-authenticated-payment-one-time-api.mdx @@ -4,440 +4,426 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; Requests payment with credit card information. - -If you pass + + If you pass -**customer_uid** + **customer\_uid** -, the billing key used for a successful payment will be saved for future payments. If customer_uid is not specified, it will not be saved. You cannot reuse the same + , the billing key used for a successful payment will be saved for future payments. If customer\_uid is not specified, it will not be saved. You cannot reuse the same -**merchant_uid** + **merchant\_uid** - for another request. + for another request. + - + ## Parameters -### Parameters + ### Body -#### Body + + + **Order ID** + + - - + + Currency code -**Order ID** + KRW, USD, VND ... + - + + + **Payment amount** + + - - -Currency code + + Tax-free amount + -KRW, USD, VND ... + + **Credit card number** - - - + **(dddd-dddd-dddd-dddd)** + -**Payment amount** + + **Credit card expiration** - + **(YYYY-MM)** + - - -Tax-free amount + + **6-digit DOB** **(yymmdd)** - - -**Credit card number** + (For corporate cards, specify 10-digit business registration number) + -**(dddd-dddd-dddd-dddd)** + + First 2-digits of credit card password + - - -**Credit card expiration** + + CVC code -**(YYYY-MM)** + (last 3 digits (4 digits for AMEX) of the code at the back of the card). Applicable to **Paymentwall only** + - - -**6-digit DOB**** (yymmdd)** + + Specify this value to save the card information as billing key and use it for future payments. + -(For corporate cards, specify 10-digit business registration number) + + + **PG code** + + - - -First 2-digits of credit card password + + Product name + - - -CVC code + + Customer name + -(last 3 digits (4 digits for AMEX) of the code at the back of the card). Applicable to **Paymentwall only** + + Customer email + - - -Specify this value to save the card information as billing key and use it for future payments. + + Customer phone + - - - + + Customer address + -**PG code** + + Customer zip code + - + + Number of installment months + - - -Product name + + Whether or not there are interest-free installments paid by merchants + - - -Customer name + + Custom data + - - -Customer email + + Webhook URL for success notification + - - -Customer phone + + Customer's browser (PC) IP + - - -Customer address + + (For overseas PG only) Payment ID issued by PG for another payment after 3D secure authentication + - - -Customer zip code + + (For overseas PG only) Token issued by PG for another payment after 3D secure authentication + - - -Number of installment months + ### Responses - - -Whether or not there are interest-free installments paid by merchants + + + + **`code`** **\*** **integer** - - -Custom data + **Response code** - - -Webhook URL for success notification + 0: success, Not 0: check the message - - -Customer's browser (PC) IP + **`message`** **\*** **string** - - -(For overseas PG only) Payment ID issued by PG for another payment after 3D secure authentication + **Response message** - - -(For overseas PG only) Token issued by PG for another payment after 3D secure authentication + A non-zero code includes a message like 'Invalid payment info'. - + **`response`** **(PaymentAnnotation, optional)** + + -### Responses + + + **`code`** **\*** **integer** - - - -**`code`** **\***** ****integer** + **`Response code`** -**Response code** + 0: success, Not 0: check the message -0: success, Not 0: check the message + **`message`** **\*** **string** -**`message`** **\***** ****string** + **Response message** -**Response message** + A non-zero code includes a message like 'Invalid payment info. -A non-zero code includes a message like 'Invalid payment info'. + **`imp_uid`** \* **string** -**`response`** **(PaymentAnnotation, optional)** + **i'mport payment transaction UID** - - + **`merchant_uid`** **\*** **string** - - -**`code`** **\***** ****integer** + **Order ID** -**`Response code`** + **`pay_method`** **\*** **string** -0: success, Not 0: check the message + **Payment method code** -**`message`** **\***** ****string** + **`channel`** **\*** **string** -**Response message** + **Payment environment code** -A non-zero code includes a message like 'Invalid payment info. + - pc: (authenticated) PC + - mobile: (authenticated) mobile + - api: recurring or non-authenticated -**`imp_uid`** \* **string** + **`pg_provider`** **\*** **string** -**i'mport payment transaction UID** + **PG code** -**`merchant_uid`** **\***** ****string** + --- -**Order ID** + **`emb_pg_provider`** **\*** **string** -**`pay_method`** **\***** ****string** + **Hub-type PG code** -**Payment method code** + **`pg_tid`** **\*** **string** -**`channel`** **\***** ****string** + **PG transaction ID** -**Payment environment code** + **`pg_id`** **\*** **string** -- pc**:** (authenticated) PC -- mobile: (authenticated) mobile -- api: recurring or non-authenticated + **PG MID** -**`pg_provider`** **\***** ****string** + **`escrow`** **boolean** -**PG code** + **Indicates an escrow payment** ---- + **`apply_num`** **string** -**`emb_pg_provider`** **\***** ****string** + **Credit card approval number** -**Hub-type PG code** + **`bank_code`** **string** -**`pg_tid`** **\*** **string** + **Bank code** -**PG transaction ID** + **`bank_name`** **string** -**`pg_id`** **\***** ****string** + **Bank name** -**PG MID** + --- -**`escrow`** **boolean** + **`card_code`** **string** -**Indicates an escrow payment** + **Credit card code (KFTC Credit Card Codes:** [**link**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) ) -**`apply_num`** **string** + **`card_name`** **string** -**Credit card approval number** + **Credit card name** -**`bank_code`** **string** + **`card_quota`** **integer** -**Bank code** + **Number of installments (0 means one-off)** -**`bank_name`** **string** + **`card_number`** **string** -**Bank name** + **Masked credit card number** ---- + --- -**`card_code`** **string** + **`card_type`** **string** -**Credit card code (KFTC Credit Card Codes:** [**link**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) ) + **Credit card type code** -**`card_name`** **string** + - 0: credit + - 1: check -**Credit card name** + **`vbank_code`** **string** -**`card_quota`** **integer** + **Virtual account bank code (refer to image below)** -**Number of installments (0 means one-off)** + --- -**`card_number`** **string** + **`vbank_name`** **string** -**Masked credit card number** + **Refund virtual account** ---- + **`vbank_holder`** **string** -**`card_type`** **string** + **Refund virtual account holder** -**Credit card type code** + **`vbank_date`** **string** -- 0: credit -- 1: check + **Refund virtual account expiration (UNIX timestamp)** -**`vbank_code`** **string** + **`vbank_issued_at`** **string** -**Virtual account bank code (refer to image below)** + **Refund virtual account created at (UNIX timestamp)** ---- - -**`vbank_name`** **string** - -**Refund virtual account** + **`name`** **string** -**`vbank_holder`** **string** + **Product name** -**Refund virtual account holder** + **`amount`** **\*** **integer** -**`vbank_date`** **string** + **Order (payment) amount** -**Refund virtual account expiration (UNIX timestamp)** + **`cancel_amount`** **integer** -**`vbank_issued_at`** **string** + **Cancelled amount** -**Refund virtual account created at (UNIX timestamp)** + **`currency`** **string** -**`name`** **string** + **Currency** -**Product name** + - USD + - KRW + - EUR -**`amount`** **\*** **integer** + --- -**Order (payment) amount** + **`buyer_name`** **string** -**`cancel_amount`** **integer** + **Customer name** -**Cancelled amount** + **`buyer_email`** **string** -**`currency`** **string** + **Customer email** -**Currency** - -- USD -- KRW -- EUR - ---- + **`buyer_tel`** **string** -**`buyer_name`** **string** + **Customer phone** -**Customer name** + **`buyer_addr`** **string** -**`buyer_email`** **string** + **Customer address** -**Customer email**\ + **`buyer_postcode`** **string** -**`buyer_tel`** **string** + **Customer zip code** -**Customer phone** + **`custom_data`** **string** -**`buyer_addr`** **string** + **echo data as JSON string** -**Customer address** + **`user_agent`** **string** -**`buyer_postcode`** **string** + **UserAgent of the device where payment is initiated** -**Customer zip code** + **`status`** **\*** **string** -**`custom_data`** **string** + **Payment status code** -**echo data as JSON string** + - ready + - paid + - cancelled + - failed -**`user_agent`** **string** + **`started_at`** **\*** **string** -**UserAgent of the device where payment is initiated** + **Payment started at (UNIX timestamp)** -**`status`** **\***** ****string** + **`paid_at`** **\*** **string** -**Payment status code** + **Payment completed at (UNIX timestamp)**\\ -- ready -- paid -- cancelled -- failed + **`failed_at`** **\*** **string** -**`started_at`** **\*** **string** + **Payment failed at (UNIX timestamp)** -**Payment started at (UNIX timestamp)** + **`cancelled_at`** **\*** **string** -**`paid_at`** **\***** ****string** + **Payment cancelled at (UNIX timestamp)** -**Payment completed at (UNIX timestamp)**\ + **`fail_reason`** **string** -**`failed_at`** **\***** ****string** + **Reason for failure** -**Payment failed at (UNIX timestamp)** + **`cancel_reason`** **string** -**`cancelled_at`** **\***** ****string** + **Reason for cancellation** -**Payment cancelled at (UNIX timestamp)** + **`receipt_url`** **string** -**`fail_reason`** **string** + **Credit card receipt URL** -**Reason for failure** + **`cash_receipt_issued`** **boolean** -**`cancel_reason`** **string** + **Option to automatically issue cash receipt** -**Reason for cancellation** + **`customer_uid`** **string** -**`receipt_url`** **string** + **customer\_uid related to the payment transaction** -**Credit card receipt URL** + **`customer_uid_usage`** **string** -**`cash_receipt_issued` ****boolean** + **customer\_uid use code** -**Option to automatically issue cash receipt** + - payment.scheduled: scheduled payment + - payment: payment + - issue: billing key issuance -**`customer_uid`** **string** + **`cancel_history`** **(Array\[PaymentCancelAnnotation], optional):** -**customer\_uid related to the payment transaction** + **`Cancellation/partial cancellation history`** + + -**`customer_uid_usage`** **string** + + + **cancel\_history array \[]** -**customer\_uid use code** + **`pg_tid`** **\*** **string** -- payment.scheduled: scheduled payment -- payment: payment -- issue**: billing key issuance** + **PG cancellation transaction ID** -**`cancel_history`** **(Array\[PaymentCancelAnnotation], optional):** + **`amount`** **\*** **integer** -**`Cancellation/partial cancellation history`** + **Cancelled amount** - - + **`cancelled_at`** **\*** **string** - - -**cancel\_history array \[]** + **Cancelled at (UNIX timestamp)** -**`pg_tid`** **\***** ****string** + **`reason`** **\*** **string(256)** -**PG cancellation transaction ID** + **Reason for cancellation** -**`amount`** **\*** **integer** + **`receipt_url`** **\*** **string(300)** -**Cancelled amount** - -**`cancelled_at`** **\*** **string** - -**Cancelled at (UNIX timestamp)** - -**`reason`** **\*** **string(256)** - -**Reason for cancellation** - -**`receipt_url`** **\***** ****string(300)** - -**Cancellation receipt URL. Availability varies by PG.** - - - - - - - -```javascript -{ - // Response -} -``` - - + **Cancellation receipt URL. Availability varies by PG.** + + + + + ```ts + { + // Response + } + ``` + ### **Key request parameter description** @@ -503,79 +489,77 @@ A non-zero code includes a message like 'Invalid payment info. > with this customer\_uid value in the future.
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": { - "imp_uid": "string", - "merchant_uid": "string", - "pay_method": "string", - "channel": "pc", - "pg_provider": "string", - "emb_pg_provider": "string", - "pg_tid": "string", - "pg_id": "string", - "escrow": true, - "apply_num": "string", - "bank_code": "string", - "bank_name": "string", - "card_code": "string", - "card_name": "string", - "card_quota": 0, - "card_number": "string", - "card_type": "null", - "vbank_code": "string", - "vbank_name": "string", - "vbank_num": "string", - "vbank_holder": "string", - "vbank_date": 0, - "vbank_issued_at": 0, - "name": "string", - "amount": 0, - "cancel_amount": 0, - "currency": "string", - "buyer_name": "string", - "buyer_email": "string", - "buyer_tel": "string", - "buyer_addr": "string", - "buyer_postcode": "string", - "custom_data": "string", - "user_agent": "string", - "status": "ready", - "started_at": 0, - "paid_at": 0, - "failed_at": 0, - "cancelled_at": 0, - "fail_reason": "string", - "cancel_reason": "string", - "receipt_url": "string", - "cancel_history": [ - { - "pg_tid": "string", - "amount": 0, - "cancelled_at": 0, - "reason": "string", - "receipt_url": "string" - } - ], - "cancel_receipt_urls": [ - "string" - ], - "cash_receipt_issued": true, - "customer_uid": "string", - "customer_uid_usage": "issue" +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "imp_uid": "string", + "merchant_uid": "string", + "pay_method": "string", + "channel": "pc", + "pg_provider": "string", + "emb_pg_provider": "string", + "pg_tid": "string", + "pg_id": "string", + "escrow": true, + "apply_num": "string", + "bank_code": "string", + "bank_name": "string", + "card_code": "string", + "card_name": "string", + "card_quota": 0, + "card_number": "string", + "card_type": "null", + "vbank_code": "string", + "vbank_name": "string", + "vbank_num": "string", + "vbank_holder": "string", + "vbank_date": 0, + "vbank_issued_at": 0, + "name": "string", + "amount": 0, + "cancel_amount": 0, + "currency": "string", + "buyer_name": "string", + "buyer_email": "string", + "buyer_tel": "string", + "buyer_addr": "string", + "buyer_postcode": "string", + "custom_data": "string", + "user_agent": "string", + "status": "ready", + "started_at": 0, + "paid_at": 0, + "failed_at": 0, + "cancelled_at": 0, + "fail_reason": "string", + "cancel_reason": "string", + "receipt_url": "string", + "cancel_history": [ + { + "pg_tid": "string", + "amount": 0, + "cancelled_at": 0, + "reason": "string", + "receipt_url": "string" + } + ], + "cancel_receipt_urls": [ + "string" + ], + "cash_receipt_issued": true, + "customer_uid": "string", + "customer_uid_usage": "issue" + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/subscribe/onetime**](https://api.iamport.kr/#!/subscribe/onetime) + **Swagger Test Link** + [**https://api.iamport.kr/#!/subscribe/onetime**](https://api.iamport.kr/#!/subscribe/onetime) diff --git a/src/content/docs/en/api/billing-key-api/api-1.mdx b/src/content/docs/en/api/billing-key-api/api-1.mdx index e3e52e7f4..5aab51919 100644 --- a/src/content/docs/en/api/billing-key-api/api-1.mdx +++ b/src/content/docs/en/api/billing-key-api/api-1.mdx @@ -4,207 +4,194 @@ description: "" --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Requests a billing key with credit card information. +## Requests a billing key with credit card information. - - - - -### Parameters - -#### Path - - - - -**Billing key** - - + - + ### Parameters -#### Body + #### Path - -**PG code** + + + **Billing key** + + - - -**Credit card number** + #### Body -**XXXX-XXXX-XXXX-XXXX** + + **PG code** + - - -**Credit card expiration** + + **Credit card number** -**YYYY-MM** + **XXXX-XXXX-XXXX-XXXX** + - - -**6-digit DOB** + + **Credit card expiration** -**10-digit business registration number for corporate card** + **YYYY-MM** + - - -**First 2-digits of credit card password** + + **6-digit DOB** - - -**CVC code** + **10-digit business registration number for corporate card** + - - -**Card holder** + + **First 2-digits of credit card password** + - - -**Card holder's phone** + + **CVC code** + - - -**Card holder's email** + + **Card holder** + - - -**Card holder's address** + + **Card holder's phone** + - - -Card holder's zip code + + **Card holder's email** + - - -Customer ID ( + + **Card holder's address** + - + + Card holder's zip code + -**For Toss Payments only** + + Customer ID ( - + + **For Toss Payments only** + -) + ) + - + ### Responses -### Responses + + + + **`code`** **\*** **integer** - - - -**`code`** **\***** ****integer** + **Response code** -**Response code** + 0: success, Not 0: check the message -0: success, Not 0: check the message + **`message`** **\*** **string** -**`message`** **\***\*\* ****string\*\* + **Response message** -**Response message** + A non-zero code includes a message like 'Invalid payment info'. -A non-zero code includes a message like 'Invalid payment info'. + **`response`** **(CustomerAnnotation, optional)** + + -**`response`** **(CustomerAnnotation, optional)** + + + **`code`** **\*** **integer** - - + **Response code** - - -**`code`** **\*** **integer** + 0: success, Not 0: check the message -**Response code** + **`message`** **\*** **string** -0: success, Not 0: check the message + **Response message** -**`message`** **\***\*\* ****string\*\* + A non-zero code includes a message like 'Invalid payment info'. -**Response message** + **`customer_uid`** **\*** **string** -A non-zero code includes a message like 'Invalid payment info'. + **`Customer ID`** -**`customer_uid`** **\*** **string** + **`pg_provider`** **\*** **string** -**`Customer ID`**\ + **PG code for billing key** -**`pg_provider`** **\***\*\* ****string\*\* + **`pg_id`** **\*** **string** -**PG code for billing key** + **PG merchant ID (MID) for billing key** -**`pg_id`** **\***\*\* ****string\*\* + **`card_name`** **\*** **string** -**PG merchant ID (MID) for billing key** + **`Credit card name`** -**`card_name`** **\*** **string** + **`card_code`** **\*** **string** -**`Credit card name`** + **`Credit card code`** -**`card_code`** **\***\*\* ****string\*\* + **`card_number`** **\*** **string** -**`Credit card code`** + **`Masked card number`** -**`card_number`** **\***\*\* ****string\*\* + **`card_type`** **\*** **string** -**`Masked card number`** + **`Credit card type`** -**`card_type`** **\***\*\* ****string\*\* + **Not supported in some PGs (returns null)** -**`Credit card type`** + **`customer_name`** **\*** **string** -**Not supported in some PGs (returns null)** + **`Customer name`** -**`customer_name`** **\***\*\* ****string\*\* + **`customer_tel`** **\*** **string** -**`Customer name`** + **`Customer phone`** -**`customer_tel`** **\*** **string** + **`customer_email`** **\*** **string** -**`Customer phone`** + **`Customer email`** -**`customer_email`** **\***\*\* ****string\*\* + **`customer_addr`** **\*** **string** -**`Customer email`** + **`Customer address`** -**`customer_addr`** **\***\*\* ****string\*\* + **`customer_postcode`** **\*** **string** -**`Customer address`** + **`Customer zip code`** -**`customer_postcode`** **\***\*\* ****string\*\* + **`inserted`** **\*** **integer** -**`Customer zip code`** + **`Billing key issued at`** (UNIX timestamp) -**`inserted`** **\***\*\* ****integer\*\* + **`updated`** **\*** **integer** -**`Billing key issued at`** (UNIX timestamp) - -**`updated`** **\***\*\* ****integer\*\* - -**`Billing key updated at`** (UNIX timestamp) - - - - - - - -```javascript -{ - // Response -} -``` - - + **`Billing key updated at`** (UNIX timestamp) + + + + + ```ts + { + // Response + } + ``` + ### **Key request parameter description** @@ -225,52 +212,49 @@ A non-zero code includes a message like 'Invalid payment info'. > > May be omitted for some PGs upon pre-agreement. -> **` customer_id`` `****`string`** +> **`customer_id`** **`string`** > > **`Customer ID`** > > **For Toss Payments only** -**Using this API requires a pre-agreement with the PG.** - -- You may modify the required card information upon agreement with the PG. -- Special attention to security is required due to using sensitive card information. -- The `customer_uid` must be unique and issued per **customer-card number** pair. + **Using this API requires a pre-agreement with the PG.** + - You may modify the required card information upon agreement with the PG. + - Special attention to security is required due to using sensitive card information. + - The `customer_uid` must be unique and issued per **customer-card number** pair.
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": { - "customer_uid": "string", - "pg_provider": "string", - "pg_id": "string", - "card_name": "string", - "card_code": "string", - "card_number": "string", - "card_type": "null", - "customer_name": "string", - "customer_tel": "string", - "customer_email": "string", - "customer_addr": "string", - "customer_postcode": "string", - "inserted": 0, - "updated": 0 +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "customer_uid": "string", + "pg_provider": "string", + "pg_id": "string", + "card_name": "string", + "card_code": "string", + "card_number": "string", + "card_type": "null", + "customer_name": "string", + "customer_tel": "string", + "customer_email": "string", + "customer_addr": "string", + "customer_postcode": "string", + "inserted": 0, + "updated": 0 + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/subscribe.customer/customer_save**](https://api.iamport.kr/#!/subscribe.customer/customer_save) + **Swagger Test Link** + [**https://api.iamport.kr/#!/subscribe.customer/customer\_save**](https://api.iamport.kr/#!/subscribe.customer/customer_save) diff --git a/src/content/docs/en/api/billing-key-api/delete-billing-key-api.mdx b/src/content/docs/en/api/billing-key-api/delete-billing-key-api.mdx index 239fbb720..5fc894b9d 100644 --- a/src/content/docs/en/api/billing-key-api/delete-billing-key-api.mdx +++ b/src/content/docs/en/api/billing-key-api/delete-billing-key-api.mdx @@ -4,198 +4,185 @@ description: "" --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Deletes a billing key. You must check for any scheduled payments on the billing key. +## Deletes a billing key. You must check for any scheduled payments on the billing key. - -A deleted billing key cannot be restored. - - - -### Parameters - -#### Path - - - - -**Billing key** + + A deleted billing key cannot be restored. + - + ### Parameters - + #### Path -#### Query + + + **Billing key** + + - -**Reason for deletion** + #### Query - - -**Requester** + + **Reason for deletion** + -(for Naver Pay only) + + **Requester** - + (for Naver Pay only) + -### Responses + ### Responses - - - -**`code`** **\***** ****integer** + + + + **`code`** **\*** **integer** -**Response code** + **Response code** -0: success, Not 0: check the message + 0: success, Not 0: check the message -**`message`** **\***\*\* ****string\*\* + **`message`** **\*** **string** -**Response message** + **Response message** -A non-zero code includes a message like 'Invalid payment info'. + A non-zero code includes a message like 'Invalid payment info'. -**`response`** **(CustomerAnnotation, optional)** + **`response`** **(CustomerAnnotation, optional)** + + - - + + + **`code`** **\*** **integer** - - -**`code`** **\*** **integer** + **Response code** -**Response code** + 0: success, Not 0: check the message -0: success, Not 0: check the message + **`message`** **\*** **string** -**`message`** **\***\*\* ****string\*\* + **Response message** -**Response message** + A non-zero code includes a message like 'Invalid payment info'. -A non-zero code includes a message like 'Invalid payment info'. + **`customer_uid`** **\*** **string** -**`customer_uid`** **\*** **string** + **`Customer ID`** -**`Customer ID`**\ + **`pg_provider`** **\*** **string** -**`pg_provider`** **\***\*\* ****string\*\* + **PG code for billing key** -**PG code for billing key** + **`pg_id`** **\*** **string** -**`pg_id`** **\***\*\* ****string\*\* + **PG merchant ID (MID) for billing key** -**PG merchant ID (MID) for billing key** + **`card_name`** **\*** **string** -**`card_name`** **\*** **string** + **`Credit card name`** -**`Credit card name`** + **`card_code`** **\*** **string** -**`card_code`** **\***\*\* ****string\*\* + **`Credit card code`** -**`Credit card code`** + **`card_number`** **\*** **string** -**`card_number`** **\***\*\* ****string\*\* + **`Masked card number`** -**`Masked card number`** + **`card_type`** **\*** **string** -**`card_type`** **\***\*\* ****string\*\* + **`Credit card type`** -**`Credit card type`** + **Not supported in some PGs (returns null)** -**Not supported in some PGs (returns null)** + **`customer_name`** **\*** **string** -**`customer_name`** **\***\*\* ****string\*\* + **`Customer name`** -**`Customer name`** + **`customer_tel`** **\*** **string** -**`customer_tel`** **\*** **string** + **`Customer phone`** -**`Customer phone`** + **`customer_email`** **\*** **string** -**`customer_email`** **\***\*\* ****string\*\* + **`Customer email`** -**`Customer email`** + **`customer_addr`** **\*** **string** -**`customer_addr`** **\***\*\* ****string\*\* + **`Customer address`** -**`Customer address`** + **`customer_postcode`** **\*** **string** -**`customer_postcode`** **\***\*\* ****string\*\* + **`Customer zip code`** -**`Customer zip code`** + **`inserted`** **\*** **integer** -**`inserted`** **\***\*\* ****integer\*\* + **`Billing key issued at`** (UNIX timestamp) -**`Billing key issued at`** (UNIX timestamp) + **`updated`** **\*** **integer** -**`updated`** **\***\*\* ****integer\*\* + **`Billing key updated at`** (UNIX timestamp) + + + -**`Billing key updated at`** (UNIX timestamp) - - - - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - + + ```ts + { + // Response + } + ``` + + + ```ts + { + // Response + } + ``` +
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": { - "customer_uid": "string", - "pg_provider": "string", - "pg_id": "string", - "card_name": "string", - "card_code": "string", - "card_number": "string", - "card_type": "null", - "customer_name": "string", - "customer_tel": "string", - "customer_email": "string", - "customer_addr": "string", - "customer_postcode": "string", - "inserted": 0, - "updated": 0 +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "customer_uid": "string", + "pg_provider": "string", + "pg_id": "string", + "card_name": "string", + "card_code": "string", + "card_number": "string", + "card_type": "null", + "customer_name": "string", + "customer_tel": "string", + "customer_email": "string", + "customer_addr": "string", + "customer_postcode": "string", + "inserted": 0, + "updated": 0 + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/subscribe.customer/customer_delete**](https://api.iamport.kr/#!/subscribe.customer/customer_delete) + **Swagger Test Link** + [**https://api.iamport.kr/#!/subscribe.customer/customer\_delete**](https://api.iamport.kr/#!/subscribe.customer/customer_delete) diff --git a/src/content/docs/en/api/billing-key-api/get-billing-key-api.mdx b/src/content/docs/en/api/billing-key-api/get-billing-key-api.mdx index 44c98eea2..88fa2a1eb 100644 --- a/src/content/docs/en/api/billing-key-api/get-billing-key-api.mdx +++ b/src/content/docs/en/api/billing-key-api/get-billing-key-api.mdx @@ -4,184 +4,171 @@ description: "" --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Gets details of a billing key. +## Gets details of a billing key. - - - - -### Parameters - -#### Path - - - + -**Billing key** + ### Parameters - + #### Path - + + + **Billing key** + + -### Responses + ### Responses - - - -**`code`** **\***** ****integer** + + + + **`code`** **\*** **integer** -**Response code** + **Response code** -0: success, Not 0: check the message + 0: success, Not 0: check the message -**`message`** **\***\*\* ****string\*\* + **`message`** **\*** **string** -**Response message** + **Response message** -A non-zero code includes a message like 'Invalid payment info'. + A non-zero code includes a message like 'Invalid payment info'. -**`response`** **(CustomerAnnotation, optional)** + **`response`** **(CustomerAnnotation, optional)** + + - - + + + **`code`** **\*** **integer** - - -**`code`** **\*** **integer** + **Response code** -**Response code** + 0: success, Not 0: check the message -0: success, Not 0: check the message + **`message`** **\*** **string** -**`message`** **\***\*\* ****string\*\* + **Response message** -**Response message** + A non-zero code includes a message like 'Invalid payment info'. -A non-zero code includes a message like 'Invalid payment info'. + **`customer_uid`** **\*** **string** -**`customer_uid`** **\*** **string** + **`Customer ID`** -**`Customer ID`**\ + **`pg_provider`** **\*** **string** -**`pg_provider`** **\***\*\* ****string\*\* + **PG code for billing key** -**PG code for billing key** + **`pg_id`** **\*** **string** -**`pg_id`** **\***\*\* ****string\*\* + **PG merchant ID (MID) for billing key** -**PG merchant ID (MID) for billing key** + **`card_name`** **\*** **string** -**`card_name`** **\*** **string** + **`Credit card name`** -**`Credit card name`** + **`card_code`** **\*** **string** -**`card_code`** **\***\*\* ****string\*\* + **`Credit card code`** -**`Credit card code`** + **`card_number`** **\*** **string** -**`card_number`** **\***\*\* ****string\*\* + **`Masked card number`** -**`Masked card number`** + **`card_type`** **\*** **string** -**`card_type`** **\***\*\* ****string\*\* + **`Credit card type`** -**`Credit card type`** + **Not supported in some PGs (returns null)** -**Not supported in some PGs (returns null)** + **`customer_name`** **\*** **string** -**`customer_name`** **\***\*\* ****string\*\* + **`Customer name`** -**`Customer name`** + **`customer_tel`** **\*** **string** -**`customer_tel`** **\*** **string** + **`Customer phone`** -**`Customer phone`** + **`customer_email`** **\*** **string** -**`customer_email`** **\***\*\* ****string\*\* + **`Customer email`** -**`Customer email`** + **`customer_addr`** **\*** **string** -**`customer_addr`** **\***\*\* ****string\*\* + **`Customer address`** -**`Customer address`** + **`customer_postcode`** **\*** **string** -**`customer_postcode`** **\***\*\* ****string\*\* + **`Customer zip code`** -**`Customer zip code`** + **`inserted`** **\*** **integer** -**`inserted`** **\***\*\* ****integer\*\* + **`Billing key issued at`** (UNIX timestamp) -**`Billing key issued at`** (UNIX timestamp) + **`updated`** **\*** **integer** -**`updated`** **\***\*\* ****integer\*\* + **`Billing key updated at`** (UNIX timestamp) + + + -**`Billing key updated at`** (UNIX timestamp) - - - - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - + + ```ts + { + // Response + } + ``` + + + ```ts + { + // Response + } + ``` +
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": { - "customer_uid": "string", - "pg_provider": "string", - "pg_id": "string", - "card_name": "string", - "card_code": "string", - "card_number": "string", - "card_type": "null", - "customer_name": "string", - "customer_tel": "string", - "customer_email": "string", - "customer_addr": "string", - "customer_postcode": "string", - "inserted": 0, - "updated": 0 +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "customer_uid": "string", + "pg_provider": "string", + "pg_id": "string", + "card_name": "string", + "card_code": "string", + "card_number": "string", + "card_type": "null", + "customer_name": "string", + "customer_tel": "string", + "customer_email": "string", + "customer_addr": "string", + "customer_postcode": "string", + "inserted": 0, + "updated": 0 + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/subscribe.customer/customer_view**](https://api.iamport.kr/#!/subscribe.customer/customer_view) + **Swagger Test Link** + [**https://api.iamport.kr/#!/subscribe.customer/customer\_view**](https://api.iamport.kr/#!/subscribe.customer/customer_view) diff --git a/src/content/docs/en/api/billing-key-api/get-billing-keys-api.mdx b/src/content/docs/en/api/billing-key-api/get-billing-keys-api.mdx index 9ef6dd6d4..793df1119 100644 --- a/src/content/docs/en/api/billing-key-api/get-billing-keys-api.mdx +++ b/src/content/docs/en/api/billing-key-api/get-billing-keys-api.mdx @@ -4,195 +4,183 @@ description: "" --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Gets details of multiple billing keys. +## Gets details of multiple billing keys. - -Gets details (card info) of billing keys for the specified array of customer_uid - -_s._ - -Each card is mapped to a unique - -**customer_uid** - -. - - - -### Parameters - -#### Query - - - + + Gets details (card info) of billing keys for the specified array of customer\_uid -**Billing key** + _s._ - + Each card is mapped to a unique - + **customer\_uid** -### Responses + . + - - - -**`code`** **\***** ****integer** + ### Parameters -**Response code** + #### Query -0: success, Not 0: check the message + + + **Billing key** + + -**`message`** **\***\*\* ****string\*\* + ### Responses -**Response message** + + + + **`code`** **\*** **integer** -A non-zero code includes a message like 'Invalid payment info'. + **Response code** -**`response`** **(CustomerAnnotation, optional)** + 0: success, Not 0: check the message - - + **`message`** **\*** **string** - - -**`code`** **\*** **integer** + **Response message** -**Response code** + A non-zero code includes a message like 'Invalid payment info'. -0: success, Not 0: check the message + **`response`** **(CustomerAnnotation, optional)** + + -**`message`** **\***\*\* ****string\*\* + + + **`code`** **\*** **integer** -**Response message** + **Response code** -A non-zero code includes a message like 'Invalid payment info'. + 0: success, Not 0: check the message -**`customer_uid`** **\*** **string** + **`message`** **\*** **string** -**`Customer ID`**\ + **Response message** -**`pg_provider`** **\***\*\* ****string\*\* + A non-zero code includes a message like 'Invalid payment info'. -**PG code for billing key** + **`customer_uid`** **\*** **string** -**`pg_id`** **\***\*\* ****string\*\* + **`Customer ID`** -**PG merchant ID (MID) for billing key** + **`pg_provider`** **\*** **string** -**`card_name`** **\*** **string** + **PG code for billing key** -**`Credit card name`** + **`pg_id`** **\*** **string** -**`card_code`** **\***\*\* ****string\*\* + **PG merchant ID (MID) for billing key** -**`Credit card code`** + **`card_name`** **\*** **string** -**`card_number`** **\***\*\* ****string\*\* + **`Credit card name`** -**`Masked card number`** + **`card_code`** **\*** **string** -**`card_type`** **\***\*\* ****string\*\* + **`Credit card code`** -**`Credit card type`** + **`card_number`** **\*** **string** -**Not supported in some PGs (returns null)** + **`Masked card number`** -**`customer_name`** **\***\*\* ****string\*\* + **`card_type`** **\*** **string** -**`Customer name`** + **`Credit card type`** -**`customer_tel`** **\*** **string** + **Not supported in some PGs (returns null)** -**`Customer phone`** + **`customer_name`** **\*** **string** -**`customer_email`** **\***\*\* ****string\*\* + **`Customer name`** -**`Customer email`** + **`customer_tel`** **\*** **string** -**`customer_addr`** **\***\*\* ****string\*\* + **`Customer phone`** -**`Customer address`** + **`customer_email`** **\*** **string** -**`customer_postcode`** **\***\*\* ****string\*\* + **`Customer email`** -**`Customer zip code`** + **`customer_addr`** **\*** **string** -**`inserted`** **\***\*\* ****integer\*\* + **`Customer address`** -**`Billing key issued at`** (UNIX timestamp) + **`customer_postcode`** **\*** **string** -**`updated`** **\***\*\* ****integer\*\* + **`Customer zip code`** -**`Billing key updated at`** (UNIX timestamp) + **`inserted`** **\*** **integer** - - + **`Billing key issued at`** (UNIX timestamp) - + **`updated`** **\*** **integer** - -```javascript -{ - // Response -} -``` + **`Billing key updated at`** (UNIX timestamp) + + + - - - -```javascript -{ - // Response -} -``` - - - - - -
-

Response Model Schema

+ + ```ts + { + // Response + } + ``` + -```json -{ - "code": 0, - "message": "string", - "response": [ + + ```ts { - "customer_uid": "string", - "pg_provider": "string", - "pg_id": "string", - "card_name": "string", - "card_code": "string", - "card_number": "string", - "card_type": "null", - "customer_name": "string", - "customer_tel": "string", - "customer_email": "string", - "customer_addr": "string", - "customer_postcode": "string", - "inserted": 0, - "updated": 0 + // Response } - ] -} -``` + ``` + + +
+

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": [ + { + "customer_uid": "string", + "pg_provider": "string", + "pg_id": "string", + "card_name": "string", + "card_code": "string", + "card_number": "string", + "card_type": "null", + "customer_name": "string", + "customer_tel": "string", + "customer_email": "string", + "customer_addr": "string", + "customer_postcode": "string", + "inserted": 0, + "updated": 0 + } + ] + } + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/subscribe.customer/customer_view_multiple**](https://api.iamport.kr/#!/subscribe.customer/customer_view_multiple) + **Swagger Test Link** + [**https://api.iamport.kr/#!/subscribe.customer/customer\_view\_multiple**](https://api.iamport.kr/#!/subscribe.customer/customer_view_multiple) diff --git a/src/content/docs/en/api/billing-key-api/get-scheduled-payments-api.mdx b/src/content/docs/en/api/billing-key-api/get-scheduled-payments-api.mdx index 632651f0a..01995d2ca 100644 --- a/src/content/docs/en/api/billing-key-api/get-scheduled-payments-api.mdx +++ b/src/content/docs/en/api/billing-key-api/get-scheduled-payments-api.mdx @@ -4,223 +4,210 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Gets scheduled payments by billing key. +## Gets scheduled payments by billing key. - -Returns scheduled payments using pagination (up to 3 months period). - - - -### Parameters - -#### Path - - - - -**Billing key** - - - - - -#### Query + + Returns scheduled payments using pagination (up to 3 months period). + - -**Search result paging** + ### Parameters -Starts at 1 (default: 1) + #### Path - - -**Search start time** + + + **Billing key** + + -UNIX timestamp + #### Query - - -**Search end time** + + **Search result paging** -UNIX timestamp + Starts at 1 (default: 1) + - - -**Schedule status** + + **Search start time** -If not specified, returns for all status + UNIX timestamp + -`scheduled` + + **Search end time** -`executed` + UNIX timestamp + -`revoked` + + **Schedule status** - + If not specified, returns for all status -### Responses + `scheduled` - - - -**`code`** **\***** ****integer** + `executed` -**Response code** + `revoked` + -0: success, Not 0: check the message + ### Responses -**`message`** **\***** ****string** + + + + **`code`** **\*** **integer** -**Response message** + **Response code** -A non-zero code includes a message like 'Invalid payment info'. + 0: success, Not 0: check the message -**`response`** **(CustomerAnnotation, optional)** + **`message`** **\*** **string** - - + **Response message** - - -**`code`** **\*** **integer** + A non-zero code includes a message like 'Invalid payment info'. -**Response code** + **`response`** **(CustomerAnnotation, optional)** + + -0: success, Not 0: check the message + + + **`code`** **\*** **integer** -**`message`** **\***** ****string** + **Response code** -**Response message** + 0: success, Not 0: check the message -A non-zero code includes a message like 'Invalid payment info'. + **`message`** **\*** **string** -**`customer_uid`** **\*** **string** + **Response message** -**`Customer ID`**\ + A non-zero code includes a message like 'Invalid payment info'. -**`pg_provider`** **\***** ****string** + **`customer_uid`** **\*** **string** -**PG code for billing key** + **`Customer ID`** -**`pg_id`** **\***** ****string** + **`pg_provider`** **\*** **string** -**PG merchant ID (MID) for billing key** + **PG code for billing key** -**`card_name`** **\*** **string** + **`pg_id`** **\*** **string** -**`Credit card name`** + **PG merchant ID (MID) for billing key** -**`card_code`** **\***** ****string** + **`card_name`** **\*** **string** -**`Credit card code`** + **`Credit card name`** -**`card_number`** **\***** ****string** + **`card_code`** **\*** **string** -**`Masked card number`** + **`Credit card code`** -**`card_type`** **\***** ****string** + **`card_number`** **\*** **string** -**`Credit card type`** + **`Masked card number`** -**Not supported in some PGs (returns null)** + **`card_type`** **\*** **string** -**`customer_name`** **\***** ****string** + **`Credit card type`** -**`Customer name`** + **Not supported in some PGs (returns null)** -**`customer_tel`** **\*** **string** + **`customer_name`** **\*** **string** -**`Customer phone`** + **`Customer name`** -**`customer_email`** **\***** ****string** + **`customer_tel`** **\*** **string** -**`Customer email`** + **`Customer phone`** -**`customer_addr`** **\***** ****string** + **`customer_email`** **\*** **string** -**`Customer address`** + **`Customer email`** -**`customer_postcode`** **\***** ****string** + **`customer_addr`** **\*** **string** -**`Customer zip code`** + **`Customer address`** -**`inserted`** **\***** ****integer** + **`customer_postcode`** **\*** **string** -**`Billing key issued at`** (UNIX timestamp) + **`Customer zip code`** -**`updated`** **\***** ****integer** + **`inserted`** **\*** **integer** -**`Billing key updated at`** (UNIX timestamp) + **`Billing key issued at`** (UNIX timestamp) - - + **`updated`** **\*** **integer** - + **`Billing key updated at`** (UNIX timestamp) + + + - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - - - - -
-

Response Model Schema

+ + ```ts + { + // Response + } + ``` + -```json -{ - "code": 0, - "message": "string", - "response": [ + + ```ts { - "customer_uid": "string", - "merchant_uid": "string", - "imp_uid": "string", - "schedule_at": "0", - "executed_at": "0", - "revoked_at": "0", - "amount": 0, - "name": "string", - "buyer_name": "string", - "buyer_email": "string", - "buyer_tel": "string", - "buyer_addr": "string", - "buyer_postcode": "string", - "custom_data": "string", - "schedule_status": "scheduled", - "payment_status": "paid", - "fail_reason": "string" + // Response } - ] -} -``` + ``` + + +
+

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": [ + { + "customer_uid": "string", + "merchant_uid": "string", + "imp_uid": "string", + "schedule_at": "0", + "executed_at": "0", + "revoked_at": "0", + "amount": 0, + "name": "string", + "buyer_name": "string", + "buyer_email": "string", + "buyer_tel": "string", + "buyer_addr": "string", + "buyer_postcode": "string", + "custom_data": "string", + "schedule_status": "scheduled", + "payment_status": "paid", + "fail_reason": "string" + } + ] + } + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/subscribe.customer/findSchedulesByCustomer**](https://api.iamport.kr/#!/subscribe.customer/findSchedulesByCustomer) + **Swagger Test Link** + [**https://api.iamport.kr/#!/subscribe.customer/findSchedulesByCustomer**](https://api.iamport.kr/#!/subscribe.customer/findSchedulesByCustomer) diff --git a/src/content/docs/en/api/cash-receipt-api/cancel-cash-receipt-external-api.mdx b/src/content/docs/en/api/cash-receipt-api/cancel-cash-receipt-external-api.mdx index 8227b0abb..7578eb771 100644 --- a/src/content/docs/en/api/cash-receipt-api/cancel-cash-receipt-external-api.mdx +++ b/src/content/docs/en/api/cash-receipt-api/cancel-cash-receipt-external-api.mdx @@ -4,185 +4,168 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Cancels a cash receipt issued for an external transaction. +## Cancels a cash receipt issued for an external transaction.
-

Supported PGs

- -- **KG INICIS** -- **NHN KCP** -- **Settle Bank** -- **NICE Payments** -- **PAYJOA (Daou)** -- **KICC** - +

Supported PGs

+ + - **KG INICIS** + - **NHN KCP** + - **Settle Bank** + - **NICE Payments** + - **PAYJOA (Daou)** + - **KICC**
- -This cancels the issuance of a cash receipt for a payment processed externally through an i'mport supported PG. Pass the - -**merchant_uid** - -, the unique order number for the cash transaction, that was used to request the issuance of cash receipt. - - - -### Parameters - -#### Path + + This cancels the issuance of a cash receipt for a payment processed externally through an i'mport supported PG. Pass the - - + **merchant\_uid** -**i'mport transaction ID** + , the unique order number for the cash transaction, that was used to request the issuance of cash receipt. + - + ### Parameters - + #### Path - + + + **i'mport transaction ID** + + -### Responses + ### Responses - - - -**`code`** **\***** ****integer** + + + + **`code`** **\*** **integer** -**Response code** + **Response code** -0: success, Not 0: check the message + 0: success, Not 0: check the message -**`message`** **\***** ****string** + **`message`** **\*** **string** -**Response message** + **Response message** -A non-zero code includes a message like 'Invalid payment info'. + A non-zero code includes a message like 'Invalid payment info'. -**`response`****`(ExternalReceiptAnnotation, optional)`** + **`response`****`(ExternalReceiptAnnotation, optional)`** + + - - + + + **`imp_uid`` `****`*`****`string`** - - -**`imp_uid`` `****`*`****`string`** + **`i'mport transaction ID`** -**`i'mport transaction ID`** + **`receipt_tid`` `****`string`** -**`receipt_tid`` `****`string`** + **`Cash receipt ID issued by PG`** -**`Cash receipt ID issued by PG`** + **`apply_num`****`*`****`string`** -**`apply_num`****`*`****`string`** + **`Cash receipt ID issued by National Tax Service`** -**`Cash receipt ID issued by National Tax Service`** + **`type`` `****`*`****`string`** -**`type`` `****`*`****`string`** + **`Recipient type`** -**`Recipient type`** + - Personal use: `person` + - Business use: `company` -- Personal use: `person` -- Business use: `company` + **`amount`****`*`****`integer`** -**`amount`****`*`****`integer`** + **`Cash receipt Amount`** -**`Cash receipt Amount`** + **`vat`****`*`****`integer`** -**`vat`****`*`****`integer`** + **`VAT`** -**`VAT`** + **`receipt_url`` `****`string`** -**`receipt_url`` `****`string`** + **`Cash receipt URL`** -**`Cash receipt URL`** + **`applied_at`****`*`****`integer`** -**`applied_at`****`*`****`integer`** + **Issued at** `UNIX TIMESTAMP` -**Issued at** `UNIX TIMESTAMP` + **`cancelled_at`` `****`integer`** -**`cancelled_at`` `****`integer`** + **`Cancelled at`** `UNIX TIMESTAMP` + + + -**`Cancelled at`** `UNIX TIMESTAMP` + + ```ts + { + // Response + } + ``` + - - + + ```ts + { + // Response + } + ``` + - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - + + ```ts + { + // Response + } + ``` + + + ```ts + { + // Response + } + ``` +
-

Response Model Schema

- -``` -{ - "code": 0, - "message": "string", - "response": { - "merchant_uid": "string", - "receipt_tid": "string", - "apply_num": "string", - "type": "person", - "amount": 0, - "vat": 0, - "receipt_url": "string", - "applied_at": 0, - "cancelled_at": 0 +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "merchant_uid": "string", + "receipt_tid": "string", + "apply_num": "string", + "type": "person", + "amount": 0, + "vat": 0, + "receipt_url": "string", + "applied_at": 0, + "cancelled_at": 0 + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/receipts/revokeExternalReceipt**](https://api.iamport.kr/#!/receipts/revokeExternalReceipt) + **Swagger Test Link** + [**https://api.iamport.kr/#!/receipts/revokeExternalReceipt**](https://api.iamport.kr/#!/receipts/revokeExternalReceipt) diff --git a/src/content/docs/en/api/cash-receipt-api/cancel-cash-receipt-transaction-api.mdx b/src/content/docs/en/api/cash-receipt-api/cancel-cash-receipt-transaction-api.mdx index 4c89abbc0..8f115e025 100644 --- a/src/content/docs/en/api/cash-receipt-api/cancel-cash-receipt-transaction-api.mdx +++ b/src/content/docs/en/api/cash-receipt-api/cancel-cash-receipt-transaction-api.mdx @@ -4,180 +4,164 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Cancels cash receipt transaction processed through i'mport. +## Cancels cash receipt transaction processed through i'mport.
-

Supported PGs

- -- **KG INICIS** -- **NHN KCP** -- **Settle Bank** -- **NICE Payments** -- **PAYJOA (Daou)** -- **KICC** - +

Supported PGs

+ + - **KG INICIS** + - **NHN KCP** + - **Settle Bank** + - **NICE Payments** + - **PAYJOA (Daou)** + - **KICC**
- -(To cancel cash receipt transactions not related to i'mport, refer to - -[**link**](http://localhost:5000/s/wWX2hlvRZLZrXeH1aacF/api/api-8/api-3) - - - -**.** - - - -) + + (To cancel cash receipt transactions not related to i'mport, refer to - + [**link**](http://localhost:5000/s/wWX2hlvRZLZrXeH1aacF/api/api-8/api-3) -### Parameters + + **.** + -#### Path + ) + - - + ### Parameters -**i'mport transaction ID** + #### Path - + + + **i'mport transaction ID** + + - + ### Responses -### Responses + + + + **`code`** **\*** **integer** - - - -**`code`** **\***** ****integer** + **Response code** -**Response code** + 0: success, Not 0: check the message -0: success, Not 0: check the message + **`message`** **\*** **string** -**`message`** **\***** ****string** + **Response message** -**Response message** + A non-zero code includes a message like 'Invalid payment info'. -A non-zero code includes a message like 'Invalid payment info'. + **`response`` `****`(ReceiptAnnotation, optional)`** + + -**`response`` `****`(ReceiptAnnotation, optional)`** + + + **`imp_uid`` `****`*`****`string`** - - + **`i'mport transaction ID`** - - -**`imp_uid`` `****`*`****`string`** + **`receipt_tid`` `****`string`** -**`i'mport transaction ID`** + **`Cash receipt ID issued by PG`** -**`receipt_tid`` `****`string`** + **`apply_num`****`*`****`string`** -**`Cash receipt ID issued by PG`** + **`Cash receipt ID issued by National Tax Service`** -**`apply_num`****`*`****`string`** + **`type`` `****`*`****`string`** -**`Cash receipt ID issued by National Tax Service`** + **`Recipient type`** -**`type`` `****`*`****`string`** + - Personal use: `person` + - Business use: `company` -**`Recipient type`** + **`amount`****`*`****`integer`** -- Personal use: `person` -- Business use: `company` + **`Cash receipt Amount`** -**`amount`****`*`****`integer`** + **`vat`****`*`****`integer`** -**`Cash receipt Amount`** + **`VAT`** -**`vat`****`*`****`integer`** + **`receipt_url`` `****`string`** -**`VAT`** + **`Cash receipt URL`** -**`receipt_url`` `****`string`** + **`applied_at`****`*`****`integer`** -**`Cash receipt URL`** + **Issued at** `UNIX TIMESTAMP` -**`applied_at`****`*`****`integer`** + **`cancelled_at`` `****`integer`** -**Issued at** `UNIX TIMESTAMP` + **`Cancelled at`** `UNIX TIMESTAMP` + + + -**`cancelled_at`` `****`integer`** + + ```ts + { + // Response + } + ``` + -**`Cancelled at`** `UNIX TIMESTAMP` - - - - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - + + ```ts + { + // Response + } + ``` + + + ```ts + { + // Response + } + ``` +
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": { - "imp_uid": "string", - "receipt_tid": "string", - "apply_num": "string", - "type": "person", - "amount": 0, - "vat": 0, - "receipt_url": "string", - "applied_at": 0, - "cancelled_at": 0 +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "imp_uid": "string", + "receipt_tid": "string", + "apply_num": "string", + "type": "person", + "amount": 0, + "vat": 0, + "receipt_url": "string", + "applied_at": 0, + "cancelled_at": 0 + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/receipts/revokeReceipt**](https://api.iamport.kr/#!/receipts/revokeReceipt) + **Swagger Test Link** + [**https://api.iamport.kr/#!/receipts/revokeReceipt**](https://api.iamport.kr/#!/receipts/revokeReceipt) diff --git a/src/content/docs/en/api/cash-receipt-api/get-cash-receipt-api.mdx b/src/content/docs/en/api/cash-receipt-api/get-cash-receipt-api.mdx index 24ceea8b1..ca11302e3 100644 --- a/src/content/docs/en/api/cash-receipt-api/get-cash-receipt-api.mdx +++ b/src/content/docs/en/api/cash-receipt-api/get-cash-receipt-api.mdx @@ -4,148 +4,135 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Gets cash receipt information issued via i'mport. +## Gets cash receipt information issued via i'mport. - - - - -### Parameters - -#### Path - - - + -**i'mport transaction ID** + ### Parameters - + #### Path - + + + **i'mport transaction ID** + + -### Responses + ### Responses - - - -**`code`** **\***** ****integer** + + + + **`code`** **\*** **integer** -**Response code** + **Response code** -0: success, Not 0: check the message + 0: success, Not 0: check the message -**`message`** **\***** ****string** + **`message`** **\*** **string** -**Response message** + **Response message** -A non-zero code includes a message like 'Invalid payment info'. + A non-zero code includes a message like 'Invalid payment info'. -**`response`` `****`(ReceiptAnnotation, optional)`** + **`response`` `****`(ReceiptAnnotation, optional)`** + + - - + + + **`imp_uid`` `****`*`****`string`** - - -**`imp_uid`` `****`*`****`string`** + **`i'mport transaction ID`** -**`i'mport transaction ID`** + **`receipt_tid`` `****`string`** -**`receipt_tid`` `****`string`** + **`Cash receipt ID issued by PG`** -**`Cash receipt ID issued by PG`** + **`apply_num`****`*`****`string`** -**`apply_num`****`*`****`string`** + **`Cash receipt ID issued by National Tax Service`** -**`Cash receipt ID issued by National Tax Service`** + **`type`` `****`*`****`string`** -**`type`` `****`*`****`string`** + **`Recipient type`** -**`Recipient type`** + - Personal use: `person` + - Business use: `company` -- Personal use: `person` -- Business use: `company` + **`amount`****`*`****`integer`** -**`amount`****`*`****`integer`** + **`Cash receipt Amount`** -**`Cash receipt Amount`** + **`vat`****`*`****`integer`** -**`vat`****`*`****`integer`** + **`VAT`** -**`VAT`** + **`receipt_url`` `****`string`** -**`receipt_url`` `****`string`** + **`Cash receipt URL`** -**`Cash receipt URL`** + **`applied_at`****`*`****`integer`** -**`applied_at`****`*`****`integer`** + **Issued at** `UNIX TIMESTAMP` -**Issued at** `UNIX TIMESTAMP` + **`cancelled_at`` `****`integer`** -**`cancelled_at`` `****`integer`** + **`Cancelled at`** `UNIX TIMESTAMP` + + + -**`Cancelled at`** `UNIX TIMESTAMP` - - - - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - + + ```ts + { + // Response + } + ``` + + + ```ts + { + // Response + } + ``` +
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": { - "imp_uid": "string", - "receipt_tid": "string", - "apply_num": "string", - "type": "person", - "amount": 0, - "vat": 0, - "receipt_url": "string", - "applied_at": 0, - "cancelled_at": 0 - } -} -``` - +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "imp_uid": "string", + "receipt_tid": "string", + "apply_num": "string", + "type": "person", + "amount": 0, + "vat": 0, + "receipt_url": "string", + "applied_at": 0, + "cancelled_at": 0 + } + } + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/receipts/getReceipt**](https://api.iamport.kr/#!/receipts/getReceipt) + **Swagger Test Link** + [**https://api.iamport.kr/#!/receipts/getReceipt**](https://api.iamport.kr/#!/receipts/getReceipt) diff --git a/src/content/docs/en/api/cash-receipt-api/get-cash-receipt-external-api.mdx b/src/content/docs/en/api/cash-receipt-api/get-cash-receipt-external-api.mdx index b9222bc24..60fc276af 100644 --- a/src/content/docs/en/api/cash-receipt-api/get-cash-receipt-external-api.mdx +++ b/src/content/docs/en/api/cash-receipt-api/get-cash-receipt-external-api.mdx @@ -4,148 +4,135 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Gets cash receipt information for an external transaction. +## Gets cash receipt information for an external transaction. - - - - -### Parameters - -#### Path - - - + -**i'mport transaction ID** + ### Parameters - + #### Path - + + + **i'mport transaction ID** + + -### Responses + ### Responses - - - -**`code`** **\***** ****integer** + + + + **`code`** **\*** **integer** -**Response code** + **Response code** -0: success, Not 0: check the message + 0: success, Not 0: check the message -**`message`** **\***** ****string** + **`message`** **\*** **string** -**Response message** + **Response message** -A non-zero code includes a message like 'Invalid payment info'. + A non-zero code includes a message like 'Invalid payment info'. -**`response`****`(ExternalReceiptAnnotation, optional)`** + **`response`****`(ExternalReceiptAnnotation, optional)`** + + - - + + + **`imp_uid`` `****`*`****`string`** - - -**`imp_uid`` `****`*`****`string`** + **`i'mport transaction ID`** -**`i'mport transaction ID`** + **`receipt_tid`` `****`string`** -**`receipt_tid`` `****`string`** + **`Cash receipt ID issued by PG`** -**`Cash receipt ID issued by PG`** + **`apply_num`****`*`****`string`** -**`apply_num`****`*`****`string`** + **`Cash receipt ID issued by National Tax Service`** -**`Cash receipt ID issued by National Tax Service`** + **`type`` `****`*`****`string`** -**`type`` `****`*`****`string`** + **`Recipient type`** -**`Recipient type`** + - Personal use: `person` + - Business use: `company` -- Personal use: `person` -- Business use: `company` + **`amount`****`*`****`integer`** -**`amount`****`*`****`integer`** + **`Cash receipt Amount`** -**`Cash receipt Amount`** + **`vat`****`*`****`integer`** -**`vat`****`*`****`integer`** + **`VAT`** -**`VAT`** + **`receipt_url`` `****`string`** -**`receipt_url`` `****`string`** + **`Cash receipt URL`** -**`Cash receipt URL`** + **`applied_at`****`*`****`integer`** -**`applied_at`****`*`****`integer`** + **Issued at** `UNIX TIMESTAMP` -**Issued at** `UNIX TIMESTAMP` + **`cancelled_at`` `****`integer`** -**`cancelled_at`` `****`integer`** + **`Cancelled at`** `UNIX TIMESTAMP` + + + -**`Cancelled at`** `UNIX TIMESTAMP` - - - - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - + + ```ts + { + // Response + } + ``` + + + ```ts + { + // Response + } + ``` +
-

Response Model Schema

- -``` -{ - "code": 0, - "message": "string", - "response": { - "merchant_uid": "string", - "receipt_tid": "string", - "apply_num": "string", - "type": "person", - "amount": 0, - "vat": 0, - "receipt_url": "string", - "applied_at": 0, - "cancelled_at": 0 +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "merchant_uid": "string", + "receipt_tid": "string", + "apply_num": "string", + "type": "person", + "amount": 0, + "vat": 0, + "receipt_url": "string", + "applied_at": 0, + "cancelled_at": 0 + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/receipts/getExternalReceipt**](https://api.iamport.kr/#!/receipts/getExternalReceipt) + **Swagger Test Link** + [**https://api.iamport.kr/#!/receipts/getExternalReceipt**](https://api.iamport.kr/#!/receipts/getExternalReceipt) diff --git a/src/content/docs/en/api/cash-receipt-api/request-cash-receipt-api.mdx b/src/content/docs/en/api/cash-receipt-api/request-cash-receipt-api.mdx index 99982c3f7..a8127e483 100644 --- a/src/content/docs/en/api/cash-receipt-api/request-cash-receipt-api.mdx +++ b/src/content/docs/en/api/cash-receipt-api/request-cash-receipt-api.mdx @@ -4,210 +4,194 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Requests cash receipt for a cash transaction. +## Requests cash receipt for a cash transaction. A cash receipt is issued for the i'mport transaction number (**`imp_uid`**) of the cash transaction (**virtual account, account transfer**) processed through i'mport. The cash receipt amount is **automatically applied as cash transaction amount**. For a partially cancelled transaction, cash receipt is **issued for the remaining balance**.
-

Supported PGs

- -- **KG INICIS** -- **NHN KCP** -- **Settle Bank** -- **NICE Payments** -- **PAYJOA (Daou)** -- **KICC** - +

Supported PGs

+ + - **KG INICIS** + - **NHN KCP** + - **Settle Bank** + - **NICE Payments** + - **PAYJOA (Daou)** + - **KICC**
- - - - -### Parameters - -#### Path - - - - -**i'mport transaction ID** + - + ### Parameters - + #### Path -#### Body + + + **i'mport transaction ID** + + - - + #### Body -**Cash receipt code** + + + **Cash receipt code** + + - + + **Cash receipt code type** - - -**Cash receipt code type** + `person: social security number` -`person: social security number` + `business: business registration number` -`business: business registration number` + `phone: mobile phone number` -`phone: mobile phone number` + `taxcard: National Tax Service cash receipt card` + -`taxcard: National Tax Service cash receipt card` + + **Cash receipt type** - - -**Cash receipt type** + `For income deduction (personal) : person` -`For income deduction (personal) : person` + `For proof of expenses (business) : company` -`For proof of expenses (business) : company` + `Default: person` + -`Default: person` + + **Merchant's customer service phone** - - -**Merchant's customer service phone** + (Required for PayJoa only) + -(Required for PayJoa only) + + **Merchant's business name** - - -**Merchant's business name** + (Required for PayJoa only) + -(Required for PayJoa only) + + **Merchant's business registration number** - - -**Merchant's business registration number** + (Required for PayJoa only) + -(Required for PayJoa only) + + **Customer name** + - - -**Customer name** + + **Customer email** + - - -**Customer email** + + **Customer phone** + - - -**Customer phone** + + **Tax free amount** + - - -**Tax free amount** + ### Responses - + + + + **`code`** **\*** **integer** -### Responses + **Response code** - - - -**`code`** **\***** ****integer** + 0: success, Not 0: check the message -**Response code** + **`message`** **\*** **string** -0: success, Not 0: check the message + **Response message** -**`message`** **\***** ****string** + A non-zero code includes a message like 'Invalid payment info'. -**Response message** + **`response`` `****`(ReceiptAnnotation, optional)`** + + -A non-zero code includes a message like 'Invalid payment info'. + + + **`imp_uid`` `****`*`****`string`** -**`response`` `****`(ReceiptAnnotation, optional)`** + **`i'mport transaction ID`** - - + **`receipt_tid`` `****`string`** - - -**`imp_uid`` `****`*`****`string`** + **`Cash receipt ID issued by PG`** -**`i'mport transaction ID`** + **`apply_num`****`*`****`string`** -**`receipt_tid`` `****`string`** + **`Cash receipt ID issued by National Tax Service`** -**`Cash receipt ID issued by PG`** + **`type`` `****`*`****`string`** -**`apply_num`****`*`****`string`** + **`Recipient type`** -**`Cash receipt ID issued by National Tax Service`** + - Personal use: `person` + - Business use: `company` -**`type`` `****`*`****`string`** + **`amount`****`*`****`integer`** -**`Recipient type`** + **`Cash receipt Amount`** -- Personal use: `person` -- Business use: `company` + **`vat`****`*`****`integer`** -**`amount`****`*`****`integer`** + **`VAT`** -**`Cash receipt Amount`** + **`receipt_url`` `****`string`** -**`vat`****`*`****`integer`** + **`Cash receipt URL`** -**`VAT`** + **`applied_at`****`*`****`integer`** -**`receipt_url`` `****`string`** + **Issued at** `UNIX TIMESTAMP` -**`Cash receipt URL`** + **`cancelled_at`` `****`integer`** -**`applied_at`****`*`****`integer`** + **`Cancelled at`** `UNIX TIMESTAMP` + + + -**Issued at** `UNIX TIMESTAMP` + + ```ts + { + // Response + } + ``` + -**`cancelled_at`` `****`integer`** - -**`Cancelled at`** `UNIX TIMESTAMP` - - - - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - + + ```ts + { + // Response + } + ``` + + + ```ts + { + // Response + } + ``` + ### **Key request parameter description** @@ -223,37 +207,35 @@ A non-zero code includes a message like 'Invalid payment info'. > > **`Cash receipt code type`** > -> **Required for**** KICC and Settlebank only** +> **Required for** **KICC and Settlebank only** > > Request for KG INICIS/NHN KCP/Nice Payments/PayJoa is automatically processed with only the > **identifier.**
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": { - "imp_uid": "string", - "receipt_tid": "string", - "apply_num": "string", - "type": "person", - "amount": 0, - "vat": 0, - "receipt_url": "string", - "applied_at": 0, - "cancelled_at": 0 - } -} -``` - +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "imp_uid": "string", + "receipt_tid": "string", + "apply_num": "string", + "type": "person", + "amount": 0, + "vat": 0, + "receipt_url": "string", + "applied_at": 0, + "cancelled_at": 0 + } + } + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/receipts/issueReceipt**](https://api.iamport.kr/#!/receipts/issueReceipt) + **Swagger Test Link** + [**https://api.iamport.kr/#!/receipts/issueReceipt**](https://api.iamport.kr/#!/receipts/issueReceipt) diff --git a/src/content/docs/en/api/cash-receipt-api/request-cash-receipt-external-api.mdx b/src/content/docs/en/api/cash-receipt-api/request-cash-receipt-external-api.mdx index f307ad6fa..cd18d94dc 100644 --- a/src/content/docs/en/api/cash-receipt-api/request-cash-receipt-external-api.mdx +++ b/src/content/docs/en/api/cash-receipt-api/request-cash-receipt-external-api.mdx @@ -4,219 +4,202 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Requests a cash receipt for an external cash transaction. +## Requests a cash receipt for an external cash transaction.
-

Supported PGs

- -- **KG INICIS** -- **NHN KCP** -- **Settle Bank** -- **NICE Payments** -- **PAYJOA (Daou)** -- **KICC** - +

Supported PGs

+ + - **KG INICIS** + - **NHN KCP** + - **Settle Bank** + - **NICE Payments** + - **PAYJOA (Daou)** + - **KICC**
- -A cash receipt can be issued for a non-i'mport transaction. However, the order number must be the same as the cash transaction order number so that it can be replaced later. - -If the `pg` parameter is not specified, the request will be processed using the default PG. - - - -### Parameters - -#### Path - - - - -**i'mport transaction ID** + + A cash receipt can be issued for a non-i'mport transaction. However, the order number must be the same as the cash transaction order number so that it can be replaced later. - + If the `pg` parameter is not specified, the request will be processed using the default PG. + - + ### Parameters -#### Body + #### Path - - + + + **i'mport transaction ID** + + -**Order name** + #### Body - + + + **Order name** + + - - - + + + **Amount** + + -**Amount** + + **Cash receipt code** - + `National Tax Service cash receipt card` - - -**Cash receipt code** + `Mobile phone number` -`National Tax Service cash receipt card` + `Social security number` -`Mobile phone number` + `Business registration number` -`Social security number` + `Mobile phone number` + -`Business registration number` + + **Cash receipt code type** -`Mobile phone number` + `person: social security number` - - -**Cash receipt code type** + `business: business registration number` -`person: social security number` + `phone: mobile phone number` -`business: business registration number` + `taxcard: National Tax Service cash receipt card` + -`phone: mobile phone number` + + **Cash receipt type** -`taxcard: National Tax Service cash receipt card` + `For income deduction (personal) : person` - - -**Cash receipt type** + `For proof of expenses (business) : company` -`For income deduction (personal) : person` + `Default: person` + -`For proof of expenses (business) : company` + + **Customer name** + -`Default: person` + + **Customer email** + - - -**Customer name** + + **Customer phone** + - - -**Customer email** + + **Tax free amount** + - - -**Customer phone** + + **PG code** + - - -**Tax free amount** + ### Responses - - -**PG code** + + + + **`code`** **\*** **integer** - + **Response code** -### Responses + 0: success, Not 0: check the message - - - -**`code`** **\***** ****integer** + **`message`** **\*** **string** -**Response code** + **Response message** -0: success, Not 0: check the message + A non-zero code includes a message like 'Invalid payment info'. -**`message`** **\***** ****string** + **`response`****`(ExternalReceiptAnnotation, optional)`** + + -**Response message** + + + **`imp_uid`` `****`*`****`string`** -A non-zero code includes a message like 'Invalid payment info'. + **`i'mport transaction ID`** -**`response`****`(ExternalReceiptAnnotation, optional)`** + **`receipt_tid`` `****`string`** - - + **`Cash receipt ID issued by PG`** - - -**`imp_uid`` `****`*`****`string`** + **`apply_num`****`*`****`string`** -**`i'mport transaction ID`** + **`Cash receipt ID issued by National Tax Service`** -**`receipt_tid`` `****`string`** + **`type`` `****`*`****`string`** -**`Cash receipt ID issued by PG`** + **`Recipient type`** -**`apply_num`****`*`****`string`** + - Personal use: `person` + - Business use: `company` -**`Cash receipt ID issued by National Tax Service`** + **`amount`****`*`****`integer`** -**`type`` `****`*`****`string`** + **`Cash receipt Amount`** -**`Recipient type`** + **`vat`****`*`****`integer`** -- Personal use: `person` -- Business use: `company` + **`VAT`** -**`amount`****`*`****`integer`** + **`receipt_url`` `****`string`** -**`Cash receipt Amount`** + **`Cash receipt URL`** -**`vat`****`*`****`integer`** + **`applied_at`****`*`****`integer`** -**`VAT`** + **Issued at** `UNIX TIMESTAMP` -**`receipt_url`` `****`string`** + **`cancelled_at`` `****`integer`** -**`Cash receipt URL`** + **`Cancelled at`** `UNIX TIMESTAMP` + + + -**`applied_at`****`*`****`integer`** + + ```ts + { + // Response + } + ``` + -**Issued at** `UNIX TIMESTAMP` - -**`cancelled_at`` `****`integer`** - -**`Cancelled at`** `UNIX TIMESTAMP` - - - - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - + + ```ts + { + // Response + } + ``` + + + ```ts + { + // Response + } + ``` + ### **Key request parameter description** @@ -232,7 +215,7 @@ A non-zero code includes a message like 'Invalid payment info'. > > **`Cash receipt code type`** > -> **Required for**** KICC and Settlebank only** +> **Required for** **KICC and Settlebank only** > > Request for KG INICIS/NHN KCP/Nice Payments/PayJoa is automatically processed with only the > **identifier.** @@ -255,31 +238,29 @@ A non-zero code includes a message like 'Invalid payment info'. > - If you have multiple MIDs from NICE Payments, specify as **nice.MID1** or **nice.MID2**.
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": { - "merchant_uid": "string", - "receipt_tid": "string", - "apply_num": "string", - "type": "person", - "amount": 0, - "vat": 0, - "receipt_url": "string", - "applied_at": 0, - "cancelled_at": 0 +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "merchant_uid": "string", + "receipt_tid": "string", + "apply_num": "string", + "type": "person", + "amount": 0, + "vat": 0, + "receipt_url": "string", + "applied_at": 0, + "cancelled_at": 0 + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/receipts/issueExternalReceipt**](https://api.iamport.kr/#!/receipts/issueExternalReceipt) + **Swagger Test Link** + [**https://api.iamport.kr/#!/receipts/issueExternalReceipt**](https://api.iamport.kr/#!/receipts/issueExternalReceipt) diff --git a/src/content/docs/en/api/escrow-api/add-delivery-info-api.mdx b/src/content/docs/en/api/escrow-api/add-delivery-info-api.mdx index 12c0ba476..b58ec7b39 100644 --- a/src/content/docs/en/api/escrow-api/add-delivery-info-api.mdx +++ b/src/content/docs/en/api/escrow-api/add-delivery-info-api.mdx @@ -4,172 +4,150 @@ description: "" --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Adds delivery info for an escrow transaction. +## Adds delivery info for an escrow transaction.
-

Supported PGs

- -- KG INICIS -- NHN KCP -- PAYJOA (Daou) +

Supported PGs

+ - KG INICIS + - NHN KCP + - PAYJOA (Daou)
- -The request body must be **2-depth JSON**. - -[**Courier codes**](../../tips/code) - - - -### Parameters - -#### Path - - - - -**i'mport transaction ID** - - - - - -#### Body - - - - -**Sender info** - - - - - - - -**Receiver info** - - - - - - - -**Delivery info** - - - - - -### Responses - - - - -**`code`** **\***** ****integer** - -**Response code** - -0: success, Not 0: check the message + + The request body must be **2-depth JSON**. -**`message`** **\***\*\* ****string\*\* + [**Courier codes**](../../tips/code) + -**Response message** + ### Parameters -A non-zero code includes a message like 'Invalid payment info'. + #### Path -**`response`****`(EscrowLogisAnnotation, optional)`** + + + **i'mport transaction ID** + + - - - - - -**`company`** **`*`****`string`** - -**`Courier code`** - -**`invoice`****`*`****`string`** - -**`Tracking number`** - -**`sent_at`****`*`****`integer`** - -**`Sent at`** _**UNIX TIMESTAMP**_ - -**`applied_at`**_**`*`**_**`integer`** - -**`Delivery info created at`** _**UNIX TIMESTAMP**_ - - - - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - + #### Body + + + **Sender info** + + + + + + **Receiver info** + + + + + + **Delivery info** + + + + ### Responses + + + + + **`code`** **\*** **integer** + + **Response code** + + 0: success, Not 0: check the message + + **`message`** **\*** **string** + + **Response message** + + A non-zero code includes a message like 'Invalid payment info'. + + **`response`****`(EscrowLogisAnnotation, optional)`** + + + + + + **`company`** **`*`****`string`** + + **`Courier code`** + + **`invoice`****`*`****`string`** + + **`Tracking number`** + + **`sent_at`****`*`****`integer`** + + **`Sent at`** _**UNIX TIMESTAMP**_ + + **`applied_at`**_**`*`**_**`integer`** + + **`Delivery info created at`** _**UNIX TIMESTAMP**_ + + + + + + ```ts + { + // Response + } + ``` + + + + ```ts + { + // Response + } + ``` + + + + ```ts + { + // Response + } + ``` + + + + ```ts + { + // Response + } + ``` + + + + ```ts + { + // Response + } + ``` + + + + ```ts + { + // Response + } + ``` + ### **Key request parameter description** @@ -179,28 +157,27 @@ A non-zero code includes a message like 'Invalid payment info'. > **`Sender info`**
-

EscrowLogisSenderAnnotation

- -**`name (string, optional)`** +

EscrowLogisSenderAnnotation

-**`Sender's name (Required for: KG INICIS)`** + **`name (string, optional)`** -**`tel (string, optional)`** + **`Sender's name (Required for: KG INICIS)`** -**`Sender's phone (Required for: KG INICIS)`** + **`tel (string, optional)`** -**`addr (string, optional)`** + **`Sender's phone (Required for: KG INICIS)`** -**`Sender's address (Required for: KG INICIS)`** + **`addr (string, optional)`** -**`postcode (string, optional)`** + **`Sender's address (Required for: KG INICIS)`** -**`Sender's zip code (Required for: KG INICIS)`** + **`postcode (string, optional)`** -**`relationship (string, optional)`** + **`Sender's zip code (Required for: KG INICIS)`** -**`Relationship with sender (Required for: PAYJOA, Example: Self)`** + **`relationship (string, optional)`** + **`Relationship with sender (Required for: PAYJOA, Example: Self)`**
> **`receiver`****`*`****`Json`** @@ -208,24 +185,23 @@ A non-zero code includes a message like 'Invalid payment info'. > **`Receiver info`**
-

EscrowLogisReceiverAnnotation

- -**`name (string, optional)`** +

EscrowLogisReceiverAnnotation

-**`Receiver's name (Required for: KG INICIS)`** + **`name (string, optional)`** -**`tel (string, optional)`** + **`Receiver's name (Required for: KG INICIS)`** -**`Receiver's phone (Required for: KG INICIS)`** + **`tel (string, optional)`** -**`addr (string, optional)`** + **`Receiver's phone (Required for: KG INICIS)`** -**`Receiver's address (Required for: KG INICIS)`** + **`addr (string, optional)`** -**`postcode (string, optional)`** + **`Receiver's address (Required for: KG INICIS)`** -**`Receiver's zip code (Required for: KG INICIS)`** + **`postcode (string, optional)`** + **`Receiver's zip code (Required for: KG INICIS)`**
> **`logis`****`*`****`Json`** @@ -233,53 +209,50 @@ A non-zero code includes a message like 'Invalid payment info'. > **`Delivery info`**
-

EscrowLogisInfoAnnotation

+

EscrowLogisInfoAnnotation

-**`company (string)`** + **`company (string)`** -**`Courier code`** + **`Courier code`** -**`invoice (string)`** + **`invoice (string)`** -**`Tracking number`** + **`Tracking number`** -**`sent_at (integer)`** + **`sent_at (integer)`** -**`Sent at UNIX TIMESTAMP`** + **`Sent at UNIX TIMESTAMP`** -**`receiving_at (string, optional)`** + **`receiving_at (string, optional)`** -**`Received at (Required for: PAYJOA / Example: YYYYMMDD)`** + **`Received at (Required for: PAYJOA / Example: YYYYMMDD)`** -**`address (string, optional)`** - -**`Shipping address (Required for: PAYJOA)`** + **`address (string, optional)`** + **`Shipping address (Required for: PAYJOA)`**
### Response
-

Response Model Schema

- -``` -{ - "code": 0, - "message": "string", - "response": { - "company": "string", - "invoice": "string", - "sent_at": 0, - "applied_at": 0 +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "company": "string", + "invoice": "string", + "sent_at": 0, + "applied_at": 0 + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/escrow.logis/escrow_logis_save**](https://api.iamport.kr/#!/escrow.logis/escrow_logis_save) + **Swagger Test Link** + [**https://api.iamport.kr/#!/escrow.logis/escrow\_logis\_save**](https://api.iamport.kr/#!/escrow.logis/escrow_logis_save) diff --git a/src/content/docs/en/api/escrow-api/get-delivery-info-api.mdx b/src/content/docs/en/api/escrow-api/get-delivery-info-api.mdx index 42d4148a2..2a70182d2 100644 --- a/src/content/docs/en/api/escrow-api/get-delivery-info-api.mdx +++ b/src/content/docs/en/api/escrow-api/get-delivery-info-api.mdx @@ -4,147 +4,131 @@ description: "" --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Gets delivery information for an escrow payment transaction. +## Gets delivery information for an escrow payment transaction.
-

Supported PGs

- -- KG INICIS -- NHN KCP -- PAYJOA (Daou) +

Supported PGs

+ - KG INICIS + - NHN KCP + - PAYJOA (Daou)
- - - - -### Parameters - -#### Path - - - - -**i'mport transaction ID** + - + ### Parameters - + #### Path -### Responses + + + **i'mport transaction ID** + + - - - -**`code`** **\***** ****integer** + ### Responses -**Response code** + + + + **`code`** **\*** **integer** -0: success, Not 0: check the message + **Response code** -**`message`** **\***\*\* ****string\*\* + 0: success, Not 0: check the message -**Response message** + **`message`** **\*** **string** -A non-zero code includes a message like 'Invalid payment info'. + **Response message** -**`response`****`(EscrowLogisAnnotation, optional)`** + A non-zero code includes a message like 'Invalid payment info'. - - + **`response`****`(EscrowLogisAnnotation, optional)`** + + - - -**`company`** **`*`****`string`** + + + **`company`** **`*`****`string`** -**`Courier code`** + **`Courier code`** -**`invoice`****`*`****`string`** + **`invoice`****`*`****`string`** -**`Tracking number`** + **`Tracking number`** -**`sent_at`****`*`****`integer`** + **`sent_at`****`*`****`integer`** -**`Sent at`** _**UNIX TIMESTAMP**_ + **`Sent at`** _**UNIX TIMESTAMP**_ -**`applied_at`**_**`*`**_**`integer`** + **`applied_at`**_**`*`**_**`integer`** -**`Delivery info created at`** _**UNIX TIMESTAMP**_ + **`Delivery info created at`** _**UNIX TIMESTAMP**_ + + + - - + + ```ts + { + // Response + } + ``` + - + + ```ts + { + // Response + } + ``` + - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - + + ```ts + { + // Response + } + ``` + + + ```ts + { + // Response + } + ``` +
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": { - "company": "string", - "invoice": "string", - "sent_at": 0, - "applied_at": 0 +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "company": "string", + "invoice": "string", + "sent_at": 0, + "applied_at": 0 + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/escrow.logis/escrow_logis_get**](https://api.iamport.kr/#!/escrow.logis/escrow_logis_get) + **Swagger Test Link** + [**https://api.iamport.kr/#!/escrow.logis/escrow\_logis\_get**](https://api.iamport.kr/#!/escrow.logis/escrow_logis_get) diff --git a/src/content/docs/en/api/escrow-api/readme.mdx b/src/content/docs/en/api/escrow-api/readme.mdx index 349fd1a2f..b5feb1f59 100644 --- a/src/content/docs/en/api/escrow-api/readme.mdx +++ b/src/content/docs/en/api/escrow-api/readme.mdx @@ -5,7 +5,7 @@ description: Learn about escrow service API. import ContentRef from "~/components/gitbook/ContentRef.astro"; -### Escrow API currently supports the following PGs: +## Escrow API currently supports the following PGs: - KG Inicis - NHN KCP diff --git a/src/content/docs/en/api/escrow-api/update-delivery-info-api.mdx b/src/content/docs/en/api/escrow-api/update-delivery-info-api.mdx index 03d1e4979..ac73acf55 100644 --- a/src/content/docs/en/api/escrow-api/update-delivery-info-api.mdx +++ b/src/content/docs/en/api/escrow-api/update-delivery-info-api.mdx @@ -4,138 +4,118 @@ description: "" --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; +import Hint from "~/components/Hint.astro"; -### Updates delivery info for an escrow transaction. +## Updates delivery info for an escrow transaction.
-

Supported PGs

- -- KG INICIS -- NHN KCP -- PAYJOA (Daou) +

Supported PGs

+ - KG INICIS + - NHN KCP + - PAYJOA (Daou)
- -The request body must be **2-depth JSON**. - -All parameters are required. Required properties for sender and receiver JSON objects vary by PG. - -All values, to be updated and maintained, must be specified. - - - -### Parameters - -#### Path - - - - -**i'mport transaction ID** - - - - - -#### Body - - - - -**Sender info** - - - - - - - -**Receiver info** - - - - - - - -**Delivery info** - - - - - -### Responses - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - - + + The request body must be **2-depth JSON**. + + All parameters are required. Required properties for sender and receiver JSON objects vary by PG. + + All values, to be updated and maintained, must be specified. + + + ### Parameters + + #### Path + + + + **i'mport transaction ID** + + + + #### Body + + + + **Sender info** + + + + + + **Receiver info** + + + + + + **Delivery info** + + + + ### Responses + + + ```ts + { + // Response + } + ``` + + + + ```ts + { + // Response + } + ``` + + + + ```ts + { + // Response + } + ``` + + + + ```ts + { + // Response + } + ``` + + + + ```ts + { + // Response + } + ``` + + + + ```ts + { + // Response + } + ``` + + + + ```ts + { + // Response + } + ``` + ### **Key request parameter description** @@ -145,28 +125,27 @@ All values, to be updated and maintained, must be specified. > **`Sender info`**
-

EscrowLogisSenderAnnotation

- -**`name (string, optional)`** +

EscrowLogisSenderAnnotation

-**`Sender's name (Required for: KG INICIS)`** + **`name (string, optional)`** -**`tel (string, optional)`** + **`Sender's name (Required for: KG INICIS)`** -**`Sender's phone (Required for: KG INICIS)`** + **`tel (string, optional)`** -**`addr (string, optional)`** + **`Sender's phone (Required for: KG INICIS)`** -**`Sender's address (Required for: KG INICIS)`** + **`addr (string, optional)`** -**`postcode (string, optional)`** + **`Sender's address (Required for: KG INICIS)`** -**`Sender's zip code (Required for: KG INICIS)`** + **`postcode (string, optional)`** -**`relationship (string, optional)`** + **`Sender's zip code (Required for: KG INICIS)`** -**`Relationship with sender (Required for: PAYJOA, Example: Self)`** + **`relationship (string, optional)`** + **`Relationship with sender (Required for: PAYJOA, Example: Self)`**
> **`receiver`****`*`****`Json`** @@ -174,24 +153,23 @@ All values, to be updated and maintained, must be specified. > **`Receiver info`**
-

EscrowLogisReceiverAnnotation

+

EscrowLogisReceiverAnnotation

-**`name (string, optional)`** + **`name (string, optional)`** -**`Receiver's name (Required for: KG INICIS)`** + **`Receiver's name (Required for: KG INICIS)`** -**`tel (string, optional)`** + **`tel (string, optional)`** -**`Receiver's phone (Required for: KG INICIS)`** + **`Receiver's phone (Required for: KG INICIS)`** -**`addr (string, optional)`** + **`addr (string, optional)`** -**`Receiver's address (Required for: KG INICIS)`** + **`Receiver's address (Required for: KG INICIS)`** -**`postcode (string, optional)`** - -**`Receiver's zip code (Required for: KG INICIS)`** + **`postcode (string, optional)`** + **`Receiver's zip code (Required for: KG INICIS)`**
> **`logis`****`*`****`Json`** @@ -199,28 +177,27 @@ All values, to be updated and maintained, must be specified. > **`Delivery info`**
-

EscrowLogisInfoAnnotation

- -**`company (string)`** +

EscrowLogisInfoAnnotation

-**`Courier code`** + **`company (string)`** -**`invoice (string)`** + **`Courier code`** -**`Tracking number`** + **`invoice (string)`** -**`sent_at (integer)`** + **`Tracking number`** -**`Sent at UNIX TIMESTAMP`** + **`sent_at (integer)`** -**`receiving_at (string, optional)`** + **`Sent at UNIX TIMESTAMP`** -**`Received at (Required for: PAYJOA / Example: YYYYMMDD)`** + **`receiving_at (string, optional)`** -**`address (string, optional)`** + **`Received at (Required for: PAYJOA / Example: YYYYMMDD)`** -**`Shipping address (Required for: PAYJOA)`** + **`address (string, optional)`** + **`Shipping address (Required for: PAYJOA)`**
```json title="Request Body Sample" @@ -241,26 +218,24 @@ All values, to be updated and maintained, must be specified. ```
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": { - "company": "string", - "invoice": "string", - "sent_at": 0, - "applied_at": 0 +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "company": "string", + "invoice": "string", + "sent_at": 0, + "applied_at": 0 + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/escrow.logis/escrow_logis_edit**](https://api.iamport.kr/#!/escrow.logis/escrow_logis_edit) + **Swagger Test Link** + [**https://api.iamport.kr/#!/escrow.logis/escrow\_logis\_edit**](https://api.iamport.kr/#!/escrow.logis/escrow_logis_edit) diff --git a/src/content/docs/en/api/identity-verification-api/confirm-identity-verification-api.mdx b/src/content/docs/en/api/identity-verification-api/confirm-identity-verification-api.mdx index 44e9d61d8..23499b6ce 100644 --- a/src/content/docs/en/api/identity-verification-api/confirm-identity-verification-api.mdx +++ b/src/content/docs/en/api/identity-verification-api/confirm-identity-verification-api.mdx @@ -4,239 +4,223 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Confirms the identity verification based on the submitted verification ID and OTP number. +## Confirms the identity verification based on the submitted verification ID and OTP number. - -If verification is successful, this return a response with the user's name, phone number, carrier, gender, foreigner status, date of birth, CI, and DI values. - -\ - - - -### Parameters - -#### Path - - - - -**i'mport verification ID** - - + + If verification is successful, this return a response with the user's name, phone number, carrier, gender, foreigner status, date of birth, CI, and DI values. + - + ### Parameters -#### Body + #### Path - - + + + **i'mport verification ID** + + -**OTP number received via SMS** + #### Body - + + + **OTP number received via SMS** + + - + ### Responses -### Responses + + + + **`code`** **\*** **integer** - - - -**`code`** **\***** ****integer** + **Response code** -**Response code** + 0: success, Not 0: check the message -0: success, Not 0: check the message + **`message`** **\*** **string** -**`message`** **\***** ****string** + **Response message** -**Response message** + A non-zero code includes a message like 'Invalid payment info'. -A non-zero code includes a message like 'Invalid payment info'. + **response** **(CertificationAnnotation, optional)** + + -**response** **(CertificationAnnotation, optional)** + + + **`imp_uid`** \* **string** - - + **`verification ID`** - - -**`imp_uid`** \* **string** + **`merchant_uid`** **string** -**`verification ID`** + **`Order ID`** -**`merchant_uid`** **string** + **`pg_tid`** **string** -**`Order ID`** + **`PG verification ID`** -**`pg_tid`** **string** + **`pg_provider`** **\*** **string** -**`PG verification ID`** + **`PG provider`** -**`pg_provider`** **\***** ****string** + **`name`** **string** -**`PG provider`** + **`Name`** -**`name`** **string** + **`gender`** **string** -**`Name`** + **`Gender`** -**`gender`** **string** + - male + - female -**`Gender`** + **`birthday`** **string** -- male -- female + **`DOB`** -**`birthday` ****string** + ISO8601 date in string format. YYYY-MM-DD (10-digit) -**`DOB`** + **`foreigner`** **\*** **boolean** -ISO8601 date in string format. YYYY-MM-DD (10-digit) + **`Foreigner status`** -**`foreigner`** **\*** **boolean** + When signing a Danal identity verification service contract, + you must request to use foreigner identification service. -**`Foreigner status`** + - true : foreigner + - false : not foreigner -When signing a Danal identity verification service contract, you must request to use foreigner identification service. + **`phone`** **string** -- true : foreigner -- false : not foreigner + **`Mobile phone number`** -**`phone`** **string** + Returns mobile phone number with only numbers without special symbols. + This attribute is omitted unless pre-approved by the carrier. + For pre-approval from the carrier, send a request with your Danal CPID to **[cs@iamport.kr](mailto:cs@iamport.kr)**. -**`Mobile phone number`** + **`carrier`** **string** -Returns mobile phone number with only numbers without special symbols. This attribute is omitted unless pre-approved by the carrier. For pre-approval from the carrier, send a request with your Danal CPID to **cs@iamport.kr**. + **`Mobile carrier`** -**`carrier`** **string** + Requires pre-approval from the carrier (send a request with your Danal CPID to **[cs@iamport.kr](mailto:cs@iamport.kr)**). -**`Mobile carrier`** + - SKT + - KT + - LGT + - SKT\_MVNO + - KT\_MVNO + - LGT\_MVNO -Requires pre-approval from the carrier (send a request with your Danal CPID to **cs@iamport.kr**). + **`certified`** **\*** **boolean** -- SKT -- KT -- LGT -- SKT\_MVNO -- KT\_MVNO -- LGT\_MVNO + **`Whether verification is successful`** -**`certified`** **\*** **boolean** + **`certified_at`** **string** -**`Whether verification is successful`** + **`Verified at`** (UNIX timestamp) -**`certified_at`** **string** + **`unique_key`** **string** -**`Verified at`** (UNIX timestamp) + **`Personal Identification Key (CI)`** -**`unique_key` ****string** + **`unique_in_site`** **string** -**`Personal Identification Key (CI)`** + **`Merchant Personal Identification Key (DI)`** -**`unique_in_site`** **string** + **`origin`** **string** -**`Merchant Personal Identification Key (DI)`** + **URL of the web page where the identity verification process is processed** -**`origin`** **string** + **`foreigner_v2`** **boolean** -**URL of the web page where the identity verification process is processed** + **`Foreigner status (nullable)`** -**`foreigner_v2`** **boolean** + - true : foreigner + - false : not foreigner -**`Foreigner status (nullable)`** + Requires a separate request to use Danal identity verification service + + + -- true : foreigner -- false : not foreigner + + ```ts + { + // Response + } + ``` + -Requires a separate request to use Danal identity verification service + + ```ts + { + // Response + } + ``` + - - - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - + + ```ts + { + // Response + } + ``` + + + ```ts + { + // Response + } + ``` +
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": { - "imp_uid": "string", - "merchant_uid": "string", - "pg_tid": "string", - "pg_provider": "string", - "name": "string", - "gender": "string", - "birth": 0, - "birthday": "string", - "foreigner": true, - "phone": "string", - "carrier": "SKT", - "certified": true, - "certified_at": 0, - "unique_key": "string", - "unique_in_site": "string", - "origin": "string", - "foreigner_v2": true +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "imp_uid": "string", + "merchant_uid": "string", + "pg_tid": "string", + "pg_provider": "string", + "name": "string", + "gender": "string", + "birth": 0, + "birthday": "string", + "foreigner": true, + "phone": "string", + "carrier": "SKT", + "certified": true, + "certified_at": 0, + "unique_key": "string", + "unique_in_site": "string", + "origin": "string", + "foreigner_v2": true + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/certifications/confirmOTP**](https://api.iamport.kr/#!/certifications/confirmOTP) + **Swagger Test Link** + [**https://api.iamport.kr/#!/certifications/confirmOTP**](https://api.iamport.kr/#!/certifications/confirmOTP) diff --git a/src/content/docs/en/api/identity-verification-api/delete-identity-verification-api.mdx b/src/content/docs/en/api/identity-verification-api/delete-identity-verification-api.mdx index 39dab1b6d..a4f68ad9c 100644 --- a/src/content/docs/en/api/identity-verification-api/delete-identity-verification-api.mdx +++ b/src/content/docs/en/api/identity-verification-api/delete-identity-verification-api.mdx @@ -4,216 +4,204 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Permanently deletes identity verification info from i'mport server. +## Permanently deletes identity verification info from i'mport server. - - - - -### Parameters - -#### Path - - - - -**i'mport verification ID** + - + ### Parameters - + #### Path -### Responses + + + **i'mport verification ID** + + - - - -**`code`** **\***** ****integer** + ### Responses -**Response code** + + + + **`code`** **\*** **integer** -0: success, Not 0: check the message + **Response code** -**`message`** **\***** ****string** + 0: success, Not 0: check the message -**Response message** + **`message`** **\*** **string** -A non-zero code includes a message like 'Invalid payment info'. + **Response message** -**response** **(CertificationAnnotation, optional)** + A non-zero code includes a message like 'Invalid payment info'. - - + **response** **(CertificationAnnotation, optional)** + + - - -**`imp_uid`** \* **string** + + + **`imp_uid`** \* **string** -**`verification ID`** + **`verification ID`** -**`merchant_uid`** **string** + **`merchant_uid`** **string** -**`Order ID`** + **`Order ID`** -**`pg_tid`** **string** + **`pg_tid`** **string** -**`PG verification ID`** + **`PG verification ID`** -**`pg_provider`** **\***** ****string** + **`pg_provider`** **\*** **string** -**`PG provider`** + **`PG provider`** -**`name`** **string** + **`name`** **string** -**`Name`** + **`Name`** -**`gender`** **string** + **`gender`** **string** -**`Gender`** + **`Gender`** -- male -- female + - male + - female -**`birthday` ****string** + **`birthday`** **string** -**`DOB`** + **`DOB`** -ISO8601 date in string format. YYYY-MM-DD (10-digit) + ISO8601 date in string format. YYYY-MM-DD (10-digit) -**`foreigner`** **\*** **boolean** + **`foreigner`** **\*** **boolean** -**`Foreigner status`** + **`Foreigner status`** -When signing a Danal identity verification service contract, you must request to use foreigner identification service. + When signing a Danal identity verification service contract, you must request to use foreigner identification service. -- true : foreigner -- false : not foreigner + - true : foreigner + - false : not foreigner -**`phone`** **string** + **`phone`** **string** -**`Mobile phone number`** + **`Mobile phone number`** -Returns mobile phone number with only numbers without special symbols. This attribute is omitted unless pre-approved by the carrier. For pre-approval from the carrier, send a request with your Danal CPID to **cs@iamport.kr**. + Returns mobile phone number with only numbers without special symbols. + This attribute is omitted unless pre-approved by the carrier. + For pre-approval from the carrier, send a request with your Danal CPID to **[cs@iamport.kr](mailto:cs@iamport.kr)**. -**`carrier`** **string** + **`carrier`** **string** -**`Mobile carrier`** + **`Mobile carrier`** -Requires pre-approval from the carrier (send a request with your Danal CPID to **cs@iamport.kr**). + Requires pre-approval from the carrier (send a request with your Danal CPID to **[cs@iamport.kr](mailto:cs@iamport.kr)**). -- SKT -- KT -- LGT -- SKT\_MVNO -- KT\_MVNO -- LGT\_MVNO + - SKT + - KT + - LGT + - SKT\_MVNO + - KT\_MVNO + - LGT\_MVNO -**`certified`** **\*** **boolean** + **`certified`** **\*** **boolean** -**`Whether verification is successful`** + **`Whether verification is successful`** -**`certified_at`** **string** + **`certified_at`** **string** -**`Verified at`** (UNIX timestamp) + **`Verified at`** (UNIX timestamp) -**`unique_key` ****string** + **`unique_key`** **string** -**`Personal Identification Key (CI)`** + **`Personal Identification Key (CI)`** -**`unique_in_site`** **string** + **`unique_in_site`** **string** -**`Merchant Personal Identification Key (DI)`** + **`Merchant Personal Identification Key (DI)`** -**`origin`** **string** + **`origin`** **string** -**URL of the web page where the identity verification process is processed** + **URL of the web page where the identity verification process is processed** -**`foreigner_v2`** **boolean** + **`foreigner_v2`** **boolean** -**`Foreigner status (nullable)`** + **`Foreigner status (nullable)`** -- true : foreigner -- false : not foreigner + - true : foreigner + - false : not foreigner -Requires a separate request to use Danal identity verification service + Requires a separate request to use Danal identity verification service + + + - - + + ```ts + { + // Response + } + ``` + - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - + + ```ts + { + // Response + } + ``` + + + ```ts + { + // Response + } + ``` +
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": { - "imp_uid": "string", - "merchant_uid": "string", - "pg_tid": "string", - "pg_provider": "string", - "name": "string", - "gender": "string", - "birth": 0, - "birthday": "string", - "foreigner": true, - "phone": "string", - "carrier": "SKT", - "certified": true, - "certified_at": 0, - "unique_key": "string", - "unique_in_site": "string", - "origin": "string", - "foreigner_v2": true +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "imp_uid": "string", + "merchant_uid": "string", + "pg_tid": "string", + "pg_provider": "string", + "name": "string", + "gender": "string", + "birth": 0, + "birthday": "string", + "foreigner": true, + "phone": "string", + "carrier": "SKT", + "certified": true, + "certified_at": 0, + "unique_key": "string", + "unique_in_site": "string", + "origin": "string", + "foreigner_v2": true + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/certifications/deleteCertification**](https://api.iamport.kr/#!/certifications/deleteCertification) + **Swagger Test Link** + [**https://api.iamport.kr/#!/certifications/deleteCertification**](https://api.iamport.kr/#!/certifications/deleteCertification) diff --git a/src/content/docs/en/api/identity-verification-api/get-identity-verification-result-api.mdx b/src/content/docs/en/api/identity-verification-api/get-identity-verification-result-api.mdx index 19306c6b0..ef63cc77b 100644 --- a/src/content/docs/en/api/identity-verification-api/get-identity-verification-result-api.mdx +++ b/src/content/docs/en/api/identity-verification-api/get-identity-verification-result-api.mdx @@ -4,207 +4,196 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Gets identity verification result. +## Gets identity verification result. - - - - -### Parameters - -#### Body - - - + -**i'mport verification ID** + ### Parameters - + #### Body - + + + **i'mport verification ID** + + -### Responses + ### Responses - - - -**`code`** **\***** ****integer** + + + + **`code`** **\*** **integer** -**Response code** + **Response code** -0: success, Not 0: check the message + 0: success, Not 0: check the message -**`message`** **\***** ****string** + **`message`** **\*** **string** -**Response message** + **Response message** -A non-zero code includes a message like 'Invalid payment info'. + A non-zero code includes a message like 'Invalid payment info'. -**response** **(CertificationAnnotation, optional)** + **response** **(CertificationAnnotation, optional)** + + - - + + + **`imp_uid`** \* **string** - - -**`imp_uid`** \* **string** + **`verification ID`** -**`verification ID`** + **`merchant_uid`** **string** -**`merchant_uid`** **string** + **`Order ID`** -**`Order ID`** + **`pg_tid`** **string** -**`pg_tid`** **string** + **`PG verification ID`** -**`PG verification ID`** + **`pg_provider`** **\*** **string** -**`pg_provider`** **\***** ****string** + **`PG provider`** -**`PG provider`** + **`name`** **string** -**`name`** **string** + **`Name`** -**`Name`** + **`gender`** **string** -**`gender`** **string** + **`Gender`** -**`Gender`** + - male + - female -- male -- female + **`birthday`** **string** -**`birthday` ****string** + **`DOB`** -**`DOB`** + ISO8601 date in string format. YYYY-MM-DD (10-digit) -ISO8601 date in string format. YYYY-MM-DD (10-digit) + **`foreigner`** **\*** **boolean** -**`foreigner`** **\*** **boolean** + **`Foreigner status`** -**`Foreigner status`** + When signing a Danal identity verification service contract, you must request to use foreigner identification service. -When signing a Danal identity verification service contract, you must request to use foreigner identification service. + - true : foreigner + - false : not foreigner -- true : foreigner -- false : not foreigner + **`phone`** **string** -**`phone`** **string** + **`Mobile phone number`** -**`Mobile phone number`** + Returns mobile phone number with only numbers without special symbols. + This attribute is omitted unless pre-approved by the carrier. + For pre-approval from the carrier, send a request with your Danal CPID to **[cs@iamport.kr](mailto:cs@iamport.kr)**. -Returns mobile phone number with only numbers without special symbols. This attribute is omitted unless pre-approved by the carrier. For pre-approval from the carrier, send a request with your Danal CPID to **cs@iamport.kr**. + **`carrier`** **string** -**`carrier`** **string** + **`Mobile carrier`** -**`Mobile carrier`** + Requires pre-approval from the carrier (send a request with your Danal CPID to **[cs@iamport.kr](mailto:cs@iamport.kr)**). -Requires pre-approval from the carrier (send a request with your Danal CPID to **cs@iamport.kr**). + - SKT + - KT + - LGT + - SKT\_MVNO + - KT\_MVNO + - LGT\_MVNO -- SKT -- KT -- LGT -- SKT\_MVNO -- KT\_MVNO -- LGT\_MVNO + **`certified`** **\*** **boolean** -**`certified`** **\*** **boolean** + **`Whether verification is successful`** -**`Whether verification is successful`** + **`certified_at`** **string** -**`certified_at`** **string** + **`Verified at`** (UNIX timestamp) -**`Verified at`** (UNIX timestamp) + **`unique_key`** **string** -**`unique_key` ****string** + **`Personal Identification Key (CI)`** -**`Personal Identification Key (CI)`** + **`unique_in_site`** **string** -**`unique_in_site`** **string** + **`Merchant Personal Identification Key (DI)`** -**`Merchant Personal Identification Key (DI)`** + **`origin`** **string** -**`origin`** **string** + **URL of the web page where the identity verification process is processed** -**URL of the web page where the identity verification process is processed** + **`foreigner_v2`** **boolean** -**`foreigner_v2`** **boolean** + **`Foreigner status (nullable)`** -**`Foreigner status (nullable)`** + - true : foreigner + - false : not foreigner -- true : foreigner -- false : not foreigner + Requires a separate request to use Danal identity verification service + + + -Requires a separate request to use Danal identity verification service - - - - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - + + ```ts + { + // Response + } + ``` + + + ```ts + { + // Response + } + ``` +
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": { - "imp_uid": "string", - "merchant_uid": "string", - "pg_tid": "string", - "pg_provider": "string", - "name": "string", - "gender": "string", - "birth": 0, - "birthday": "string", - "foreigner": true, - "phone": "string", - "carrier": "SKT", - "certified": true, - "certified_at": 0, - "unique_key": "string", - "unique_in_site": "string", - "origin": "string", - "foreigner_v2": true +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "imp_uid": "string", + "merchant_uid": "string", + "pg_tid": "string", + "pg_provider": "string", + "name": "string", + "gender": "string", + "birth": 0, + "birthday": "string", + "foreigner": true, + "phone": "string", + "carrier": "SKT", + "certified": true, + "certified_at": 0, + "unique_key": "string", + "unique_in_site": "string", + "origin": "string", + "foreigner_v2": true + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/certifications/getCertification**](https://api.iamport.kr/#!/certifications/getCertification) + **Swagger Test Link** + [**https://api.iamport.kr/#!/certifications/getCertification**](https://api.iamport.kr/#!/certifications/getCertification) diff --git a/src/content/docs/en/api/identity-verification-api/request-identity-verification-api.mdx b/src/content/docs/en/api/identity-verification-api/request-identity-verification-api.mdx index 1b0c80010..82e0cca4c 100644 --- a/src/content/docs/en/api/identity-verification-api/request-identity-verification-api.mdx +++ b/src/content/docs/en/api/identity-verification-api/request-identity-verification-api.mdx @@ -4,145 +4,134 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Sends OTP number via SMS confirming the user's identity based on the submitted personal information. +## Sends OTP number via SMS confirming the user's identity based on the submitted personal information. - -If the user's personal information is passed to the API and verified by the carrier, an OTP (6-digit verification number) is sent to the user via SMS. This is only supported by some merchants who have been pre-approved by the carrier, and is currently only being serviced through **Danal**. - -You can call the API by directly entering the name, date of birth + 7th digit of social security number, mobile phone number, and carrier information from the merchant. If the transmitted personal information is correct, a verification code SMS is sent to the mobile phone. - -When you receive an HTTP Status 200 response, it contains the verification ID (`imp_uid`) in the response body. To complete the verification process, call the /certifications/otp/confirm/\{imp\_uid} API with the OTP number. - - - -### Parameters - -#### Body + + If the user's personal information is passed to the API and verified by the carrier, an OTP (6-digit verification number) is sent to the user via SMS. This is only supported by some merchants who have been pre-approved by the carrier, and is currently only being serviced through **Danal**. - - + You can call the API by directly entering the name, date of birth + 7th digit of social security number, mobile phone number, and carrier information from the merchant. If the transmitted personal information is correct, a verification code SMS is sent to the mobile phone. -**User name** + When you receive an HTTP Status 200 response, it contains the verification ID (`imp_uid`) in the response body. To complete the verification process, call the /certifications/otp/confirm/\{imp\_uid} API with the OTP number. + - + ### Parameters - - - **Mobile number** + #### Body -May contain special characters. + + + **User name** + + - - -**DOB** + + **Mobile number** -**`YYYYMMDD (6-digit)`** + May contain special characters. + -May contain special characters. + + **DOB** - - -**Gender code** + **`YYYYMMDD (6-digit)`** -7th digit of 13-digit social security number + May contain special characters. + - - -**Carrier code** + + **Gender code** -**`SKT`** + 7th digit of 13-digit social security number + -**`KT`** + + **Carrier code** -**`LGT`** + **`SKT`** - - -**Budget phone?** + **`KT`** - - -**Merchant service name** + **`LGT`** + - - -**Order ID** + + **Budget phone?** + - - -**PG code** + + **Merchant service name** + - + + **Order ID** + -### Responses + + **PG code** + - - - -**`code`** **\*** **integer** + ### Responses -**Response code** + + + + **`code`** **\*** **integer** -0: success, Not 0: check the message + **Response code** -**`message`** **\*** **string** + 0: success, Not 0: check the message -**Response message** + **`message`** **\*** **string** -A non-zero code includes a message like 'Invalid payment info'. + **Response message** -**response ** **(CertificationOTPAnnotation, optional)** + A non-zero code includes a message like 'Invalid payment info'. - - + **response** **(CertificationOTPAnnotation, optional)** + + - - -**`imp_uid *`` `** **`String`** + + + **`imp_uid *`` `** **`String`** -**`i'mport verification ID`** + **`i'mport verification ID`** + + + - - + + ```ts + { + // Response + } + ``` + - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - + + ```ts + { + // Response + } + ``` + + + ```ts + { + // Response + } + ``` + ### **Key request parameter description** @@ -178,23 +167,21 @@ A non-zero code includes a message like 'Invalid payment info'. > **danal.\{Merchant ID}**
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": { - "imp_uid": "string" +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "imp_uid": "string" + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/certifications/requestOTP**](https://api.iamport.kr/#!/certifications/requestOTP) + **Swagger Test Link** + [**https://api.iamport.kr/#!/certifications/requestOTP**](https://api.iamport.kr/#!/certifications/requestOTP) diff --git a/src/content/docs/en/api/import-api-overview.mdx b/src/content/docs/en/api/import-api-overview.mdx index 95be69fb4..934c4663f 100644 --- a/src/content/docs/en/api/import-api-overview.mdx +++ b/src/content/docs/en/api/import-api-overview.mdx @@ -6,41 +6,41 @@ description: Get an overview of the i'mport API. import Figure from "~/components/Figure.astro"; import Hint from "~/components/Hint.astro"; -### Learn how to configure HTTP header in i'mport API call. +## Learn how to configure HTTP header in i'mport API call. -1. Call [**/users/getToken**](rest-api-access-token) with **API Key** & **API secret** to get an **`access_token`**.\ +1. Call [**/users/getToken**](rest-api-access-token) with **API Key** & **API secret** + to get an **`access_token`**. -2. In the API call, include the **`access_token`** as **`Authorization:`****`access_token`** or **`X-ImpTokenHeader:`****`access_token`** in the HTTP header. +2. In the API call, include the **`access_token`** as **`Authorization:`****`access_token`** + or **`X-ImpTokenHeader:`****`access_token`** in the HTTP header. -**Content-Type** + **Content-Type** -API Content-Type supported in i'mport is: - -**Application.json;charset=UTF-8** + API Content-Type supported in i'mport is: + **Application.json;charset=UTF-8** -**Agency Merchant** - -Sub-merchants must specify the following in the **`HTTP Header`** and use the **Agent account's** **`API key`** and **`Secret`** to call the i'mport API. + **Agency Merchant** -- **`"Tier" : "`****`Tier code`**(Sub-merchant Tier Code)" + Sub-merchants must specify the following in the **`HTTP Header`** and use the **Agent account's** **`API key`** + and **`Secret`** to call the i'mport API. + - **`"Tier" : "`****`Tier code`**(Sub-merchant Tier Code)" ### API specification -To check the detailed specification for i'mport API response, select the **HTTP Status ****200** response as shown below. +To check the detailed specification for i'mport API response, select the **HTTP Status** **200** response as shown below.
-**API Swagger site** - -i'mport supports the Swagger API Specification. + **API Swagger site** -[**https://api.iamport.kr**](https://api.iamport.kr) + i'mport supports the Swagger API Specification. + [**https://api.iamport.kr**](https://api.iamport.kr) diff --git a/src/content/docs/en/api/miscellaneous-api/benepia-point/get-points-api.mdx b/src/content/docs/en/api/miscellaneous-api/benepia-point/get-points-api.mdx index df54def39..31433054b 100644 --- a/src/content/docs/en/api/miscellaneous-api/benepia-point/get-points-api.mdx +++ b/src/content/docs/en/api/miscellaneous-api/benepia-point/get-points-api.mdx @@ -4,120 +4,106 @@ description: 베네피아 포인트를 단건 조회 합니다. --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Gets Benepia points using user's Benepia account ID and password through KCP. +## Gets Benepia points using user's Benepia account ID and password through KCP. - -Requires KCP site code. - - - -### Parameters - -#### Body - - - - -**Benepia account ID** + + Requires KCP site code. + - + ### Parameters - - - + #### Body -**Benepia account password** + + + **Benepia account ID** + + - + + + **Benepia account password** + + - - -**PG code** + + **PG code** -If there are multiple KCP PG settings, specify as **kcp.\{KCP site code}**. If omitted, the KCP pg setting in Admin console is used. + If there are multiple KCP PG settings, specify as **kcp.\{KCP site code}**. If omitted, the KCP pg setting in Admin console is used. + - + ### Responses -### Responses + + + + **`code`** **\*** **integer** - - - -**`code`** **\***** ****integer** + **Response code** -**Response code** + 0: success, Not 0: check the message -0: success, Not 0: check the message + **`message`** **\*** **string** -**`message`** **\***** ****string** + **Response message** -**Response message** + A non-zero code includes a message like 'Invalid payment info'. -A non-zero code includes a message like 'Invalid payment info'. + **`response`` `****`(BenepiaPointAnnotation, optional)`** + + -**`response`` `****`(BenepiaPointAnnotation, optional)`** + + + **`point`****`*`****`integer`** - - + **`Benepia points`** + + + - - -**`point`****`*`****`integer`** - -**`Benepia points`** - - - - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - + + ```ts + { + // Response + } + ``` + + + ```ts + { + // Response + } + ``` +
-

Response Model Schema

- -``` -{ - "code": 0, - "message": "string", - "response": { - "point": 0 +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "point": 0 + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/benepia/queryBenepiaPoint**](https://api.iamport.kr/#!/benepia/queryBenepiaPoint) + **Swagger Test Link** + [**https://api.iamport.kr/#!/benepia/queryBenepiaPoint**](https://api.iamport.kr/#!/benepia/queryBenepiaPoint) diff --git a/src/content/docs/en/api/miscellaneous-api/benepia-point/request-point-payment-api.mdx b/src/content/docs/en/api/miscellaneous-api/benepia-point/request-point-payment-api.mdx index f3cdbbfcb..ba84f40d3 100644 --- a/src/content/docs/en/api/miscellaneous-api/benepia-point/request-point-payment-api.mdx +++ b/src/content/docs/en/api/miscellaneous-api/benepia-point/request-point-payment-api.mdx @@ -4,469 +4,448 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Requests payment using Benepia (benefit) points. +## Requests payment using Benepia (benefit) points. - -Requests payment using Benepia points through KCP by passing user's Benepia account ID and password with the payment information. Requires KCP site code. - - - -### Parameters - -#### Body - - - - -**Benepia account ID** - - - - - - - -**Benepia account password** - - - - - - - -**Order ID** + + Requests payment using Benepia points through KCP by passing user's Benepia account ID and password with the payment information. Requires KCP site code. + - + ### Parameters - - - + #### Body -**Amount** + + + **Benepia account ID** + + - + + + **Benepia account password** + + - - - + + + **Order ID** + + -**Product name** + + + **Amount** + + - + + + **Product name** + + - - -**Customer name** + + **Customer name** + - - -**Customer email** + + **Customer email** + - - -**Customer phone** + + **Customer phone** + - - -**Customer address** + + **Customer address** + - - -**Customer zip code** + + **Customer zip code** + - - -**PG code** + + **PG code** + - - -**Notification URL (Webhook URL)** + + **Notification URL (Webhook URL)** + - - -**Custom data** + + **Custom data** + - + ### Responses -### Responses + + + + **`code`** **\*** **integer** - - - -**`code`** **\***** ****integer** + **Response code** -**Response code** + 0: success, Not 0: check the message -0: success, Not 0: check the message + **`message`** **\*** **string** -**`message`** **\***** ****string** + **Response message** -**Response message** + A non-zero code includes a message like 'Invalid payment info'. -A non-zero code includes a message like 'Invalid payment info'. + **`response`** **`(PaymentAnnotation, optional)`** + + -**`response`** **`(PaymentAnnotation, optional)`** + + + **`code`** **\*** **integer** - - + **`Response code`** - - -**`code`** **\***** ****integer** + 0: success, Not 0: check the message -**`Response code`** + **`message`** **\*** **string** -0: success, Not 0: check the message + **Response message** -**`message`** **\***** ****string** + A non-zero code includes a message like 'Invalid payment info. -**Response message** + **`imp_uid`** \* **string** -A non-zero code includes a message like 'Invalid payment info. + **i'mport payment transaction UID** -**`imp_uid`** \* **string** + **`merchant_uid`** **\*** **string** -**i'mport payment transaction UID** + **Order ID** -**`merchant_uid`** **\***** ****string** + **`pay_method`** **\*** **string** -**Order ID** + **Payment method code** -**`pay_method`** **\***** ****string** + **`channel`** **\*** **string** -**Payment method code** + **Payment environment code** -**`channel`** **\***** ****string** + - pc: (authenticated) PC + - mobile: (authenticated) mobile + - api: recurring or non-authenticated -**Payment environment code** + **`pg_provider`** **\*** **string** -- pc**:** (authenticated) PC -- mobile: (authenticated) mobile -- api: recurring or non-authenticated + **PG code** -**`pg_provider`** **\***** ****string** + --- -**PG code** + **`emb_pg_provider`** **\*** **string** ---- - -**`emb_pg_provider`** **\***** ****string** - -**Hub-type PG code** - -**`pg_tid`** **\*** **string** + **Hub-type PG code** -**PG transaction ID** + **`pg_tid`** **\*** **string** -**`pg_id`** **\***** ****string** + **PG transaction ID** -**PG MID** + **`pg_id`** **\*** **string** -**`escrow`** **boolean** + **PG MID** -**Indicates an escrow payment** + **`escrow`** **boolean** -**`apply_num`** **string** + **Indicates an escrow payment** -**Credit card approval number** + **`apply_num`** **string** -**`bank_code`** **string** + **Credit card approval number** -**Bank code** + **`bank_code`** **string** -**`bank_name`** **string** + **Bank code** -**Bank name** + **`bank_name`** **string** ---- + **Bank name** -**`card_code`** **string** + --- -**Credit card code (KFTC Credit Card Codes:** [**link**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) ) + **`card_code`** **string** -**`card_name`** **string** + **Credit card code (KFTC Credit Card Codes:** [**link**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) ) -**Credit card name** + **`card_name`** **string** -**`card_quota`** **integer** + **Credit card name** -**Number of installments (0 means one-off)** + **`card_quota`** **integer** -**`card_number`** **string** + **Number of installments (0 means one-off)** -**Masked credit card number** + **`card_number`** **string** ---- + **Masked credit card number** -**`card_type`** **string** + --- -**Credit card type code** + **`card_type`** **string** -- 0: credit -- 1: check + **Credit card type code** -**`vbank_code`** **string** + - 0: credit + - 1: check -**Virtual account bank code (refer to image below)** + **`vbank_code`** **string** ---- + **Virtual account bank code (refer to image below)** -**`vbank_name`** **string** + --- -**Refund virtual account** + **`vbank_name`** **string** -**`vbank_holder`** **string** + **Refund virtual account** -**Refund virtual account holder** + **`vbank_holder`** **string** -**`vbank_date`** **string** + **Refund virtual account holder** -**Refund virtual account expiration (UNIX timestamp)** + **`vbank_date`** **string** -**`vbank_issued_at`** **string** + **Refund virtual account expiration (UNIX timestamp)** -**Refund virtual account created at (UNIX timestamp)** + **`vbank_issued_at`** **string** -**`name`** **string** + **Refund virtual account created at (UNIX timestamp)** -**Product name** + **`name`** **string** -**`amount`** **\*** **integer** + **Product name** -**Order (payment) amount** + **`amount`** **\*** **integer** -**`cancel_amount`** **integer** + **Order (payment) amount** -**Cancelled amount** + **`cancel_amount`** **integer** -**`currency`** **string** + **Cancelled amount** -**Currency** + **`currency`** **string** -- USD -- KRW -- EUR + **Currency** ---- + - USD + - KRW + - EUR -**`buyer_name`** **string** + --- -**Customer name** + **`buyer_name`** **string** -**`buyer_email`** **string** + **Customer name** -**Customer email**\ + **`buyer_email`** **string** -**`buyer_tel`** **string** + **Customer email**\\ -**Customer phone** + **`buyer_tel`** **string** -**`buyer_addr`** **string** + **Customer phone** -**Customer address** + **`buyer_addr`** **string** -**`buyer_postcode`** **string** + **Customer address** -**Customer zip code** + **`buyer_postcode`** **string** -**`custom_data`** **string** + **Customer zip code** -**echo data as JSON string** + **`custom_data`** **string** -**`user_agent`** **string** + **echo data as JSON string** -**UserAgent of the device where payment is initiated** + **`user_agent`** **string** -**`status`** **\***** ****string** + **UserAgent of the device where payment is initiated** -**Payment status code** + **`status`** **\*** **string** -- ready -- paid -- cancelled -- failed + **Payment status code** -**`started_at`** **\*** **string** + - ready + - paid + - cancelled + - failed -**Payment started at (UNIX timestamp)** + **`started_at`** **\*** **string** -**`paid_at`** **\***** ****string** + **Payment started at (UNIX timestamp)** -**Payment completed at (UNIX timestamp)**\ + **`paid_at`** **\*** **string** -**`failed_at`** **\***** ****string** + **Payment completed at (UNIX timestamp)**\\ -**Payment failed at (UNIX timestamp)** + **`failed_at`** **\*** **string** -**`cancelled_at`** **\***** ****string** + **Payment failed at (UNIX timestamp)** -**Payment cancelled at (UNIX timestamp)** + **`cancelled_at`** **\*** **string** -**`fail_reason`** **string** + **Payment cancelled at (UNIX timestamp)** -**Reason for failure** + **`fail_reason`** **string** -**`cancel_reason`** **string** + **Reason for failure** -**Reason for cancellation** + **`cancel_reason`** **string** -**`receipt_url`** **string** + **Reason for cancellation** -**Credit card receipt URL** + **`receipt_url`** **string** -**`cash_receipt_issued` ****boolean** + **Credit card receipt URL** -**Option to automatically issue cash receipt** + **`cash_receipt_issued`** **boolean** -**`customer_uid`** **string** + **Option to automatically issue cash receipt** -**customer\_uid related to the payment transaction** + **`customer_uid`** **string** -**`customer_uid_usage`** **string** + **customer\_uid related to the payment transaction** -**customer\_uid use code** + **`customer_uid_usage`** **string** -- payment.scheduled: scheduled payment -- payment: payment -- issue**: billing key issuance** + **customer\_uid use code** -**`cancel_history`** **(Array\[PaymentCancelAnnotation], optional):** + - payment.scheduled: scheduled payment + - payment: payment + - issue: billing key issuance -**`Cancellation/partial cancellation history`** + **`cancel_history`** **(Array\[PaymentCancelAnnotation], optional):** - - + **`Cancellation/partial cancellation history`** + + - - -**`pg_tid`** **\***** ****string** + + + **`pg_tid`** **\*** **string** -**PG cancellation transaction ID** + **PG cancellation transaction ID** -**`amount`** **\*** **integer** + **`amount`** **\*** **integer** -**Cancelled amount** + **Cancelled amount** -**`cancelled_at`** **\*** **string** + **`cancelled_at`** **\*** **string** -**Cancelled at (UNIX timestamp)** + **Cancelled at (UNIX timestamp)** -**`reason`** **\*** **string(256)** + **`reason`** **\*** **string(256)** -**Reason for cancellation** + **Reason for cancellation** -**`receipt_url`** **\***** ****string(300)** + **`receipt_url`** **\*** **string(300)** -**Cancellation receipt URL. Availability varies by PG.** + **Cancellation receipt URL. Availability varies by PG.** + + + - - - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - + + ```ts + { + // Response + } + ``` + + + ```ts + { + // Response + } + ``` +
-

Response Model Schema

- -``` -{ - "code": 0, - "message": "string", - "response": { - "imp_uid": "string", - "merchant_uid": "string", - "pay_method": "string", - "channel": "pc", - "pg_provider": "string", - "emb_pg_provider": "string", - "pg_tid": "string", - "pg_id": "string", - "escrow": true, - "apply_num": "string", - "bank_code": "string", - "bank_name": "string", - "card_code": "string", - "card_name": "string", - "card_quota": 0, - "card_number": "string", - "card_type": "null", - "vbank_code": "string", - "vbank_name": "string", - "vbank_num": "string", - "vbank_holder": "string", - "vbank_date": 0, - "vbank_issued_at": 0, - "name": "string", - "amount": 0, - "cancel_amount": 0, - "currency": "string", - "buyer_name": "string", - "buyer_email": "string", - "buyer_tel": "string", - "buyer_addr": "string", - "buyer_postcode": "string", - "custom_data": "string", - "user_agent": "string", - "status": "ready", - "started_at": 0, - "paid_at": 0, - "failed_at": 0, - "cancelled_at": 0, - "fail_reason": "string", - "cancel_reason": "string", - "receipt_url": "string", - "cancel_history": [ - { - "pg_tid": "string", - "amount": 0, - "cancelled_at": 0, - "reason": "string", - "receipt_url": "string" - } - ], - "cancel_receipt_urls": [ - "string" - ], - "cash_receipt_issued": true, - "customer_uid": "string", - "customer_uid_usage": "issue" +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "imp_uid": "string", + "merchant_uid": "string", + "pay_method": "string", + "channel": "pc", + "pg_provider": "string", + "emb_pg_provider": "string", + "pg_tid": "string", + "pg_id": "string", + "escrow": true, + "apply_num": "string", + "bank_code": "string", + "bank_name": "string", + "card_code": "string", + "card_name": "string", + "card_quota": 0, + "card_number": "string", + "card_type": "null", + "vbank_code": "string", + "vbank_name": "string", + "vbank_num": "string", + "vbank_holder": "string", + "vbank_date": 0, + "vbank_issued_at": 0, + "name": "string", + "amount": 0, + "cancel_amount": 0, + "currency": "string", + "buyer_name": "string", + "buyer_email": "string", + "buyer_tel": "string", + "buyer_addr": "string", + "buyer_postcode": "string", + "custom_data": "string", + "user_agent": "string", + "status": "ready", + "started_at": 0, + "paid_at": 0, + "failed_at": 0, + "cancelled_at": 0, + "fail_reason": "string", + "cancel_reason": "string", + "receipt_url": "string", + "cancel_history": [ + { + "pg_tid": "string", + "amount": 0, + "cancelled_at": 0, + "reason": "string", + "receipt_url": "string" + } + ], + "cancel_receipt_urls": [ + "string" + ], + "cash_receipt_issued": true, + "customer_uid": "string", + "customer_uid_usage": "issue" + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/benepia/payBenepiaPoint**](https://api.iamport.kr/#!/benepia/payBenepiaPoint) + **Swagger Test Link** + [**https://api.iamport.kr/#!/benepia/payBenepiaPoint**](https://api.iamport.kr/#!/benepia/payBenepiaPoint) diff --git a/src/content/docs/en/api/miscellaneous-api/convenience-store-payment/cancel-barcode-api.mdx b/src/content/docs/en/api/miscellaneous-api/convenience-store-payment/cancel-barcode-api.mdx index 0aeddc78a..b4c9ecad6 100644 --- a/src/content/docs/en/api/miscellaneous-api/convenience-store-payment/cancel-barcode-api.mdx +++ b/src/content/docs/en/api/miscellaneous-api/convenience-store-payment/cancel-barcode-api.mdx @@ -4,182 +4,172 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Cancels a convenience store barcode to block payment. +## Cancels a convenience store barcode to block payment. - -You can cancel a barcode with pending payment to block payment for orders that cannot be fulfilled due to out of stock items etc. - - - -### Parameters - -#### Path + + You can cancel a barcode with pending payment to block payment for orders that cannot be fulfilled due to out of stock items etc. + - -**i'mport transaction ID** + ### Parameters -For convenience store payment + #### Path - + + **i'mport transaction ID** -### Responses + For convenience store payment + - - - -**`code`** **\***** ****integer** + ### Responses -**Response code** + + + + **`code`** **\*** **integer** -0: success, Not 0: check the message + **Response code** -**`message`** **\***** ****string** + 0: success, Not 0: check the message -**Response message** + **`message`** **\*** **string** -A non-zero code includes a message like 'Invalid payment info'. + **Response message** -**`response`** **`(PaymentAnnotation, optional)`** + A non-zero code includes a message like 'Invalid payment info'. - - + **`response`** **`(PaymentAnnotation, optional)`** + + - - -**Response code** + + + **Response code** -0: success, Not 0: check the message + 0: success, Not 0: check the message -**`message`** **\***** ****string** + **`message`** **\*** **string** -**Response message** + **Response message** -A non-zero code includes a message like 'Invalid payment info'. + A non-zero code includes a message like 'Invalid payment info'. + + - - + + + **`pg_tid`** **\*** **string** - - -**`pg_tid`** **\***** ****string** + **PG cancellation transaction ID** -**PG cancellation transaction ID** + **`amount`** **\*** **integer** -**`amount`** **\*** **integer** + **Cancelled amount** -**Cancelled amount** + **`cancelled_at`** **\*** **string** -**`cancelled_at`** **\*** **string** + **Cancelled at (UNIX timestamp)** -**Cancelled at (UNIX timestamp)** + **`reason`** **\*** **string(256)** -**`reason`** **\*** **string(256)** + **Reason for cancellation** -**Reason for cancellation** + **`receipt_url`** **\*** **string(300)** -**`receipt_url`** **\***** ****string(300)** - -**Cancellation receipt URL. Availability varies by PG.** - - - - - - - -```javascript -{ - // Response -} -``` - - + **Cancellation receipt URL. Availability varies by PG.** + + + + + ```ts + { + // Response + } + ``` +
-

Response Model Schema

- -``` -{ - "code": 0, - "message": "string", - "response": { - "imp_uid": "string", - "merchant_uid": "string", - "pay_method": "string", - "channel": "pc", - "pg_provider": "string", - "emb_pg_provider": "string", - "pg_tid": "string", - "pg_id": "string", - "escrow": true, - "apply_num": "string", - "bank_code": "string", - "bank_name": "string", - "card_code": "string", - "card_name": "string", - "card_quota": 0, - "card_number": "string", - "card_type": "null", - "vbank_code": "string", - "vbank_name": "string", - "vbank_num": "string", - "vbank_holder": "string", - "vbank_date": 0, - "vbank_issued_at": 0, - "name": "string", - "amount": 0, - "cancel_amount": 0, - "currency": "string", - "buyer_name": "string", - "buyer_email": "string", - "buyer_tel": "string", - "buyer_addr": "string", - "buyer_postcode": "string", - "custom_data": "string", - "user_agent": "string", - "status": "ready", - "started_at": 0, - "paid_at": 0, - "failed_at": 0, - "cancelled_at": 0, - "fail_reason": "string", - "cancel_reason": "string", - "receipt_url": "string", - "cancel_history": [ - { - "pg_tid": "string", - "amount": 0, - "cancelled_at": 0, - "reason": "string", - "receipt_url": "string" - } - ], - "cancel_receipt_urls": [ - "string" - ], - "cash_receipt_issued": true, - "customer_uid": "string", - "customer_uid_usage": "issue" +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "imp_uid": "string", + "merchant_uid": "string", + "pay_method": "string", + "channel": "pc", + "pg_provider": "string", + "emb_pg_provider": "string", + "pg_tid": "string", + "pg_id": "string", + "escrow": true, + "apply_num": "string", + "bank_code": "string", + "bank_name": "string", + "card_code": "string", + "card_name": "string", + "card_quota": 0, + "card_number": "string", + "card_type": "null", + "vbank_code": "string", + "vbank_name": "string", + "vbank_num": "string", + "vbank_holder": "string", + "vbank_date": 0, + "vbank_issued_at": 0, + "name": "string", + "amount": 0, + "cancel_amount": 0, + "currency": "string", + "buyer_name": "string", + "buyer_email": "string", + "buyer_tel": "string", + "buyer_addr": "string", + "buyer_postcode": "string", + "custom_data": "string", + "user_agent": "string", + "status": "ready", + "started_at": 0, + "paid_at": 0, + "failed_at": 0, + "cancelled_at": 0, + "fail_reason": "string", + "cancel_reason": "string", + "receipt_url": "string", + "cancel_history": [ + { + "pg_tid": "string", + "amount": 0, + "cancelled_at": 0, + "reason": "string", + "receipt_url": "string" + } + ], + "cancel_receipt_urls": [ + "string" + ], + "cash_receipt_issued": true, + "customer_uid": "string", + "customer_uid_usage": "issue" + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/cvs/revokeCvsPayment**](https://api.iamport.kr/#!/cvs/revokeCvsPayment) + **Swagger Test Link** + [**https://api.iamport.kr/#!/cvs/revokeCvsPayment**](https://api.iamport.kr/#!/cvs/revokeCvsPayment) diff --git a/src/content/docs/en/api/miscellaneous-api/convenience-store-payment/request-barcode-api.mdx b/src/content/docs/en/api/miscellaneous-api/convenience-store-payment/request-barcode-api.mdx index ca5cd3fe3..d6f6eb421 100644 --- a/src/content/docs/en/api/miscellaneous-api/convenience-store-payment/request-barcode-api.mdx +++ b/src/content/docs/en/api/miscellaneous-api/convenience-store-payment/request-barcode-api.mdx @@ -4,394 +4,380 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Requests issuance or registration of convenience store barcode. +## Requests issuance or registration of convenience store barcode. - -A customer can make payment by presenting the barcode image or number at a convenience store. - - - -### Parameters - -#### Body - - - - -**Order ID** - - - - - - - -**Amount** - - + + A customer can make payment by presenting the barcode image or number at a convenience store. + - - -**Barcode** + ### Parameters - - -**Convenience store payment deadline** + #### Body -Unix Timestamp + + + **Order ID** + + - - -**Product name** + + + **Amount** + + - - -**Customer name** + + **Barcode** + - - -**Customer email** + + **Convenience store payment deadline** - - -**Customer phone** + Unix Timestamp + - - -**Customer address** + + **Product name** + - - -**Customer zip code** + + **Customer name** + - - -**PG code** + + **Customer email** + - - -**URL for checking whether payment is acceptable** + + **Customer phone** + - - -**Notification URL for successful payment** + + **Customer address** + -If not specified, the Notification URL set in Admin console is used. + + **Customer zip code** + - - -**Custom data** + + **PG code** + - + + **URL for checking whether payment is acceptable** + - + + **Notification URL for successful payment** -### Responses + If not specified, the Notification URL set in Admin console is used. + - - - -**`code`** **\*** **integer** + + **Custom data** + -**Response code** + ### Responses -0: success, Not 0: check the message + + + + **`code`** **\*** **integer** -**`message`** **\*** **string** + **Response code** -**Response message** + 0: success, Not 0: check the message -A non-zero code includes a message like 'Invalid payment info'. + **`message`** **\*** **string** -**`response`** **`(PaymentAnnotation, optional)`** + **Response message** - - + A non-zero code includes a message like 'Invalid payment info'. - - -**`code`** **\*** **integer** + **`response`** **`(PaymentAnnotation, optional)`** + + -**`Response code`** + + + **`code`** **\*** **integer** -0: success, Not 0: check the message + **`Response code`** -**`message`** **\*** **string** + 0: success, Not 0: check the message -**Response message** + **`message`** **\*** **string** -A non-zero code includes a message like 'Invalid payment info. + **Response message** -**`imp_uid`** \* **string** + A non-zero code includes a message like 'Invalid payment info. -**i'mport payment transaction UID** + **`imp_uid`** \* **string** -**`merchant_uid`** **\*** **string** + **i'mport payment transaction UID** -**Order ID** + **`merchant_uid`** **\*** **string** -**`pay_method`** **\*** **string** + **Order ID** -**Payment method code** + **`pay_method`** **\*** **string** -**`channel`** **\*** **string** + **Payment method code** -**Payment environment code** + **`channel`** **\*** **string** -- pc**:** (authenticated) PC -- mobile: (authenticated) mobile -- api: recurring or non-authenticated + **Payment environment code** -**`pg_provider`** **\*** **string** + - pc: (authenticated) PC + - mobile: (authenticated) mobile + - api: recurring or non-authenticated -**PG code** + **`pg_provider`** **\*** **string** ---- + **PG code** -**`emb_pg_provider`** **\*** **string** + --- -**Hub-type PG code** + **`emb_pg_provider`** **\*** **string** -**`pg_tid`** **\*** **string** + **Hub-type PG code** -**PG transaction ID** + **`pg_tid`** **\*** **string** -**`pg_id`** **\*** **string** + **PG transaction ID** -**PG MID** + **`pg_id`** **\*** **string** -**`escrow`** **boolean** + **PG MID** -**Indicates an escrow payment** + **`escrow`** **boolean** -**`apply_num`** **string** + **Indicates an escrow payment** -**Credit card approval number** + **`apply_num`** **string** -**`bank_code`** **string** + **Credit card approval number** -**Bank code** + **`bank_code`** **string** -**`bank_name`** **string** + **Bank code** -**Bank name** + **`bank_name`** **string** ---- + **Bank name** -**`card_code`** **string** + --- -**Credit card code (KFTC Credit Card Codes:** [**link**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) ) + **`card_code`** **string** -**`card_name`** **string** + **Credit card code (KFTC Credit Card Codes:** [**link**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) ) -**Credit card name** + **`card_name`** **string** -**`card_quota`** **integer** + **Credit card name** -**Number of installments (0 means one-off)** + **`card_quota`** **integer** -**`card_number`** **string** + **Number of installments (0 means one-off)** -**Masked credit card number** + **`card_number`** **string** ---- + **Masked credit card number** -**`card_type`** **string** + --- -**Credit card type code** + **`card_type`** **string** -- 0: credit -- 1: check + **Credit card type code** -**`vbank_code`** **string** + - 0: credit + - 1: check -**Virtual account bank code (refer to image below)** + **`vbank_code`** **string** ---- + **Virtual account bank code (refer to image below)** -**`vbank_name`** **string** + --- -**Refund virtual account** + **`vbank_name`** **string** -**`vbank_holder`** **string** + **Refund virtual account** -**Refund virtual account holder** + **`vbank_holder`** **string** -**`vbank_date`** **string** + **Refund virtual account holder** -**Refund virtual account expiration (UNIX timestamp)** + **`vbank_date`** **string** -**`vbank_issued_at`** **string** + **Refund virtual account expiration (UNIX timestamp)** -**Refund virtual account created at (UNIX timestamp)** + **`vbank_issued_at`** **string** -**`name`** **string** + **Refund virtual account created at (UNIX timestamp)** -**Product name** + **`name`** **string** -**`amount`** **\*** **integer** + **Product name** -**Order (payment) amount** + **`amount`** **\*** **integer** -**`cancel_amount`** **integer** + **Order (payment) amount** -**Cancelled amount** + **`cancel_amount`** **integer** -**`currency`** **string** + **Cancelled amount** -**Currency** - -- USD -- KRW -- EUR - ---- + **`currency`** **string** -**`buyer_name`** **string** + **Currency** -**Customer name** + - USD + - KRW + - EUR -**`buyer_email`** **string** + --- -**Customer email**\ + **`buyer_name`** **string** -**`buyer_tel`** **string** + **Customer name** -**Customer phone** + **`buyer_email`** **string** -**`buyer_addr`** **string** + **Customer email** -**Customer address** + **`buyer_tel`** **string** -**`buyer_postcode`** **string** + **Customer phone** -**Customer zip code** + **`buyer_addr`** **string** -**`custom_data`** **string** + **Customer address** -**echo data as JSON string** + **`buyer_postcode`** **string** -**`user_agent`** **string** + **Customer zip code** -**UserAgent of the device where payment is initiated** + **`custom_data`** **string** -**`status`** **\*** **string** + **echo data as JSON string** -**Payment status code** + **`user_agent`** **string** -- ready -- paid -- cancelled -- failed + **UserAgent of the device where payment is initiated** -**`started_at`** **\*** **string** + **`status`** **\*** **string** -**Payment started at (UNIX timestamp)** + **Payment status code** -**`paid_at`** **\*** **string** + - ready + - paid + - cancelled + - failed -**Payment completed at (UNIX timestamp)**\ + **`started_at`** **\*** **string** -**`failed_at`** **\*** **string** + **Payment started at (UNIX timestamp)** -**Payment failed at (UNIX timestamp)** + **`paid_at`** **\*** **string** -**`cancelled_at`** **\*** **string** + **Payment completed at (UNIX timestamp)** -**Payment cancelled at (UNIX timestamp)** + **`failed_at`** **\*** **string** -**`fail_reason`** **string** + **Payment failed at (UNIX timestamp)** -**Reason for failure** + **`cancelled_at`** **\*** **string** -**`cancel_reason`** **string** + **Payment cancelled at (UNIX timestamp)** -**Reason for cancellation** + **`fail_reason`** **string** -**`receipt_url`** **string** + **Reason for failure** -**Credit card receipt URL** + **`cancel_reason`** **string** -**`cash_receipt_issued` ****boolean** + **Reason for cancellation** -**Option to automatically issue cash receipt** + **`receipt_url`** **string** -**`customer_uid`** **string** + **Credit card receipt URL** -**customer\_uid related to the payment transaction** + **`cash_receipt_issued`** **boolean** -**`customer_uid_usage`** **string** + **Option to automatically issue cash receipt** -**customer\_uid use code** + **`customer_uid`** **string** -- payment.scheduled: scheduled payment -- payment: payment -- issue**: billing key issuance** + **customer\_uid related to the payment transaction** -**`cancel_history`** **(Array\[PaymentCancelAnnotation], optional):** + **`customer_uid_usage`** **string** -**`Cancellation/partial cancellation history`** + **customer\_uid use code** - - + - payment.scheduled: scheduled payment + - payment: payment + - issue: billing key issuance - - -**`pg_tid`** **\*** **string** + **`cancel_history`** **(Array\[PaymentCancelAnnotation], optional):** -**PG cancellation transaction ID** + **`Cancellation/partial cancellation history`** + + -**`amount`** **\*** **integer** + + + **`pg_tid`** **\*** **string** -**Cancelled amount** + **PG cancellation transaction ID** -**`cancelled_at`** **\*** **string** + **`amount`** **\*** **integer** -**Cancelled at (UNIX timestamp)** + **Cancelled amount** -**`reason`** **\*** **string(256)** + **`cancelled_at`** **\*** **string** -**Reason for cancellation** + **Cancelled at (UNIX timestamp)** -**`receipt_url`** **\*** **string(300)** + **`reason`** **\*** **string(256)** -**Cancellation receipt URL. Availability varies by PG.** + **Reason for cancellation** - - + **`receipt_url`** **\*** **string(300)** - - - -```javascript -{ - // Response -} -``` - - + **Cancellation receipt URL. Availability varies by PG.** + + + + + ```ts + { + // Response + } + ``` + ### Key request parameter description -> **barcode ****string** +> **barcode** **string** > > **`Barcode number`** > > If there is a barcode number generated/managed by the merchant, you can use it instead of getting > one from GalaxiaMoneytree. -> **expired\_at ****integer** +> **expired\_at** **integer** > > **`Convenience store payment deadline`** > @@ -414,96 +400,91 @@ A non-zero code includes a message like 'Invalid payment info. > > **`200 response == acceptable / Other responses == Not acceptable`** > -> -> > ```json title="Webhook Body" > { -> event : 'Galaxia.Cvs.Confirm', -> imp_uid : 'imp_123412341234', -> merchant_uid : 'asdfasdfasdf', -> status : 'ready', -> extra : { -> barcode : '11222222', -> payType : 'card' //card or cash -> } +> "event": "Galaxia.Cvs.Confirm", +> "imp_uid": "imp_123412341234", +> "merchant_uid": "asdfasdfasdf", +> "status": "ready", +> "extra": { +> "barcode": "11222222", +> "payType": "card" //card or cash +> } > } > ``` ->
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": { - "imp_uid": "string", - "merchant_uid": "string", - "pay_method": "string", - "channel": "pc", - "pg_provider": "string", - "emb_pg_provider": "string", - "pg_tid": "string", - "pg_id": "string", - "escrow": true, - "apply_num": "string", - "bank_code": "string", - "bank_name": "string", - "card_code": "string", - "card_name": "string", - "card_quota": 0, - "card_number": "string", - "card_type": "null", - "vbank_code": "string", - "vbank_name": "string", - "vbank_num": "string", - "vbank_holder": "string", - "vbank_date": 0, - "vbank_issued_at": 0, - "name": "string", - "amount": 0, - "cancel_amount": 0, - "currency": "string", - "buyer_name": "string", - "buyer_email": "string", - "buyer_tel": "string", - "buyer_addr": "string", - "buyer_postcode": "string", - "custom_data": "string", - "user_agent": "string", - "status": "ready", - "started_at": 0, - "paid_at": 0, - "failed_at": 0, - "cancelled_at": 0, - "fail_reason": "string", - "cancel_reason": "string", - "receipt_url": "string", - "cancel_history": [ - { - "pg_tid": "string", - "amount": 0, - "cancelled_at": 0, - "reason": "string", - "receipt_url": "string" - } - ], - "cancel_receipt_urls": [ - "string" - ], - "cash_receipt_issued": true, - "customer_uid": "string", - "customer_uid_usage": "issue" +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "imp_uid": "string", + "merchant_uid": "string", + "pay_method": "string", + "channel": "pc", + "pg_provider": "string", + "emb_pg_provider": "string", + "pg_tid": "string", + "pg_id": "string", + "escrow": true, + "apply_num": "string", + "bank_code": "string", + "bank_name": "string", + "card_code": "string", + "card_name": "string", + "card_quota": 0, + "card_number": "string", + "card_type": "null", + "vbank_code": "string", + "vbank_name": "string", + "vbank_num": "string", + "vbank_holder": "string", + "vbank_date": 0, + "vbank_issued_at": 0, + "name": "string", + "amount": 0, + "cancel_amount": 0, + "currency": "string", + "buyer_name": "string", + "buyer_email": "string", + "buyer_tel": "string", + "buyer_addr": "string", + "buyer_postcode": "string", + "custom_data": "string", + "user_agent": "string", + "status": "ready", + "started_at": 0, + "paid_at": 0, + "failed_at": 0, + "cancelled_at": 0, + "fail_reason": "string", + "cancel_reason": "string", + "receipt_url": "string", + "cancel_history": [ + { + "pg_tid": "string", + "amount": 0, + "cancelled_at": 0, + "reason": "string", + "receipt_url": "string" + } + ], + "cancel_receipt_urls": [ + "string" + ], + "cash_receipt_issued": true, + "customer_uid": "string", + "customer_uid_usage": "issue" + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/cvs/issueCvsPayment**](https://api.iamport.kr/#!/cvs/issueCvsPayment) + **Swagger Test Link** + [**https://api.iamport.kr/#!/cvs/issueCvsPayment**](https://api.iamport.kr/#!/cvs/issueCvsPayment) diff --git a/src/content/docs/en/api/miscellaneous-api/financial-institution-codes/get-bank-codes-all-api.mdx b/src/content/docs/en/api/miscellaneous-api/financial-institution-codes/get-bank-codes-all-api.mdx index ba4e7f205..7d3f05364 100644 --- a/src/content/docs/en/api/miscellaneous-api/financial-institution-codes/get-bank-codes-all-api.mdx +++ b/src/content/docs/en/api/miscellaneous-api/financial-institution-codes/get-bank-codes-all-api.mdx @@ -4,99 +4,88 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; -import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Gets a list of standard codes and names for all banks (based on KFTC codes). +## Gets a list of standard codes and names for all banks (based on KFTC codes). - - - - -### Responses - - - - -**`code`** **\***** ****integer** - -**Response code** - -0: success, Not 0: check the message - -**`message`** **\***** ****string** + -**Response message** + ### Responses -A non-zero code includes a message like 'Invalid payment info'. + + + + **`code`** **\*** **integer** -**`response`****`(Array[StandardCodeAnnotation], optional)`** + **Response code** - - + 0: success, Not 0: check the message - - -**`code`****`*`****`string`** + **`message`** **\*** **string** -**`Institution code (from KFTC)`** + **Response message** -**`name`` `****`*`****`string`** + A non-zero code includes a message like 'Invalid payment info'. -**`Institution name (from KFTC)`** + **`response`****`(Array[StandardCodeAnnotation], optional)`** + + - - + + + **`code`****`*`****`string`** - + **`Institution code (from KFTC)`** - -```javascript -{ - // Response -} -``` + **`name`` `****`*`****`string`** - + **`Institution name (from KFTC)`** + + + - -```javascript -{ - // Response -} -``` - - - - - -
-

Response Model Schema

+ + ```ts + { + // Response + } + ``` + -``` -{ - "code": 0, - "message": "string", - "response": [ + + ```ts { - "code": "string", - "name": "string" + // Response } - ] -} -``` + ``` + + +
+

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": [ + { + "code": "string", + "name": "string" + } + ] + } + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/codes/allBankCodes**](https://api.iamport.kr/#!/codes/allBankCodes) + **Swagger Test Link** + [**https://api.iamport.kr/#!/codes/allBankCodes**](https://api.iamport.kr/#!/codes/allBankCodes) diff --git a/src/content/docs/en/api/miscellaneous-api/financial-institution-codes/get-bank-name-api.mdx b/src/content/docs/en/api/miscellaneous-api/financial-institution-codes/get-bank-name-api.mdx index b36565b4e..485988d3b 100644 --- a/src/content/docs/en/api/miscellaneous-api/financial-institution-codes/get-bank-name-api.mdx +++ b/src/content/docs/en/api/miscellaneous-api/financial-institution-codes/get-bank-name-api.mdx @@ -4,110 +4,97 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Gets the bank name for a bank code. +## Gets the bank name for a bank code. - - - - -### Parameters - -#### Path - - - + -**Bank code** + ### Parameters - + #### Path - + + + **Bank code** + + -### Responses + ### Responses - - - -**`code`** **\***** ****integer** + + + + **`code`** **\*** **integer** -**Response code** + **Response code** -0: success, Not 0: check the message + 0: success, Not 0: check the message -**`message`** **\***** ****string** + **`message`** **\*** **string** -**Response message** + **Response message** -A non-zero code includes a message like 'Invalid payment info'. + A non-zero code includes a message like 'Invalid payment info'. -**`response`****`(Array[StandardCodeAnnotation], optional)`** + **`response`****`(Array[StandardCodeAnnotation], optional)`** + + - - + + + **`code`****`*`****`string`** - - -**`code`****`*`****`string`** + **`Institution code (from KFTC)`** -**`Institution code (from KFTC)`** + **`name`` `****`*`****`string`** -**`name`` `****`*`****`string`** + **`Institution name (from KFTC)`** + + + -**`Institution name (from KFTC)`** - - - - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - + + ```ts + { + // Response + } + ``` + + + ```ts + { + // Response + } + ``` +
-

Response Model Schema

- -``` -{ - "code": 0, - "message": "string", - "response": { - "code": "string", - "name": "string" +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "code": "string", + "name": "string" + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/codes/bankCodes**](https://api.iamport.kr/#!/codes/bankCodes) + **Swagger Test Link** + [**https://api.iamport.kr/#!/codes/bankCodes**](https://api.iamport.kr/#!/codes/bankCodes) diff --git a/src/content/docs/en/api/miscellaneous-api/financial-institution-codes/get-credit-card-codes-all-api.mdx b/src/content/docs/en/api/miscellaneous-api/financial-institution-codes/get-credit-card-codes-all-api.mdx index 08a50c93b..34311da59 100644 --- a/src/content/docs/en/api/miscellaneous-api/financial-institution-codes/get-credit-card-codes-all-api.mdx +++ b/src/content/docs/en/api/miscellaneous-api/financial-institution-codes/get-credit-card-codes-all-api.mdx @@ -4,99 +4,88 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; -import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Gets a list of standard codes and names for all credit card companies (based on KFTC codes). +## Gets a list of standard codes and names for all credit card companies (based on KFTC codes). - - - - -### Responses - - - - -**`code`** **\***** ****integer** - -**Response code** - -0: success, Not 0: check the message - -**`message`** **\***** ****string** + -**Response message** + ### Responses -A non-zero code includes a message like 'Invalid payment info'. + + + + **`code`** **\*** **integer** -**`response`****`(Array[StandardCodeAnnotation], optional)`** + **Response code** - - + 0: success, Not 0: check the message - - -**`code`****`*`****`string`** + **`message`** **\*** **string** -**`Institution code (from KFTC)`** + **Response message** -**`name`` `****`*`****`string`** + A non-zero code includes a message like 'Invalid payment info'. -**`Institution name (from KFTC)`** + **`response`****`(Array[StandardCodeAnnotation], optional)`** + + - - + + + **`code`****`*`****`string`** - + **`Institution code (from KFTC)`** - -```javascript -{ - // Response -} -``` + **`name`` `****`*`****`string`** - + **`Institution name (from KFTC)`** + + + - -```javascript -{ - // Response -} -``` - - - - - -
-

Response Model Schema

+ + ```ts + { + // Response + } + ``` + -``` -{ - "code": 0, - "message": "string", - "response": [ + + ```ts { - "code": "string", - "name": "string" + // Response } - ] -} -``` + ``` + + +
+

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": [ + { + "code": "string", + "name": "string" + } + ] + } + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/codes/allCardCodes**](https://api.iamport.kr/#!/codes/allCardCodes) + **Swagger Test Link** + [**https://api.iamport.kr/#!/codes/allCardCodes**](https://api.iamport.kr/#!/codes/allCardCodes) diff --git a/src/content/docs/en/api/miscellaneous-api/financial-institution-codes/get-credit-card-name-api.mdx b/src/content/docs/en/api/miscellaneous-api/financial-institution-codes/get-credit-card-name-api.mdx index 8337dad2e..d10b684f1 100644 --- a/src/content/docs/en/api/miscellaneous-api/financial-institution-codes/get-credit-card-name-api.mdx +++ b/src/content/docs/en/api/miscellaneous-api/financial-institution-codes/get-credit-card-name-api.mdx @@ -4,110 +4,97 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Gets the credit card name for a credit card code. +## Gets the credit card name for a credit card code. - - - - -### Parameters - -#### Path - - - + -**Credit card code** + ### Parameters - + #### Path - + + + **Credit card code** + + -### Responses + ### Responses - - - -**`code`** **\***** ****integer** + + + + **`code`** **\*** **integer** -**Response code** + **Response code** -0: success, Not 0: check the message + 0: success, Not 0: check the message -**`message`** **\***** ****string** + **`message`** **\*** **string** -**Response message** + **Response message** -A non-zero code includes a message like 'Invalid payment info'. + A non-zero code includes a message like 'Invalid payment info'. -**`response`****`(Array[StandardCodeAnnotation], optional)`** + **`response`****`(Array[StandardCodeAnnotation], optional)`** + + - - + + + **`code`****`*`****`string`** - - -**`code`****`*`****`string`** + **`Institution code (from KFTC)`** -**`Institution code (from KFTC)`** + **`name`` `****`*`****`string`** -**`name`` `****`*`****`string`** + **`Institution name (from KFTC)`** + + + -**`Institution name (from KFTC)`** - - - - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - + + ```ts + { + // Response + } + ``` + + + ```ts + { + // Response + } + ``` +
-

Response Model Schema

- -``` -{ - "code": 0, - "message": "string", - "response": { - "code": "string", - "name": "string" +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "code": "string", + "name": "string" + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/codes/cardCodes**](https://api.iamport.kr/#!/codes/cardCodes) + **Swagger Test Link** + [**https://api.iamport.kr/#!/codes/cardCodes**](https://api.iamport.kr/#!/codes/cardCodes) diff --git a/src/content/docs/en/api/miscellaneous-api/pg-information/get-pg-mids-api.mdx b/src/content/docs/en/api/miscellaneous-api/pg-information/get-pg-mids-api.mdx index 0a6236f7d..3d8b4559a 100644 --- a/src/content/docs/en/api/miscellaneous-api/pg-information/get-pg-mids-api.mdx +++ b/src/content/docs/en/api/miscellaneous-api/pg-information/get-pg-mids-api.mdx @@ -4,97 +4,88 @@ description: "" --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; -import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Gets a list of PG settings (MIDs) configured in the Admin console. +## Gets a list of PG settings (MIDs) configured in the Admin console. - - - - -### Responses + - - - -**`code`** **\***** ****integer** + ### Responses -**Response code** + + + + **`code`** **\*** **integer** -0: success, Not 0: check the message + **Response code** -**`message`** **\***\*\* ****string\*\* + 0: success, Not 0: check the message -**Response message** + **`message`** **\*** **string** -A non-zero code includes a message like 'Invalid payment info'. + **Response message** -**`response`****`(Array[PgSettingAnnotation], optional)`** + A non-zero code includes a message like 'Invalid payment info'. - - + **`response`****`(Array[PgSettingAnnotation], optional)`** + + - - -**`pg_provider`****`*`****`string`** + + + **`pg_provider`****`*`****`string`** -**`PG code`** + **`PG code`** -[**PG codes**](../../../tips/pg-codes) + [**PG codes**](../../../tips/pg-codes) -**`pg_id`****`*`****`string`** + **`pg_id`****`*`****`string`** -**`PG MID`** + **`PG MID`** -**` sandbox`` `****`*`****`boolean`** + **`sandbox`** **`*`****`boolean`** -**`Test mode?`** + **`Test mode?`** -**` type`` `****`*`****`string`** + **`type`** **`*`****`string`** -**`PG setting type`** - -- `payment` : Authenticated payment (Admin console > PG settings \[general/subscription] tab) -- `api_payment` : API payment (Admin console > PG settings \[general/key-in] tab) -- `certification` : Identity verification (Admin console > identity verification tab) - - - - - + **`PG setting type`** + - `payment` : Authenticated payment (Admin console > PG settings \[general/subscription] tab) + - `api_payment` : API payment (Admin console > PG settings \[general/key-in] tab) + - `certification` : Identity verification (Admin console > identity verification tab) + + +
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": [ - { - "pg_provider": "string", - "pg_id": "string", - "sandbox": true, - "type": "payment" - } - ] -} -``` - +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": [ + { + "pg_provider": "string", + "pg_id": "string", + "sandbox": true, + "type": "payment" + } + ] + } + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/users/getPgSettingList**](https://api.iamport.kr/#!/users/getPgSettingList) + **Swagger Test Link** + [**https://api.iamport.kr/#!/users/getPgSettingList**](https://api.iamport.kr/#!/users/getPgSettingList) diff --git a/src/content/docs/en/api/overseas-pg-api/paymentwall-delivery-api.mdx b/src/content/docs/en/api/overseas-pg-api/paymentwall-delivery-api.mdx index e7c5c9782..3395c3527 100644 --- a/src/content/docs/en/api/overseas-pg-api/paymentwall-delivery-api.mdx +++ b/src/content/docs/en/api/overseas-pg-api/paymentwall-delivery-api.mdx @@ -4,241 +4,226 @@ description: "" --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Registers delivery information. +## Registers delivery information. Registers delivery information required by Paymentwall for e-Commerce (physical goods) businesses. - -If omitted, you cannot receive settlement from Paymentwall. - - - -### Parameters - -#### Body - - - - -**i'mport transaction ID** - - + + If omitted, you cannot receive settlement from Paymentwall. + - - - + ### Parameters -**Order ID** + #### Body - + + + **i'mport transaction ID** + + - - -**Product code** + + + **Order ID** + + -**`physical`** + + **Product code** -**`digital`** + **`physical`** - - -**Delivery status code** + **`digital`** + -**`order_placed`** + + **Delivery status code** -**`order_shipped`** + **`order_placed`** -**`delivering`** + **`order_shipped`** -**`delivered`** + **`delivering`** - - -**Tracking number** + **`delivered`** + -Required for physical order + + **Tracking number** - - -**Courier name** + Required for physical order + -Required for physical order + + **Courier name** - - -**Estimated delivery date/time** + Required for physical order + -Unix timestamp + + **Estimated delivery date/time** -(May specify current time for digital order) + Unix timestamp - - -**Estimated status update date/time** + (May specify current time for digital order) + -Unix timestamp sec + + **Estimated status update date/time** -(May specify current time for digital order) + Unix timestamp sec - - -**Reason** + (May specify current time for digital order) + - - -**Refundable?** + + **Reason** + -`yes` + + **Refundable?** -`no` + `yes` - - -**Details** + `no` + - - - + + **Details** + -**Recipient's email** + + + **Recipient's email** + + - + + **Recipient's country** - - -**Recipient's country** + Required for physical order + -Required for physical order + + **Recipient's city** - - -**Recipient's city** + Required for physical order + -Required for physical order + + **Recipient's zip code** - - -**Recipient's zip code** + Required for physical order + -Required for physical order + + **Recipient's state** - - -**Recipient's state** + Set to 'N/A' if outside of USA -Set to 'N/A' if outside of USA + Required for physical order + -Required for physical order + + **Recipient's street name** - - -**Recipient's street name** + Required for physical order + -Required for physical order + + **Recipient's phone** - - -**Recipient's phone** + Required for physical order + -Required for physical order + + **Recipient's first name** - - -**Recipient's first name** + Required for physical order + -Required for physical order + + **Recipient's last name** - - -**Recipient's last name** + Required for physical order + -Required for physical order + ### Responses - + + + + **`code`** **\*** **integer** -### Responses + **Response code** - - - -**`code`** **\***** ****integer** + 0: success, Not 0: check the message -**Response code** + **`message`** **\*** **string** -0: success, Not 0: check the message + **Response message** -**`message`** **\***\*\* ****string\*\* + A non-zero code includes a message like 'Invalid payment info'. -**Response message** + **response** **(PaymentwallDeliveryDetailAnnotation, optional):** -A non-zero code includes a message like 'Invalid payment info'. + Includes multiple error messages or 'success: 1' message when successful. + + -**response** **(PaymentwallDeliveryDetailAnnotation, optional):** + + + **`error_code`****`integer`** -Includes multiple error messages or 'success: 1' message when successful. + Success if null. Otherwise, check notices for error message. - - + **`error`` `****`string`** - - -**`error_code`****`integer`** + **`Error message`** -Success if null. Otherwise, check notices for error message. + **`notices`` `****`Array[string]`** -**` error`` `****`string`** - -**`Error message`** - -**` notices`` `****`Array[string]`** - -**`Detailed error message`** - - - - - - - -```javascript -{ - // Response -} -``` - - + **`Detailed error message`** + + + + + ```ts + { + // Response + } + ``` +
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": { - "error_code": 0, - "error": "string", - "notices": ["string"] +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "error_code": 0, + "error": "string", + "notices": ["string"] + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/paymentwall/paymentwall_delivery**](https://api.iamport.kr/#!/paymentwall/paymentwall_delivery) + **Swagger Test Link** + [**https://api.iamport.kr/#!/paymentwall/paymentwall\_delivery**](https://api.iamport.kr/#!/paymentwall/paymentwall_delivery) diff --git a/src/content/docs/en/api/payment-api/cancel-payment-api.mdx b/src/content/docs/en/api/payment-api/cancel-payment-api.mdx index c7d8a5632..ba74863fa 100644 --- a/src/content/docs/en/api/payment-api/cancel-payment-api.mdx +++ b/src/content/docs/en/api/payment-api/cancel-payment-api.mdx @@ -4,366 +4,353 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### C**ancels a payment in full or partially regardless of the payment method and PG.** +## Cancels a payment in full or partially regardless of the payment method and PG. - -Credit card/instant account transfer/mobile micropayment: cancellation is processed immediately. - -Virtual account: if you provide the refund account information, the refund information will be registered with PG and processed on the next business day. **(Requires virtual account special service contract)** - - - -### Parameters - -#### Body - - - - -**ChaiPort transaction ID** - - - - - -**Order ID (Required if imp_uid is null)** + + Credit card/instant account transfer/mobile micropayment: cancellation is processed immediately. - - -Amount to refund ( + Virtual account: if you provide the refund account information, the refund information will be registered with PG and processed on the next business day. **(Requires virtual account special service contract)** + -**Full refund if null** + ### Parameters -) + #### Body - - -Tax free amount out of + + + **ChaiPort transaction ID** + + -`amount` + + **Order ID (Required if imp\_uid is null)** + - ( + + Amount to refund ( -**0 if null** + **Full refund if null** -) + ) + - - -Refundable amount + + Tax free amount out of - - -**Reason for cancellation** + `amount` - - -**Refund account holder** + ( - (Required for + **0 if null** -**virtual account** + ) + - cancellation) + + Refundable amount + - - -Refund account bank code (Refer to bank codes list below, required for + + **Reason for cancellation** + -**virtual account** + + **Refund account holder** - cancellation) + (Required for - - -Refund account number (Required for + **virtual account** -**virtual account** + cancellation) + - cancellation) + + Refund account bank code (Refer to bank codes list below, required for - - -Refund account holder's phone number (Required for + **virtual account** -**virtual account** + cancellation) + - cancellation and + + Refund account number (Required for - + **virtual account** -**Smartro PG** + cancellation) + - + + Refund account holder's phone number (Required for -) + **virtual account** - + cancellation and -### Responses + + **Smartro PG** + - - - -**`code`** **\***** ****integer** + ) + -**Response code** + ### Responses -0: success, \ -Not 0: check the message + + + + **`code`** **\*** **integer** -**`message`** **\***** ****string** + **Response code** -**Response message** + 0: success, \ + Not 0: check the message -A non-zero code includes a message like 'Invalid payment info. + **`message`** **\*** **string** -**`response`** **(PagedPaymentAnnotation, optional)** + **Response message** - - + A non-zero code includes a message like 'Invalid payment info. - - -**`imp_uid`** \* **string(32)** + **`response`** **(PagedPaymentAnnotation, optional)** + + -**i'mport payment transaction UID** + + + **`imp_uid`** \* **string(32)** -**`merchant_uid`** **\***** ****string(40)** + **i'mport payment transaction UID** -**Order ID** + **`merchant_uid`** **\*** **string(40)** -**`pay_method`** **\***** ****string(20)** + **Order ID** -**Payment method code** + **`pay_method`** **\*** **string(20)** -**`channel`** **\***** ****string(10)** + **Payment method code** -**Payment environment code** + **`channel`** **\*** **string(10)** -\['pc', 'mobile', 'api'] + **Payment environment code** -**`pg_provider`** **\***** ****string(16)** + \['pc', 'mobile', 'api'] -**PG code** + **`pg_provider`** **\*** **string(16)** ---- - -**`emb_pg_provider`** **\***** ****string(16)** - -**Hub-type PG code** + **PG code** -**`pg_tid`** **\*** **string(80)** + --- -**PG transaction ID** + **`emb_pg_provider`** **\*** **string(16)** -**`pg_id`** **\***** ****string(80)** + **Hub-type PG code** -**PG MID** + **`pg_tid`** **\*** **string(80)** -**`escrow`** **boolean** + **PG transaction ID** -**Indicates an escrow payment** + **`pg_id`** **\*** **string(80)** -**`apply_num`** **string(20)** + **PG MID** -**Credit card approval number** + **`escrow`** **boolean** -**`bank_code`** **string(4)** + **Indicates an escrow payment** -**Bank code** + **`apply_num`** **string(20)** -**`bank_name`** **string(20)** - -**Bank name** - ---- + **Credit card approval number** -**`card_code`** **string(3)** + **`bank_code`** **string(4)** -**Credit card code (KFTC Credit Card Codes:** [**link**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) ) + **Bank code** -**`card_name`** **string(20)** + **`bank_name`** **string(20)** -**Credit card name** + **Bank name** -**`card_quota`** **integer** + --- -**Number of installments (0 means one-off)** + **`card_code`** **string(3)** -**`card_number`** **string(20)** + **Credit card code (KFTC Credit Card Codes:** [**link**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) ) -**Masked credit card number** + **`card_name`** **string(20)** ---- + **Credit card name** -**`card_type`** **string(2)** + **`card_quota`** **integer** -**Card type code** + **Number of installments (0 means one-off)** -**`vbank_code`** **string(4)** + **`card_number`** **string(20)** -**Virtual account bank code (refer to image below)** + **Masked credit card number** ---- + --- -**`vbank_name`** **string(20)** + **`card_type`** **string(2)** -**Refund virtual account** + **Card type code** -**`vbank_holder`** **string(16)** + **`vbank_code`** **string(4)** -**Refund virtual account holder** + **Virtual account bank code (refer to image below)** -**`vbank_date`** **string** + --- -**Refund virtual account expiration (UNIX timestamp)** + **`vbank_name`** **string(20)** -**`vbank_issued_at`** **string** + **Refund virtual account** -**Refund virtual account created at (UNIX timestamp)** + **`vbank_holder`** **string(16)** -**`name`** **string(40)** + **Refund virtual account holder** -**Product name** + **`vbank_date`** **string** -**`amount`** **\*** **integer** + **Refund virtual account expiration (UNIX timestamp)** -**Order (payment) amount** + **`vbank_issued_at`** **string** -**`cancel_amount`** **integer** + **Refund virtual account created at (UNIX timestamp)** -**Cancelled amount** + **`name`** **string(40)** -**`currency`** **string(3)** + **Product name** -**Currency** + **`amount`** **\*** **integer** ---- + **Order (payment) amount** -**`buyer_name`** **string(16)** + **`cancel_amount`** **integer** -**Customer name** + **Cancelled amount** -**`buyer_email`** **string(64)** + **`currency`** **string(3)** -**Customer email**\ + **Currency** -**`buyer_tel`** **string(16)** + --- -**Customer phone** + **`buyer_name`** **string(16)** -**`buyer_addr`** **string(128)** + **Customer name** -**Customer address** + **`buyer_email`** **string(64)** -**`buyer_postcode`** **string(8)** + **Customer email**\\ -**Customer zip code** + **`buyer_tel`** **string(16)** -**`custom_data`** **string** + **Customer phone** -**echo data as JSON string** + **`buyer_addr`** **string(128)** -**`user_agent`** **string(256)** + **Customer address** -**UserAgent of the device where payment is initiated** + **`buyer_postcode`** **string(8)** -**`status`** **\***** ****string(20)** + **Customer zip code** -**Payment status code** + **`custom_data`** **string** -**`started_at`** **\*** **string** + **echo data as JSON string** -**Payment started at (UNIX timestamp)** + **`user_agent`** **string(256)** -**`paid_at`** **\***** ****string** + **UserAgent of the device where payment is initiated** -**Payment completed at (UNIX timestamp)**\ + **`status`** **\*** **string(20)** -**`failed_at`** **\***** ****string** + **Payment status code** -**Payment failed at (UNIX timestamp)** + **`started_at`** **\*** **string** -**`cancelled_at`** **\***** ****string** + **Payment started at (UNIX timestamp)** -**Payment cancelled at (UNIX timestamp)** + **`paid_at`** **\*** **string** -**`fail_reason`** **string(256)** + **Payment completed at (UNIX timestamp)**\\ -**Reason for failure** + **`failed_at`** **\*** **string** -**`cancel_reason`** **string(256)** + **Payment failed at (UNIX timestamp)** -**Reason for cancellation** + **`cancelled_at`** **\*** **string** -**`receipt_url`** **string(300)** + **Payment cancelled at (UNIX timestamp)** -**Credit card receipt URL** + **`fail_reason`** **string(256)** -**`cash_receipt_issued` ****boolean** + **Reason for failure** -**Option to automatically issue cash receipt** + **`cancel_reason`** **string(256)** -**`customer_uid`** **string(80)** + **Reason for cancellation** -**customer\_uid related to the payment transaction** + **`receipt_url`** **string(300)** -**`customer_uid_usage`** **string****(20)** + **Credit card receipt URL** -**customer\_uid use code** + **`cash_receipt_issued`** **boolean** -\['issue', 'payment', 'payment.scheduled'] + **Option to automatically issue cash receipt** -**`cancel_history`** **(Array\[PaymentCancelAnnotation], optional):** + **`customer_uid`** **string(80)** -**`Cancellation/partial cancellation history`** + **customer\_uid related to the payment transaction** - - + **`customer_uid_usage`** **string****(20)** - - -**cancel\_history array \[]** + **customer\_uid use code** -**`pg_tid`** **\***** ****string** + \['issue', 'payment', 'payment.scheduled'] -**PG cancellation transaction ID** + **`cancel_history`** **(Array\[PaymentCancelAnnotation], optional):** -**`amount`** **\*** **integer** + **`Cancellation/partial cancellation history`** + + -**Cancelled amount** + + + **cancel\_history array \[]** -**`cancelled_at`** **\*** **string** + **`pg_tid`** **\*** **string** -Cancelled at (UNIX timestamp) + **PG cancellation transaction ID** -**`reason`** **\*** **string(256)** + **`amount`** **\*** **integer** -**Reason for cancellation** + **Cancelled amount** -**`receipt_url`** **\***** ****string(300)** + **`cancelled_at`** **\*** **string** -**Cancellation receipt URL. Availability varies by PG.** + Cancelled at (UNIX timestamp) - - + **`reason`** **\*** **string(256)** - + **Reason for cancellation** - + **`receipt_url`** **\*** **string(300)** - + **Cancellation receipt URL. Availability varies by PG.** + + + + ### **Key parameters** @@ -378,89 +365,86 @@ Cancelled at (UNIX timestamp) > > The `checksum` is used to check whether the refundable amount is the same between the API > requester and the i'mport server. If they do not match, the refund request will fail. If the -> `checksum` is null, the verification is not performed.\ -> +> `checksum` is null, the verification is not performed.\\ -> **`amount`** **\***** ****integer** +> **`amount`** **\*** **integer** > > **Amount to cancel** > > If not specified, a full refund is requested.
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": { - "imp_uid": "string", - "merchant_uid": "string", - "pay_method": "string", - "channel": "pc", - "pg_provider": "string", - "emb_pg_provider": "string", - "pg_tid": "string", - "pg_id": "string", - "escrow": true, - "apply_num": "string", - "bank_code": "string", - "bank_name": "string", - "card_code": "string", - "card_name": "string", - "card_quota": 0, - "card_number": "string", - "card_type": "null", - "vbank_code": "string", - "vbank_name": "string", - "vbank_num": "string", - "vbank_holder": "string", - "vbank_date": 0, - "vbank_issued_at": 0, - "name": "string", - "amount": 0, - "cancel_amount": 0, - "currency": "string", - "buyer_name": "string", - "buyer_email": "string", - "buyer_tel": "string", - "buyer_addr": "string", - "buyer_postcode": "string", - "custom_data": "string", - "user_agent": "string", - "status": "ready", - "started_at": 0, - "paid_at": 0, - "failed_at": 0, - "cancelled_at": 0, - "fail_reason": "string", - "cancel_reason": "string", - "receipt_url": "string", - "cancel_history": [ - { - "pg_tid": "string", - "amount": 0, - "cancelled_at": 0, - "reason": "string", - "receipt_url": "string" - } - ], - "cancel_receipt_urls": [ - "string" - ], - "cash_receipt_issued": true, - "customer_uid": "string", - "customer_uid_usage": "issue" +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "imp_uid": "string", + "merchant_uid": "string", + "pay_method": "string", + "channel": "pc", + "pg_provider": "string", + "emb_pg_provider": "string", + "pg_tid": "string", + "pg_id": "string", + "escrow": true, + "apply_num": "string", + "bank_code": "string", + "bank_name": "string", + "card_code": "string", + "card_name": "string", + "card_quota": 0, + "card_number": "string", + "card_type": "null", + "vbank_code": "string", + "vbank_name": "string", + "vbank_num": "string", + "vbank_holder": "string", + "vbank_date": 0, + "vbank_issued_at": 0, + "name": "string", + "amount": 0, + "cancel_amount": 0, + "currency": "string", + "buyer_name": "string", + "buyer_email": "string", + "buyer_tel": "string", + "buyer_addr": "string", + "buyer_postcode": "string", + "custom_data": "string", + "user_agent": "string", + "status": "ready", + "started_at": 0, + "paid_at": 0, + "failed_at": 0, + "cancelled_at": 0, + "fail_reason": "string", + "cancel_reason": "string", + "receipt_url": "string", + "cancel_history": [ + { + "pg_tid": "string", + "amount": 0, + "cancelled_at": 0, + "reason": "string", + "receipt_url": "string" + } + ], + "cancel_receipt_urls": [ + "string" + ], + "cash_receipt_issued": true, + "customer_uid": "string", + "customer_uid_usage": "issue" + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/payments/cancelPayment**](https://api.iamport.kr/#!/payments/cancelPayment) + **Swagger Test Link** + [**https://api.iamport.kr/#!/payments/cancelPayment**](https://api.iamport.kr/#!/payments/cancelPayment) diff --git a/src/content/docs/en/api/payment-api/get-balance-api-for-split-payment-transaction.mdx b/src/content/docs/en/api/payment-api/get-balance-api-for-split-payment-transaction.mdx index 2c8a911ae..1fe56de86 100644 --- a/src/content/docs/en/api/payment-api/get-balance-api-for-split-payment-transaction.mdx +++ b/src/content/docs/en/api/payment-api/get-balance-api-for-split-payment-transaction.mdx @@ -4,225 +4,211 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Gets the balance of a transaction paid for using multiple payment methods. +## Gets the balance of a transaction paid for using multiple payment methods. - -This is currently supported only by PAYCO. - - - -### Parameters - -#### Path - - - - -**i'mport order ID** + + This is currently supported only by PAYCO. + - + ### Parameters - + #### Path -### Responses + + + **i'mport order ID** + + - - - -**`code`** **\***** ****integer** + ### Responses -**Response code** + + + + **`code`** **\*** **integer** -0: success, Not 0: check the message + **Response code** -**`message`** **\***** ****string** + 0: success, Not 0: check the message -**Response message** + **`message`** **\*** **string** -A non-zero code includes a message like 'Invalid payment info'. + **Response message** -**`response`` `****`(PaymentBalanceResponseAnnotation, optional)`** + A non-zero code includes a message like 'Invalid payment info'. - - + **`response`` `****`(PaymentBalanceResponseAnnotation, optional)`** + + - - -**`amount`` `****`Integer`** + + + **`amount`` `****`Integer`** -**`Total amount`** + **`Total amount`** -**`cash_receipt`` `****`(PaymentBalanceAnnotation):`** + **`cash_receipt`` `****`(PaymentBalanceAnnotation):`** -**`Cash receipt amount`** + **`Cash receipt amount`** -**`primary`` `****`(PaymentBalanceAnnotation):`** + **`primary`` `****`(PaymentBalanceAnnotation):`** -**`Payment method 1`**(credit card, account transfer, virtual account, mobile micropayment) amount + **`Payment method 1`**(credit card, account transfer, virtual account, mobile micropayment) amount -**`secondary`` `****`(PaymentBalanceAnnotation):`** + **`secondary`` `****`(PaymentBalanceAnnotation):`** -**`Payment method 2`** PG/credit card points amount + **`Payment method 2`** PG/credit card points amount -**`discount`` `****`(PaymentBalanceAnnotation):`** + **`discount`` `****`(PaymentBalanceAnnotation):`** -**`PG/credit card discount amount`** + **`PG/credit card discount amount`** -**`histories`` `****`(Array[PaymentBalanceBaseAnnotation], optional)`** + **`histories`` `****`(Array[PaymentBalanceBaseAnnotation], optional)`** -**`PaymentBalance history`** + **`PaymentBalance history`** + + - - + + + **`tax_free`` `****`Integer`** - - -**`tax_free`` `****`Integer`** + **`Tax free amount`** (excludes any refunded amount) -**`Tax free amount`** (excludes any refunded amount) + **`supply`` `****`Integer`** -**`supply`` `****`Integer`** + **`Taxed amount`** (excludes any refunded amount) -**`Taxed amount`** (excludes any refunded amount) + **`vat`** **`Integer`** -**`vat`** **`Integer`** + **`Tax`** (excludes any refunded amount) -**`Tax`** (excludes any refunded amount) + **`service`` `****`Integer`** -**`service`` `****`Integer`** + **`Fee`** (excludes any refunded amount) + + -**`Fee`** (excludes any refunded amount) + + + **`cash_receipt`` `****`(PaymentBalanceAnnotation):`** - - + **`Cash receipt amount`** - - -**`cash_receipt`` `****`(PaymentBalanceAnnotation):`** + **`primary`` `****`(PaymentBalanceAnnotation):`** -**`Cash receipt amount`** + **`Payment method 1`**(credit card, account transfer, virtual account, mobile micropayment) amount -**`primary`` `****`(PaymentBalanceAnnotation):`** + **`secondary`` `****`(PaymentBalanceAnnotation):`** -**`Payment method 1`**(credit card, account transfer, virtual account, mobile micropayment) amount + **`Payment method 2`** PG/credit card points amount -**`secondary`` `****`(PaymentBalanceAnnotation):`** + **`discount`` `****`(PaymentBalanceAnnotation):`** -**`Payment method 2`** PG/credit card points amount + **`PG/credit card discount amount`** -**`discount`` `****`(PaymentBalanceAnnotation):`** + **`created *`` `****`integer`** -**`PG/credit card discount amount`** + **`Balance created at (UNIX timestamp)`** + + + -**`created *`` `****`integer`** - -**`Balance created at (UNIX timestamp)`** - - - - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - + + ```ts + { + // Response + } + ``` + + + ```ts + { + // Response + } + ``` +
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": { - "amount": 0, - "cash_receipt": { - "tax_free": 0, - "supply": 0, - "vat": 0, - "service": 0 - }, - "primary": { - "tax_free": 0, - "supply": 0, - "vat": 0, - "service": 0 - }, - "secondary": { - "tax_free": 0, - "supply": 0, - "vat": 0, - "service": 0 - }, - "discount": { - "tax_free": 0, - "supply": 0, - "vat": 0, - "service": 0 - }, - "histories": [ - { - "cash_receipt": { - "tax_free": 0, - "supply": 0, - "vat": 0, - "service": 0 - }, - "primary": { - "tax_free": 0, - "supply": 0, - "vat": 0, - "service": 0 - }, - "secondary": { - "tax_free": 0, - "supply": 0, - "vat": 0, - "service": 0 - }, - "discount": { - "tax_free": 0, - "supply": 0, - "vat": 0, - "service": 0 - }, - "created": 0 - } - ] +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "amount": 0, + "cash_receipt": { + "tax_free": 0, + "supply": 0, + "vat": 0, + "service": 0 + }, + "primary": { + "tax_free": 0, + "supply": 0, + "vat": 0, + "service": 0 + }, + "secondary": { + "tax_free": 0, + "supply": 0, + "vat": 0, + "service": 0 + }, + "discount": { + "tax_free": 0, + "supply": 0, + "vat": 0, + "service": 0 + }, + "histories": [ + { + "cash_receipt": { + "tax_free": 0, + "supply": 0, + "vat": 0, + "service": 0 + }, + "primary": { + "tax_free": 0, + "supply": 0, + "vat": 0, + "service": 0 + }, + "secondary": { + "tax_free": 0, + "supply": 0, + "vat": 0, + "service": 0 + }, + "discount": { + "tax_free": 0, + "supply": 0, + "vat": 0, + "service": 0 + }, + "created": 0 + } + ] + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/payments/balanceByImpUid**](https://api.iamport.kr/#!/payments/balanceByImpUid) + **Swagger Test Link** + [**https://api.iamport.kr/#!/payments/balanceByImpUid**](https://api.iamport.kr/#!/payments/balanceByImpUid) diff --git a/src/content/docs/en/api/payment-api/get-payment-amount-api.mdx b/src/content/docs/en/api/payment-api/get-payment-amount-api.mdx index b4d9c228a..0482f730f 100644 --- a/src/content/docs/en/api/payment-api/get-payment-amount-api.mdx +++ b/src/content/docs/en/api/payment-api/get-payment-amount-api.mdx @@ -4,103 +4,91 @@ description: "" --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Gets the amount saved via [**save payment amount API**](save-payment-amount-api). +## Gets the amount saved via [**save payment amount API**](save-payment-amount-api). - - - - -### Parameters - -#### Body - - - + -**Merchant order ID** + ### Parameters - + #### Body - + + + **Merchant order ID** + + -### Responses + ### Responses - - - -**`code`** **\***** ****integer** + + + + **`code`** **\*** **integer** -**Response code** + **Response code** -0: success, Not 0: check the message + 0: success, Not 0: check the message -**`message`** **\***\*\* ****string\*\* + **`message`** **\*** **string** -**Response message** + **Response message** -A non-zero code includes a message like 'Invalid payment info'. + A non-zero code includes a message like 'Invalid payment info'. - - **`response (PaymentPrepareAnnotation, optional)`** - + + **`response (PaymentPrepareAnnotation, optional)`** + + + - - + + + **`merchant_uid`` `****`*`****` `****`string`** - - -**`merchant_uid`` `****`*`****` `****`string`** + **`Merchant order ID`** -**`Merchant order ID`** + **`amount`****`*`****`number`** -**`amount`****`*`****`number`** - -**`Payment amount`** - - - - - - - -```javascript -{ - // Response -} -``` - - + **`Payment amount`** + + + + + ```ts + { + // Response + } + ``` +
-

Response Model Schema

- -``` -{ - "code": 0, - "message": "string", - "response": { - "merchant_uid": "string", - "amount": 0 +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "merchant_uid": "string", + "amount": 0 + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/payments.validation/getPaymentPrepareByMerchantUid**](https://api.iamport.kr/#!/payments.validation/getPaymentPrepareByMerchantUid) + **Swagger Test Link** + [**https://api.iamport.kr/#!/payments.validation/getPaymentPrepareByMerchantUid**](https://api.iamport.kr/#!/payments.validation/getPaymentPrepareByMerchantUid) diff --git a/src/content/docs/en/api/payment-api/get-payment-api.mdx b/src/content/docs/en/api/payment-api/get-payment-api.mdx index d1b6dfe6b..970da4c6b 100644 --- a/src/content/docs/en/api/payment-api/get-payment-api.mdx +++ b/src/content/docs/en/api/payment-api/get-payment-api.mdx @@ -4,406 +4,392 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Gets the details of a payment by imp\_uid. +## Gets the details of a payment by imp\_uid. - - - - -### Parameters - -#### Path - - - - -**Transaction ID** - - - - + -### Responses + ### Parameters - - - -**`code`** **\***** ****integer** + #### Path -**Response code** + + + **Transaction ID** + + -0: success, Not 0: check the message + ### Responses -**`message`** **\***** ****string** + + + + **`code`** **\*** **integer** -**Response message** + **Response code** -A non-zero code includes a message like 'Invalid payment info. + 0: success, Not 0: check the message -**`response`** **(PaymentAnnotation, optional)** + **`message`** **\*** **string** - - + **Response message** - - -**`code`** **\***** ****integer** + A non-zero code includes a message like 'Invalid payment info. -**`Response code`** + **`response`** **(PaymentAnnotation, optional)** + + -0: success, Not 0: check the message + + + **`code`** **\*** **integer** -**`message`** **\***** ****string** + **`Response code`** -**Response message** + 0: success, Not 0: check the message -A non-zero code includes a message like 'Invalid payment info. + **`message`** **\*** **string** -**`imp_uid`** \* **string** + **Response message** -**i'mport payment transaction UID** + A non-zero code includes a message like 'Invalid payment info. -**`merchant_uid`** **\***** ****string** + **`imp_uid`** \* **string** -**Order ID** + **i'mport payment transaction UID** -**`pay_method`** **\***** ****string** + **`merchant_uid`** **\*** **string** -**Payment method code** + **Order ID** -**`channel`** **\***** ****string** + **`pay_method`** **\*** **string** -**Payment environment code** + **Payment method code** -- pc**:** (authenticated) PC -- mobile: (authenticated) mobile -- api: recurring or non-authenticated + **`channel`** **\*** **string** -**`pg_provider`** **\***** ****string** + **Payment environment code** -**PG code** + - pc: (authenticated) PC + - mobile: (authenticated) mobile + - api: recurring or non-authenticated ---- - -**`emb_pg_provider`** **\***** ****string** + **`pg_provider`** **\*** **string** -**Hub-type PG code** + **PG code** -**`pg_tid`** **\*** **string** + --- -**PG transaction ID** + **`emb_pg_provider`** **\*** **string** -**`pg_id`** **\***** ****string** + **Hub-type PG code** -**PG MID** + **`pg_tid`** **\*** **string** -**`escrow`** **boolean** + **PG transaction ID** -**Indicates an escrow payment** + **`pg_id`** **\*** **string** -**`apply_num`** **string** + **PG MID** -**Credit card approval number** + **`escrow`** **boolean** -**`bank_code`** **string** + **Indicates an escrow payment** -**Bank code** + **`apply_num`** **string** -**`bank_name`** **string** + **Credit card approval number** -**Bank name** + **`bank_code`** **string** ---- + **Bank code** -**`card_code`** **string** + **`bank_name`** **string** -**Credit card code (KFTC Credit Card Codes:** [**link**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) ) + **Bank name** -**`card_name`** **string** + --- -**Credit card name** + **`card_code`** **string** -**`card_quota`** **integer** + **Credit card code (KFTC Credit Card Codes:** [**link**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) ) -**Number of installments (0 means one-off)** + **`card_name`** **string** -**`card_number`** **string** + **Credit card name** -**Masked credit card number** + **`card_quota`** **integer** ---- + **Number of installments (0 means one-off)** -**`card_type`** **string** + **`card_number`** **string** -**Credit card type code** + **Masked credit card number** -- 0: credit -- 1: check + --- -**`vbank_code`** **string** + **`card_type`** **string** -**Virtual account bank code (refer to image below)** + **Credit card type code** ---- + - 0: credit + - 1: check -**`vbank_name`** **string** + **`vbank_code`** **string** -**Refund virtual account** + **Virtual account bank code (refer to image below)** -**`vbank_holder`** **string** + --- -**Refund virtual account holder** + **`vbank_name`** **string** -**`vbank_date`** **string** + **Refund virtual account** -**Refund virtual account expiration (UNIX timestamp)** + **`vbank_holder`** **string** -**`vbank_issued_at`** **string** + **Refund virtual account holder** -**Refund virtual account created at (UNIX timestamp)** + **`vbank_date`** **string** -**`name`** **string** + **Refund virtual account expiration (UNIX timestamp)** -**Product name** + **`vbank_issued_at`** **string** -**`amount`** **\*** **integer** + **Refund virtual account created at (UNIX timestamp)** -**Order (payment) amount** + **`name`** **string** -**`cancel_amount`** **integer** + **Product name** -**Cancelled amount** + **`amount`** **\*** **integer** -**`currency`** **string** + **Order (payment) amount** -**Currency** + **`cancel_amount`** **integer** -- USD -- KRW -- EUR + **Cancelled amount** ---- + **`currency`** **string** -**`buyer_name`** **string** + **Currency** -**Customer name** + - USD + - KRW + - EUR -**`buyer_email`** **string** + --- -**Customer email**\ + **`buyer_name`** **string** -**`buyer_tel`** **string** + **Customer name** -**Customer phone** + **`buyer_email`** **string** -**`buyer_addr`** **string** + **Customer email**\\ -**Customer address** + **`buyer_tel`** **string** -**`buyer_postcode`** **string** + **Customer phone** -**Customer zip code** + **`buyer_addr`** **string** -**`custom_data`** **string** + **Customer address** -**echo data as JSON string** + **`buyer_postcode`** **string** -**`user_agent`** **string** + **Customer zip code** -**UserAgent of the device where payment is initiated** + **`custom_data`** **string** -**`status`** **\***** ****string** + **echo data as JSON string** -**Payment status code** + **`user_agent`** **string** -- ready -- paid -- cancelled -- failed + **UserAgent of the device where payment is initiated** -**`started_at`** **\*** **string** + **`status`** **\*** **string** -**Payment started at (UNIX timestamp)** + **Payment status code** -**`paid_at`** **\***** ****string** + - ready + - paid + - cancelled + - failed -**Payment completed at (UNIX timestamp)**\ + **`started_at`** **\*** **string** -**`failed_at`** **\***** ****string** + **Payment started at (UNIX timestamp)** -**Payment failed at (UNIX timestamp)** + **`paid_at`** **\*** **string** -**`cancelled_at`** **\***** ****string** + **Payment completed at (UNIX timestamp)**\\ -**Payment cancelled at (UNIX timestamp)** + **`failed_at`** **\*** **string** -**`fail_reason`** **string** + **Payment failed at (UNIX timestamp)** -**Reason for failure** + **`cancelled_at`** **\*** **string** -**`cancel_reason`** **string** + **Payment cancelled at (UNIX timestamp)** -**Reason for cancellation** + **`fail_reason`** **string** -**`receipt_url`** **string** + **Reason for failure** -**Credit card receipt URL** + **`cancel_reason`** **string** -**`cash_receipt_issued` ****boolean** + **Reason for cancellation** -**Option to automatically issue cash receipt** + **`receipt_url`** **string** -**`customer_uid`** **string** + **Credit card receipt URL** -**customer\_uid related to the payment transaction** + **`cash_receipt_issued`** **boolean** -**`customer_uid_usage`** **string** + **Option to automatically issue cash receipt** -**customer\_uid use code** + **`customer_uid`** **string** -- payment.scheduled: scheduled payment -- payment: payment -- issue**: billing key issuance** + **customer\_uid related to the payment transaction** -**`cancel_history`** **(Array\[PaymentCancelAnnotation], optional):** + **`customer_uid_usage`** **string** -**`Cancellation/partial cancellation history`** + **customer\_uid use code** - - + - payment.scheduled: scheduled payment + - payment: payment + - issue: billing key issuance - - -**cancel\_history array \[]** + **`cancel_history`** **(Array\[PaymentCancelAnnotation], optional):** -**`pg_tid`** **\***** ****string** + **`Cancellation/partial cancellation history`** + + -**PG cancellation transaction ID** + + + **cancel\_history array \[]** -**`amount`** **\*** **integer** + **`pg_tid`** **\*** **string** -**Cancelled amount** + **PG cancellation transaction ID** -**`cancelled_at`** **\*** **string** + **`amount`** **\*** **integer** -**Cancelled at (UNIX timestamp)** + **Cancelled amount** -**`reason`** **\*** **string(256)** + **`cancelled_at`** **\*** **string** -**Reason for cancellation** + **Cancelled at (UNIX timestamp)** -**`receipt_url`** **\***** ****string(300)** + **`reason`** **\*** **string(256)** -**Cancellation receipt URL. Availability varies by PG.** + **Reason for cancellation** - - + **`receipt_url`** **\*** **string(300)** - + **Cancellation receipt URL. Availability varies by PG.** + + + - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - + + ```ts + { + // Response + } + ``` + + + ```ts + { + // Response + } + ``` +
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": { - "imp_uid": "string", - "merchant_uid": "string", - "pay_method": "string", - "channel": "pc", - "pg_provider": "string", - "emb_pg_provider": "string", - "pg_tid": "string", - "pg_id": "string", - "escrow": true, - "apply_num": "string", - "bank_code": "string", - "bank_name": "string", - "card_code": "string", - "card_name": "string", - "card_quota": 0, - "card_number": "string", - "card_type": "null", - "vbank_code": "string", - "vbank_name": "string", - "vbank_num": "string", - "vbank_holder": "string", - "vbank_date": 0, - "vbank_issued_at": 0, - "name": "string", - "amount": 0, - "cancel_amount": 0, - "currency": "string", - "buyer_name": "string", - "buyer_email": "string", - "buyer_tel": "string", - "buyer_addr": "string", - "buyer_postcode": "string", - "custom_data": "string", - "user_agent": "string", - "status": "ready", - "started_at": 0, - "paid_at": 0, - "failed_at": 0, - "cancelled_at": 0, - "fail_reason": "string", - "cancel_reason": "string", - "receipt_url": "string", - "cancel_history": [ - { - "pg_tid": "string", - "amount": 0, - "cancelled_at": 0, - "reason": "string", - "receipt_url": "string" - } - ], - "cancel_receipt_urls": [ - "string" - ], - "cash_receipt_issued": true, - "customer_uid": "string", - "customer_uid_usage": "issue" +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "imp_uid": "string", + "merchant_uid": "string", + "pay_method": "string", + "channel": "pc", + "pg_provider": "string", + "emb_pg_provider": "string", + "pg_tid": "string", + "pg_id": "string", + "escrow": true, + "apply_num": "string", + "bank_code": "string", + "bank_name": "string", + "card_code": "string", + "card_name": "string", + "card_quota": 0, + "card_number": "string", + "card_type": "null", + "vbank_code": "string", + "vbank_name": "string", + "vbank_num": "string", + "vbank_holder": "string", + "vbank_date": 0, + "vbank_issued_at": 0, + "name": "string", + "amount": 0, + "cancel_amount": 0, + "currency": "string", + "buyer_name": "string", + "buyer_email": "string", + "buyer_tel": "string", + "buyer_addr": "string", + "buyer_postcode": "string", + "custom_data": "string", + "user_agent": "string", + "status": "ready", + "started_at": 0, + "paid_at": 0, + "failed_at": 0, + "cancelled_at": 0, + "fail_reason": "string", + "cancel_reason": "string", + "receipt_url": "string", + "cancel_history": [ + { + "pg_tid": "string", + "amount": 0, + "cancelled_at": 0, + "reason": "string", + "receipt_url": "string" + } + ], + "cancel_receipt_urls": [ + "string" + ], + "cash_receipt_issued": true, + "customer_uid": "string", + "customer_uid_usage": "issue" + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/payments/getPaymentByImpUid**](https://api.iamport.kr/#!/payments/getPaymentByImpUid) + **Swagger Test Link** + [**https://api.iamport.kr/#!/payments/getPaymentByImpUid**](https://api.iamport.kr/#!/payments/getPaymentByImpUid) diff --git a/src/content/docs/en/api/payment-api/get-payments-api.mdx b/src/content/docs/en/api/payment-api/get-payments-api.mdx index 57bcdd178..52f4765a4 100644 --- a/src/content/docs/en/api/payment-api/get-payments-api.mdx +++ b/src/content/docs/en/api/payment-api/get-payments-api.mdx @@ -4,415 +4,402 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Gets the details of payments by multiple imp\_uids or merchant\_uids. +## Gets the details of payments by multiple imp\_uids or merchant\_uids. - -**Example call**\ -`/payments?imp_uid[]=imp_448280090638&imp_uid[]=imp_448280090639&merchant_uid[]=merchant_143434085216` - -Returns up to 100 - - - -### Parameters - -#### Query - - - - -**Transaction ID** - - - -Order ID - - - -### Responses - - - - -**`code`** **\***** ****integer** + + **Example call**\ + `/payments?imp_uid[]=imp_448280090638&imp_uid[]=imp_448280090639&merchant_uid[]=merchant_143434085216` -**Response code** + Returns up to 100 + -0: success, \ -Not 0: check the message + ### Parameters -**`message`** **\***** ****string** + #### Query -**Response message** + + **Transaction ID** + -A non-zero code includes a message like 'Invalid payment info. + + Order ID + -**`response`** **(Array\[PaymentAnnotation], optional)** + ### Responses - - + + + + **`code`** **\*** **integer** - - -**`code`** **\***** ****integer** + **Response code** -**`Response code`** + 0: success, \ + Not 0: check the message -0: success, Not 0: check the message + **`message`** **\*** **string** -**`message`** **\***** ****string** + **Response message** -**Response message** + A non-zero code includes a message like 'Invalid payment info. -A non-zero code includes a message like 'Invalid payment info. + **`response`** **(Array\[PaymentAnnotation], optional)** + + -**`imp_uid`** \* **string** + + + **`code`** **\*** **integer** -**i'mport payment transaction UID** + **`Response code`** -**`merchant_uid`** **\***** ****string** + 0: success, Not 0: check the message -**Order ID** + **`message`** **\*** **string** -**`pay_method`** **\***** ****string** + **Response message** -**Payment method code** + A non-zero code includes a message like 'Invalid payment info. -**`channel`** **\***** ****string** + **`imp_uid`** \* **string** -**Payment environment code** + **i'mport payment transaction UID** -- pc**:** (authenticated) PC -- mobile: (authenticated) mobile -- api: recurring or non-authenticated + **`merchant_uid`** **\*** **string** -**`pg_provider`** **\***** ****string** + **Order ID** -**PG code** + **`pay_method`** **\*** **string** ---- + **Payment method code** -**`emb_pg_provider`** **\***** ****string** + **`channel`** **\*** **string** -**Hub-type PG code** + **Payment environment code** -**`pg_tid`** **\*** **string** + - pc: (authenticated) PC + - mobile: (authenticated) mobile + - api: recurring or non-authenticated -**PG transaction ID** + **`pg_provider`** **\*** **string** -**`pg_id`** **\***** ****string** + **PG code** -**PG MID** + --- -**`escrow`** **boolean** + **`emb_pg_provider`** **\*** **string** -**Indicates an escrow payment** + **Hub-type PG code** -**`apply_num`** **string** + **`pg_tid`** **\*** **string** -**Credit card approval number** + **PG transaction ID** -**`bank_code`** **string** + **`pg_id`** **\*** **string** -**Bank code** + **PG MID** -**`bank_name`** **string** + **`escrow`** **boolean** -**Bank name** + **Indicates an escrow payment** ---- + **`apply_num`** **string** -**`card_code`** **string** + **Credit card approval number** -**Credit card code (KFTC Credit Card Codes:** [**link**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) ) + **`bank_code`** **string** -**`card_name`** **string** + **Bank code** -**Credit card name** + **`bank_name`** **string** -**`card_quota`** **integer** + **Bank name** -**Number of installments (0 means one-off)** + --- -**`card_number`** **string** + **`card_code`** **string** -**Masked credit card number** + **Credit card code (KFTC Credit Card Codes:** [**link**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) ) ---- + **`card_name`** **string** -**`card_type`** **string** + **Credit card name** -**Credit card type code** + **`card_quota`** **integer** -- 0: credit -- 1: check + **Number of installments (0 means one-off)** -**`vbank_code`** **string** + **`card_number`** **string** -**Virtual account bank code (refer to image below)** + **Masked credit card number** ---- + --- -**`vbank_name`** **string** + **`card_type`** **string** -**Refund virtual account** + **Credit card type code** -**`vbank_holder`** **string** + - 0: credit + - 1: check -**Refund virtual account holder** + **`vbank_code`** **string** -**`vbank_date`** **string** + **Virtual account bank code (refer to image below)** -**Refund virtual account expiration (UNIX timestamp)** + --- -**`vbank_issued_at`** **string** + **`vbank_name`** **string** -**Refund virtual account created at (UNIX timestamp)** + **Refund virtual account** -**`name`** **string** + **`vbank_holder`** **string** -**Product name** + **Refund virtual account holder** -**`amount`** **\*** **integer** + **`vbank_date`** **string** -**Order (payment) amount** + **Refund virtual account expiration (UNIX timestamp)** -**`cancel_amount`** **integer** + **`vbank_issued_at`** **string** -**Cancelled amount** + **Refund virtual account created at (UNIX timestamp)** -**`currency`** **string** + **`name`** **string** -**Currency** - -- USD -- KRW -- EUR - ---- + **Product name** -**`buyer_name`** **string** + **`amount`** **\*** **integer** -**Customer name** + **Order (payment) amount** -**`buyer_email`** **string** + **`cancel_amount`** **integer** -**Customer email**\ + **Cancelled amount** -**`buyer_tel`** **string** + **`currency`** **string** -**Customer phone** + **Currency** -**`buyer_addr`** **string** + - USD + - KRW + - EUR -**Customer address** + --- -**`buyer_postcode`** **string** + **`buyer_name`** **string** -**Customer zip code** + **Customer name** -**`custom_data`** **string** + **`buyer_email`** **string** -**echo data as JSON string** + **Customer email** -**`user_agent`** **string** + **`buyer_tel`** **string** -**UserAgent of the device where payment is initiated** + **Customer phone** -**`status`** **\***** ****string** + **`buyer_addr`** **string** -**Payment status code** + **Customer address** -- ready -- paid -- cancelled -- failed + **`buyer_postcode`** **string** -**`started_at`** **\*** **string** + **Customer zip code** -**Payment started at (UNIX timestamp)** + **`custom_data`** **string** -**`paid_at`** **\***** ****string** + **echo data as JSON string** -**Payment completed at (UNIX timestamp)**\ + **`user_agent`** **string** -**`failed_at`** **\***** ****string** + **UserAgent of the device where payment is initiated** -**Payment failed at (UNIX timestamp)** + **`status`** **\*** **string** -**`cancelled_at`** **\***** ****string** + **Payment status code** -**Payment cancelled at (UNIX timestamp)** + - ready + - paid + - cancelled + - failed -**`fail_reason`** **string** + **`started_at`** **\*** **string** -**Reason for failure** + **Payment started at (UNIX timestamp)** -**`cancel_reason`** **string** + **`paid_at`** **\*** **string** -**Reason for cancellation** + **Payment completed at (UNIX timestamp)** -**`receipt_url`** **string** + **`failed_at`** **\*** **string** -**Credit card receipt URL** + **Payment failed at (UNIX timestamp)** -**`cash_receipt_issued` ****boolean** + **`cancelled_at`** **\*** **string** -**Option to automatically issue cash receipt** + **Payment cancelled at (UNIX timestamp)** -**`customer_uid`** **string** + **`fail_reason`** **string** -**customer\_uid related to the payment transaction** + **Reason for failure** -**`customer_uid_usage`** **string** + **`cancel_reason`** **string** -**customer\_uid use code** + **Reason for cancellation** -- payment.scheduled: scheduled payment -- payment: payment -- issue**: billing key issuance** + **`receipt_url`** **string** -**`cancel_history`** **(Array\[PaymentCancelAnnotation], optional):** + **Credit card receipt URL** -**`Cancellation/partial cancellation history`** + **`cash_receipt_issued`****boolean** - - + **Option to automatically issue cash receipt** - - -**cancel\_history array \[]** + **`customer_uid`** **string** -**`pg_tid`** **\***** ****string** + **customer\_uid related to the payment transaction** -**PG cancellation transaction ID** + **`customer_uid_usage`** **string** -**`amount`** **\*** **integer** + **customer\_uid use code** -**Cancelled amount** + - payment.scheduled: scheduled payment + - payment: payment + - issue: billing key issuance -**`cancelled_at`** **\*** **string** + **`cancel_history`** **(Array\[PaymentCancelAnnotation], optional):** -**Cancelled at (UNIX timestamp)** + **`Cancellation/partial cancellation history`** + + -**`reason`** **\*** **string** + + + **cancel\_history array \[]** -**Reason for cancellation** + **`pg_tid`** **\*** **string** -**`receipt_url`** **\***** ****string** + **PG cancellation transaction ID** -**Cancellation receipt URL. Availability varies by PG.** + **`amount`** **\*** **integer** - - + **Cancelled amount** - + **`cancelled_at`** **\*** **string** - -```javascript -{ - // Response -} -``` + **Cancelled at (UNIX timestamp)** - + **`reason`** **\*** **string** - -```javascript -{ - // Response -} -``` + **Reason for cancellation** - + **`receipt_url`** **\*** **string** - + **Cancellation receipt URL. Availability varies by PG.** + + + -
-

Response Model Schema

+ + ```ts + { + // Response + } + ``` + -```json -{ - "code": 0, - "message": "string", - "response": [ + + ```ts { - "imp_uid": "string", - "merchant_uid": "string", - "pay_method": "string", - "channel": "pc", - "pg_provider": "string", - "emb_pg_provider": "string", - "pg_tid": "string", - "pg_id": "string", - "escrow": true, - "apply_num": "string", - "bank_code": "string", - "bank_name": "string", - "card_code": "string", - "card_name": "string", - "card_quota": 0, - "card_number": "string", - "card_type": "null", - "vbank_code": "string", - "vbank_name": "string", - "vbank_num": "string", - "vbank_holder": "string", - "vbank_date": 0, - "vbank_issued_at": 0, - "name": "string", - "amount": 0, - "cancel_amount": 0, - "currency": "string", - "buyer_name": "string", - "buyer_email": "string", - "buyer_tel": "string", - "buyer_addr": "string", - "buyer_postcode": "string", - "custom_data": "string", - "user_agent": "string", - "status": "ready", - "started_at": 0, - "paid_at": 0, - "failed_at": 0, - "cancelled_at": 0, - "fail_reason": "string", - "cancel_reason": "string", - "receipt_url": "string", - "cancel_history": [ - { - "pg_tid": "string", - "amount": 0, - "cancelled_at": 0, - "reason": "string", - "receipt_url": "string" - } - ], - "cancel_receipt_urls": [ - "string" - ], - "cash_receipt_issued": true, - "customer_uid": "string", - "customer_uid_usage": "issue" + // Response } - ] -} -``` + ``` + + +
+

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": [ + { + "imp_uid": "string", + "merchant_uid": "string", + "pay_method": "string", + "channel": "pc", + "pg_provider": "string", + "emb_pg_provider": "string", + "pg_tid": "string", + "pg_id": "string", + "escrow": true, + "apply_num": "string", + "bank_code": "string", + "bank_name": "string", + "card_code": "string", + "card_name": "string", + "card_quota": 0, + "card_number": "string", + "card_type": "null", + "vbank_code": "string", + "vbank_name": "string", + "vbank_num": "string", + "vbank_holder": "string", + "vbank_date": 0, + "vbank_issued_at": 0, + "name": "string", + "amount": 0, + "cancel_amount": 0, + "currency": "string", + "buyer_name": "string", + "buyer_email": "string", + "buyer_tel": "string", + "buyer_addr": "string", + "buyer_postcode": "string", + "custom_data": "string", + "user_agent": "string", + "status": "ready", + "started_at": 0, + "paid_at": 0, + "failed_at": 0, + "cancelled_at": 0, + "fail_reason": "string", + "cancel_reason": "string", + "receipt_url": "string", + "cancel_history": [ + { + "pg_tid": "string", + "amount": 0, + "cancelled_at": 0, + "reason": "string", + "receipt_url": "string" + } + ], + "cancel_receipt_urls": [ + "string" + ], + "cash_receipt_issued": true, + "customer_uid": "string", + "customer_uid_usage": "issue" + } + ] + } + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/payments/getPaymentListByImpUid**](https://api.iamport.kr/#!/payments/getPaymentListByImpUid) + **Swagger Test Link** + [**https://api.iamport.kr/#!/payments/getPaymentListByImpUid**](https://api.iamport.kr/#!/payments/getPaymentListByImpUid) diff --git a/src/content/docs/en/api/payment-api/get-payments-by-billing-key-api.mdx b/src/content/docs/en/api/payment-api/get-payments-by-billing-key-api.mdx index 37f052741..4825d451d 100644 --- a/src/content/docs/en/api/payment-api/get-payments-by-billing-key-api.mdx +++ b/src/content/docs/en/api/payment-api/get-payments-by-billing-key-api.mdx @@ -4,408 +4,393 @@ description: "" --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Gets payments made with the specified billing key. +## Gets payments made with the specified billing key. - - - - -### Parameters + -#### Path + ### Parameters - - + #### Path -**Billing key** + + + **Billing key** + + - + #### Query - + + **Paging page** -#### Query + Start from 1 + - -**Paging page** + ### Responses -Start from 1 + + + + **`code`** **\*** **integer** - + **Response code** -### Responses + 0: success, Not 0: check the message - - - -**`code`** **\***** ****integer** + **`message`** **\*** **string** -**Response code** + **Response message** -0: success, Not 0: check the message + A non-zero code includes a message like 'Invalid payment info'. -**`message`** **\***\*\* ****string\*\* + **`response`** **(Array\[PaymentAnnotation], optional)** + + -**Response message** + + + **`imp_uid`** \* **string** -A non-zero code includes a message like 'Invalid payment info'. + **i'mport payment transaction UID** -**`response`** **(Array\[PaymentAnnotation], optional)** + **`merchant_uid`** **\*** **string** - - + **Order ID** - - -**`imp_uid`** \* **string** + **`pay_method`** **\*** **string** -**i'mport payment transaction UID** + **Payment method code** -**`merchant_uid`** **\***\*\* ****string\*\* + **`channel`** **\*** **string** -**Order ID** + **Payment environment code** -**`pay_method`** **\***\*\* ****string\*\* + - pc: (authenticated) PC + - mobile: (authenticated) mobile + - api: recurring or non-authenticated -**Payment method code** + **`pg_provider`** **\*** **string** -**`channel`** **\***\*\* ****string\*\* + **PG code** -**Payment environment code** + --- -- pc**:** (authenticated) PC -- mobile: (authenticated) mobile -- api: recurring or non-authenticated + **`emb_pg_provider`** **\*** **string** -**`pg_provider`** **\***\*\* ****string\*\* + **Hub-type PG code** -**PG code** + **`pg_tid`** **\*** **string** ---- - -**`emb_pg_provider`** **\***\*\* ****string\*\* + **PG transaction ID** -**Hub-type PG code** + **`pg_id`** **\*** **string** -**`pg_tid`** **\*** **string** + **PG MID** -**PG transaction ID** + **`escrow`** **boolean** -**`pg_id`** **\***\*\* ****string\*\* + **Indicates an escrow payment** -**PG MID** + **`apply_num`** **string** -**`escrow`** **boolean** + **Credit card approval number** -**Indicates an escrow payment** + **`bank_code`** **string** -**`apply_num`** **string** + **Bank code** -**Credit card approval number** + **`bank_name`** **string** -**`bank_code`** **string** + **Bank name** -**Bank code** + --- -**`bank_name`** **string** + **`card_code`** **string** -**Bank name** + **Credit card code (KFTC Credit Card Codes:** [**link**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) ) ---- + **`card_name`** **string** -**`card_code`** **string** + **Credit card name** -**Credit card code (KFTC Credit Card Codes:** [**link**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) ) + **`card_quota`** **integer** -**`card_name`** **string** + **Number of installments (0 means one-off)** -**Credit card name** + **`card_number`** **string** -**`card_quota`** **integer** + **Masked credit card number** -**Number of installments (0 means one-off)** + --- -**`card_number`** **string** + **`card_type`** **string** -**Masked credit card number** + **Credit card type code** ---- + - 0: credit + - 1: check -**`card_type`** **string** + **`vbank_code`** **string** -**Credit card type code** + **Virtual account bank code (refer to image below)** -- 0: credit -- 1: check + --- -**`vbank_code`** **string** + **`vbank_name`** **string** -**Virtual account bank code (refer to image below)** + **Refund virtual account** ---- + **`vbank_holder`** **string** -**`vbank_name`** **string** + **Refund virtual account holder** -**Refund virtual account** + **`vbank_date`** **string** -**`vbank_holder`** **string** + **Refund virtual account expiration (UNIX timestamp)** -**Refund virtual account holder** + **`vbank_issued_at`** **string** -**`vbank_date`** **string** + **Refund virtual account created at (UNIX timestamp)** -**Refund virtual account expiration (UNIX timestamp)** + **`name`** **string** -**`vbank_issued_at`** **string** + **Product name** -**Refund virtual account created at (UNIX timestamp)** + **`amount`** **\*** **integer** -**`name`** **string** + **Order (payment) amount** -**Product name** + **`cancel_amount`** **integer** -**`amount`** **\*** **integer** + **Cancelled amount** -**Order (payment) amount** + **`currency`** **string** -**`cancel_amount`** **integer** + **Currency** -**Cancelled amount** + - USD + - KRW + - EUR -**`currency`** **string** + --- -**Currency** + **`buyer_name`** **string** -- USD -- KRW -- EUR + **Customer name** ---- + **`buyer_email`** **string** -**`buyer_name`** **string** + **Customer email** -**Customer name** + **`buyer_tel`** **string** -**`buyer_email`** **string** + **Customer phone** -**Customer email**\ + **`buyer_addr`** **string** -**`buyer_tel`** **string** + **Customer address** -**Customer phone** + **`buyer_postcode`** **string** -**`buyer_addr`** **string** + **Customer zip code** -**Customer address** + **`custom_data`** **string** -**`buyer_postcode`** **string** + **echo data as JSON string** -**Customer zip code** + **`user_agent`** **string** -**`custom_data`** **string** + **UserAgent of the device where payment is initiated** -**echo data as JSON string** + **`status`** **\*** **string** -**`user_agent`** **string** + **Payment status code** -**UserAgent of the device where payment is initiated** + - ready + - paid + - cancelled + - failed -**`status`** **\***\*\* ****string\*\* + **`started_at`** **\*** **string** -**Payment status code** + **Payment started at (UNIX timestamp)** -- ready -- paid -- cancelled -- failed + **`paid_at`** **\*** **string** -**`started_at`** **\*** **string** + **Payment completed at (UNIX timestamp)** -**Payment started at (UNIX timestamp)** + **`failed_at`** **\*** **string** -**`paid_at`** **\***\*\* ****string\*\* + **Payment failed at (UNIX timestamp)** -**Payment completed at (UNIX timestamp)**\ + **`cancelled_at`** **\*** **string** -**`failed_at`** **\***\*\* ****string\*\* + **Payment cancelled at (UNIX timestamp)** -**Payment failed at (UNIX timestamp)** + **`fail_reason`** **string** -**`cancelled_at`** **\***\*\* ****string\*\* + **Reason for failure** -**Payment cancelled at (UNIX timestamp)** + **`cancel_reason`** **string** -**`fail_reason`** **string** + **Reason for cancellation** -**Reason for failure** + **`receipt_url`** **string** -**`cancel_reason`** **string** + **Credit card receipt URL** -**Reason for cancellation** + **`cash_receipt_issued`** **boolean** -**`receipt_url`** **string** + **Option to automatically issue cash receipt** -**Credit card receipt URL** + **`customer_uid`** **string** -**`cash_receipt_issued` ****boolean** + **customer\_uid related to the payment transaction** -**Option to automatically issue cash receipt** + **`customer_uid_usage`** **string** -**`customer_uid`** **string** + **customer\_uid use code** -**customer_uid related to the payment transaction** + - payment.scheduled: scheduled payment + - payment: payment + - issue: billing key issuance -**`customer_uid_usage`** **string** + **`cancel_history`** **(Array\[PaymentCancelAnnotation], optional):** -**customer_uid use code** + **`Cancellation/partial cancellation history`** + + -- payment.scheduled: scheduled payment -- payment: payment -- issue**: billing key issuance** + + + **cancel\_history array \[]** -**`cancel_history`** **(Array\[PaymentCancelAnnotation], optional):** + **`pg_tid`** **\*** **string** -**`Cancellation/partial cancellation history`** + **PG cancellation transaction ID** - - + **`amount`** **\*** **integer** - - -**cancel\_history array \[]** + **Cancelled amount** -**`pg_tid`** **\***\*\* ****string\*\* + **`cancelled_at`** **\*** **string** -**PG cancellation transaction ID** + **Cancelled at (UNIX timestamp)** -**`amount`** **\*** **integer** + **`reason`** **\*** **string(256)** -**Cancelled amount** + **Reason for cancellation** -**`cancelled_at`** **\*** **string** + **`receipt_url`** **\*** **string(300)** -**Cancelled at (UNIX timestamp)** + **Cancellation receipt URL. Availability varies by PG.** + + + -**`reason`** **\*** **string(256)** - -**Reason for cancellation** - -**`receipt_url`** **\***\*\* ****string(300)\*\* - -**Cancellation receipt URL. Availability varies by PG.** - - - - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - + + ```ts + { + // Response + } + ``` + + + ```ts + { + // Response + } + ``` +
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": { - "total": 0, - "previous": 0, - "next": 0, - "list": [ - { - "imp_uid": "string", - "merchant_uid": "string", - "pay_method": "string", - "channel": "pc", - "pg_provider": "string", - "emb_pg_provider": "string", - "pg_tid": "string", - "pg_id": "string", - "escrow": true, - "apply_num": "string", - "bank_code": "string", - "bank_name": "string", - "card_code": "string", - "card_name": "string", - "card_quota": 0, - "card_number": "string", - "card_type": "null", - "vbank_code": "string", - "vbank_name": "string", - "vbank_num": "string", - "vbank_holder": "string", - "vbank_date": 0, - "vbank_issued_at": 0, - "name": "string", - "amount": 0, - "cancel_amount": 0, - "currency": "string", - "buyer_name": "string", - "buyer_email": "string", - "buyer_tel": "string", - "buyer_addr": "string", - "buyer_postcode": "string", - "custom_data": "string", - "user_agent": "string", - "status": "ready", - "started_at": 0, - "paid_at": 0, - "failed_at": 0, - "cancelled_at": 0, - "fail_reason": "string", - "cancel_reason": "string", - "receipt_url": "string", - "cancel_history": [ - { - "pg_tid": "string", - "amount": 0, - "cancelled_at": 0, - "reason": "string", - "receipt_url": "string" - } - ], - "cancel_receipt_urls": ["string"], - "cash_receipt_issued": true, - "customer_uid": "string", - "customer_uid_usage": "issue" - } - ] +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "total": 0, + "previous": 0, + "next": 0, + "list": [ + { + "imp_uid": "string", + "merchant_uid": "string", + "pay_method": "string", + "channel": "pc", + "pg_provider": "string", + "emb_pg_provider": "string", + "pg_tid": "string", + "pg_id": "string", + "escrow": true, + "apply_num": "string", + "bank_code": "string", + "bank_name": "string", + "card_code": "string", + "card_name": "string", + "card_quota": 0, + "card_number": "string", + "card_type": "null", + "vbank_code": "string", + "vbank_name": "string", + "vbank_num": "string", + "vbank_holder": "string", + "vbank_date": 0, + "vbank_issued_at": 0, + "name": "string", + "amount": 0, + "cancel_amount": 0, + "currency": "string", + "buyer_name": "string", + "buyer_email": "string", + "buyer_tel": "string", + "buyer_addr": "string", + "buyer_postcode": "string", + "custom_data": "string", + "user_agent": "string", + "status": "ready", + "started_at": 0, + "paid_at": 0, + "failed_at": 0, + "cancelled_at": 0, + "fail_reason": "string", + "cancel_reason": "string", + "receipt_url": "string", + "cancel_history": [ + { + "pg_tid": "string", + "amount": 0, + "cancelled_at": 0, + "reason": "string", + "receipt_url": "string" + } + ], + "cancel_receipt_urls": ["string"], + "cash_receipt_issued": true, + "customer_uid": "string", + "customer_uid_usage": "issue" + } + ] + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/subscribe.customer/customer_payments**](https://api.iamport.kr/#!/subscribe.customer/customer_payments) + **Swagger Test Link** + [**https://api.iamport.kr/#!/subscribe.customer/customer\_payments**](https://api.iamport.kr/#!/subscribe.customer/customer_payments) diff --git a/src/content/docs/en/api/payment-api/get-payments-by-order-id-status-all.mdx b/src/content/docs/en/api/payment-api/get-payments-by-order-id-status-all.mdx index c3729e6e0..a9e86f365 100644 --- a/src/content/docs/en/api/payment-api/get-payments-by-order-id-status-all.mdx +++ b/src/content/docs/en/api/payment-api/get-payments-by-order-id-status-all.mdx @@ -4,381 +4,366 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -Gets details of payments by order ID, status. This returns all transactions with the ID (for all -duplicate IDs). +## Gets details of payments by order ID, status. This returns all transactions with the ID (for all duplicate IDs). - -Returns all transactions with the ID (for all duplicate IDs). - - - -### Parameters - -#### Path - - - - -**Order ID** - - - - - -**Status code** - -ready - -paid - -failed - -cancelled + + Returns all transactions with the ID (for all duplicate IDs). + - + ### Parameters -#### Query + #### Path - -**Page number** + + + **Order ID** + + - - -**Search results per page** + + **Status code** - - -**Sort by code** + ready - + paid -### Responses + failed - - - -**`code`** **\*** **integer** + cancelled + -**Response code** + #### Query -0: success, Not 0: check the message + + **Page number** + -**`message`** **\*** **string** + + **Search results per page** + -**Response message** + + **Sort by code** + -A non-zero code includes a message like 'Invalid payment info'. + ### Responses -**`response`** **(PagedPaymentAnnotation, optional)** + + + + **`code`** **\*** **integer** - - + **Response code** - - -**`total`** **`*`** **`integer`** + 0: success, Not 0: check the message -**`Total search results`** + **`message`** **\*** **string** -**`previous`** **`*`** **`integer`** + **Response message** -**`Previous page number`** + A non-zero code includes a message like 'Invalid payment info'. -If none, 0 + **`response`** **(PagedPaymentAnnotation, optional)** + + -**`next`** **`*`** **`integer`** + + + **`total`** **`*`** **`integer`** -**`Next page number`** + **`Total search results`** -If none, 0 + **`previous`** **`*`** **`integer`** -**list ** **(Array\[PaymentAnnotation], optional)** + **`Previous page number`** -Array of payment records (up to 20) + If none, 0 - - + **`next`** **`*`** **`integer`** - - -**`imp_uid`** \* **string** + **`Next page number`** -**i'mport payment transaction UID** + If none, 0 -**`merchant_uid`** **\*** **string** + **list** **(Array\[PaymentAnnotation], optional)** -**Order ID** + Array of payment records (up to 20) + + -**`pay_method`** **\*** **string** + + + **`imp_uid`** \* **string** -**Payment method code** + **i'mport payment transaction UID** -**`channel`** **\*** **string** + **`merchant_uid`** **\*** **string** -**Payment environment code** + **Order ID** -- pc**:** (authenticated) PC -- mobile: (authenticated) mobile -- api: recurring or non-authenticated + **`pay_method`** **\*** **string** -**`pg_provider`** **\*** **string** + **Payment method code** -**PG code** + **`channel`** **\*** **string** ---- - -**`emb_pg_provider`** **\*** **string** - -**Hub-type PG code** - -**`pg_tid`** **\*** **string** + **Payment environment code** -**PG transaction ID** + - pc: (authenticated) PC + - mobile: (authenticated) mobile + - api: recurring or non-authenticated -**`pg_id`** **\*** **string** + **`pg_provider`** **\*** **string** -**PG MID** + **PG code** -**`escrow`** **boolean** + --- -**Indicates an escrow payment** + **`emb_pg_provider`** **\*** **string** -**`apply_num`** **string** + **Hub-type PG code** -**Credit card approval number** + **`pg_tid`** **\*** **string** -**`bank_code`** **string** + **PG transaction ID** -**Bank code** + **`pg_id`** **\*** **string** -**`bank_name`** **string** + **PG MID** -**Bank name** + **`escrow`** **boolean** ---- + **Indicates an escrow payment** -**`card_code`** **string** + **`apply_num`** **string** -**Credit card code (KFTC Credit Card Codes:** [ **link** ](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) ) + **Credit card approval number** -**`card_name`** **string** + **`bank_code`** **string** -**Credit card name** + **Bank code** -**`card_quota`** **integer** + **`bank_name`** **string** -**Number of installments (0 means one-off)** + **Bank name** -**`card_number`** **string** + --- -**Masked credit card number** + **`card_code`** **string** ---- + **Credit card code (KFTC Credit Card Codes:** [**link**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) ) -**`card_type`** **string** + **`card_name`** **string** -**Credit card type code** + **Credit card name** -- 0: credit -- 1: check + **`card_quota`** **integer** -**`vbank_code`** **string** + **Number of installments (0 means one-off)** -**Virtual account bank code (refer to image below)** + **`card_number`** **string** ---- + **Masked credit card number** -**`vbank_name`** **string** + --- -**Refund virtual account** + **`card_type`** **string** -**`vbank_holder`** **string** + **Credit card type code** -**Refund virtual account holder** + - 0: credit + - 1: check -**`vbank_date`** **string** + **`vbank_code`** **string** -**Refund virtual account expiration (UNIX timestamp)** + **Virtual account bank code (refer to image below)** -**`vbank_issued_at`** **string** + --- -**Refund virtual account created at (UNIX timestamp)** + **`vbank_name`** **string** -**`name`** **string** + **Refund virtual account** -**Product name** + **`vbank_holder`** **string** -**`amount`** **\*** **integer** + **Refund virtual account holder** -**Order (payment) amount** + **`vbank_date`** **string** -**`cancel_amount`** **integer** + **Refund virtual account expiration (UNIX timestamp)** -**Cancelled amount** + **`vbank_issued_at`** **string** -**`currency`** **string** + **Refund virtual account created at (UNIX timestamp)** -**Currency** + **`name`** **string** -- USD -- KRW -- EUR + **Product name** ---- + **`amount`** **\*** **integer** -**`buyer_name`** **string** + **Order (payment) amount** -**Customer name** + **`cancel_amount`** **integer** -**`buyer_email`** **string** + **Cancelled amount** -**Customer email**\ + **`currency`** **string** -**`buyer_tel`** **string** + **Currency** -**Customer phone** + - USD + - KRW + - EUR -**`buyer_addr`** **string** + --- -**Customer address** + **`buyer_name`** **string** -**`buyer_postcode`** **string** + **Customer name** -**Customer zip code** + **`buyer_email`** **string** -**`custom_data`** **string** + **Customer email** -**echo data as JSON string** + **`buyer_tel`** **string** -**`user_agent`** **string** + **Customer phone** -**UserAgent of the device where payment is initiated** + **`buyer_addr`** **string** -**`status`** **\*** **string** + **Customer address** -**Payment status code** + **`buyer_postcode`** **string** -- ready -- paid -- cancelled -- failed + **Customer zip code** -**`started_at`** **\*** **string** + **`custom_data`** **string** -**Payment started at (UNIX timestamp)** + **echo data as JSON string** -**`paid_at`** **\*** **string** + **`user_agent`** **string** -**Payment completed at (UNIX timestamp)**\ + **UserAgent of the device where payment is initiated** -**`failed_at`** **\*** **string** + **`status`** **\*** **string** -**Payment failed at (UNIX timestamp)** + **Payment status code** -**`cancelled_at`** **\*** **string** + - ready + - paid + - cancelled + - failed -**Payment cancelled at (UNIX timestamp)** + **`started_at`** **\*** **string** -**`fail_reason`** **string** + **Payment started at (UNIX timestamp)** -**Reason for failure** + **`paid_at`** **\*** **string** -**`cancel_reason`** **string** + **Payment completed at (UNIX timestamp)** -**Reason for cancellation** + **`failed_at`** **\*** **string** -**`receipt_url`** **string** + **Payment failed at (UNIX timestamp)** -**Credit card receipt URL** + **`cancelled_at`** **\*** **string** -**`cash_receipt_issued`** **boolean** + **Payment cancelled at (UNIX timestamp)** -**Option to automatically issue cash receipt** + **`fail_reason`** **string** -**`customer_uid`** **string** + **Reason for failure** -**customer\_uid related to the payment transaction** + **`cancel_reason`** **string** -**`customer_uid_usage`** **string** + **Reason for cancellation** -**customer\_uid use code** + **`receipt_url`** **string** -- payment.scheduled: scheduled payment -- payment: payment -- issue**: billing key issuance** + **Credit card receipt URL** -**`cancel_history`** **(Array\[PaymentCancelAnnotation], optional):** + **`cash_receipt_issued`** **boolean** -**`Cancellation/partial cancellation history`** + **Option to automatically issue cash receipt** - - + **`customer_uid`** **string** - - -**cancel\_history array \[]** + **customer\_uid related to the payment transaction** -**`pg_tid`** **\*** **string** + **`customer_uid_usage`** **string** -**PG cancellation transaction ID** + **customer\_uid use code** -**`amount`** **\*** **integer** + - payment.scheduled: scheduled payment + - payment: payment + - issue: billing key issuance -**Cancelled amount** + **`cancel_history`** **(Array\[PaymentCancelAnnotation], optional):** -**`cancelled_at`** **\*** **string** + **`Cancellation/partial cancellation history`** + + -**Cancelled at (UNIX timestamp)** + + + **cancel\_history array \[]** -**`reason`** **\*** **string(256)** + **`pg_tid`** **\*** **string** -**Reason for cancellation** + **PG cancellation transaction ID** -**`receipt_url`** **\*** **string(300)** + **`amount`** **\*** **integer** -**Cancellation receipt URL. Availability varies by PG.** + **Cancelled amount** - - + **`cancelled_at`** **\*** **string** - + **Cancelled at (UNIX timestamp)** - -```javascript -{ - // Response -} -``` + **`reason`** **\*** **string(256)** - + **Reason for cancellation** - -```javascript -{ - // Response -} -``` + **`receipt_url`** **\*** **string(300)** - + **Cancellation receipt URL. Availability varies by PG.** + + + - -```javascript -{ - // Response -} -``` + + ```ts + { + // Response + } + ``` + - + + ```ts + { + // Response + } + ``` + + + ```ts + { + // Response + } + ``` + ### **Key request parameter description** @@ -389,94 +374,101 @@ Array of payment records (up to 20) > > A minus (-) indicates a descending sort order. > -> - \-started : Sort in descending order (DESC) based on payment start time (payment window open time) -> - started : Sort in ascending order (ASC) based on payment start time (payment window open time) -> - \-paid : Sort in descending order (DESC) based on payment completion time +> - -started : Sort in descending order (DESC) +> based on payment start time (payment window open time) +> +> - started : Sort in ascending order (ASC) +> based on payment start time (payment window open time) +> +> - -paid : Sort in descending order (DESC) based on payment completion time +> > - paid: Sort in ascending order (ASC) based on payment completion time -> - \-updated : Sort in descending order (DESC) based on the last modification time (the modification time is changed whenever payment status changes) -> - updated : Sort in ascending order (ASC) based on the last modification time (the modification time is changed whenever payment status changes) +> +> - -updated : Sort in descending order (DESC) based on the last modification time +> (the modification time is changed whenever payment status changes) +> +> - updated : Sort in ascending order (ASC) based on the last modification time +> (the modification time is changed whenever payment status changes)
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": { - "total": 0, - "previous": 0, - "next": 0, - "list": [ - { - "imp_uid": "string", - "merchant_uid": "string", - "pay_method": "string", - "channel": "pc", - "pg_provider": "string", - "emb_pg_provider": "string", - "pg_tid": "string", - "pg_id": "string", - "escrow": true, - "apply_num": "string", - "bank_code": "string", - "bank_name": "string", - "card_code": "string", - "card_name": "string", - "card_quota": 0, - "card_number": "string", - "card_type": "null", - "vbank_code": "string", - "vbank_name": "string", - "vbank_num": "string", - "vbank_holder": "string", - "vbank_date": 0, - "vbank_issued_at": 0, - "name": "string", - "amount": 0, - "cancel_amount": 0, - "currency": "string", - "buyer_name": "string", - "buyer_email": "string", - "buyer_tel": "string", - "buyer_addr": "string", - "buyer_postcode": "string", - "custom_data": "string", - "user_agent": "string", - "status": "ready", - "started_at": 0, - "paid_at": 0, - "failed_at": 0, - "cancelled_at": 0, - "fail_reason": "string", - "cancel_reason": "string", - "receipt_url": "string", - "cancel_history": [ - { - "pg_tid": "string", - "amount": 0, - "cancelled_at": 0, - "reason": "string", - "receipt_url": "string" - } - ], - "cancel_receipt_urls": [ - "string" - ], - "cash_receipt_issued": true, - "customer_uid": "string", - "customer_uid_usage": "issue" - } - ] +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "total": 0, + "previous": 0, + "next": 0, + "list": [ + { + "imp_uid": "string", + "merchant_uid": "string", + "pay_method": "string", + "channel": "pc", + "pg_provider": "string", + "emb_pg_provider": "string", + "pg_tid": "string", + "pg_id": "string", + "escrow": true, + "apply_num": "string", + "bank_code": "string", + "bank_name": "string", + "card_code": "string", + "card_name": "string", + "card_quota": 0, + "card_number": "string", + "card_type": "null", + "vbank_code": "string", + "vbank_name": "string", + "vbank_num": "string", + "vbank_holder": "string", + "vbank_date": 0, + "vbank_issued_at": 0, + "name": "string", + "amount": 0, + "cancel_amount": 0, + "currency": "string", + "buyer_name": "string", + "buyer_email": "string", + "buyer_tel": "string", + "buyer_addr": "string", + "buyer_postcode": "string", + "custom_data": "string", + "user_agent": "string", + "status": "ready", + "started_at": 0, + "paid_at": 0, + "failed_at": 0, + "cancelled_at": 0, + "fail_reason": "string", + "cancel_reason": "string", + "receipt_url": "string", + "cancel_history": [ + { + "pg_tid": "string", + "amount": 0, + "cancelled_at": 0, + "reason": "string", + "receipt_url": "string" + } + ], + "cancel_receipt_urls": [ + "string" + ], + "cash_receipt_issued": true, + "customer_uid": "string", + "customer_uid_usage": "issue" + } + ] + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/payments/getAllPaymentsByMerchantUid**](https://api.iamport.kr/#!/payments/getAllPaymentsByMerchantUid) + **Swagger Test Link** + [**https://api.iamport.kr/#!/payments/getAllPaymentsByMerchantUid**](https://api.iamport.kr/#!/payments/getAllPaymentsByMerchantUid) diff --git a/src/content/docs/en/api/payment-api/get-payments-by-order-id-status-top-1.mdx b/src/content/docs/en/api/payment-api/get-payments-by-order-id-status-top-1.mdx index 559444004..068cf5b94 100644 --- a/src/content/docs/en/api/payment-api/get-payments-by-order-id-status-top-1.mdx +++ b/src/content/docs/en/api/payment-api/get-payments-by-order-id-status-top-1.mdx @@ -4,338 +4,326 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Gets details of payments by order ID, status. This returns top 1 transaction based on the sort order. +## Gets details of payments by order ID, status. This returns top 1 transaction based on the sort order. - -If you specify the payment_status, this returns the latest data for the status. - - - -### Parameters - -#### Path - - - - -**Order ID** - - - - - -**Status code** - -`ready` - -`paid` - -`failed` + + If you specify the payment\_status, this returns the latest data for the status. + -`cancelled` + ### Parameters - + #### Path -#### Query + + + **Order ID** + + - -`Sort by code` + + **Status code** - + `ready` -### Responses + `paid` - - - -**`code`** **\***** ****integer** + `failed` -**Response code** + `cancelled` + -0: success, Not 0: check the message + #### Query -**`message`** **\***** ****string** + + `Sort by code` + -**Response message** + ### Responses -A non-zero code includes a message like 'Invalid payment info'. + + + + **`code`** **\*** **integer** -**`response`** **(PagedPaymentAnnotation, optional)** + **Response code** - - + 0: success, Not 0: check the message - - -**`imp_uid`** \* **string** + **`message`** **\*** **string** -**i'mport payment transaction UID** + **Response message** -**`merchant_uid`** **\***** ****string** + A non-zero code includes a message like 'Invalid payment info'. -**Order ID** + **`response`** **(PagedPaymentAnnotation, optional)** + + -**`pay_method`** **\***** ****string** + + + **`imp_uid`** \* **string** -**Payment method code** + **i'mport payment transaction UID** -**`channel`** **\***** ****string** + **`merchant_uid`** **\*** **string** -**Payment environment code** + **Order ID** -- pc**:** (authenticated) PC -- mobile: (authenticated) mobile -- api: recurring or non-authenticated + **`pay_method`** **\*** **string** -**`pg_provider`** **\***** ****string** + **Payment method code** -**PG code** + **`channel`** **\*** **string** ---- + **Payment environment code** -**`emb_pg_provider`** **\***** ****string** + - pc: (authenticated) PC + - mobile: (authenticated) mobile + - api: recurring or non-authenticated -**Hub-type PG code** + **`pg_provider`** **\*** **string** -**`pg_tid`** **\*** **string** + **PG code** -**PG transaction ID** + --- -**`pg_id`** **\***** ****string** + **`emb_pg_provider`** **\*** **string** -**PG MID** + **Hub-type PG code** -**`escrow`** **boolean** + **`pg_tid`** **\*** **string** -**Indicates an escrow payment** + **PG transaction ID** -**`apply_num`** **string** + **`pg_id`** **\*** **string** -**Credit card approval number** + **PG MID** -**`bank_code`** **string** + **`escrow`** **boolean** -**Bank code** + **Indicates an escrow payment** -**`bank_name`** **string** + **`apply_num`** **string** -**Bank name** + **Credit card approval number** ---- + **`bank_code`** **string** -**`card_code`** **string** + **Bank code** -**Credit card code (KFTC Credit Card Codes:** [**link**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) ) + **`bank_name`** **string** -**`card_name`** **string** + **Bank name** -**Credit card name** + --- -**`card_quota`** **integer** + **`card_code`** **string** -**Number of installments (0 means one-off)** + **Credit card code (KFTC Credit Card Codes:** [**link**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) ) -**`card_number`** **string** + **`card_name`** **string** -**Masked credit card number** + **Credit card name** ---- + **`card_quota`** **integer** -**`card_type`** **string** + **Number of installments (0 means one-off)** -**Credit card type code** + **`card_number`** **string** -- 0: credit -- 1: check + **Masked credit card number** -**`vbank_code`** **string** + --- -**Virtual account bank code (refer to image below)** + **`card_type`** **string** ---- + **Credit card type code** -**`vbank_name`** **string** + - 0: credit + - 1: check -**Refund virtual account** + **`vbank_code`** **string** -**`vbank_holder`** **string** + **Virtual account bank code (refer to image below)** -**Refund virtual account holder** + --- -**`vbank_date`** **string** + **`vbank_name`** **string** -**Refund virtual account expiration (UNIX timestamp)** + **Refund virtual account** -**`vbank_issued_at`** **string** + **`vbank_holder`** **string** -**Refund virtual account created at (UNIX timestamp)** + **Refund virtual account holder** -**`name`** **string** + **`vbank_date`** **string** -**Product name** + **Refund virtual account expiration (UNIX timestamp)** -**`amount`** **\*** **integer** + **`vbank_issued_at`** **string** -**Order (payment) amount** + **Refund virtual account created at (UNIX timestamp)** -**`cancel_amount`** **integer** + **`name`** **string** -**Cancelled amount** + **Product name** -**`currency`** **string** + **`amount`** **\*** **integer** -**Currency** - -- USD -- KRW -- EUR - ---- + **Order (payment) amount** -**`buyer_name`** **string** + **`cancel_amount`** **integer** -**Customer name** + **Cancelled amount** -**`buyer_email`** **string** + **`currency`** **string** -**Customer email**\ + **Currency** -**`buyer_tel`** **string** + - USD + - KRW + - EUR -**Customer phone** + --- -**`buyer_addr`** **string** + **`buyer_name`** **string** -**Customer address** + **Customer name** -**`buyer_postcode`** **string** + **`buyer_email`** **string** -**Customer zip code** + **Customer email**\\ -**`custom_data`** **string** + **`buyer_tel`** **string** -**echo data as JSON string** + **Customer phone** -**`user_agent`** **string** + **`buyer_addr`** **string** -**UserAgent of the device where payment is initiated** + **Customer address** -**`status`** **\***** ****string** + **`buyer_postcode`** **string** -**Payment status code** + **Customer zip code** -- ready -- paid -- cancelled -- failed + **`custom_data`** **string** -**`started_at`** **\*** **string** + **echo data as JSON string** -**Payment started at (UNIX timestamp)** + **`user_agent`** **string** -**`paid_at`** **\***** ****string** + **UserAgent of the device where payment is initiated** -**Payment completed at (UNIX timestamp)**\ + **`status`** **\*** **string** -**`failed_at`** **\***** ****string** + **Payment status code** -**Payment failed at (UNIX timestamp)** + - ready + - paid + - cancelled + - failed -**`cancelled_at`** **\***** ****string** + **`started_at`** **\*** **string** -**Payment cancelled at (UNIX timestamp)** + **Payment started at (UNIX timestamp)** -**`fail_reason`** **string** + **`paid_at`** **\*** **string** -**Reason for failure** + **Payment completed at (UNIX timestamp)**\\ -**`cancel_reason`** **string** + **`failed_at`** **\*** **string** -**Reason for cancellation** + **Payment failed at (UNIX timestamp)** -**`receipt_url`** **string** + **`cancelled_at`** **\*** **string** -**Credit card receipt URL** + **Payment cancelled at (UNIX timestamp)** -**`cash_receipt_issued` ****boolean** + **`fail_reason`** **string** -**Option to automatically issue cash receipt** + **Reason for failure** -**`customer_uid`** **string** + **`cancel_reason`** **string** -**customer\_uid related to the payment transaction** + **Reason for cancellation** -**`customer_uid_usage`** **string** + **`receipt_url`** **string** -**customer\_uid use code** + **Credit card receipt URL** -- payment.scheduled: scheduled payment -- payment: payment -- issue**: billing key issuance** + **`cash_receipt_issued`** **boolean** -**`cancel_history`** **(Array\[PaymentCancelAnnotation], optional):** + **Option to automatically issue cash receipt** -**`Cancellation/partial cancellation history`** + **`customer_uid`** **string** - - + **customer\_uid related to the payment transaction** - - -**cancel\_history array \[]** + **`customer_uid_usage`** **string** -**`pg_tid`** **\***** ****string** + **customer\_uid use code** -**PG cancellation transaction ID** + - payment.scheduled: scheduled payment + - payment: payment + - issue: billing key issuance -**`amount`** **\*** **integer** + **`cancel_history`** **(Array\[PaymentCancelAnnotation], optional):** -**Cancelled amount** + **`Cancellation/partial cancellation history`** + + -**`cancelled_at`** **\*** **string** + + + **cancel\_history array \[]** -**Cancelled at (UNIX timestamp)** + **`pg_tid`** **\*** **string** -**`reason`** **\*** **string(256)** + **PG cancellation transaction ID** -**Reason for cancellation** + **`amount`** **\*** **integer** -**`receipt_url`** **\***** ****string(300)** + **Cancelled amount** -**Cancellation receipt URL. Availability varies by PG.** + **`cancelled_at`** **\*** **string** - - + **Cancelled at (UNIX timestamp)** - + **`reason`** **\*** **string(256)** - -```javascript -{ - // Response -} -``` + **Reason for cancellation** - + **`receipt_url`** **\*** **string(300)** - -```javascript -{ - // Response -} -``` + **Cancellation receipt URL. Availability varies by PG.** + + + - + + ```ts + { + // Response + } + ``` + + + ```ts + { + // Response + } + ``` + ### **Key request parameter description** @@ -346,87 +334,93 @@ A non-zero code includes a message like 'Invalid payment info'. > > A minus (-) indicates a descending sort order. > -> - \-started : Sort in descending order (DESC) based on payment start time (payment window open time) +> - -started : Sort in descending order (DESC) +> based on payment start time (payment window open time) +> > - started : Sort in ascending order (ASC) based on payment start time (payment window open time) -> - \-paid : Sort in descending order (DESC) based on payment completion time +> +> - -paid : Sort in descending order (DESC) based on payment completion time +> > - paid: Sort in ascending order (ASC) based on payment completion time -> - \-updated : Sort in descending order (DESC) based on the last modification time (the modification time is changed whenever payment status changes) -> - updated : Sort in ascending order (ASC) based on the last modification time (the modification time is changed whenever payment status changes +> +> - -updated : Sort in descending order (DESC) based on the last modification time +> (the modification time is changed whenever payment status changes) +> +> - updated : Sort in ascending order (ASC) based on the last modification time +> (the modification time is changed whenever payment status changes)
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": { - "imp_uid": "string", - "merchant_uid": "string", - "pay_method": "string", - "channel": "pc", - "pg_provider": "string", - "emb_pg_provider": "string", - "pg_tid": "string", - "pg_id": "string", - "escrow": true, - "apply_num": "string", - "bank_code": "string", - "bank_name": "string", - "card_code": "string", - "card_name": "string", - "card_quota": 0, - "card_number": "string", - "card_type": "null", - "vbank_code": "string", - "vbank_name": "string", - "vbank_num": "string", - "vbank_holder": "string", - "vbank_date": 0, - "vbank_issued_at": 0, - "name": "string", - "amount": 0, - "cancel_amount": 0, - "currency": "string", - "buyer_name": "string", - "buyer_email": "string", - "buyer_tel": "string", - "buyer_addr": "string", - "buyer_postcode": "string", - "custom_data": "string", - "user_agent": "string", - "status": "ready", - "started_at": 0, - "paid_at": 0, - "failed_at": 0, - "cancelled_at": 0, - "fail_reason": "string", - "cancel_reason": "string", - "receipt_url": "string", - "cancel_history": [ - { - "pg_tid": "string", - "amount": 0, - "cancelled_at": 0, - "reason": "string", - "receipt_url": "string" - } - ], - "cancel_receipt_urls": [ - "string" - ], - "cash_receipt_issued": true, - "customer_uid": "string", - "customer_uid_usage": "issue" +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "imp_uid": "string", + "merchant_uid": "string", + "pay_method": "string", + "channel": "pc", + "pg_provider": "string", + "emb_pg_provider": "string", + "pg_tid": "string", + "pg_id": "string", + "escrow": true, + "apply_num": "string", + "bank_code": "string", + "bank_name": "string", + "card_code": "string", + "card_name": "string", + "card_quota": 0, + "card_number": "string", + "card_type": "null", + "vbank_code": "string", + "vbank_name": "string", + "vbank_num": "string", + "vbank_holder": "string", + "vbank_date": 0, + "vbank_issued_at": 0, + "name": "string", + "amount": 0, + "cancel_amount": 0, + "currency": "string", + "buyer_name": "string", + "buyer_email": "string", + "buyer_tel": "string", + "buyer_addr": "string", + "buyer_postcode": "string", + "custom_data": "string", + "user_agent": "string", + "status": "ready", + "started_at": 0, + "paid_at": 0, + "failed_at": 0, + "cancelled_at": 0, + "fail_reason": "string", + "cancel_reason": "string", + "receipt_url": "string", + "cancel_history": [ + { + "pg_tid": "string", + "amount": 0, + "cancelled_at": 0, + "reason": "string", + "receipt_url": "string" + } + ], + "cancel_receipt_urls": [ + "string" + ], + "cash_receipt_issued": true, + "customer_uid": "string", + "customer_uid_usage": "issue" + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/payments/getPaymentByMerchantUid**](https://api.iamport.kr/#!/payments/getPaymentByMerchantUid) + **Swagger Test Link** + [**https://api.iamport.kr/#!/payments/getPaymentByMerchantUid**](https://api.iamport.kr/#!/payments/getPaymentByMerchantUid) diff --git a/src/content/docs/en/api/payment-api/get-payments-by-status-api.mdx b/src/content/docs/en/api/payment-api/get-payments-by-status-api.mdx index d286b02db..b505e0455 100644 --- a/src/content/docs/en/api/payment-api/get-payments-by-status-api.mdx +++ b/src/content/docs/en/api/payment-api/get-payments-by-status-api.mdx @@ -4,381 +4,370 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Gets details of payments by payment status. +## Gets details of payments by payment status. - -The search period is up to **90** days. The default value of the `to` parameter is the current date, and that of the `from` parameter is 90 days before the `to` parameter. - -If `from`/`to` parameters are not specified, this returns the data for the last 90 days from the current time. - - - -### Parameters + + The search period is up to **90** days. The default value of the `to` parameter is the current date, and that of the `from` parameter is 90 days before the `to` parameter. -#### Path + If `from`/`to` parameters are not specified, this returns the data for the last 90 days from the current time. + - -**Payment status code** + ### Parameters -**all**\ -**ready**\ -**paid**\ -**cancelled**\ -**failed** + #### Path - + + **Payment status code** -#### Query + **all**\ + **ready**\ + **paid**\ + **cancelled**\ + **failed** + - -**Page number** + #### Query -Starts from 1 + + **Page number** - - -**Search results per page** + Starts from 1 + -Up to 1000, default: 20 + + **Search results per page** - - -**Search start time** + Up to 1000, default: 20 + -Default: 90 days before `to` parameter (UNIX timestamp) + + **Search start time** - - -**Search end time** + Default: 90 days before `to` parameter (UNIX timestamp) + -Default: current time (UNIX timestamp) + + **Search end time** - - -**Sort by** + Default: current time (UNIX timestamp) + -Default: started (Refer to description below) + + **Sort by** - + Default: started (Refer to description below) + -### Responses + ### Responses - - - -**`code`** **\*** **integer** + + + + **`code`** **\*** **integer** -**Response code** + **Response code** -0: success, Not 0: check the message + 0: success, Not 0: check the message -**`message`** **\*** **string** + **`message`** **\*** **string** -**Response message** + **Response message** -A non-zero code includes a message like 'Invalid payment info'. + A non-zero code includes a message like 'Invalid payment info'. -**`response`** **(PagedPaymentAnnotation, optional)** + **`response`** **(PagedPaymentAnnotation, optional)** + + - - + + + **`total`` `** **`*`** **`integer`** - - -**`total`` `** **`*`** **`integer`** + **`Total search results`** -**`Total search results`** + **`previous`** **`*`** **`integer`** -**`previous`** **`*`** **`integer`** + **`Previous page number`** -**`Previous page number`** + If none, 0 -If none, 0 + **`next`** **`*`** **`integer`** -**`next`** **`*`** **`integer`** + **`Next page number`** -**`Next page number`** + If none, 0 -If none, 0 + list **(Array\[PaymentAnnotation], optional)** -**list ** **(Array\[PaymentAnnotation], optional)** + Array of payment records (up to 20) + + -Array of payment records (up to 20) + + + **`imp_uid`** \* **string** - - + **i'mport payment transaction UID** - - -**`imp_uid`** \* **string** + **`merchant_uid`** **\*** **string** -**i'mport payment transaction UID** + **Order ID** -**`merchant_uid`** **\*** **string** + **`pay_method`** **\*** **string** -**Order ID** + **Payment method code** -**`pay_method`** **\*** **string** + **`channel`** **\*** **string** -**Payment method code** + **Payment environment code** -**`channel`** **\*** **string** + - pc: (authenticated) PC + - mobile: (authenticated) mobile + - api: recurring or non-authenticated -**Payment environment code** + **`pg_provider`** **\*** **string** -- pc**:** (authenticated) PC -- mobile: (authenticated) mobile -- api: recurring or non-authenticated + **PG code** -**`pg_provider`** **\*** **string** + --- -**PG code** + **`emb_pg_provider`** **\*** **string** ---- + **Hub-type PG code** -**`emb_pg_provider`** **\*** **string** + **`pg_tid`** **\*** **string** -**Hub-type PG code** + **PG transaction ID** -**`pg_tid`** **\*** **string** + **`pg_id`** **\*** **string** -**PG transaction ID** + **PG MID** -**`pg_id`** **\*** **string** + **`escrow`** **boolean** -**PG MID** + **Indicates an escrow payment** -**`escrow`** **boolean** + **`apply_num`** **string** -**Indicates an escrow payment** + **Credit card approval number** -**`apply_num`** **string** + **`bank_code`** **string** -**Credit card approval number** + **Bank code** -**`bank_code`** **string** + **`bank_name`** **string** -**Bank code** + **Bank name** -**`bank_name`** **string** + --- -**Bank name** + **`card_code`** **string** ---- + **Credit card code (KFTC Credit Card Codes:** [**link**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) ) -**`card_code`** **string** + **`card_name`** **string** -**Credit card code (KFTC Credit Card Codes:** [ **link** ](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) ) + **Credit card name** -**`card_name`** **string** + **`card_quota`** **integer** -**Credit card name** + **Number of installments (0 means one-off)** -**`card_quota`** **integer** + **`card_number`** **string** -**Number of installments (0 means one-off)** + **Masked credit card number** -**`card_number`** **string** + --- -**Masked credit card number** + **`card_type`** **string** ---- + **Credit card type code** -**`card_type`** **string** + - 0: credit + - 1: check -**Credit card type code** + **`vbank_code`** **string** -- 0: credit -- 1: check + **Virtual account bank code (refer to image below)** -**`vbank_code`** **string** + --- -**Virtual account bank code (refer to image below)** + **`vbank_name`** **string** ---- + **Refund virtual account** -**`vbank_name`** **string** + **`vbank_holder`** **string** -**Refund virtual account** + **Refund virtual account holder** -**`vbank_holder`** **string** + **`vbank_date`** **string** -**Refund virtual account holder** + **Refund virtual account expiration (UNIX timestamp)** -**`vbank_date`** **string** + **`vbank_issued_at`** **string** -**Refund virtual account expiration (UNIX timestamp)** + **Refund virtual account created at (UNIX timestamp)** -**`vbank_issued_at`** **string** + **`name`** **string** -**Refund virtual account created at (UNIX timestamp)** + **Product name** -**`name`** **string** + **`amount`** **\*** **integer** -**Product name** + **Order (payment) amount** -**`amount`** **\*** **integer** + **`cancel_amount`** **integer** -**Order (payment) amount** + **Cancelled amount** -**`cancel_amount`** **integer** + **`currency`** **string** -**Cancelled amount** + **Currency** -**`currency`** **string** + - USD + - KRW + - EUR -**Currency** - -- USD -- KRW -- EUR - ---- + --- -**`buyer_name`** **string** + **`buyer_name`** **string** -**Customer name** + **Customer name** -**`buyer_email`** **string** + **`buyer_email`** **string** -**Customer email**\ + **Customer email** -**`buyer_tel`** **string** + **`buyer_tel`** **string** -**Customer phone** + **Customer phone** -**`buyer_addr`** **string** + **`buyer_addr`** **string** -**Customer address** + **Customer address** -**`buyer_postcode`** **string** + **`buyer_postcode`** **string** -**Customer zip code** + **Customer zip code** -**`custom_data`** **string** + **`custom_data`** **string** -**echo data as JSON string** + **echo data as JSON string** -**`user_agent`** **string** + **`user_agent`** **string** -**UserAgent of the device where payment is initiated** + **UserAgent of the device where payment is initiated** -**`status`** **\*** **string** + **`status`** **\*** **string** -**Payment status code** + **Payment status code** -- ready -- paid -- cancelled -- failed + - ready + - paid + - cancelled + - failed -**`started_at`** **\*** **string** + **`started_at`** **\*** **string** -**Payment started at (UNIX timestamp)** + **Payment started at (UNIX timestamp)** -**`paid_at`** **\*** **string** + **`paid_at`** **\*** **string** -**Payment completed at (UNIX timestamp)**\ + **Payment completed at (UNIX timestamp)** -**`failed_at`** **\*** **string** + **`failed_at`** **\*** **string** -**Payment failed at (UNIX timestamp)** + **Payment failed at (UNIX timestamp)** -**`cancelled_at`** **\*** **string** + **`cancelled_at`** **\*** **string** -**Payment cancelled at (UNIX timestamp)** + **Payment cancelled at (UNIX timestamp)** -**`fail_reason`** **string** + **`fail_reason`** **string** -**Reason for failure** + **Reason for failure** -**`cancel_reason`** **string** + **`cancel_reason`** **string** -**Reason for cancellation** + **Reason for cancellation** -**`receipt_url`** **string** + **`receipt_url`** **string** -**Credit card receipt URL** + **Credit card receipt URL** -**`cash_receipt_issued` ** **boolean** + **`cash_receipt_issued`** **boolean** -**Option to automatically issue cash receipt** + **Option to automatically issue cash receipt** -**`customer_uid`** **string** + **`customer_uid`** **string** -**customer\_uid related to the payment transaction** + **customer\_uid related to the payment transaction** -**`customer_uid_usage`** **string** + **`customer_uid_usage`** **string** -**customer\_uid use code** + **customer\_uid use code** -- payment.scheduled: scheduled payment -- payment: payment -- issue**: billing key issuance** + - payment.scheduled: scheduled payment + - payment: payment + - issue: billing key issuance -**`cancel_history`** **(Array\[PaymentCancelAnnotation], optional):** + **`cancel_history`** **(Array\[PaymentCancelAnnotation], optional):** -**`Cancellation/partial cancellation history`** + **`Cancellation/partial cancellation history`** + + - - + + + **cancel\_history array \[]** - - -**cancel\_history array \[]** + **`pg_tid`** **\*** **string** -**`pg_tid`** **\*** **string** + **PG cancellation transaction ID** -**PG cancellation transaction ID** + **`amount`** **\*** **integer** -**`amount`** **\*** **integer** + **Cancelled amount** -**Cancelled amount** + **`cancelled_at`** **\*** **string** -**`cancelled_at`** **\*** **string** + **Cancelled at (UNIX timestamp)** -**Cancelled at (UNIX timestamp)** + **`reason`** **\*** **string(256)** -**`reason`** **\*** **string(256)** + **Reason for cancellation** -**Reason for cancellation** + **`receipt_url`** **\*** **string(300)** -**`receipt_url`** **\*** **string(300)** + **Cancellation receipt URL. Availability varies by PG.** + + + -**Cancellation receipt URL. Availability varies by PG.** - - - - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - + + ```ts + { + // Response + } + ``` + + + ```ts + { + // Response + } + ``` + ### **Key request parameter description** @@ -389,94 +378,100 @@ Array of payment records (up to 20) > > A minus (-) indicates a descending sort order. > -> - \-started : Sort in descending order (DESC) based on payment start time (payment window open time) +> - -started : Sort in descending order (DESC) +> based on payment start time (payment window open time) +> > - started : Sort in ascending order (ASC) based on payment start time (payment window open time) -> - \-paid : Sort in descending order (DESC) based on payment completion time +> +> - -paid : Sort in descending order (DESC) based on payment completion time +> > - paid: Sort in ascending order (ASC) based on payment completion time -> - \-updated : Sort in descending order (DESC) based on the last modification time (the modification time is changed whenever payment status changes) -> - updated : Sort in ascending order (ASC) based on the last modification time (the modification time is changed whenever payment status changes) +> +> - -updated : Sort in descending order (DESC) based on the last modification time +> (the modification time is changed whenever payment status changes) +> +> - updated : Sort in ascending order (ASC) based on the last modification time +> (the modification time is changed whenever payment status changes)
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": { - "total": 0, - "previous": 0, - "next": 0, - "list": [ - { - "imp_uid": "string", - "merchant_uid": "string", - "pay_method": "string", - "channel": "pc", - "pg_provider": "string", - "emb_pg_provider": "string", - "pg_tid": "string", - "pg_id": "string", - "escrow": true, - "apply_num": "string", - "bank_code": "string", - "bank_name": "string", - "card_code": "string", - "card_name": "string", - "card_quota": 0, - "card_number": "string", - "card_type": "null", - "vbank_code": "string", - "vbank_name": "string", - "vbank_num": "string", - "vbank_holder": "string", - "vbank_date": 0, - "vbank_issued_at": 0, - "name": "string", - "amount": 0, - "cancel_amount": 0, - "currency": "string", - "buyer_name": "string", - "buyer_email": "string", - "buyer_tel": "string", - "buyer_addr": "string", - "buyer_postcode": "string", - "custom_data": "string", - "user_agent": "string", - "status": "ready", - "started_at": 0, - "paid_at": 0, - "failed_at": 0, - "cancelled_at": 0, - "fail_reason": "string", - "cancel_reason": "string", - "receipt_url": "string", - "cancel_history": [ - { - "pg_tid": "string", - "amount": 0, - "cancelled_at": 0, - "reason": "string", - "receipt_url": "string" - } - ], - "cancel_receipt_urls": [ - "string" - ], - "cash_receipt_issued": true, - "customer_uid": "string", - "customer_uid_usage": "issue" - } - ] +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "total": 0, + "previous": 0, + "next": 0, + "list": [ + { + "imp_uid": "string", + "merchant_uid": "string", + "pay_method": "string", + "channel": "pc", + "pg_provider": "string", + "emb_pg_provider": "string", + "pg_tid": "string", + "pg_id": "string", + "escrow": true, + "apply_num": "string", + "bank_code": "string", + "bank_name": "string", + "card_code": "string", + "card_name": "string", + "card_quota": 0, + "card_number": "string", + "card_type": "null", + "vbank_code": "string", + "vbank_name": "string", + "vbank_num": "string", + "vbank_holder": "string", + "vbank_date": 0, + "vbank_issued_at": 0, + "name": "string", + "amount": 0, + "cancel_amount": 0, + "currency": "string", + "buyer_name": "string", + "buyer_email": "string", + "buyer_tel": "string", + "buyer_addr": "string", + "buyer_postcode": "string", + "custom_data": "string", + "user_agent": "string", + "status": "ready", + "started_at": 0, + "paid_at": 0, + "failed_at": 0, + "cancelled_at": 0, + "fail_reason": "string", + "cancel_reason": "string", + "receipt_url": "string", + "cancel_history": [ + { + "pg_tid": "string", + "amount": 0, + "cancelled_at": 0, + "reason": "string", + "receipt_url": "string" + } + ], + "cancel_receipt_urls": [ + "string" + ], + "cash_receipt_issued": true, + "customer_uid": "string", + "customer_uid_usage": "issue" + } + ] + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/payments/getPaymentsByStatus**](https://api.iamport.kr/#!/payments/getPaymentsByStatus) + **Swagger Test Link** + [**https://api.iamport.kr/#!/payments/getPaymentsByStatus**](https://api.iamport.kr/#!/payments/getPaymentsByStatus) diff --git a/src/content/docs/en/api/payment-api/save-payment-amount-api.mdx b/src/content/docs/en/api/payment-api/save-payment-amount-api.mdx index 5713d351b..2e8a6b80a 100644 --- a/src/content/docs/en/api/payment-api/save-payment-amount-api.mdx +++ b/src/content/docs/en/api/payment-api/save-payment-amount-api.mdx @@ -4,116 +4,101 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Saves the payment amount before calling the payment window to block the payment process in case of forgery or falsification of the payment amount when making an authenticated payment. +## Saves the payment amount before calling the payment window to block the payment process in case of forgery or falsification of the payment amount when making an authenticated payment. - -If the payment amount of the order saved on the merchant-side is different from the amount passed to IMP.requestpay() for the same merchant - ---- - -uid, the PG payment window call is blocked. - - - -### Parameters - -#### Body + + If the payment amount of the order saved on the merchant-side is different from the amount passed to IMP.requestpay() for the same merchant - - + --- -**Merchant order ID** + uid, the PG payment window call is blocked. + - + ### Parameters - - - + #### Body -**Payment amount** + + + **Merchant order ID** + + - + + + **Payment amount** + + - + ### Responses - + + + + **`code`** **\*** **integer** -### Responses + **Response code** - - - -**`code`** **\*** **integer** + 0: success, Not 0: check the message -**Response code** + **`message`** **\*** **string** -0: success, Not 0: check the message + **Response message** -**`message`** **\*** **string** + A non-zero code includes a message like 'Invalid payment info'. -**Response message** + **`response (PaymentPrepareAnnotation, optional)`** + + -A non-zero code includes a message like 'Invalid payment info'. + + + **merchant\_uid** **\*** **string** -**`response (PaymentPrepareAnnotation, optional)`** + **`Merchant order ID`** - - + **`amount`** **`*`** **`number`** - - -**merchant\_uid ** **\*** **string** - -**`Merchant order ID`** - -**`amount`** **`*`** **`number`** - -**`Payment amount`** - - - - - - - -```javascript -{ - // Response -} -``` - - + **`Payment amount`** + + + + + ```ts + { + // Response + } + ``` +
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": { - "merchant_uid": "string", - "amount": 0 +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "merchant_uid": "string", + "amount": 0 + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/payments.validation/preparePayment**](https://api.iamport.kr/#!/payments.validation/preparePayment) + **Swagger Test Link** + [**https://api.iamport.kr/#!/payments.validation/preparePayment**](https://api.iamport.kr/#!/payments.validation/preparePayment) diff --git a/src/content/docs/en/api/payment-api/update-payment-amount-api.mdx b/src/content/docs/en/api/payment-api/update-payment-amount-api.mdx index f688fe159..3cc4faa47 100644 --- a/src/content/docs/en/api/payment-api/update-payment-amount-api.mdx +++ b/src/content/docs/en/api/payment-api/update-payment-amount-api.mdx @@ -4,120 +4,105 @@ description: "" --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Updates the amount saved via [**Save payment amount API**](save-payment-amount-api). +## Updates the amount saved via [**Save payment amount API**](save-payment-amount-api). - - - - -### Parameters - -#### Body - - - - -**Merchant order ID** + - + ### Parameters - - - + #### Body -**Payment amount** + + + **Merchant order ID** + + - + + + **Payment amount** + + - + ### Responses -### Responses + + + + **`code`** **\*** **integer** - - - -**`code`** **\***** ****integer** + **Response code** -**Response code** + 0: success, Not 0: check the message -0: success, Not 0: check the message + **`message`** **\*** **string** -**`message`** **\***\*\* ****string\*\* + **Response message** -**Response message** + A non-zero code includes a message like 'Invalid payment info'. -A non-zero code includes a message like 'Invalid payment info'. + + **`response (PaymentPrepareAnnotation, optional)`** + + + - - **`response (PaymentPrepareAnnotation, optional)`** - + + + **`merchant_uid`` `****`*`****` `****`string`** - - + **`Merchant order ID`** - - -**`merchant_uid`` `****`*`****` `****`string`** + **`amount`****`*`****`number`** -**`Merchant order ID`** + **`Payment amount`** + + + -**`amount`****`*`****`number`** - -**`Payment amount`** - - - - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - + + ```ts + { + // Response + } + ``` + + + ```ts + { + // Response + } + ``` +
-

Response Model Schema

- -``` -{ - "code": 0, - "message": "string", - "response": { - "merchant_uid": "string", - "amount": 0 +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "merchant_uid": "string", + "amount": 0 + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/payments.validation/editPreparePayment**](https://api.iamport.kr/#!/payments.validation/editPreparePayment) + **Swagger Test Link** + [**https://api.iamport.kr/#!/payments.validation/editPreparePayment**](https://api.iamport.kr/#!/payments.validation/editPreparePayment) diff --git a/src/content/docs/en/api/rest-api-access-token.mdx b/src/content/docs/en/api/rest-api-access-token.mdx index 7c9c5504d..9f8efc7ed 100644 --- a/src/content/docs/en/api/rest-api-access-token.mdx +++ b/src/content/docs/en/api/rest-api-access-token.mdx @@ -4,22 +4,24 @@ description: Learn how to get an access token. --- import Figure from "~/components/Figure.astro"; -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Access token is required to make an i'mport REST API request. +## Access token is required to make an i'mport REST API request. To get access to private resources, such as payment information, you must obtain an access token and include it in the i'mport REST API request. -### Get an access token +### Get an access token -Request access token from server-side - -If you **request for access token from the client-side**, the **`REST API Key`****` ``and`** **`REST API Secret`** are **exposed to public creating a potential security vulnerability**. Therefore, you **must request for access token from the server-side.** + Request access token from server-side + If you **request for access token from the client-side**, + the **`REST API Key`** **and** **`REST API Secret`** + are **exposed to public creating a potential security vulnerability**. + Therefore, you **must request for access token from the server-side.** ### **STEP 01.** Request access code @@ -31,60 +33,58 @@ to get an access token as follows:
- -```python title="server-side" - curl -H "Content-Type: application/json" POST -d '{"imp_key": "REST API key", "imp_secret":"REST API Secret"}' https://api.iamport.kr/users/getToken -``` - - - - -```javascript title="server-side" -// Request access token - axios({ - url: "https://api.iamport.kr/users/getToken", - // POST method - method: "post", - // "Content-Type": "application/json" - headers: { "Content-Type": "application/json" }, - data: { - // REST API key - imp_key: "imp_apikey", - // REST API Secret - imp_secret: "ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6bkA5lamv9OqDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f" - } - }); -``` - - - - -```python -import requests -import json - -def getTokenApi(path): - API_HOST = "https://api.iamport.kr" - url = API_HOST + path - - headers = {'Content-Type': 'application/json', 'charset': 'UTF-8', 'Accept': '*/*'} - body = { - "imp_key": "", # REST API Key - "imp_secret": "" # REST API Secret - } - try: - response = requests.post(url, headers=headers, data=json.dumps(body, ensure_ascii=False, indent="\t")) - return response - except Exception as ex: - -res=getTokenApi("/users/getToken") # API call -json_object=json.loads(res.text) # Convert to JSON object -TokenVal = json_object['response']['access_token'] # Parse the token - -print(TokenVal) -``` - - + + ```sh title="server-side" + curl -H "Content-Type: application/json" POST -d '{"imp_key": "REST API key", "imp_secret":"REST API Secret"}' https://api.iamport.kr/users/getToken + ``` + + + + ```ts title="server-side" + // Request access token + axios({ + url: "https://api.iamport.kr/users/getToken", + // POST method + method: "post", + // "Content-Type": "application/json" + headers: { "Content-Type": "application/json" }, + data: { + // REST API key + imp_key: "imp_apikey", + // REST API Secret + imp_secret: + "ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6bkA5lamv9OqDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f", + }, + }); + ``` + + + + ```python + import requests + import json + + def getTokenApi(path): + API_HOST = "https://api.iamport.kr" + url = API_HOST + path + + headers = {'Content-Type': 'application/json', 'charset': 'UTF-8', 'Accept': '*/*'} + body = { + "imp_key": "", # REST API Key + "imp_secret": "" # REST API Secret + } + try: + response = requests.post(url, headers=headers, data=json.dumps(body, ensure_ascii=False, indent="\t")) + return response + except Exception as ex: + + res=getTokenApi("/users/getToken") # API call + json_object=json.loads(res.text) # Convert to JSON object + TokenVal = json_object['response']['access_token'] # Parse the token + + print(TokenVal) + ``` + ### **STEP 02.** Get access token @@ -93,21 +93,20 @@ Get the access token from the response as follows: ```json title="Response" { - "code": 0, - "message": null, - "response":{ - "access_token": "a9ace025c90c0da2161075da6ddd3492a2fca776", // access token - "now": 1512446940, // i'mport REST API server's timestamp - "expired_at": 1512448740, // token's expiration (UNIX timestamp, KST) - }, + "code": 0, + "message": null, + "response":{ + "access_token": "a9ace025c90c0da2161075da6ddd3492a2fca776", // access token + "now": 1512446940, // i'mport REST API server's timestamp + "expired_at": 1512448740 // token's expiration (UNIX timestamp, KST) } +} ``` -**Standard NTP Server** - -The i'mport REST API server synchronizes with the standard time using **Google Public NTP**. + **Standard NTP Server** + The i'mport REST API server synchronizes with the standard time using **Google Public NTP**. ### **STEP 03.** Using access token @@ -119,36 +118,35 @@ format: > Authorization: **Bearer** a9ace025c90c0da2161075da6ddd3492a2fca776 - -Call the REST API to get the payment details by **including the access token in the request header** as follows: - -``` title="server-side" -curl -H "Content-Type: application/json" -H "Authorization: Bearer a9ace025c90c0da2161075da6ddd3492a2fca776" https://api.iamport.kr/payments/imp_448280090638 -``` - - - - -```json title="server-side" -axios({ - url: "https://api.iamport.kr/payments/imp_448280090638", - method: "get", // GET method - headers: { - // "Content-Type": "application/json" - "Content-Type": "application/json", - // Reissuing and Reusing Access Token -ssued access token - "Authorization": "Bearer a9ace025c90c0da2161075da6ddd3492a2fca776" - } - }); -``` - - + + Call the REST API to get the payment details by **including the access token in the request header** as follows: + + ```sh title="server-side" + curl -H "Content-Type: application/json" -H "Authorization: Bearer a9ace025c90c0da2161075da6ddd3492a2fca776" https://api.iamport.kr/payments/imp_448280090638 + ``` + + + + ```ts title="server-side" + axios({ + url: "https://api.iamport.kr/payments/imp_448280090638", + method: "get", // GET method + headers: { + // "Content-Type": "application/json" + "Content-Type": "application/json", + // Use issued access token + Authorization: "Bearer a9ace025c90c0da2161075da6ddd3492a2fca776", + }, + }); + ``` + -### Reissuing and Reusing Access Token +### Reissuing and Reusing Access Token -The expiration of the access token is **30 minutes** from the time of issuance. A token **cannot be used after its expiration**. An API call request with an expired token returns a **`401 Unauthorized`** response. +The expiration of the access token is **30 minutes** from the time of issuance. +A token **cannot be used after its expiration**. +An API call request with an expired token returns a **`401 Unauthorized`** response. > - Reissuance (after expiration): A new access token is issued. > (Expiration: 30 minutes after issuance) @@ -156,14 +154,13 @@ The expiration of the access token is **30 minutes** from the time of issuance. > - Reuse (before expiration): Existing access token is reused. (Expiration: same as before, > but extended by 5 minutes if requested within 1 minute from the original expiration) -![]() +![](/gitbook-assets/en/access_token_reuse.png) -**5 minute extension of expiration** - -The reuse and 5 minute lifetime extension of access token are provided for the following situations: + **5 minute extension of expiration** -- Multiple web servers of a single merchant are competing to call the REST API (`/users/getToken`) at the same time. -- Multiple web servers of a single merchant are not synchronized in time. + The reuse and 5 minute lifetime extension of access token are provided for the following situations: + - Multiple web servers of a single merchant are competing to call the REST API (`/users/getToken`) at the same time. + - Multiple web servers of a single merchant are not synchronized in time. diff --git a/src/content/docs/en/api/simple-payment-service-api/kakao-pay/get-order-api.mdx b/src/content/docs/en/api/simple-payment-service-api/kakao-pay/get-order-api.mdx index 966526582..1d72c206b 100644 --- a/src/content/docs/en/api/simple-payment-service-api/kakao-pay/get-order-api.mdx +++ b/src/content/docs/en/api/simple-payment-service-api/kakao-pay/get-order-api.mdx @@ -3,66 +3,58 @@ title: Get order API description: '' --- -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; +import Hint from "~/components/Hint.astro"; -### Gets order details (API that wraps [Kakao Pay's Get order details API](https://developers.kakao.com/docs/restapi/kakaopay-api#%EC%A3%BC%EB%AC%B8%EB%82%B4%EC%97%AD%EC%A1%B0%ED%9A%8C)). +## Gets order details (API that wraps [Kakao Pay's Get order details API](https://developers.kakao.com/docs/restapi/kakaopay-api#%EC%A3%BC%EB%AC%B8%EB%82%B4%EC%97%AD%EC%A1%B0%ED%9A%8C)). - -Request is similar and response is identical with Kakao Pay API. - - - -### Parameters - -#### Query + + Request is similar and response is identical with Kakao Pay API. + - -**Request date** + ### Parameters -YYYYMMDD + #### Query - - -**Kakao Pay MID** + + **Request date** -Default: Kakao Pay CID set in i'mport + YYYYMMDD + - - -**Page number** + + **Kakao Pay MID** - + Default: Kakao Pay CID set in i'mport + - + + **Page number** + -### Responses - - -```javascript -{ - // Response -} -``` - - + ### Responses + + ```ts + { + // Response + } + ``` + -**Swagger Test Link** - -[**https://api.iamport.kr/#!/kakao/getOrders**](https://api.iamport.kr/#!/kakao/getOrders) + **Swagger Test Link** + [**https://api.iamport.kr/#!/kakao/getOrders**](https://api.iamport.kr/#!/kakao/getOrders) -### **Precaution** - -The support for this API will be terminated in**`2H of 2022`** due to Kakao Pay's policy change. + ### **Precaution** + The support for this API will be terminated in **`2H of 2022`** due to Kakao Pay's policy change. diff --git a/src/content/docs/en/api/simple-payment-service-api/kcp-quick-pay/delete-user-api.mdx b/src/content/docs/en/api/simple-payment-service-api/kcp-quick-pay/delete-user-api.mdx index e3c903a41..c6ac74312 100644 --- a/src/content/docs/en/api/simple-payment-service-api/kcp-quick-pay/delete-user-api.mdx +++ b/src/content/docs/en/api/simple-payment-service-api/kcp-quick-pay/delete-user-api.mdx @@ -4,142 +4,130 @@ description: "" --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Deletes a KCP Quick Pay user information. +## Deletes a KCP Quick Pay user information. -### Accept setting is required + ### Accept setting is required -You must specify the Accept setting in the HTTP header as follows: - -**Accept : application/json** + You must specify the Accept setting in the HTTP header as follows: + **Accept : application/json** - - - - -### Parameters - -#### Path + - -**Member ID** + ### Parameters - - -**KCP Quick Pay site code** + #### Path - - -**KCP Quick Pay partner type** + + **Member ID** + - - -**KCP Quick Pay partner subtype** + + **KCP Quick Pay site code** + - + + **KCP Quick Pay partner type** + -### Responses + + **KCP Quick Pay partner subtype** + - - - -**`code`** **\***** ****integer** + ### Responses -**Response code** + + + + **`code`** **\*** **integer** -0: success, Not 0: check the message + **Response code** -**`message`** **\***\*\* ****string\*\* + 0: success, Not 0: check the message -**Response message** + **`message`** **\*** **string** -A non-zero code includes a message like 'Invalid payment info'. + **Response message** -**` response`` `****`(KcpQuickMemberAnnotation, optional)`** + A non-zero code includes a message like 'Invalid payment info'. - - + **`response`` `****`(KcpQuickMemberAnnotation, optional)`** + + - - -**`member_id`****`*`****`string`** + + + **`member_id`****`*`****`string`** -**`Member ID`** + **`Member ID`** -**`pg_provider`****`*`****`string`** + **`pg_provider`****`*`****`string`** -**`PG code`** + **`PG code`** -**`pg_id`****`*`****`string`** + **`pg_id`****`*`****`string`** -**`PG Merchant ID`** + **`PG Merchant ID`** -**`inserted`****`*`****`integer`** + **`inserted`****`*`****`integer`** -**`User created at (UNIX timestamp)`** + **`User created at (UNIX timestamp)`** -**`updated`****`*`****`integer`** + **`updated`****`*`****`integer`** -**`User updated at (UNIX timestamp)`** + **`User updated at (UNIX timestamp)`** + + + - - - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - + + ```ts + { + // Response + } + ``` + + + ```ts + { + // Response + } + ``` +
-

Response Model Schema

- -``` -{ - "code": 0, - "message": "string", - "response": { - "member_id": "string", - "pg_provider": "string", - "pg_id": "string", - "inserted": 0, - "updated": 0 +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "member_id": "string", + "pg_provider": "string", + "pg_id": "string", + "inserted": 0, + "updated": 0 + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/kcpquick/member_delete**](https://api.iamport.kr/#!/kcpquick/member_delete) + **Swagger Test Link** + [**https://api.iamport.kr/#!/kcpquick/member\_delete**](https://api.iamport.kr/#!/kcpquick/member_delete) diff --git a/src/content/docs/en/api/simple-payment-service-api/naver-pay/accrue-points-api.mdx b/src/content/docs/en/api/simple-payment-service-api/naver-pay/accrue-points-api.mdx index b3d6f054d..fb67a11e0 100644 --- a/src/content/docs/en/api/simple-payment-service-api/naver-pay/accrue-points-api.mdx +++ b/src/content/docs/en/api/simple-payment-service-api/naver-pay/accrue-points-api.mdx @@ -4,100 +4,87 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Accrues Naver Pay points. +## Accrues Naver Pay points. - - - - -### Parameters - -#### Path - - - - -**i'mport transaction ID** + - + ### Parameters - + #### Path -### Responses + + + **i'mport transaction ID** + + - - - -**`code`** **\***** ****integer** + ### Responses -**Response code** + + + + **`code`** **\*** **integer** -0: success, Not 0: check the message + **Response code** -**`message`** **\***** ****string** + 0: success, Not 0: check the message -**Response message** + **`message`** **\*** **string** -A non-zero code includes a message like 'Invalid payment info'. + **Response message** - - + A non-zero code includes a message like 'Invalid payment info'. + + + - + + ```ts + { + // Response + } + ``` + - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - + + ```ts + { + // Response + } + ``` + + + ```ts + { + // Response + } + ``` +
-

Response Model Schema

- -``` -{ - "code": 0, - "message": "string" -} -``` - +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string" + } + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/naver/naverDepositPoint**](https://api.iamport.kr/#!/naver/naverDepositPoint) + **Swagger Test Link** + [**https://api.iamport.kr/#!/naver/naverDepositPoint**](https://api.iamport.kr/#!/naver/naverDepositPoint) diff --git a/src/content/docs/en/api/simple-payment-service-api/naver-pay/confirm-escrow-order-api.mdx b/src/content/docs/en/api/simple-payment-service-api/naver-pay/confirm-escrow-order-api.mdx index dcfc522b2..3f7709d3f 100644 --- a/src/content/docs/en/api/simple-payment-service-api/naver-pay/confirm-escrow-order-api.mdx +++ b/src/content/docs/en/api/simple-payment-service-api/naver-pay/confirm-escrow-order-api.mdx @@ -4,101 +4,89 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Confirms a Naver Pay escrow order. +## Confirms a Naver Pay escrow order. - -Naver Pay - Pay method at checkout - - - -### Parameters - -#### Path - - - - -**i'mport transaction ID** - - - - - -### Responses - - - - -**`code`** **\***** ****integer** - -**Response code** - -0: success, Not 0: check the message - -**`message`** **\***** ****string** - -**Response message** - -A non-zero code includes a message like 'Invalid payment info'. - - - - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - - + + Naver Pay - Pay method at checkout + + + ### Parameters + + #### Path + + + + **i'mport transaction ID** + + + + ### Responses + + + + + **`code`** **\*** **integer** + + **Response code** + + 0: success, Not 0: check the message + + **`message`** **\*** **string** + + **Response message** + + A non-zero code includes a message like 'Invalid payment info'. + + + + + + ```ts + { + // Response + } + ``` + + + + ```ts + { + // Response + } + ``` + + + + ```ts + { + // Response + } + ``` +
-

Response Model Schema

- -``` -{ - "code": 0, - "message": "string" -} -``` - +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string" + } + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/naver/naverConfirmPayment**](https://api.iamport.kr/#!/naver/naverConfirmPayment) + **Swagger Test Link** + [**https://api.iamport.kr/#!/naver/naverConfirmPayment**](https://api.iamport.kr/#!/naver/naverConfirmPayment) diff --git a/src/content/docs/en/api/simple-payment-service-api/naver-pay/get-cash-receipt-amount-api.mdx b/src/content/docs/en/api/simple-payment-service-api/naver-pay/get-cash-receipt-amount-api.mdx index e62e114e5..d69a47320 100644 --- a/src/content/docs/en/api/simple-payment-service-api/naver-pay/get-cash-receipt-amount-api.mdx +++ b/src/content/docs/en/api/simple-payment-service-api/naver-pay/get-cash-receipt-amount-api.mdx @@ -4,134 +4,120 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Gets Naver Pay amount subject to issuance of a cash receipt. +## Gets Naver Pay amount subject to issuance of a cash receipt. - - - - -### Parameters - -#### Path - - - - -**i'mport transaction ID** + - + ### Parameters - + #### Path -### Responses + + + **i'mport transaction ID** + + - - - -**`code`** **\***** ****integer** + ### Responses -**Response code** + + + + **`code`** **\*** **integer** -0: success, Not 0: check the message + **Response code** -**`message`** **\***** ****string** + 0: success, Not 0: check the message -**Response message** + **`message`** **\*** **string** -A non-zero code includes a message like 'Invalid payment info'. + **Response message** -**`response`` `****`(NaverCashAmountAnnotation, optional)`** + A non-zero code includes a message like 'Invalid payment info'. - - + **`response`` `****`(NaverCashAmountAnnotation, optional)`** + + - - -**`amount_total`` `****`integer`** + + + **`amount_total`` `****`integer`** -**`Total amount subject to cash receipt issuance`** + **`Total amount subject to cash receipt issuance`** -**`amount_by_npoint`** **`integer`** + **`amount_by_npoint`** **`integer`** -**`Npoint amount out of the amount_total`** + **`Npoint amount out of the amount_total`** -**`amount_by_primary`** **`integer`** + **`amount_by_primary`** **`integer`** -**`Amount charged with the main payment method (credit card, account transfer etc.) out of the amount_total`** + **`Amount charged with the main payment method (credit card, account transfer etc.) out of the amount_total`** -**`amount_supply`** **`integer`** + **`amount_supply`** **`integer`** -**`List price amount out of the amount_total`** + **`List price amount out of the amount_total`** -**`amount_vat`** **`integer`** + **`amount_vat`** **`integer`** -**`VAT out of the amount_total`** + **`VAT out of the amount_total`** + + + - - + + ```ts + { + // Response + } + ``` + - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - + + ```ts + { + // Response + } + ``` + + + ```ts + { + // Response + } + ``` +
-

Response Model Schema

- -``` -{ - "code": 0, - "message": "string", - "response": { - "amount_total": 0, - "amount_by_npoint": 0, - "amount_by_primary": 0, - "amount_supply": 0, - "amount_vat": 0 +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "amount_total": 0, + "amount_by_npoint": 0, + "amount_by_primary": 0, + "amount_supply": 0, + "amount_vat": 0 + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/naver/queryCashAmount**](https://api.iamport.kr/#!/naver/queryCashAmount) + **Swagger Test Link** + [**https://api.iamport.kr/#!/naver/queryCashAmount**](https://api.iamport.kr/#!/naver/queryCashAmount) diff --git a/src/content/docs/en/api/simple-payment-service-api/payco/update-order-status-api.mdx b/src/content/docs/en/api/simple-payment-service-api/payco/update-order-status-api.mdx index bd263f7ca..5013f43b7 100644 --- a/src/content/docs/en/api/simple-payment-service-api/payco/update-order-status-api.mdx +++ b/src/content/docs/en/api/simple-payment-service-api/payco/update-order-status-api.mdx @@ -4,111 +4,98 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Updates the status of a PAYCO order. +## Updates the status of a PAYCO order. - - - - -### Parameters - -#### Path - - - + -**i'mport transaction ID** + ### Parameters - + #### Path - + + + **i'mport transaction ID** + + -#### Body + #### Body - - **Status code** + + **Status code** -`DELIVERY_START` + `DELIVERY_START` -`PURCHASE_DECISION` + `PURCHASE_DECISION` -`CANCELED` + `CANCELED` + - + ### Responses -### Responses + + + + **`code`** **\*** **integer** - - - -**`code`** **\*** **integer** + **Response code** -**Response code** + 0: success, Not 0: check the message -0: success, Not 0: check the message + **`message`** **\*** **string** -**`message`** **\*** **string** + **Response message** -**Response message** + A non-zero code includes a message like 'Invalid payment info'. -A non-zero code includes a message like 'Invalid payment info'. + **`response`** **(PaycoStatusAnnotation, optional)** + + -**`response` ** **(PaycoStatusAnnotation, optional)** + + + **`status`** **`*`** **`string`** - - + **`PAYCO updated order status`** - - -**`status`** **`*`** **`string`** - -**`PAYCO updated order status`** - -\['DELIVERY\_START', 'PURCHASE\_DECISION', 'CANCELED'] - - - - - - - -```javascript -{ - // Response -} -``` - - + \['DELIVERY\_START', 'PURCHASE\_DECISION', 'CANCELED'] + + + + + ```ts + { + // Response + } + ``` +
-

Response Model Schema

- -``` -{ - "code": 0, - "message": "string", - "response": { - "status": "DELIVERY_START" +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "status": "DELIVERY_START" + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/payco/changeOrderStatus**](https://api.iamport.kr/#!/payco/changeOrderStatus) + **Swagger Test Link** + [**https://api.iamport.kr/#!/payco/changeOrderStatus**](https://api.iamport.kr/#!/payco/changeOrderStatus) diff --git a/src/content/docs/en/api/subscription-payment-api/cancel-scheduled-payment-api.mdx b/src/content/docs/en/api/subscription-payment-api/cancel-scheduled-payment-api.mdx index 767a1e92a..2334c55b4 100644 --- a/src/content/docs/en/api/subscription-payment-api/cancel-scheduled-payment-api.mdx +++ b/src/content/docs/en/api/subscription-payment-api/cancel-scheduled-payment-api.mdx @@ -4,205 +4,193 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Cancels a scheduled payment before execution. +## Cancels a scheduled payment before execution. - - - - -### Parameters - -#### Body - - - - -**Billing key** - - + - - -**Order ID** + ### Parameters -If omitted, cancels all scheduled payments associated with customer\_uid. + #### Body - + + + **Billing key** + + -### Responses + + **Order ID** - - - -**`code`** **\***** ****integer** + If omitted, cancels all scheduled payments associated with customer\_uid. + -**Response code** + ### Responses -0: success, Not 0: check the message + + + + **`code`** **\*** **integer** -**`message`** **\***** ****string** + **Response code** -**Response message** + 0: success, Not 0: check the message -A non-zero code includes a message like 'Invalid payment info'. + **`message`** **\*** **string** -**`response`** **(Array\[ScheduleResultAnnotation], optional** + **Response message** - - + A non-zero code includes a message like 'Invalid payment info'. - - -**`code`** **\*** **integer** + **`response`** **(Array\[ScheduleResultAnnotation], optional** + + -**Response code** + + + **`code`** **\*** **integer** -0: success, Not 0: check the message + **Response code** -**`message`** **\***** ****string** + 0: success, Not 0: check the message -**Response message** + **`message`** **\*** **string** -A non-zero code includes a message like 'Invalid payment info'. + **Response message** -**`customer_uid`** **\*** **string** + A non-zero code includes a message like 'Invalid payment info'. -**Billing key** + **`customer_uid`** **\*** **string** -**`merchant_uid` \* ****string** + **Billing key** -**Order ID** + **`merchant_uid`\*** **string** -**`imp_uid`** \* **string** + **Order ID** -**i'mport transaction UID** + **`imp_uid`** \* **string** -**`schedule_at`** **\*** **UNIX timestamp** + **i'mport transaction UID** -**Payment scheduled at** + **`schedule_at`** **\*** **UNIX timestamp** -**`executed_at`** **\*** **UNIX timestamp** + **Payment scheduled at** -**Payment started at** + **`executed_at`** **\*** **UNIX timestamp** -**`revoked_at`** **\*** **UNIX timestamp** + **Payment started at** -**Payment cancelled at** + **`revoked_at`** **\*** **UNIX timestamp** -**`amount`** **\*** **integer** + **Payment cancelled at** -**Payment amount** + **`amount`** **\*** **integer** -**`name`** **string** + **Payment amount** -**Product name** + **`name`** **string** -**`buyer_name`** **string** + **Product name** -**Customer name** + **`buyer_name`** **string** -**`buyer_email`** **string** + **Customer name** -**Customer email**\ + **`buyer_email`** **string** -**`buyer_tel`** **string** + **Customer email** -**Customer phone number** + **`buyer_tel`** **string** -**`buyer_addr`** **string** + **Customer phone number** -**Customer address** + **`buyer_addr`** **string** -**`buyer_postcode`** **string** + **Customer address** -**Customer zip code** + **`buyer_postcode`** **string** -**`custom_data`** **string** + **Customer zip code** -**Echo data as JSON string** + **`custom_data`** **string** -**`schedule_status`** **\***** ** **string** + **Echo data as JSON string** -**Status of scheduled payment** + **`schedule_status`** **\*** **string** -- `scheduled` (payment is scheduled for execution) -- `executed` (payment is completed) -- `revoked` (payment is cancelled) + **Status of scheduled payment** -**`payment_status`** **\***** ** **string** + - `scheduled` (payment is scheduled for execution) + - `executed` (payment is completed) + - `revoked` (payment is cancelled) -**Payment approval state** + **`payment_status`** **\*** **string** -- `null`: Scheduled payment has not executed yet (actual null value, not string) -- `paid`: Scheduled payment is approved -- `failed`: Scheduled payment approval failed -- `cancelled`: Scheduled payment is refunded (cancelled) after approval + **Payment approval state** -**`fail_reason`** **string** + - `null`: Scheduled payment has not executed yet (actual null value, not string) + - `paid`: Scheduled payment is approved + - `failed`: Scheduled payment approval failed + - `cancelled`: Scheduled payment is refunded (cancelled) after approval -**Reason for failure** + **`fail_reason`** **string** - - + **Reason for failure** + + + - - - -```javascript -{ - // Response -} -``` - - - - - -
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": [ + + ```ts { - "customer_uid": "string", - "merchant_uid": "string", - "imp_uid": "string", - "schedule_at": "0", - "executed_at": "0", - "revoked_at": "0", - "amount": 0, - "name": "string", - "buyer_name": "string", - "buyer_email": "string", - "buyer_tel": "string", - "buyer_addr": "string", - "buyer_postcode": "string", - "custom_data": "string", - "schedule_status": "scheduled", - "payment_status": "paid", - "fail_reason": "string" + // Response } - ] -} -``` + ``` + + +
+

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": [ + { + "customer_uid": "string", + "merchant_uid": "string", + "imp_uid": "string", + "schedule_at": "0", + "executed_at": "0", + "revoked_at": "0", + "amount": 0, + "name": "string", + "buyer_name": "string", + "buyer_email": "string", + "buyer_tel": "string", + "buyer_addr": "string", + "buyer_postcode": "string", + "custom_data": "string", + "schedule_status": "scheduled", + "payment_status": "paid", + "fail_reason": "string" + } + ] + } + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/subscribe/unschedule**](https://api.iamport.kr/#!/subscribe/unschedule) + **Swagger Test Link** + [**https://api.iamport.kr/#!/subscribe/unschedule**](https://api.iamport.kr/#!/subscribe/unschedule) diff --git a/src/content/docs/en/api/subscription-payment-api/get-scheduled-payment-api.mdx b/src/content/docs/en/api/subscription-payment-api/get-scheduled-payment-api.mdx index df990fd25..0ab84d295 100644 --- a/src/content/docs/en/api/subscription-payment-api/get-scheduled-payment-api.mdx +++ b/src/content/docs/en/api/subscription-payment-api/get-scheduled-payment-api.mdx @@ -4,210 +4,197 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Gets scheduled payment data by order ID (merchant\_uid). +## Gets scheduled payment data by order ID (merchant\_uid). - - - - -### Parameters - -#### Path - - -Merchant - - - -**Order ID** - - - - + -### Responses + ### Parameters - - - -**`code`** **\***** ****integer** + #### Path -**Response code** + + Merchant -0: success, Not 0: check the message + + **Order ID** + + -**`message`** **\***** ****string** + ### Responses -**Response message** + + + + **`code`** **\*** **integer** -A non-zero code includes a message like 'Invalid payment info'. + **Response code** -**`response`** **(Array\[ScheduleResultAnnotation], optional** + 0: success, Not 0: check the message - - + **`message`** **\*** **string** - - -**`code`** **\*** **integer** + **Response message** -**Response code** + A non-zero code includes a message like 'Invalid payment info'. -0: success, Not 0: check the message + **`response`** **(Array\[ScheduleResultAnnotation], optional** + + -**`message`** **\***** ****string** + + + **`code`** **\*** **integer** -**Response message** + **Response code** -A non-zero code includes a message like 'Invalid payment info'. + 0: success, Not 0: check the message -**`customer_uid`** **\*** **string** + **`message`** **\*** **string** -**Billing key** + **Response message** -**`merchant_uid` \* ****string** + A non-zero code includes a message like 'Invalid payment info'. -**Order ID** + **`customer_uid`** **\*** **string** -**`imp_uid`** \* **string** + **Billing key** -**i'mport transaction UID** + **`merchant_uid`\*** **string** -**`schedule_at`** **\*** **UNIX timestamp** + **Order ID** -**Payment scheduled at** + **`imp_uid`** \* **string** -**`executed_at`** **\*** **UNIX timestamp** + **i'mport transaction UID** -**Payment started at** + **`schedule_at`** **\*** **UNIX timestamp** -**`revoked_at`** **\*** **UNIX timestamp** + **Payment scheduled at** -**Payment cancelled at** + **`executed_at`** **\*** **UNIX timestamp** -**`amount`** **\*** **integer** + **Payment started at** -**Payment amount** + **`revoked_at`** **\*** **UNIX timestamp** -**`name`** **string** + **Payment cancelled at** -**Product name** + **`amount`** **\*** **integer** -**`buyer_name`** **string** + **Payment amount** -**Customer name** + **`name`** **string** -**`buyer_email`** **string** + **Product name** -**Customer email**\ + **`buyer_name`** **string** -**`buyer_tel`** **string** + **Customer name** -**Customer phone number** + **`buyer_email`** **string** -**`buyer_addr`** **string** + **Customer email** -**Customer address** + **`buyer_tel`** **string** -**`buyer_postcode`** **string** + **Customer phone number** -**Customer zip code** + **`buyer_addr`** **string** -**`custom_data`** **string** + **Customer address** -**Echo data as JSON string** + **`buyer_postcode`** **string** -**`schedule_status`** **\***** ** **string** + **Customer zip code** -**Status of scheduled payment** + **`custom_data`** **string** -- `scheduled` (payment is scheduled for execution) -- `executed` (payment is completed) -- `revoked` (payment is cancelled) + **Echo data as JSON string** -**`payment_status`** **\***** ** **string** + **`schedule_status`** **\*** **string** -**Payment approval state** + **Status of scheduled payment** -- `null`: Scheduled payment has not executed yet (actual null value, not string) -- `paid`: Scheduled payment is approved -- `failed`: Scheduled payment approval failed -- `cancelled`: Scheduled payment is refunded (cancelled) after approval + - `scheduled` (payment is scheduled for execution) + - `executed` (payment is completed) + - `revoked` (payment is cancelled) -**`fail_reason`** **string** + **`payment_status`** **\*** **string** -**Reason for failure** + **Payment approval state** - - + - `null`: Scheduled payment has not executed yet (actual null value, not string) + - `paid`: Scheduled payment is approved + - `failed`: Scheduled payment approval failed + - `cancelled`: Scheduled payment is refunded (cancelled) after approval - + **`fail_reason`** **string** - -```javascript -{ - // Response -} -``` + **Reason for failure** + + + - - - -```javascript -{ - // Response -} -``` - - - - - -
-

Response Model Schema

+ + ```ts + { + // Response + } + ``` + -```json -{ - "code": 0, - "message": "string", - "response": [ + + ```ts { - "customer_uid": "string", - "merchant_uid": "string", - "imp_uid": "string", - "schedule_at": "0", - "executed_at": "0", - "revoked_at": "0", - "amount": 0, - "name": "string", - "buyer_name": "string", - "buyer_email": "string", - "buyer_tel": "string", - "buyer_addr": "string", - "buyer_postcode": "string", - "custom_data": "string", - "schedule_status": "scheduled", - "payment_status": "paid", - "fail_reason": "string" + // Response } - ] -} -``` + ``` + + +
+

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": [ + { + "customer_uid": "string", + "merchant_uid": "string", + "imp_uid": "string", + "schedule_at": "0", + "executed_at": "0", + "revoked_at": "0", + "amount": 0, + "name": "string", + "buyer_name": "string", + "buyer_email": "string", + "buyer_tel": "string", + "buyer_addr": "string", + "buyer_postcode": "string", + "custom_data": "string", + "schedule_status": "scheduled", + "payment_status": "paid", + "fail_reason": "string" + } + ] + } + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/subscribe/getScheduleByMid**](https://api.iamport.kr/#!/subscribe/getScheduleByMid) + **Swagger Test Link** + [**https://api.iamport.kr/#!/subscribe/getScheduleByMid**](https://api.iamport.kr/#!/subscribe/getScheduleByMid) diff --git a/src/content/docs/en/api/subscription-payment-api/get-scheduled-payments-api.mdx b/src/content/docs/en/api/subscription-payment-api/get-scheduled-payments-api.mdx index ba91c8a4d..f64f5b5d2 100644 --- a/src/content/docs/en/api/subscription-payment-api/get-scheduled-payments-api.mdx +++ b/src/content/docs/en/api/subscription-payment-api/get-scheduled-payments-api.mdx @@ -4,255 +4,241 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Gets a list of scheduled payments by search period. +## Gets a list of scheduled payments by search period. - -Scheduled payments data is sorted by the latest scheduled time. To sort by the oldest scheduled time, set - -**sorting=scheduled** - -. - - - -### Parameters - -#### Query - - - - -**Start search time** - - - - (UNIX timestamp) + + Scheduled payments data is sorted by the latest scheduled time. To sort by the oldest scheduled time, set - - - + **sorting=scheduled** -**End search time** + . + - + ### Parameters - (UNIX timestamp) + #### Query - - -**Schedule status** + + + **Start search time** + -`scheduled` + (UNIX timestamp) + -`executed` + + + **End search time** + -`revoked` + (UNIX timestamp) + - - -**Result paging** + + **Schedule status** -Starts from 1, default: 1 + `scheduled` - - -**Results per page** + `executed` -Max 1000, default: 20 + `revoked` + - - -**Sort by** + + **Result paging** -Default: latest scheduled time + Starts from 1, default: 1 + -scheduled: oldest scheduled time + + **Results per page** - + Max 1000, default: 20 + -### Responses + + **Sort by** - - - -**`code`** **\***** ****integer** + Default: latest scheduled time -**Response code** + scheduled: oldest scheduled time + -0: success, Not 0: check the message + ### Responses -**`message`** **\***** ****string** + + + + **`code`** **\*** **integer** -**Response message** + **Response code** -A non-zero code includes a message like 'Invalid payment info'. + 0: success, Not 0: check the message -**`response`** **(Array\[ScheduleResultAnnotation], optional** + **`message`** **\*** **string** - - + **Response message** - - -**`code`** **\*** **integer** + A non-zero code includes a message like 'Invalid payment info'. -**Response code** + **`response`** **(Array\[ScheduleResultAnnotation], optional** + + -0: success, Not 0: check the message + + + **`code`** **\*** **integer** -**`message`** **\***** ****string** + **Response code** -**Response message** + 0: success, Not 0: check the message -A non-zero code includes a message like 'Invalid payment info'. + **`message`** **\*** **string** -**`customer_uid`** **\*** **string** + **Response message** -**Billing key** + A non-zero code includes a message like 'Invalid payment info'. -**`merchant_uid` \* ****string** + **`customer_uid`** **\*** **string** -**Order ID** + **Billing key** -**`imp_uid`** \* **string** + **`merchant_uid` \*** **string** -**i'mport transaction UID** + **Order ID** -**`schedule_at`** **\*** **UNIX timestamp** + **`imp_uid`** \* **string** -**Payment scheduled at** + **i'mport transaction UID** -**`executed_at`** **\*** **UNIX timestamp** + **`schedule_at`** **\*** **UNIX timestamp** -**Payment started at** + **Payment scheduled at** -**`revoked_at`** **\*** **UNIX timestamp** + **`executed_at`** **\*** **UNIX timestamp** -**Payment cancelled at** + **Payment started at** -**`amount`** **\*** **integer** + **`revoked_at`** **\*** **UNIX timestamp** -**Payment amount** + **Payment cancelled at** -**`name`** **string** + **`amount`** **\*** **integer** -**Product name** + **Payment amount** -**`buyer_name`** **string** + **`name`** **string** -**Customer name** + **Product name** -**`buyer_email`** **string** + **`buyer_name`** **string** -**Customer email**\ + **Customer name** -**`buyer_tel`** **string** + **`buyer_email`** **string** -**Customer phone number** + **Customer email** -**`buyer_addr`** **string** + **`buyer_tel`** **string** -**Customer address** + **Customer phone number** -**`buyer_postcode`** **string** + **`buyer_addr`** **string** -**Customer zip code** + **Customer address** -**`custom_data`** **string** + **`buyer_postcode`** **string** -**Echo data as JSON string** + **Customer zip code** -**`schedule_status`** **\***** ** **string** + **`custom_data`** **string** -**Status of scheduled payment** + **Echo data as JSON string** -- `scheduled` (payment is scheduled for execution) -- `executed` (payment is completed) -- `revoked` (payment is cancelled) + **`schedule_status`** **\*** **string** -**`payment_status`** **\***** ** **string** + **Status of scheduled payment** -**Payment approval state** + - `scheduled` (payment is scheduled for execution) + - `executed` (payment is completed) + - `revoked` (payment is cancelled) -- `null`: Scheduled payment has not executed yet (actual null value, not string) -- `paid`: Scheduled payment is approved -- `failed`: Scheduled payment approval failed -- `cancelled`: Scheduled payment is refunded (cancelled) after approval + **`payment_status`** **\*** **string** -**`fail_reason`** **string** + **Payment approval state** -**Reason for failure** + - `null`: Scheduled payment has not executed yet (actual null value, not string) + - `paid`: Scheduled payment is approved + - `failed`: Scheduled payment approval failed + - `cancelled`: Scheduled payment is refunded (cancelled) after approval - - + **`fail_reason`** **string** - + **Reason for failure** + + + - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - - - - -
-

Response Model Schema

+ + ```ts + { + // Response + } + ``` + -```json -{ - "code": 0, - "message": "string", - "response": [ + + ```ts { - "customer_uid": "string", - "merchant_uid": "string", - "imp_uid": "string", - "schedule_at": "0", - "executed_at": "0", - "revoked_at": "0", - "amount": 0, - "name": "string", - "buyer_name": "string", - "buyer_email": "string", - "buyer_tel": "string", - "buyer_addr": "string", - "buyer_postcode": "string", - "custom_data": "string", - "schedule_status": "scheduled", - "payment_status": "paid", - "fail_reason": "string" + // Response } - ] -} -``` + ``` + + +
+

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": [ + { + "customer_uid": "string", + "merchant_uid": "string", + "imp_uid": "string", + "schedule_at": "0", + "executed_at": "0", + "revoked_at": "0", + "amount": 0, + "name": "string", + "buyer_name": "string", + "buyer_email": "string", + "buyer_tel": "string", + "buyer_addr": "string", + "buyer_postcode": "string", + "custom_data": "string", + "schedule_status": "scheduled", + "payment_status": "paid", + "fail_reason": "string" + } + ] + } + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/subscribe/findSchedulesByRange**](https://api.iamport.kr/#!/subscribe/findSchedulesByRange) + **Swagger Test Link** + [**https://api.iamport.kr/#!/subscribe/findSchedulesByRange**](https://api.iamport.kr/#!/subscribe/findSchedulesByRange) diff --git a/src/content/docs/en/api/subscription-payment-api/get-scheduled-payments-by-billing-key-api.mdx b/src/content/docs/en/api/subscription-payment-api/get-scheduled-payments-by-billing-key-api.mdx index 45ac29238..5657fd767 100644 --- a/src/content/docs/en/api/subscription-payment-api/get-scheduled-payments-by-billing-key-api.mdx +++ b/src/content/docs/en/api/subscription-payment-api/get-scheduled-payments-by-billing-key-api.mdx @@ -4,242 +4,229 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Gets scheduled payments by billing key (customer\_uid). +## Gets scheduled payments by billing key (customer\_uid). - -Returns scheduled payments using pagination (up to 3 months period). - - - -### Parameters - -#### Path - - - - -**Billing key** - - - - - -#### Query + + Returns scheduled payments using pagination (up to 3 months period). + - -**Search result paging** + ### Parameters -Starts at 1 (default: 1) + #### Path - - -**Search start time** + + + **Billing key** + + -UNIX timestamp + #### Query - - -**Search end time** + + **Search result paging** -UNIX timestamp + Starts at 1 (default: 1) + - - -**Schedule status** + + **Search start time** -If not specified, returns for all status + UNIX timestamp + -`scheduled` + + **Search end time** -`executed` + UNIX timestamp + -`revoked` + + **Schedule status** - + If not specified, returns for all status -### Responses + `scheduled` - - - -**`code`** **\***** ****integer** + `executed` -**Response code** + `revoked` + -0: success, Not 0: check the message + ### Responses -**`message`** **\***** ****string** + + + + **`code`** **\*** **integer** -**Response message** + **Response code** -A non-zero code includes a message like 'Invalid payment info'. + 0: success, Not 0: check the message -**`response`** **(Array\[ScheduleResultAnnotation], optional** + **`message`** **\*** **string** - - + **Response message** - - -**`code`** **\*** **integer** + A non-zero code includes a message like 'Invalid payment info'. -**Response code** + **`response`** **(Array\[ScheduleResultAnnotation], optional** + + -0: success, Not 0: check the message + + + **`code`** **\*** **integer** -**`message`** **\***** ****string** + **Response code** -**Response message** + 0: success, Not 0: check the message -A non-zero code includes a message like 'Invalid payment info'. + **`message`** **\*** **string** -**`customer_uid`** **\*** **string** + **Response message** -**Billing key** + A non-zero code includes a message like 'Invalid payment info'. -**`merchant_uid` \* ****string** + **`customer_uid`** **\*** **string** -**Order ID** + **Billing key** -**`imp_uid`** \* **string** + **`merchant_uid` \*****string** -**i'mport transaction UID** + **Order ID** -**`schedule_at`** **\*** **UNIX timestamp** + **`imp_uid`** \* **string** -**Payment scheduled at** + **i'mport transaction UID** -**`executed_at`** **\*** **UNIX timestamp** + **`schedule_at`** **\*** **UNIX timestamp** -**Payment started at** + **Payment scheduled at** -**`revoked_at`** **\*** **UNIX timestamp** + **`executed_at`** **\*** **UNIX timestamp** -**Payment cancelled at** + **Payment started at** -**`amount`** **\*** **integer** + **`revoked_at`** **\*** **UNIX timestamp** -**Payment amount** + **Payment cancelled at** -**`name`** **string** + **`amount`** **\*** **integer** -**Product name** + **Payment amount** -**`buyer_name`** **string** + **`name`** **string** -**Customer name** + **Product name** -**`buyer_email`** **string** + **`buyer_name`** **string** -**Customer email**\ + **Customer name** -**`buyer_tel`** **string** + **`buyer_email`** **string** -**Customer phone number** + **Customer email** -**`buyer_addr`** **string** + **`buyer_tel`** **string** -**Customer address** + **Customer phone number** -**`buyer_postcode`** **string** + **`buyer_addr`** **string** -**Customer zip code** + **Customer address** -**`custom_data`** **string** + **`buyer_postcode`** **string** -**Echo data as JSON string** + **Customer zip code** -**`schedule_status`** **\***** ** **string** + **`custom_data`** **string** -**Status of scheduled payment** + **Echo data as JSON string** -- `scheduled` (payment is scheduled for execution) -- `executed` (payment is completed) -- `revoked` (payment is cancelled) + **`schedule_status`** **\*** **string** -**`payment_status`** **\***** ** **string** + **Status of scheduled payment** -**Payment approval state** + - `scheduled` (payment is scheduled for execution) + - `executed` (payment is completed) + - `revoked` (payment is cancelled) -- `null`: Scheduled payment has not executed yet (actual null value, not string) -- `paid`: Scheduled payment is approved -- `failed`: Scheduled payment approval failed -- `cancelled`: Scheduled payment is refunded (cancelled) after approval + **`payment_status`** **\*** **string** -**`fail_reason`** **string** + **Payment approval state** -**Reason for failure** + - `null`: Scheduled payment has not executed yet (actual null value, not string) + - `paid`: Scheduled payment is approved + - `failed`: Scheduled payment approval failed + - `cancelled`: Scheduled payment is refunded (cancelled) after approval - - + **`fail_reason`** **string** - + **Reason for failure** + + + - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - - - - -
-

Response Model Schema

+ + ```ts + { + // Response + } + ``` + -```json -{ - "code": 0, - "message": "string", - "response": [ + + ```ts { - "customer_uid": "string", - "merchant_uid": "string", - "imp_uid": "string", - "schedule_at": "0", - "executed_at": "0", - "revoked_at": "0", - "amount": 0, - "name": "string", - "buyer_name": "string", - "buyer_email": "string", - "buyer_tel": "string", - "buyer_addr": "string", - "buyer_postcode": "string", - "custom_data": "string", - "schedule_status": "scheduled", - "payment_status": "paid", - "fail_reason": "string" + // Response } - ] -} -``` + ``` + + +
+

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": [ + { + "customer_uid": "string", + "merchant_uid": "string", + "imp_uid": "string", + "schedule_at": "0", + "executed_at": "0", + "revoked_at": "0", + "amount": 0, + "name": "string", + "buyer_name": "string", + "buyer_email": "string", + "buyer_tel": "string", + "buyer_addr": "string", + "buyer_postcode": "string", + "custom_data": "string", + "schedule_status": "scheduled", + "payment_status": "paid", + "fail_reason": "string" + } + ] + } + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/subscribe/findSchedulesByCustomer**](https://api.iamport.kr/#!/subscribe/findSchedulesByCustomer) + **Swagger Test Link** + [**https://api.iamport.kr/#!/subscribe/findSchedulesByCustomer**](https://api.iamport.kr/#!/subscribe/findSchedulesByCustomer) diff --git a/src/content/docs/en/api/subscription-payment-api/schedule-payment-api.mdx b/src/content/docs/en/api/subscription-payment-api/schedule-payment-api.mdx index b7c56ddec..9c54238ab 100644 --- a/src/content/docs/en/api/subscription-payment-api/schedule-payment-api.mdx +++ b/src/content/docs/en/api/subscription-payment-api/schedule-payment-api.mdx @@ -4,228 +4,216 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Schedules a non-authenticated payment using customer\_uid. +## Schedules a non-authenticated payment using customer\_uid. -#### The result of the payment request can be received (POST request) through the endpoint URL set in notice\_url via webhook. +The result of the payment request can be received (POST request) +through the endpoint URL set in notice\_url via webhook. - -A payment is scheduled with the billing key associated with customer_uid + + A payment is scheduled with the billing key associated with customer\_uid -_._ + _._ - If you specify a new customer + If you specify a new customer ---- - -uid instead of using the existing customer_uid, you must also enter the credit card information. In this case, both a new billing key is issued and payment is scheduled. + --- - + uid instead of using the existing customer\_uid, you must also enter the credit card information. In this case, both a new billing key is issued and payment is scheduled. + -### Parameters + ### Parameters -#### Body + #### Body - - + + + **Billing key** + + -**Billing key** + + Test amount approved to check validity of the credit card (cancelled immediately) + - + + Credit card number ( - - -Test amount approved to check validity of the credit card (cancelled immediately) + **dddd-dddd-dddd-dddd** - - -Credit card number ( + ) + -**dddd-dddd-dddd-dddd** + + Credit card expiration ( -) + **YYYY-MM** - - -Credit card expiration ( + ) + -**YYYY-MM** + + 6-digit DOB (**YYMMDD**) -) + (10-digit business registration number for corporate card) + - - -6-digit DOB (**YYMMDD**) + + First 2 digits of credit card password + -(10-digit business registration number for corporate card) + + Credit card CVC + - - -First 2 digits of credit card password + + PG code + - - -Credit card CVC + + + **Payment schedule** + + - - -PG code + ### Responses - - - + + + + **`code`** **\*** **integer** -**Payment schedule** + **Response code** - + 0: success, Not 0: check the message - + **`message`** **\*** **string** -### Responses + **Response message** - - - -**`code`** **\***** ****integer** + A non-zero code includes a message like 'Invalid payment info'. -**Response code** + **`response`** **(Array\[ScheduleResultAnnotation], optional)** + + -0: success, Not 0: check the message + + + **`code`** **\*** **integer** -**`message`** **\***** ****string** + **Response code** -**Response message** - -A non-zero code includes a message like 'Invalid payment info'. - -**`response`** **(Array\[ScheduleResultAnnotation], optional)** - - - - - - -**`code`** **\*** **integer** + 0: success, Not 0: check the message -**Response code** + **`message`** **\*** **string** -0: success, Not 0: check the message + **Response message** -**`message`** **\***** ****string** + A non-zero code includes a message like 'Invalid payment info'. -**Response message** + **`customer_uid`** **\*** **string** -A non-zero code includes a message like 'Invalid payment info'. + **Billing key** -**`customer_uid`** **\*** **string** + **`merchant_uid` \*****string** -**Billing key** + **Order ID** -**`merchant_uid` \* ****string** + **`imp_uid`** \* **string** -**Order ID** + **i'mport transaction UID** -**`imp_uid`** \* **string** + **`schedule_at`** **\*** **UNIX timestamp** -**i'mport transaction UID** + **Payment scheduled at (UNIX timestamp in seconds)** -**`schedule_at`** **\*** **UNIX timestamp** + **`executed_at`** **\*** **UNIX timestamp** -**Payment scheduled at (UNIX timestamp in seconds)** + **Payment started at (UNIX timestamp in seconds)** -**`executed_at`** **\*** **UNIX timestamp** + **`revoked_at`** **\*** **UNIX timestamp** -**Payment started at (UNIX timestamp in seconds)** + **Payment cancelled at (UNIX timestamp in seconds)** -**`revoked_at`** **\*** **UNIX timestamp** + **`amount`** **\*** **integer** -**Payment cancelled at (UNIX timestamp in seconds)** + **Payment amount** -**`amount`** **\*** **integer** + **`name`** **string** -**Payment amount** + **Product name** -**`name`** **string** + **`buyer_name`** **string** -**Product name** + **Customer name** -**`buyer_name`** **string** + **`buyer_email`** **string** -**Customer name** + **Customer email** -**`buyer_email`** **string** + **`buyer_tel`** **string** -**Customer email**\ + **Customer phone number** -**`buyer_tel`** **string** + **`buyer_addr`** **string** -**Customer phone number** + **Customer address** -**`buyer_addr`** **string** + **`buyer_postcode`** **string** -**Customer address** + **Customer zip code** -**`buyer_postcode`** **string** + **`custom_data`** **string** -**Customer zip code** + **Echo data as JSON string** -**`custom_data`** **string** + **`schedule_status`** **\*** **string** -**Echo data as JSON string** + **Status of scheduled payment** -**`schedule_status`** **\***** ** **string** + - `scheduled` (payment is scheduled for execution) + - `executed` (payment is completed) + - `revoked` (payment is cancelled) -**Status of scheduled payment** + **`payment_status`** **\*** **string** -- `scheduled` (payment is scheduled for execution) -- `executed` (payment is completed) -- `revoked` (payment is cancelled) + **Payment approval state** -**`payment_status`** **\***** ** **string** + - `null`: Scheduled payment has not executed yet (actual null value, not string) + - `paid`: Scheduled payment is approved + - `failed`: Scheduled payment approval failed + - `cancelled`: Scheduled payment is refunded (cancelled) after approval -**Payment approval state** + **`fail_reason`** **string** -- `null`: Scheduled payment has not executed yet (actual null value, not string) -- `paid`: Scheduled payment is approved -- `failed`: Scheduled payment approval failed -- `cancelled`: Scheduled payment is refunded (cancelled) after approval - -**`fail_reason`** **string** - -**Reason for failure** - - - - - - - -```javascript -{ - // Response -} -``` - - + **Reason for failure** + + + + + ```ts + { + // Response + } + ``` + ### **Key request parameter description** -> **`schedules`** **\***** ****array** +> **`schedules`** **\*** **array** > > **Payment schedule** > -> -> > **\[ Required ]** > > - `merchant_uid` : Merchant order ID (Must be unique for each request) @@ -236,51 +224,58 @@ A non-zero code includes a message like 'Invalid payment info'. > **\[ Optional ]** > > - `tax_free` : Tax free amount out of `amount` (Default: 0) +> > - `name` : Order name (If omitted, sets to i'mport default setting) +> > - `buyer_name` : Customer name +> > - `buyer_email` : Customer email +> > - `buyer_tel` : Customer phone number +> > - `buyer_addr` : Customer address +> > - `buyer_postcode` : Customer zip code +> > - `custom_data` : Custom data +> > - `notice_url` : Notification URL to receive payment result > -> (If omitted, sets to Notification URL setting in Admin console) +> (If omitted, sets to Notification URL setting in Admin console) > > - `extra.naverUseCfm` : Expiration date (string in yyyyMMdd format). > - Specify if contract between Naver Pay and merchant requires this value for recurring payment. - -```json title="Sample" -[ - { - "merchant_uid": "your_merchant_uid1", - "schedule_at": 1478150985, - "currency": "KRW", - "amount": 1004, - "name": "order name", - "buyer_name": "customer name", - "buyer_email": "customer email", - "buyer_tel": "customer phone number", - "buyer_addr": "customer address", - "buyer_postcode": "customer zip code" - }, - { - "merchant_uid": "your_merchant_uid2", - "schedule_at": 1478150985, - "amount": 1004, - "name": "order name", - "buyer_name": "customer name", - "buyer_email": "customer email", - "buyer_tel": "customer phone number", - "buyer_addr": "customer address", - "buyer_postcode": "customer zip code" - } -] -``` - - + + ```json title="Sample" + [ + { + "merchant_uid": "your_merchant_uid1", + "schedule_at": 1478150985, + "currency": "KRW", + "amount": 1004, + "name": "order name", + "buyer_name": "customer name", + "buyer_email": "customer email", + "buyer_tel": "customer phone number", + "buyer_addr": "customer address", + "buyer_postcode": "customer zip code" + }, + { + "merchant_uid": "your_merchant_uid2", + "schedule_at": 1478150985, + "amount": 1004, + "name": "order name", + "buyer_name": "customer name", + "buyer_email": "customer email", + "buyer_tel": "customer phone number", + "buyer_addr": "customer address", + "buyer_postcode": "customer zip code" + } + ] + ``` + > **`pg`** **\*** **string** @@ -301,67 +296,63 @@ A non-zero code includes a message like 'Invalid payment info'. > - If you have multiple MIDs from NICE Payments, specify as **nice.MID1** or **nice.MID2**. -`schedules` details - -**If buyer\_name, buyer\_email, buyer\_tel, buyer\_addr, or buyer\_postcode** is omitted, it is set to the corresponding value of **customer\_uid** (**customer\_name, customer\_email, customer\_tel, customer\_addr, customer\_postcode)**. + `schedules` details + **If buyer\_name, buyer\_email, buyer\_tel, buyer\_addr, or buyer\_postcode** is omitted, it is set to the corresponding value of **customer\_uid** (**customer\_name, customer\_email, customer\_tel, customer\_addr, customer\_postcode)**.
-

Request Sample Json

- -```json -{ - "customer_uid": "TEST0001", - "schedules": [ - { - "merchant_uid": "order_id001", - "schedule_at": 1658480415, - "amount": 1004, - "name": "carrot", - } - ] -} -``` - +

Request Sample Json

+ + ```json + { + "customer_uid": "TEST0001", + "schedules": [ + { + "merchant_uid": "order_id001", + "schedule_at": 1658480415, + "amount": 1004, + "name": "carrot", + } + ] + } + ```
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": [ - { - "customer_uid": "string", - "merchant_uid": "string", - "imp_uid": "string", - "schedule_at": 0, - "executed_at": 0, - "revoked_at": 0, - "amount": 0, - "name": "string", - "buyer_name": "string", - "buyer_email": "string", - "buyer_tel": "string", - "buyer_addr": "string", - "buyer_postcode": "string", - "custom_data": "string", - "schedule_status": "scheduled", - "payment_status": "paid", - "fail_reason": "string" - } - ] -} -``` - +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": [ + { + "customer_uid": "string", + "merchant_uid": "string", + "imp_uid": "string", + "schedule_at": 0, + "executed_at": 0, + "revoked_at": 0, + "amount": 0, + "name": "string", + "buyer_name": "string", + "buyer_email": "string", + "buyer_tel": "string", + "buyer_addr": "string", + "buyer_postcode": "string", + "custom_data": "string", + "schedule_status": "scheduled", + "payment_status": "paid", + "fail_reason": "string" + } + ] + } + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/subscribe/schedule**](https://api.iamport.kr/#!/subscribe/schedule) + **Swagger Test Link** + [**https://api.iamport.kr/#!/subscribe/schedule**](https://api.iamport.kr/#!/subscribe/schedule) diff --git a/src/content/docs/en/api/virtual-account-api/cancel-virtual-account-api.mdx b/src/content/docs/en/api/virtual-account-api/cancel-virtual-account-api.mdx index e9bb84a86..0af20b741 100644 --- a/src/content/docs/en/api/virtual-account-api/cancel-virtual-account-api.mdx +++ b/src/content/docs/en/api/virtual-account-api/cancel-virtual-account-api.mdx @@ -4,366 +4,352 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Cancels a virtual account before payment is deposited. +## Cancels a virtual account before payment is deposited.
-

Supported PGs

- -- **KG INCIS** -- **NHN KCP** -- **TOSS Payments** -- **Nice Payments** -- **KICC** -- **Settle Bank** -- **Smartro** - +

Supported PGs

+ + - **KG INCIS** + - **NHN KCP** + - **TOSS Payments** + - **Nice Payments** + - **KICC** + - **Settle Bank** + - **Smartro**
- -You can cancel a virtual account before deposit to prevent the buyer from depositing by mistake. - -**imp_uid** - - must be specified. (Since there can be multiple virtual accounts pending payment deposit for a single merchant_uid, you can only cancel a virtual account based on the imp_uid) - - - -### Parameters - -#### Path - - - - -**i'mport transaction ID** + + You can cancel a virtual account before deposit to prevent the buyer from depositing by mistake. - + **imp\_uid** - + must be specified. (Since there can be multiple virtual accounts pending payment deposit for a single merchant\_uid, you can only cancel a virtual account based on the imp\_uid) + -#### Query + ### Parameters - -**API Key** + #### Path -**(Required for KG INICIS Only)** + + + **i'mport transaction ID** + + - + #### Query -### Responses + + **API Key** - - - -**`code`** **\***** ****integer** + **(Required for KG INICIS Only)** + -**Response code** + ### Responses -0: success, Not 0: check the message + + + + **`code`** **\*** **integer** -**`message`** **\***** ****string** + **Response code** -**Response message** + 0: success, Not 0: check the message -A non-zero code includes a message like 'Invalid payment info'. + **`message`** **\*** **string** -**`response`** **(PaymentAnnotation, optional)** + **Response message** - - + A non-zero code includes a message like 'Invalid payment info'. - - -**`code`** **\***** ****integer** + **`response`** **(PaymentAnnotation, optional)** + + -**`Response code`** + + + **`code`** **\*** **integer** -0: success, Not 0: check the message + **`Response code`** -**`message`** **\***** ****string** + 0: success, Not 0: check the message -**Response message** + **`message`** **\*** **string** -A non-zero code includes a message like 'Invalid payment info. + **Response message** -**`imp_uid`** \* **string** + A non-zero code includes a message like 'Invalid payment info. -**i'mport payment transaction UID** + **`imp_uid`** \* **string** -**`merchant_uid`** **\***** ****string** + **i'mport payment transaction UID** -**Order ID** + **`merchant_uid`** **\*** **string** -**`pay_method`** **\***** ****string** + **Order ID** -**Payment method code** + **`pay_method`** **\*** **string** -**`channel`** **\***** ****string** + **Payment method code** -**Payment environment code** + **`channel`** **\*** **string** -- pc**:** (authenticated) PC -- mobile: (authenticated) mobile -- api: recurring or non-authenticated + **Payment environment code** -**`pg_provider`** **\***** ****string** + - pc: (authenticated) PC + - mobile: (authenticated) mobile + - api: recurring or non-authenticated -**PG code** + **`pg_provider`** **\*** **string** ---- + **PG code** -**`emb_pg_provider`** **\***** ****string** + --- -**Hub-type PG code** + **`emb_pg_provider`** **\*** **string** -**`pg_tid`** **\*** **string** + **Hub-type PG code** -**PG transaction ID** + **`pg_tid`** **\*** **string** -**`pg_id`** **\***** ****string** + **PG transaction ID** -**PG MID** + **`pg_id`** **\*** **string** -**`escrow`** **boolean** + **PG MID** -**Indicates an escrow payment** + **`escrow`** **boolean** -**`apply_num`** **string** + **Indicates an escrow payment** -**Credit card approval number** + **`apply_num`** **string** -**`bank_code`** **string** + **Credit card approval number** -**Bank code** + **`bank_code`** **string** -**`bank_name`** **string** + **Bank code** -**Bank name** + **`bank_name`** **string** ---- + **Bank name** -**`card_code`** **string** + --- -**Credit card code (KFTC Credit Card Codes:** [**link**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) ) + **`card_code`** **string** -**`card_name`** **string** + **Credit card code (KFTC Credit Card Codes:** [**link**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) ) -**Credit card name** + **`card_name`** **string** -**`card_quota`** **integer** + **Credit card name** -**Number of installments (0 means one-off)** + **`card_quota`** **integer** -**`card_number`** **string** + **Number of installments (0 means one-off)** -**Masked credit card number** + **`card_number`** **string** ---- + **Masked credit card number** -**`card_type`** **string** + --- -**Credit card type code** + **`card_type`** **string** -- 0: credit -- 1: check + **Credit card type code** -**`vbank_code`** **string** + - 0: credit + - 1: check -**Virtual account bank code (refer to image below)** + **`vbank_code`** **string** ---- + **Virtual account bank code (refer to image below)** -**`vbank_name`** **string** + --- -**Refund virtual account** + **`vbank_name`** **string** -**`vbank_holder`** **string** + **Refund virtual account** -**Refund virtual account holder** + **`vbank_holder`** **string** -**`vbank_date`** **string** + **Refund virtual account holder** -**Refund virtual account expiration (UNIX timestamp)** + **`vbank_date`** **string** -**`vbank_issued_at`** **string** + **Refund virtual account expiration (UNIX timestamp)** -**Refund virtual account created at (UNIX timestamp)** + **`vbank_issued_at`** **string** -**`name`** **string** + **Refund virtual account created at (UNIX timestamp)** -**Product name** + **`name`** **string** -**`amount`** **\*** **integer** + **Product name** -**Order (payment) amount** + **`amount`** **\*** **integer** -**`cancel_amount`** **integer** + **Order (payment) amount** -**Cancelled amount** + **`cancel_amount`** **integer** -**`currency`** **string** + **Cancelled amount** -**Currency** - -- USD -- KRW -- EUR - ---- + **`currency`** **string** -**`buyer_name`** **string** + **Currency** -**Customer name** + - USD + - KRW + - EUR -**`buyer_email`** **string** + --- -**Customer email**\ + **`buyer_name`** **string** -**`buyer_tel`** **string** + **Customer name** -**Customer phone** + **`buyer_email`** **string** -**`buyer_addr`** **string** + **Customer email** -**Customer address** + **`buyer_tel`** **string** -**`buyer_postcode`** **string** + **Customer phone** -**Customer zip code** + **`buyer_addr`** **string** -**`custom_data`** **string** + **Customer address** -**echo data as JSON string** + **`buyer_postcode`** **string** -**`user_agent`** **string** + **Customer zip code** -**UserAgent of the device where payment is initiated** + **`custom_data`** **string** -**`status`** **\***** ****string** + **echo data as JSON string** -**Payment status code** + **`user_agent`** **string** -- ready -- paid -- cancelled -- failed + **UserAgent of the device where payment is initiated** -**`started_at`** **\*** **string** + **`status`** **\*** **string** -**Payment started at (UNIX timestamp)** + **Payment status code** -**`paid_at`** **\***** ****string** + - ready + - paid + - cancelled + - failed -**Payment completed at (UNIX timestamp)**\ + **`started_at`** **\*** **string** -**`failed_at`** **\***** ****string** + **Payment started at (UNIX timestamp)** -**Payment failed at (UNIX timestamp)** + **`paid_at`** **\*** **string** -**`cancelled_at`** **\***** ****string** + **Payment completed at (UNIX timestamp)** -**Payment cancelled at (UNIX timestamp)** + **`failed_at`** **\*** **string** -**`fail_reason`** **string** + **Payment failed at (UNIX timestamp)** -**Reason for failure** + **`cancelled_at`** **\*** **string** -**`cancel_reason`** **string** + **Payment cancelled at (UNIX timestamp)** -**Reason for cancellation** + **`fail_reason`** **string** -**`receipt_url`** **string** + **Reason for failure** -**Credit card receipt URL** + **`cancel_reason`** **string** -**`cash_receipt_issued` ****boolean** + **Reason for cancellation** -**Option to automatically issue cash receipt** + **`receipt_url`** **string** -**`customer_uid`** **string** + **Credit card receipt URL** -**customer\_uid related to the payment transaction** + **`cash_receipt_issued`** **boolean** -**`customer_uid_usage`** **string** + **Option to automatically issue cash receipt** -**customer\_uid use code** + **`customer_uid`** **string** -- payment.scheduled: scheduled payment -- payment: payment -- issue**: billing key issuance** + **customer\_uid related to the payment transaction** -**`cancel_history`** **(Array\[PaymentCancelAnnotation], optional):** + **`customer_uid_usage`** **string** -**`Cancellation/partial cancellation history`** + **customer\_uid use code** - - + - payment.scheduled: scheduled payment + - payment: payment + - issue: billing key issuance - - -**cancel\_history array \[]** + **`cancel_history`** **(Array\[PaymentCancelAnnotation], optional):** -**`pg_tid`** **\***** ****string** + **`Cancellation/partial cancellation history`** + + -**PG cancellation transaction ID** + + + **cancel\_history array \[]** -**`amount`** **\*** **integer** + **`pg_tid`** **\*** **string** -**Cancelled amount** + **PG cancellation transaction ID** -**`cancelled_at`** **\*** **string** + **`amount`** **\*** **integer** -**Cancelled at (UNIX timestamp)** + **Cancelled amount** -**`reason`** **\*** **string(256)** + **`cancelled_at`** **\*** **string** -**Reason for cancellation** + **Cancelled at (UNIX timestamp)** -**`receipt_url`** **\***** ****string(300)** + **`reason`** **\*** **string(256)** -**Cancellation receipt URL. Availability varies by PG.** + **Reason for cancellation** - - + **`receipt_url`** **\*** **string(300)** - + **Cancellation receipt URL. Availability varies by PG.** + + + - -```javascript -{ - // Response -} -``` + + ```ts + { + // Response + } + ``` + - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - + + ```ts + { + // Response + } + ``` + + + ```ts + { + // Response + } + ``` + ### Key request parameter description @@ -378,79 +364,77 @@ A non-zero code includes a message like 'Invalid payment info. > (**Required for KG INICIS only**)
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": { - "imp_uid": "string", - "merchant_uid": "string", - "pay_method": "string", - "channel": "pc", - "pg_provider": "string", - "emb_pg_provider": "string", - "pg_tid": "string", - "pg_id": "string", - "escrow": true, - "apply_num": "string", - "bank_code": "string", - "bank_name": "string", - "card_code": "string", - "card_name": "string", - "card_quota": 0, - "card_number": "string", - "card_type": "null", - "vbank_code": "string", - "vbank_name": "string", - "vbank_num": "string", - "vbank_holder": "string", - "vbank_date": 0, - "vbank_issued_at": 0, - "name": "string", - "amount": 0, - "cancel_amount": 0, - "currency": "string", - "buyer_name": "string", - "buyer_email": "string", - "buyer_tel": "string", - "buyer_addr": "string", - "buyer_postcode": "string", - "custom_data": "string", - "user_agent": "string", - "status": "ready", - "started_at": 0, - "paid_at": 0, - "failed_at": 0, - "cancelled_at": 0, - "fail_reason": "string", - "cancel_reason": "string", - "receipt_url": "string", - "cancel_history": [ - { - "pg_tid": "string", - "amount": 0, - "cancelled_at": 0, - "reason": "string", - "receipt_url": "string" - } - ], - "cancel_receipt_urls": [ - "string" - ], - "cash_receipt_issued": true, - "customer_uid": "string", - "customer_uid_usage": "issue" +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "imp_uid": "string", + "merchant_uid": "string", + "pay_method": "string", + "channel": "pc", + "pg_provider": "string", + "emb_pg_provider": "string", + "pg_tid": "string", + "pg_id": "string", + "escrow": true, + "apply_num": "string", + "bank_code": "string", + "bank_name": "string", + "card_code": "string", + "card_name": "string", + "card_quota": 0, + "card_number": "string", + "card_type": "null", + "vbank_code": "string", + "vbank_name": "string", + "vbank_num": "string", + "vbank_holder": "string", + "vbank_date": 0, + "vbank_issued_at": 0, + "name": "string", + "amount": 0, + "cancel_amount": 0, + "currency": "string", + "buyer_name": "string", + "buyer_email": "string", + "buyer_tel": "string", + "buyer_addr": "string", + "buyer_postcode": "string", + "custom_data": "string", + "user_agent": "string", + "status": "ready", + "started_at": 0, + "paid_at": 0, + "failed_at": 0, + "cancelled_at": 0, + "fail_reason": "string", + "cancel_reason": "string", + "receipt_url": "string", + "cancel_history": [ + { + "pg_tid": "string", + "amount": 0, + "cancelled_at": 0, + "reason": "string", + "receipt_url": "string" + } + ], + "cancel_receipt_urls": [ + "string" + ], + "cash_receipt_issued": true, + "customer_uid": "string", + "customer_uid_usage": "issue" + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/vbanks/revokeVbank**](https://api.iamport.kr/#!/vbanks/revokeVbank) + **Swagger Test Link** + [**https://api.iamport.kr/#!/vbanks/revokeVbank**](https://api.iamport.kr/#!/vbanks/revokeVbank) diff --git a/src/content/docs/en/api/virtual-account-api/get-account-holder-api.mdx b/src/content/docs/en/api/virtual-account-api/get-account-holder-api.mdx index 218417ba5..40090607e 100644 --- a/src/content/docs/en/api/virtual-account-api/get-account-holder-api.mdx +++ b/src/content/docs/en/api/virtual-account-api/get-account-holder-api.mdx @@ -4,120 +4,106 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Gets the account holder name for a bank account. +## Gets the account holder name for a bank account. - - - - -### Parameters - -#### Query - - - - -**Bank code** + - + ### Parameters - - -**Account number** + #### Query -`Numbers and special characters allowed` + + + **Bank code** + + - + + **Account number** -### Responses + `Numbers and special characters allowed` + - - - -**`code`** **\*** **integer** + ### Responses -**Response code** + + + + **`code`** **\*** **integer** -0: success, Not 0: check the message + **Response code** -**`message`** **\*** **string** + 0: success, Not 0: check the message -**Response message** + **`message`** **\*** **string** -A non-zero code includes a message like 'Invalid payment info'. + **Response message** -**`response`** **(VbankHolderAnnotation, optional)** + A non-zero code includes a message like 'Invalid payment info'. - - + **`response`** **(VbankHolderAnnotation, optional)** + + - - -**`bank_holder`** **`*`** **`string`** + + + **`bank_holder`** **`*`** **`string`** -**`Account holder name`** + **`Account holder name`** + + + - - + + ```ts + { + // Response + } + ``` + - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - + + ```ts + { + // Response + } + ``` + + + ```ts + { + // Response + } + ``` +
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": { - "bank_holder": "string" +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "bank_holder": "string" + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/vbanks/queryBankHolder**](https://api.iamport.kr/#!/vbanks/queryBankHolder) + **Swagger Test Link** + [**https://api.iamport.kr/#!/vbanks/queryBankHolder**](https://api.iamport.kr/#!/vbanks/queryBankHolder) diff --git a/src/content/docs/en/api/virtual-account-api/request-virtual-account-api.mdx b/src/content/docs/en/api/virtual-account-api/request-virtual-account-api.mdx index 5f0c1faf8..3a5c6e32d 100644 --- a/src/content/docs/en/api/virtual-account-api/request-virtual-account-api.mdx +++ b/src/content/docs/en/api/virtual-account-api/request-virtual-account-api.mdx @@ -4,15 +4,15 @@ description: "" --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Requests a virtual account for payment collection from the customer. +## Requests a virtual account for payment collection from the customer. Supported PGs @@ -21,384 +21,367 @@ Supported PGs - KG INCIS - -You can create a virtual account for a desired bank and account holder name. (Requires a separate PG contract) - - - -### Parameters - -#### Body - - - - -**Order ID** - - - - - - - -**Amount** - - - - - - + + You can create a virtual account for a desired bank and account holder name. (Requires a separate PG contract) + -**Bank code** + ### Parameters - + #### Body - - -**Account expiration** + + + **Order ID** + + -**UNIX TIMESTAMP** + + + **Amount** + + - - - + + + **Bank code** + + -**Account holder** + + **Account expiration** - + **UNIX TIMESTAMP** + - - -**Order name** + + + **Account holder** + + - - -**Customer name** + + **Order name** + - - -**Customer email** + + **Customer name** + - - -**Customer phone** + + **Customer email** + - - -**Customer address** + + **Customer phone** + - - -**Customer zip code** + + **Customer address** + - - -**PG code** + + **Customer zip code** + - - -**Notification URL** + + **PG code** + - - -**Custom data** + + **Notification URL** + - + + **Custom data** + -#### Query + #### Query - -**API Key** + + **API Key** -**(Required for KG INICIS Only)** + **(Required for KG INICIS Only)** + - + ### Responses -### Responses + + + + **`code`** **\*** **integer** - - - -**`code`** **\***** ****integer** + **Response code** -**Response code** + 0: success, Not 0: check the message -0: success, Not 0: check the message + **`message`** **\*** **string** -**`message`** **\***\*\* ****string\*\* + **Response message** -**Response message** + A non-zero code includes a message like 'Invalid payment info'. -A non-zero code includes a message like 'Invalid payment info'. + **`response`** **(PaymentAnnotation, optional)** + + -**`response`** **(PaymentAnnotation, optional)** + + + **`code`** **\*** **integer** - - + **`Response code`** - - -**`code`** **\***** ****integer** + 0: success, Not 0: check the message -**`Response code`** + **`message`** **\*** **string** -0: success, Not 0: check the message + **Response message** -**`message`** **\***\*\* ****string\*\* + A non-zero code includes a message like 'Invalid payment info. -**Response message** + **`imp_uid`** \* **string** -A non-zero code includes a message like 'Invalid payment info. + **i'mport payment transaction UID** -**`imp_uid`** \* **string** + **`merchant_uid`** **\*** **string** -**i'mport payment transaction UID** + **Order ID** -**`merchant_uid`** **\***\*\* ****string\*\* + **`pay_method`** **\*** **string** -**Order ID** + **Payment method code** -**`pay_method`** **\***\*\* ****string\*\* + **`channel`** **\*** **string** -**Payment method code** + **Payment environment code** -**`channel`** **\***\*\* ****string\*\* + - pc: (authenticated) PC + - mobile: (authenticated) mobile + - api: recurring or non-authenticated -**Payment environment code** + **`pg_provider`** **\*** **string** -- pc**:** (authenticated) PC -- mobile: (authenticated) mobile -- api: recurring or non-authenticated + **PG code** -**`pg_provider`** **\***\*\* ****string\*\* + --- -**PG code** + **`emb_pg_provider`** **\*** **string** ---- - -**`emb_pg_provider`** **\***\*\* ****string\*\* - -**Hub-type PG code** - -**`pg_tid`** **\*** **string** - -**PG transaction ID** - -**`pg_id`** **\***\*\* ****string\*\* - -**PG MID** + **Hub-type PG code** -**`escrow`** **boolean** + **`pg_tid`** **\*** **string** -**Indicates an escrow payment** + **PG transaction ID** -**`apply_num`** **string** + **`pg_id`** **\*** **string** -**Credit card approval number** + **PG MID** -**`bank_code`** **string** + **`escrow`** **boolean** -**Bank code** + **Indicates an escrow payment** -**`bank_name`** **string** + **`apply_num`** **string** -**Bank name** + **Credit card approval number** ---- + **`bank_code`** **string** -**`card_code`** **string** + **Bank code** -**Credit card code (KFTC Credit Card Codes:** [**link**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) ) + **`bank_name`** **string** -**`card_name`** **string** + **Bank name** -**Credit card name** + --- -**`card_quota`** **integer** + **`card_code`** **string** -**Number of installments (0 means one-off)** + **Credit card code (KFTC Credit Card Codes:** [**link**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) ) -**`card_number`** **string** + **`card_name`** **string** -**Masked credit card number** + **Credit card name** ---- + **`card_quota`** **integer** -**`card_type`** **string** + **Number of installments (0 means one-off)** -**Credit card type code** + **`card_number`** **string** -- 0: credit -- 1: check + **Masked credit card number** -**`vbank_code`** **string** + --- -**Virtual account bank code (refer to image below)** + **`card_type`** **string** ---- + **Credit card type code** -**`vbank_name`** **string** + - 0: credit + - 1: check -**Refund virtual account** + **`vbank_code`** **string** -**`vbank_holder`** **string** + **Virtual account bank code (refer to image below)** -**Refund virtual account holder** + --- -**`vbank_date`** **string** + **`vbank_name`** **string** -**Refund virtual account expiration (UNIX timestamp)** + **Refund virtual account** -**`vbank_issued_at`** **string** + **`vbank_holder`** **string** -**Refund virtual account created at (UNIX timestamp)** + **Refund virtual account holder** -**`name`** **string** + **`vbank_date`** **string** -**Product name** + **Refund virtual account expiration (UNIX timestamp)** -**`amount`** **\*** **integer** + **`vbank_issued_at`** **string** -**Order (payment) amount** + **Refund virtual account created at (UNIX timestamp)** -**`cancel_amount`** **integer** + **`name`** **string** -**Cancelled amount** + **Product name** -**`currency`** **string** + **`amount`** **\*** **integer** -**Currency** + **Order (payment) amount** -- USD -- KRW -- EUR + **`cancel_amount`** **integer** ---- + **Cancelled amount** -**`buyer_name`** **string** + **`currency`** **string** -**Customer name** + **Currency** -**`buyer_email`** **string** + - USD + - KRW + - EUR -**Customer email**\ + --- -**`buyer_tel`** **string** + **`buyer_name`** **string** -**Customer phone** + **Customer name** -**`buyer_addr`** **string** + **`buyer_email`** **string** -**Customer address** + **Customer email** -**`buyer_postcode`** **string** + **`buyer_tel`** **string** -**Customer zip code** + **Customer phone** -**`custom_data`** **string** + **`buyer_addr`** **string** -**echo data as JSON string** + **Customer address** -**`user_agent`** **string** + **`buyer_postcode`** **string** -**UserAgent of the device where payment is initiated** + **Customer zip code** -**`status`** **\***\*\* ****string\*\* + **`custom_data`** **string** -**Payment status code** + **echo data as JSON string** -- ready -- paid -- cancelled -- failed + **`user_agent`** **string** -**`started_at`** **\*** **string** + **UserAgent of the device where payment is initiated** -**Payment started at (UNIX timestamp)** + **`status`** **\*** **string** -**`paid_at`** **\***\*\* ****string\*\* + **Payment status code** -**Payment completed at (UNIX timestamp)**\ + - ready + - paid + - cancelled + - failed -**`failed_at`** **\***\*\* ****string\*\* + **`started_at`** **\*** **string** -**Payment failed at (UNIX timestamp)** + **Payment started at (UNIX timestamp)** -**`cancelled_at`** **\***\*\* ****string\*\* + **`paid_at`** **\*** **string** -**Payment cancelled at (UNIX timestamp)** + **Payment completed at (UNIX timestamp)** -**`fail_reason`** **string** + **`failed_at`** **\*** **string** -**Reason for failure** + **Payment failed at (UNIX timestamp)** -**`cancel_reason`** **string** + **`cancelled_at`** **\*** **string** -**Reason for cancellation** + **Payment cancelled at (UNIX timestamp)** -**`receipt_url`** **string** + **`fail_reason`** **string** -**Credit card receipt URL** + **Reason for failure** -**`cash_receipt_issued` ****boolean** + **`cancel_reason`** **string** -**Option to automatically issue cash receipt** + **Reason for cancellation** -**`customer_uid`** **string** + **`receipt_url`** **string** -**customer_uid related to the payment transaction** + **Credit card receipt URL** -**`customer_uid_usage`** **string** + **`cash_receipt_issued`** **boolean** -**customer_uid use code** + **Option to automatically issue cash receipt** -- payment.scheduled: scheduled payment -- payment: payment -- issue**: billing key issuance** + **`customer_uid`** **string** -**`cancel_history`** **(Array\[PaymentCancelAnnotation], optional):** + **customer\_uid related to the payment transaction** -**`Cancellation/partial cancellation history`** + **`customer_uid_usage`** **string** - - + **customer\_uid use code** - - -**`pg_tid`** **\***** ****string** + - payment.scheduled: scheduled payment + - payment: payment + - issue: billing key issuance -**PG cancellation transaction ID** + **`cancel_history`** **(Array\[PaymentCancelAnnotation], optional):** -**`amount`** **\*** **integer** + **`Cancellation/partial cancellation history`** + + -**Cancelled amount** + + + **`pg_tid`** **\*** **string** -**`cancelled_at`** **\*** **string** + **PG cancellation transaction ID** -**Cancelled at (UNIX timestamp)** + **`amount`** **\*** **integer** -**`reason`** **\*** **string(256)** + **Cancelled amount** -**Reason for cancellation** + **`cancelled_at`** **\*** **string** -**`receipt_url`** **\***\*\* ****string(300)\*\* + **Cancelled at (UNIX timestamp)** -**Cancellation receipt URL. Availability varies by PG.** + **`reason`** **\*** **string(256)** - - + **Reason for cancellation** - + **`receipt_url`** **\*** **string(300)** - -```javascript -{ - // Response -} -``` - - + **Cancellation receipt URL. Availability varies by PG.** + + + + + ```ts + { + // Response + } + ``` + ### Key request parameter description @@ -449,77 +432,75 @@ A non-zero code includes a message like 'Invalid payment info. > (**Required for KG INICIS only**)
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": { - "imp_uid": "string", - "merchant_uid": "string", - "pay_method": "string", - "channel": "pc", - "pg_provider": "string", - "emb_pg_provider": "string", - "pg_tid": "string", - "pg_id": "string", - "escrow": true, - "apply_num": "string", - "bank_code": "string", - "bank_name": "string", - "card_code": "string", - "card_name": "string", - "card_quota": 0, - "card_number": "string", - "card_type": "null", - "vbank_code": "string", - "vbank_name": "string", - "vbank_num": "string", - "vbank_holder": "string", - "vbank_date": 0, - "vbank_issued_at": 0, - "name": "string", - "amount": 0, - "cancel_amount": 0, - "currency": "string", - "buyer_name": "string", - "buyer_email": "string", - "buyer_tel": "string", - "buyer_addr": "string", - "buyer_postcode": "string", - "custom_data": "string", - "user_agent": "string", - "status": "ready", - "started_at": 0, - "paid_at": 0, - "failed_at": 0, - "cancelled_at": 0, - "fail_reason": "string", - "cancel_reason": "string", - "receipt_url": "string", - "cancel_history": [ - { - "pg_tid": "string", - "amount": 0, - "cancelled_at": 0, - "reason": "string", - "receipt_url": "string" - } - ], - "cancel_receipt_urls": ["string"], - "cash_receipt_issued": true, - "customer_uid": "string", - "customer_uid_usage": "issue" +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "imp_uid": "string", + "merchant_uid": "string", + "pay_method": "string", + "channel": "pc", + "pg_provider": "string", + "emb_pg_provider": "string", + "pg_tid": "string", + "pg_id": "string", + "escrow": true, + "apply_num": "string", + "bank_code": "string", + "bank_name": "string", + "card_code": "string", + "card_name": "string", + "card_quota": 0, + "card_number": "string", + "card_type": "null", + "vbank_code": "string", + "vbank_name": "string", + "vbank_num": "string", + "vbank_holder": "string", + "vbank_date": 0, + "vbank_issued_at": 0, + "name": "string", + "amount": 0, + "cancel_amount": 0, + "currency": "string", + "buyer_name": "string", + "buyer_email": "string", + "buyer_tel": "string", + "buyer_addr": "string", + "buyer_postcode": "string", + "custom_data": "string", + "user_agent": "string", + "status": "ready", + "started_at": 0, + "paid_at": 0, + "failed_at": 0, + "cancelled_at": 0, + "fail_reason": "string", + "cancel_reason": "string", + "receipt_url": "string", + "cancel_history": [ + { + "pg_tid": "string", + "amount": 0, + "cancelled_at": 0, + "reason": "string", + "receipt_url": "string" + } + ], + "cancel_receipt_urls": ["string"], + "cash_receipt_issued": true, + "customer_uid": "string", + "customer_uid_usage": "issue" + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/vbanks/createVbank**](https://api.iamport.kr/#!/vbanks/createVbank) + **Swagger Test Link** + [**https://api.iamport.kr/#!/vbanks/createVbank**](https://api.iamport.kr/#!/vbanks/createVbank) diff --git a/src/content/docs/en/api/virtual-account-api/update-virtual-account-api.mdx b/src/content/docs/en/api/virtual-account-api/update-virtual-account-api.mdx index 0ded9738d..ba6f6f019 100644 --- a/src/content/docs/en/api/virtual-account-api/update-virtual-account-api.mdx +++ b/src/content/docs/en/api/virtual-account-api/update-virtual-account-api.mdx @@ -4,444 +4,428 @@ description: '' --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Updates the deposit expiration or amount for a virtual account that is pending deposit. +## Updates the deposit expiration or amount for a virtual account that is pending deposit.
-

Supported PGs

- -- **KG INCIS** -- **NHN KCP** -- **TOSS Payments** -- **Nice Payments** -- **KICC** -- **Settle Bank** -- **Smartro** - +

Supported PGs

+ + - **KG INCIS** + - **NHN KCP** + - **TOSS Payments** + - **Nice Payments** + - **KICC** + - **Settle Bank** + - **Smartro**
- -**imp_uid** - - must be specified. (Since there can be multiple virtual accounts pending payment deposit for a single merchant_uid, you can only update a virtual account based on the imp_uid) - - - -### Parameters - -#### Path - - - - -**i'mport transaction ID** - - + + **imp\_uid** - + must be specified. (Since there can be multiple virtual accounts pending payment deposit for a single merchant\_uid, you can only update a virtual account based on the imp\_uid) + -#### Body + ### Parameters - -**Amount** + #### Path - - -**Account expiration** + + + **i'mport transaction ID** + + -`UNIX TIMESTAMP` + #### Body - + + **Amount** + -### Responses + + **Account expiration** - - - -**`code`** **\***** ****integer** + `UNIX TIMESTAMP` + -**Response code** + ### Responses -0: success, Not 0: check the message + + + + **`code`** **\*** **integer** -**`message`** **\***** ****string** + **Response code** -**Response message** + 0: success, Not 0: check the message -A non-zero code includes a message like 'Invalid payment info'. + **`message`** **\*** **string** -**`response`** **(PaymentAnnotation, optional)** + **Response message** - - + A non-zero code includes a message like 'Invalid payment info'. - - -**`code`** **\***** ****integer** + **`response`** **(PaymentAnnotation, optional)** + + -**`Response code`** + + + **`code`** **\*** **integer** -0: success, Not 0: check the message + **`Response code`** -**`message`** **\***** ****string** + 0: success, Not 0: check the message -**Response message** + **`message`** **\*** **string** -A non-zero code includes a message like 'Invalid payment info. + **Response message** -**`imp_uid`** \* **string** + A non-zero code includes a message like 'Invalid payment info. -**i'mport payment transaction UID** + **`imp_uid`** \* **string** -**`merchant_uid`** **\***** ****string** + **i'mport payment transaction UID** -**Order ID** + **`merchant_uid`** **\*** **string** -**`pay_method`** **\***** ****string** + **Order ID** -**Payment method code** + **`pay_method`** **\*** **string** -**`channel`** **\***** ****string** + **Payment method code** -**Payment environment code** + **`channel`** **\*** **string** -- pc**:** (authenticated) PC -- mobile: (authenticated) mobile -- api: recurring or non-authenticated + **Payment environment code** -**`pg_provider`** **\***** ****string** + - pc: (authenticated) PC + - mobile: (authenticated) mobile + - api: recurring or non-authenticated -**PG code** + **`pg_provider`** **\*** **string** ---- + **PG code** -**`emb_pg_provider`** **\***** ****string** + --- -**Hub-type PG code** + **`emb_pg_provider`** **\*** **string** -**`pg_tid`** **\*** **string** + **Hub-type PG code** -**PG transaction ID** + **`pg_tid`** **\*** **string** -**`pg_id`** **\***** ****string** + **PG transaction ID** -**PG MID** + **`pg_id`** **\*** **string** -**`escrow`** **boolean** + **PG MID** -**Indicates an escrow payment** + **`escrow`** **boolean** -**`apply_num`** **string** + **Indicates an escrow payment** -**Credit card approval number** + **`apply_num`** **string** -**`bank_code`** **string** + **Credit card approval number** -**Bank code** + **`bank_code`** **string** -**`bank_name`** **string** + **Bank code** -**Bank name** + **`bank_name`** **string** ---- + **Bank name** -**`card_code`** **string** + --- -**Credit card code (KFTC Credit Card Codes:** [**link**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) ) + **`card_code`** **string** -**`card_name`** **string** + **Credit card code (KFTC Credit Card Codes:** [**link**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) ) -**Credit card name** + **`card_name`** **string** -**`card_quota`** **integer** + **Credit card name** -**Number of installments (0 means one-off)** + **`card_quota`** **integer** -**`card_number`** **string** + **Number of installments (0 means one-off)** -**Masked credit card number** + **`card_number`** **string** ---- + **Masked credit card number** -**`card_type`** **string** + --- -**Credit card type code** + **`card_type`** **string** -- 0: credit -- 1: check + **Credit card type code** -**`vbank_code`** **string** + - 0: credit + - 1: check -**Virtual account bank code (refer to image below)** + **`vbank_code`** **string** ---- + **Virtual account bank code (refer to image below)** -**`vbank_name`** **string** + --- -**Refund virtual account** + **`vbank_name`** **string** -**`vbank_holder`** **string** + **Refund virtual account** -**Refund virtual account holder** + **`vbank_holder`** **string** -**`vbank_date`** **string** + **Refund virtual account holder** -**Refund virtual account expiration (UNIX timestamp)** + **`vbank_date`** **string** -**`vbank_issued_at`** **string** + **Refund virtual account expiration (UNIX timestamp)** -**Refund virtual account created at (UNIX timestamp)** + **`vbank_issued_at`** **string** -**`name`** **string** + **Refund virtual account created at (UNIX timestamp)** -**Product name** + **`name`** **string** -**`amount`** **\*** **integer** + **Product name** -**Order (payment) amount** + **`amount`** **\*** **integer** -**`cancel_amount`** **integer** + **Order (payment) amount** -**Cancelled amount** + **`cancel_amount`** **integer** -**`currency`** **string** + **Cancelled amount** -**Currency** - -- USD -- KRW -- EUR - ---- + **`currency`** **string** -**`buyer_name`** **string** + **Currency** -**Customer name** + - USD + - KRW + - EUR -**`buyer_email`** **string** + --- -**Customer email**\ + **`buyer_name`** **string** -**`buyer_tel`** **string** + **Customer name** -**Customer phone** + **`buyer_email`** **string** -**`buyer_addr`** **string** + **Customer email** -**Customer address** + **`buyer_tel`** **string** -**`buyer_postcode`** **string** + **Customer phone** -**Customer zip code** + **`buyer_addr`** **string** -**`custom_data`** **string** + **Customer address** -**echo data as JSON string** + **`buyer_postcode`** **string** -**`user_agent`** **string** + **Customer zip code** -**UserAgent of the device where payment is initiated** + **`custom_data`** **string** -**`status`** **\***** ****string** + **echo data as JSON string** -**Payment status code** + **`user_agent`** **string** -- ready -- paid -- cancelled -- failed + **UserAgent of the device where payment is initiated** -**`started_at`** **\*** **string** + **`status`** **\*** **string** -**Payment started at (UNIX timestamp)** + **Payment status code** -**`paid_at`** **\***** ****string** + - ready + - paid + - cancelled + - failed -**Payment completed at (UNIX timestamp)**\ + **`started_at`** **\*** **string** -**`failed_at`** **\***** ****string** + **Payment started at (UNIX timestamp)** -**Payment failed at (UNIX timestamp)** + **`paid_at`** **\*** **string** -**`cancelled_at`** **\***** ****string** + **Payment completed at (UNIX timestamp)** -**Payment cancelled at (UNIX timestamp)** + **`failed_at`** **\*** **string** -**`fail_reason`** **string** + **Payment failed at (UNIX timestamp)** -**Reason for failure** + **`cancelled_at`** **\*** **string** -**`cancel_reason`** **string** + **Payment cancelled at (UNIX timestamp)** -**Reason for cancellation** + **`fail_reason`** **string** -**`receipt_url`** **string** + **Reason for failure** -**Credit card receipt URL** + **`cancel_reason`** **string** -**`cash_receipt_issued` ****boolean** + **Reason for cancellation** -**Option to automatically issue cash receipt** + **`receipt_url`** **string** -**`customer_uid`** **string** + **Credit card receipt URL** -**customer\_uid related to the payment transaction** + **`cash_receipt_issued`** **boolean** -**`customer_uid_usage`** **string** + **Option to automatically issue cash receipt** -**customer\_uid use code** + **`customer_uid`** **string** -- payment.scheduled: scheduled payment -- payment: payment -- issue**: billing key issuance** + **customer\_uid related to the payment transaction** -**`cancel_history`** **(Array\[PaymentCancelAnnotation], optional):** + **`customer_uid_usage`** **string** -**`Cancellation/partial cancellation history`** + **customer\_uid use code** - - + - payment.scheduled: scheduled payment + - payment: payment + - issue: billing key issuance - - -**cancel\_history array \[]** + **`cancel_history`** **(Array\[PaymentCancelAnnotation], optional):** -**`pg_tid`** **\***** ****string** + **`Cancellation/partial cancellation history`** + + -**PG cancellation transaction ID** + + + **cancel\_history array \[]** -**`amount`** **\*** **integer** + **`pg_tid`** **\*** **string** -**Cancelled amount** + **PG cancellation transaction ID** -**`cancelled_at`** **\*** **string** + **`amount`** **\*** **integer** -**Cancelled at (UNIX timestamp)** + **Cancelled amount** -**`reason`** **\*** **string(256)** + **`cancelled_at`** **\*** **string** -**Reason for cancellation** + **Cancelled at (UNIX timestamp)** -**`receipt_url`** **\***** ****string(300)** + **`reason`** **\*** **string(256)** -**Cancellation receipt URL. Availability varies by PG.** + **Reason for cancellation** - - + **`receipt_url`** **\*** **string(300)** - + **Cancellation receipt URL. Availability varies by PG.** + + + - -```javascript -{ - // Response -} -``` + + ```ts + { + // Response + } + ``` + - - - -```javascript -{ - // Response -} -``` - - - - -```javascript -{ - // Response -} -``` - - + + ```ts + { + // Response + } + ``` + + + ```ts + { + // Response + } + ``` +
-

Response Model Schema

- -```json -{ - "code": 0, - "message": "string", - "response": { - "imp_uid": "string", - "merchant_uid": "string", - "pay_method": "string", - "channel": "pc", - "pg_provider": "string", - "emb_pg_provider": "string", - "pg_tid": "string", - "pg_id": "string", - "escrow": true, - "apply_num": "string", - "bank_code": "string", - "bank_name": "string", - "card_code": "string", - "card_name": "string", - "card_quota": 0, - "card_number": "string", - "card_type": "null", - "vbank_code": "string", - "vbank_name": "string", - "vbank_num": "string", - "vbank_holder": "string", - "vbank_date": 0, - "vbank_issued_at": 0, - "name": "string", - "amount": 0, - "cancel_amount": 0, - "currency": "string", - "buyer_name": "string", - "buyer_email": "string", - "buyer_tel": "string", - "buyer_addr": "string", - "buyer_postcode": "string", - "custom_data": "string", - "user_agent": "string", - "status": "ready", - "started_at": 0, - "paid_at": 0, - "failed_at": 0, - "cancelled_at": 0, - "fail_reason": "string", - "cancel_reason": "string", - "receipt_url": "string", - "cancel_history": [ - { - "pg_tid": "string", - "amount": 0, - "cancelled_at": 0, - "reason": "string", - "receipt_url": "string" - } - ], - "cancel_receipt_urls": [ - "string" - ], - "cash_receipt_issued": true, - "customer_uid": "string", - "customer_uid_usage": "issue" +

Response Model Schema

+ + ```json + { + "code": 0, + "message": "string", + "response": { + "imp_uid": "string", + "merchant_uid": "string", + "pay_method": "string", + "channel": "pc", + "pg_provider": "string", + "emb_pg_provider": "string", + "pg_tid": "string", + "pg_id": "string", + "escrow": true, + "apply_num": "string", + "bank_code": "string", + "bank_name": "string", + "card_code": "string", + "card_name": "string", + "card_quota": 0, + "card_number": "string", + "card_type": "null", + "vbank_code": "string", + "vbank_name": "string", + "vbank_num": "string", + "vbank_holder": "string", + "vbank_date": 0, + "vbank_issued_at": 0, + "name": "string", + "amount": 0, + "cancel_amount": 0, + "currency": "string", + "buyer_name": "string", + "buyer_email": "string", + "buyer_tel": "string", + "buyer_addr": "string", + "buyer_postcode": "string", + "custom_data": "string", + "user_agent": "string", + "status": "ready", + "started_at": 0, + "paid_at": 0, + "failed_at": 0, + "cancelled_at": 0, + "fail_reason": "string", + "cancel_reason": "string", + "receipt_url": "string", + "cancel_history": [ + { + "pg_tid": "string", + "amount": 0, + "cancelled_at": 0, + "reason": "string", + "receipt_url": "string" + } + ], + "cancel_receipt_urls": [ + "string" + ], + "cash_receipt_issued": true, + "customer_uid": "string", + "customer_uid_usage": "issue" + } } -} -``` - + ```
-**Swagger Test Link** - -[**https://api.iamport.kr/#!/vbanks/modifyVbank**](https://api.iamport.kr/#!/vbanks/modifyVbank) + **Swagger Test Link** + [**https://api.iamport.kr/#!/vbanks/modifyVbank**](https://api.iamport.kr/#!/vbanks/modifyVbank) diff --git a/src/content/docs/en/auth/guide-1/bill/pg-window.mdx b/src/content/docs/en/auth/guide-1/bill/pg-window.mdx index 0fb4394de..37030cff3 100644 --- a/src/content/docs/en/auth/guide-1/bill/pg-window.mdx +++ b/src/content/docs/en/auth/guide-1/bill/pg-window.mdx @@ -4,154 +4,170 @@ description: Get a billing key through the payment window provided by the PG. --- import Figure from "~/components/Figure.astro"; -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -#### You can enter the card information through the PG's payment window to get a billing key. +You can enter the card information through the PG's payment window to get a billing key. -- **Pros**: **no need to establish additional security process** for transmitting card information because the data is transmitted directly to PG without going through the server or i'mport server. -- **Cons**: **cannot customize card registration form** since billing key is requested through the PG's payment window via web browser (cannot implement merchant site friendly UI/UX). +- **Pros**: **no need to establish additional security process** for transmitting card information + because the data is transmitted directly to PG without going through the server or i'mport server. -
+- **Cons**: **cannot customize card registration form** since billing key is requested + through the PG's payment window via web browser (cannot implement merchant site friendly UI/UX). -### **STEP 01.** Request billing key +
-As with authenticated payment, use the **JavaScript SDK** to call the PG's payment window. To get a billing key, specify the following additional parameters. +## **STEP 01.** Request billing key -> #### customer_uid: unique key that maps 1:1 with billing key +As with authenticated payment, use the **JavaScript SDK** to call the PG's payment window. +To get a billing key, specify the following additional parameters. + +> customer\_uid: unique key that maps 1:1 with billing key - -```javascript title="client-side" - IMP.request_pay({ // Refer to above mentioned PG specific guide for param settings - customer_uid: "gildong_0001_1234", // Unique ID for each card (billing key) - /* ...Omitted... */ - }, function (rsp) { // callback - if (rsp.success) { - // Billing key request successful - } else { - // Billing key request failed - } - }); -``` - - -**What is a customer\_uid?** - -It is a unique value specified by the merchant that maps 1:1 with the billing key issued by PG. A unique `customer_uid` must be created for each card. - -Example: If a customer named **Hong Gildong** requests for a billing key from **A card**, the customer_uid must be issued for the **specified member's credit card number** + + ```ts title="client-side" + IMP.request_pay( + { + // Refer to above mentioned PG specific guide for param settings + customer_uid: "gildong_0001_1234", // Unique ID for each card (billing key) + /* ...Omitted... */ + }, + function (rsp) { + // callback + if (rsp.success) { + // Billing key request successful + } else { + // Billing key request failed + } + }, + ); + ``` - + + **What is a customer\_uid?** - + It is a unique value specified by the merchant that maps 1:1 with the billing key issued by PG. A unique `customer_uid` must be created for each card. + + Example: If a customer named **Hong Gildong** requests for a billing key from **A card**, the customer\_uid must be issued for the **specified member's credit card number** + + ### **STEP 02.** Handle response - -```javascript title="client-side" - IMP.request_pay({ // param - /* ...Omitted... */ - }, function (rsp) { // callback - if (rsp.success) { - // Billing key request successful - // jQuery HTTP request - jQuery.ajax({ - url: "{URL to receive customer-uid}", // Example: https://www.myservice.com/billings/ - method: "POST", - headers: { "Content-Type": "application/json" }, - data: { - customer_uid: "gildong_0001_1234", // Unique ID for each card (billing key) + + ```ts title="client-side" + IMP.request_pay( + { + // param + /* ...Omitted... */ + }, + function (rsp) { + // callback + if (rsp.success) { + // Billing key request successful + // jQuery HTTP request + jQuery.ajax({ + url: "{URL to receive customer-uid}", // Example: https://www.myservice.com/billings/ + method: "POST", + headers: { "Content-Type": "application/json" }, + data: { + customer_uid: "gildong_0001_1234", // Unique ID for each card (billing key) + }, + }); + } else { + // Billing key request failed } - }); - } else { - // Billing key request failed - } - }); -``` - -Once the billing key is issued successfully, the **customer_uid** is sent to the merchant server. The server creates an API endpoint that receives the **customer_uid** from the client. The server can use the **customer_uid** to request future payments.\ - -```javascript title="server-side" - app.post("/billings", async (req, res) => { - try { - const { customer_uid } = req.body; // Get customer_uid from req.body - - ... - } catch (e) { - res.status(400).send(e); - } - }); -``` - -Save the `customer_uid` in the merchant's database and use it to request future payments. - - + }, + ); + ``` + + Once the billing key is issued successfully, the **customer\_uid** is sent to the merchant server. The server creates an API endpoint that receives the **customer\_uid** from the client. The server can use the **customer\_uid** to request future payments.\\ + + ```ts title="server-side" + app.post("/billings", async (req, res) => { + try { + const { customer_uid } = req.body; // Get customer_uid from req.body + } catch (e) { + res.status(400).send(e); + } + }); + ``` + + Save the `customer_uid` in the merchant's database and use it to request future payments. + ### **STEP 03.** Request payment -Use the saved **customer_uid** and call the i'mport [**Non-authenticated payment (billing key) API**](../../../api/api/api) to request payment. +Use the saved **customer\_uid** and call the i'mport +[**Non-authenticated payment (billing key) API**](../../../api/api/api) to request payment. -**To use the i'mport REST API, you must first get an** [**access token**](../../../api/rest-api-access-token). - + **To use the i'mport REST API, you must first get an** [**access token**](../../../api/rest-api-access-token). - -```javascript title="server-side" -app.post("/billings", async (req, res) => { - try { - const { customer_uid } = req.body; // Get customer_uid from req.body - // Get billing key - const getToken = await axios({ - url: "https://api.iamport.kr/users/getToken", - method: "post", // POST method - headers: { "Content-Type": "application/json" }, // "Content-Type": "application/json" - data: { - imp_key: "imp_apikey", // REST API key - imp_secret: "ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6bkA5lamv9OqDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f" // REST API Secret + + ```ts title="server-side" + app.post("/billings", async (req, res) => { + try { + const { customer_uid } = req.body; // Get customer_uid from req.body + // Get billing key + const getToken = await axios({ + url: "https://api.iamport.kr/users/getToken", + method: "post", // POST method + headers: { "Content-Type": "application/json" }, // "Content-Type": "application/json" + data: { + imp_key: "imp_apikey", // REST API key + imp_secret: + "ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6bkA5lamv9OqDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f", // REST API Secret + }, + }); + const { access_token } = getToken.data.response; // Access token + // Request payment (for first or nth time) + const paymentResult = await axios({ + url: `https://api.iamport.kr/subscribe/payments/again`, + method: "post", + headers: { Authorization: access_token }, // Add access token to authorization header + data: { + customer_uid, + merchant_uid: "order_monthly_0001", // Order ID + amount: 8900, + name: "recurring payments for monthly subscription", + }, + }); + const { code, message } = paymentResult; + if (code === 0) { + // Successful communication with the card company (additional check is required to confirm whether the payment was successful) + if (paymentResult.status === "paid") { + // Payment approved + res.send({ + // ... + }); + } else { + // Payment not approved (Example: card limit exceeded, card suspended, insufficient balance) + // paymentResult.status: failed is returned + res.send({ + // ... + }); + } + res.send({ + // ... + }); + } else { + // Card company rejected payment (paymentResult is null) + res.send({ + // ... + }); } - }); - const { access_token } = getToken.data.response; // Access token - ... - // Request payment (for first or nth time) - const paymentResult = await axios({ - url: \`https://api.iamport.kr/subscribe/payments/again\`, - method: "post", - headers: { "Authorization": access_token }, // Add access token to authorization header - data: { - customer_uid, - merchant_uid: "order_monthly_0001", // Order ID - amount: 8900, - name: "recurring payments for monthly subscription" - } - }); - ... - const { code, message } = paymentResult; - if (code === 0) { // Successful communication with the card company (additional check is required to confirm whether the payment was successful) - if ( paymentResult.status === "paid" ) { // Payment approved - res.send({ ... }); - } else { // Payment not approved (Example: card limit exceeded, card suspended, insufficient balance) - // paymentResult.status: failed is returned - res.send({ ... }); - } - res.send({ ... }); - } else { // Card company rejected payment (paymentResult is null) - res.send({ ... }); + } catch (e) { + res.status(400).send(e); } - } catch (e) { - res.status(400).send(e); - } - }); -``` - - + }); + ``` + diff --git a/src/content/docs/en/auth/guide-1/bill/readme.mdx b/src/content/docs/en/auth/guide-1/bill/readme.mdx index e8c2711ca..a09efa01d 100644 --- a/src/content/docs/en/auth/guide-1/bill/readme.mdx +++ b/src/content/docs/en/auth/guide-1/bill/readme.mdx @@ -3,59 +3,56 @@ title: Request billing key payment description: Request a non-authenticated payment request with the credit card information. --- +import Figure from "~/components/Figure.astro"; import ContentRef from "~/components/gitbook/ContentRef.astro"; import Details from "~/components/gitbook/Details.astro"; -import Figure from "~/components/Figure.astro"; -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; ## Non-authenticated payment using a billing key -**What is a billing key?** - -A billing key is an encryption key that can be used to make a payment at a desired time, such as subscriptions and Pay-As-You-Go payments. Since a merchant cannot store the customer's card information, it can get the card's billing key from the card company, store and use it to make payments. + **What is a billing key?** + A billing key is an encryption key that can be used to make a payment at a desired time, such as subscriptions and Pay-As-You-Go payments. Since a merchant cannot store the customer's card information, it can get the card's billing key from the card company, store and use it to make payments. Depending on the PG, the billing key can be issued using the following two methods: - -#### Use i'mport REST API to get a billing key and use it to make a payment request. - -- `NICE Payments` -- `JTNet` -- `KCP` -- `SettleBank` -- `INICIS` -- `DaouData` -- `Paymentwall` - - - - -#### Use a PG payment window to get a billing key. - -- `JTNet` -- `INICIS` -- `Danal (credit card, mobile)` -- `Mobilians` -- `Payco` -- `KICC` -- `KCP` -- `Kakao Pay` -- `Naver Pay` - - + + Use i'mport REST API to get a billing key and use it to make a payment request. + + - `NICE Payments` + - `JTNet` + - `KCP` + - `SettleBank` + - `INICIS` + - `DaouData` + - `Paymentwall` + + + + Use a PG payment window to get a billing key. + + - `JTNet` + - `INICIS` + - `Danal (credit card, mobile)` + - `Mobilians` + - `Payco` + - `KICC` + - `KCP` + - `Kakao Pay` + - `Naver Pay` + -## 2. Payment using card info (key-in payment) +## 2. Payment using card info (key-in payment) Upon pre-agreement with a PG, you can request a one-time payment using the credit card information. This method requests payment by submitting card information each time. It is usually used by some @@ -64,20 +61,18 @@ from customers via ARS to make a payment. Recently, as more merchants are using method for authenticated payments, the use of key-in method is declining due to the inconvenience of having to enter the card information every time. -
+
-**An agreement with the PG is required to use key-in payment.** - + **An agreement with the PG is required to use key-in payment.**
-

PGs that support key-in payment

- -- NICE Payments -- NHN KCP -- JTNET -- SettleBank -- DaouData +

PGs that support key-in payment

+ - NICE Payments + - NHN KCP + - JTNET + - SettleBank + - DaouData
diff --git a/src/content/docs/en/auth/guide-1/bill/rest-api.mdx b/src/content/docs/en/auth/guide-1/bill/rest-api.mdx index 4bdf7fc64..88b27602b 100644 --- a/src/content/docs/en/auth/guide-1/bill/rest-api.mdx +++ b/src/content/docs/en/auth/guide-1/bill/rest-api.mdx @@ -4,9 +4,9 @@ description: Easily get a billing key using the i'mport REST API. --- import Codepen from "~/components/gitbook/Codepen.astro"; -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; You can use the i'mport REST API to request for a billing key to make a payment request. When you request for a billing key with the customer's credit card information, the i'mport server calls the @@ -19,137 +19,150 @@ has the following pros/cons: requirements are strict for this service, and must take precautions to protect personal information. -#### If you are planning to develop a merchant UI/UX-friendly payment environment, API integration is the right choice. +If you are planning to develop a merchant UI/UX-friendly payment environment, +API integration is the right choice. -### **STEP 01.** Accept credit card information +## **STEP 01.** Accept credit card information Add input fields for card information as shown below. Create a hidden field to store the -**customer_uid** to send to the server upon form submission. For corporate cards (excluding cards +**customer\_uid** to send to the server upon form submission. For corporate cards (excluding cards issued under an employee's name), enter a _10-digit business registration number_ for the `birth` parameter. The following example calls a `POST` request for `/subscription/issue-billing` with input -values and **customer_uid** when you click the **Pay** button. +values and **customer\_uid** when you click the **Pay** button. -**What is a customer\_uid?** + **What is a customer\_uid?** -It is a unique value specified by the merchant that maps 1:1 with the billing key issued by PG. A unique `customer_uid` must be created for each card. - -Example: If a customer named **Hong Gildong** requests for a billing key from **A card**, the customer_uid must be issued for the **specified member's credit card number**. + It is a unique value specified by the merchant that maps 1:1 with the billing key issued by PG. A unique `customer_uid` must be created for each card. + Example: If a customer named **Hong Gildong** requests for a billing key from **A card**, the customer\_uid must be issued for the **specified member's credit card number**. -If you reuse the customer\_uid used to get the existing billing key, the existing billing key will be replaced with the new billing key issued on the new card number. (**The billing key that maps to the existing card will be deleted.**) - + If you reuse the customer\_uid used to get the existing billing key, the existing billing key will be replaced with the new billing key issued on the new card number. (**The billing key that maps to the existing card will be deleted.**) -**Credit card information required for billing key** - -- **Credit card number** -- **Credit card expiration** -- **DOB** -- **First 2-digits of card password** + **Credit card information required for billing key** + - **Credit card number** + - **Credit card expiration** + - **DOB** + - **First 2-digits of card password** - -```html title="client-side" -
- -
- - -
-
- - -
-
- - -
-
- - -
- - -
-``` - -
- - -```jsx title="client-side" -// React.js - class CardForm extends React.Components { - constructor(props) { - super(props); - this.state = { - cardNumber: "", - expiry: "", - birth: "", - pwd2Digit: "", - customer_uid: "gildong_0001_1234", + + ```html title="client-side" +
+ +
+ + +
+
+ + +
+
+ + +
+
+ + +
+ + +
+ ``` +
+ + + ```tsx title="client-side" + // React.js + class CardForm extends React.Components { + constructor(props) { + super(props); + this.state = { + cardNumber: "", + expiry: "", + birth: "", + pwd2Digit: "", + customer_uid: "gildong_0001_1234", + }; + } + handleInputChange = (event) => { + const { value, name } = event.target; + this.setState({ + [name]: value, + }); }; + handleFormSubmit = (event) => { + event.preventDefault(); + const { cardNumber, expiry, birth, pwd2Digit, customer_uid } = this.state; + axios({ + // Example: https://www.myservice.com/subscription/issue-billing + url: "{service URL to receive billing key request}", + method: "post", + data: { + cardNumber, + expiry, + birth, + pwd2Digit, + customer_uid, + }, + }).then((rsp) => { + // Do something with the response + }); + }; + render() { + const { cardNumber, expiry, birth, pwd2Digit } = this.state; + return ( +
+ + + + + +
+ ); + } } - ... - handleInputChange = (event) => { - const { value, name } = event.target; - this.setState({ - [name]: value, - }); - }; - ... - handleFormSubmit = (event) => { - event.preventDefault(); - const { cardNumber, expiry, birth, pwd2Digit, customer_uid } = this.state; - axios({ - // Example: https://www.myservice.com/subscription/issue-billing - url: "{service URL to receive billing key request}", - method: "post", - data: { - cardNumber, - expiry, - birth, - pwd2Digit, - customer_uid, - } - }).then(rsp => { - ... - }); - }; - ... - render() { - const { cardNumber, expiry, birth, pwd2Digit } = this.state; - return ( -
- - - - - -
- ) - } - } -``` - -
+ ``` +
@@ -157,29 +170,27 @@ If you reuse the customer\_uid used to get the existing billing key, the existin ### **STEP 02.** Extract card information Create an API endpoint to extract the card information from the request body. The following is a -sample **API endpoint** that processes a `POST` request to `/subscription/issue-billing`.\ +sample **API endpoint** that processes a `POST` request to `/subscription/issue-billing`.\\ - -```javascript title="server-side" -// Process POST request to "/subscription/issue-billing" - app.post("/subscriptions/issue-billing", async (req, res) => { - try { - const { - card_number, // card number - expiry, // card expiration - birth, // DOB - pwd_2digit, // first 2-digits of card password - customer_uid, // value that maps 1:1 with card (billing key) - } = req.body; // extract card info from req.body - ... - } catch (e) { - res.status(400).send(e); - } - }); -``` - - + + ```ts title="server-side" + // Process POST request to "/subscription/issue-billing" + app.post("/subscriptions/issue-billing", async (req, res) => { + try { + const { + card_number, // card number + expiry, // card expiration + birth, // DOB + pwd_2digit, // first 2-digits of card password + customer_uid, // value that maps 1:1 with card (billing key) + } = req.body; // extract card info from req.body + } catch (e) { + res.status(400).send(e); + } + }); + ``` + ### **STEP 03.** Request billing key and handle response @@ -188,8 +199,8 @@ Request for a billing key by using the i'mport [**Get billing key REST API**](.. return a response based on the result code. - -```javascript title="server-side" + + ```ts title="server-side" // Process POST request to "/subscription/issue-billing" app.post("/subscriptions/issue-billing", async (req, res) => { try { @@ -200,7 +211,6 @@ return a response based on the result code. pwd_2digit, // First 2-digits of card password customer_uid, // Unique ID for each card (billing key) } = req.body; // Get card info from req.body - ... // Get billing key const getToken = await axios({ url: "https://api.iamport.kr/users/getToken", @@ -208,47 +218,48 @@ return a response based on the result code. headers: { "Content-Type": "application/json" }, // "Content-Type": "application/json" data: { imp_key: "imp_apikey", // REST API key - imp_secret: "ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6bkA5lamv9OqDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f" // REST API Secret - } + imp_secret: + "ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6bkA5lamv9OqDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f", // REST API Secret + }, }); const { access_token } = getToken.data.response; // Access token - ... // Get access token const issueBilling = await axios({ - url: \`https://api.iamport.kr/subscribe/customers/\${customer_uid}\`, + url: `https://api.iamport.kr/subscribe/customers/${customer_uid}`, method: "post", - headers: { "Authorization": access_token }, // Add access token to authorization header + headers: { Authorization: access_token }, // Add access token to authorization header data: { card_number, // Card number expiry, // Card expiration birth, // Date of birth pwd_2digit, // First 2-digits of card password - } + }, }); - ... const { code, message } = issueBilling.data; - if (code === 0) { // Billing key request successful - res.send({ status: "success", message: "Billing has successfully issued" }); - } else { // Billing key request failed + if (code === 0) { + // Billing key request successful + res.send({ + status: "success", + message: "Billing has successfully issued", + }); + } else { + // Billing key request failed res.send({ status: "failed", message }); } } catch (e) { res.status(400).send(e); } }); -``` - - + ``` + -**To use the i'mport REST API, you must first get an** [**access token**](../../../api/rest-api-access-token)**.** - + **To use the i'mport REST API, you must first get an** [**access token**](../../../api/rest-api-access-token)**.** -**Request billing key and make payment at once** - -By using the key-in payment REST API[**`/subscribe/payments/onetime`**](../../../api/api/), you can get the billing key and make a payment in a single API call. + **Request billing key and make payment at once** + By using the key-in payment REST API[**`/subscribe/payments/onetime`**](../../../api/api/), you can get the billing key and make a payment in a single API call. diff --git a/src/content/docs/en/auth/guide-1/page-1.mdx b/src/content/docs/en/auth/guide-1/page-1.mdx index 46ee2b182..b8ffdc138 100644 --- a/src/content/docs/en/auth/guide-1/page-1.mdx +++ b/src/content/docs/en/auth/guide-1/page-1.mdx @@ -3,31 +3,35 @@ title: Key-in payment using card info description: Request payments with only card information without authentication. --- -import Details from "~/components/gitbook/Details.astro"; import Figure from "~/components/Figure.astro"; +import Details from "~/components/gitbook/Details.astro"; import Hint from "~/components/Hint.astro"; -Upon pre-agreement with a PG, you can request a one-time payment using the credit card information. This method requests payment by submitting card information each time. It is usually used by some merchants to avoid the hassle of authenticated payments or call centers that obtain card information from customers via ARS to make a payment. Recently, as more merchants are using a simple payment method for authenticated payments, the use of key-in method is declining due to the inconvenience of having to enter the card information every time. +Upon pre-agreement with a PG, you can request a one-time payment using the credit card information. +This method requests payment by submitting card information each time. +It is usually used by some merchants to avoid the hassle of authenticated payments or call centers +that obtain card information from customers via ARS to make a payment. +Recently, as more merchants are using a simple payment method for authenticated payments, +the use of key-in method is declining due to the inconvenience of having +to enter the card information every time. -
+
-**An agreement with the PG is required to use key-in payment.** - + **An agreement with the PG is required to use key-in payment.**
-

PGs that support key-in payment

- -- NICE Payments -- NHN KCP -- JTNET -- SettleBank -- DaouData +

PGs that support key-in payment

+ - NICE Payments + - NHN KCP + - JTNET + - SettleBank + - DaouData
-You can request a key-in payment by using the [**Non-authenticated payment (one-time) API**](../../api/api/request-non-authenticated-payment-one-time-api) or the PG window. +You can request a key-in payment by using +the [**Non-authenticated payment (one-time) API**][one-time-api] or the PG window. + +[one-time-api]: ../../api/api/request-non-authenticated-payment-one-time-api diff --git a/src/content/docs/en/auth/guide-1/subscription-payment-using-billing-key.mdx b/src/content/docs/en/auth/guide-1/subscription-payment-using-billing-key.mdx index af270062a..dd19ef28e 100644 --- a/src/content/docs/en/auth/guide-1/subscription-payment-using-billing-key.mdx +++ b/src/content/docs/en/auth/guide-1/subscription-payment-using-billing-key.mdx @@ -7,37 +7,38 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Hint from "~/components/Hint.astro"; -#### subscriptionsubscriptionYou can use the customer\_uid obtained through the [Get billing key](../../api/billing-key-api/api-1) or [Non-authenticated payment (one-time)](../../api/api/request-non-authenticated-payment-one-time-api) API to request a subscription or scheduled payment. +You can use the customer\_uid obtained through the [Get billing key](../../api/billing-key-api/api-1) +or [Non-authenticated payment (one-time)](../../api/api/request-non-authenticated-payment-one-time-api) API +to request a subscription or scheduled payment. -### **STEP 01.** Request payment +## **STEP 01.** Request payment You can schedule a payment for a desired time in the future by using the ChaiPort **Schedule payment API**. - ```javascript title="Node.js" + ```ts title="Node.js" // Schedule payment - axios({ - url: \`https://api.iamport.kr/subscribe/payments/schedule\`, - method: "post", - headers: { "Authorization": access_token }, // Add access token to authorization header - data: { - customer_uid: "gildong_0001_1234", // Unique ID for each card (billing key) - schedules: [ - { - merchant_uid: "order_monthly_0001", // Order ID - schedule_at: 1519862400, // Schedule time in UNIX timestamp. - amount: 8900, - name: "Recurring payment for monthly subscription", - buyer_name: "Hong Gildong", - buyer_tel: "01012345678", - buyer_email: "gildong@gmail.com" - } - ] - } - }); - - ``` + axios({ + url: `https://api.iamport.kr/subscribe/payments/schedule`, + method: "post", + headers: { Authorization: access_token }, // Add access token to authorization header + data: { + customer_uid: "gildong_0001_1234", // Unique ID for each card (billing key) + schedules: [ + { + merchant_uid: "order_monthly_0001", // Order ID + schedule_at: 1519862400, // Schedule time in UNIX timestamp. + amount: 8900, + name: "Recurring payment for monthly subscription", + buyer_name: "Hong Gildong", + buyer_tel: "01012345678", + buyer_email: "gildong@gmail.com", + }, + ], + }, + }); +``` @@ -56,41 +57,42 @@ result. - ```javascript title="server-side" + ```ts title="server-side" // Process POST request to "/iamport-callback/schedule" - app.post("/iamport-callback/schedule", async (req, res) => { - try { - const { imp_uid, merchant_uid } = req.body; - // Get access token - const getToken = await axios({ - url: "https://api.iamport.kr/users/getToken", - method: "post", // POST method - headers: { "Content-Type": "application/json" }, // "Content-Type": "application/json" - data: { - imp_key: "imp_apikey", // REST API key - imp_secret: "ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6bkA5lamv9OqDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f" // REST API Secret - } - }); - const { access_token } = getToken.data.response; // Access token - // Get payment info from i'mport server using imp_uid - const getPaymentData = await axios({ - url: \`https://api.iamport.kr/payments/\${imp_uid}\`, // Pass imp_uid - method: "get", // GET method - headers: { "Authorization": access_token } // Add access token to authorization header - }); - const paymentData = getPaymentData.data.response; // Save payment info - const { status } = paymentData; - if (status === "paid") { // If payment is successful - // Save payment info in DB - await Orders.findByIdAndUpdate(merchant_uid, { $set: paymentData }); // Mongoose - ... - } else { - // Retry payment - } - } catch (e) { - res.status(400).send(e); - } + app.post("/iamport-callback/schedule", async (req, res) => { + try { + const { imp_uid, merchant_uid } = req.body; + // Get access token + const getToken = await axios({ + url: "https://api.iamport.kr/users/getToken", + method: "post", // POST method + headers: { "Content-Type": "application/json" }, // "Content-Type": "application/json" + data: { + imp_key: "imp_apikey", // REST API key + imp_secret: + "ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6bkA5lamv9OqDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f", // REST API Secret + }, + }); + const { access_token } = getToken.data.response; // Access token + // Get payment info from i'mport server using imp_uid + const getPaymentData = await axios({ + url: `https://api.iamport.kr/payments/${imp_uid}`, // Pass imp_uid + method: "get", // GET method + headers: { Authorization: access_token }, // Add access token to authorization header }); + const paymentData = getPaymentData.data.response; // Save payment info + const { status } = paymentData; + if (status === "paid") { + // If payment is successful + // Save payment info in DB + await Orders.findByIdAndUpdate(merchant_uid, { $set: paymentData }); // Mongoose + } else { + // Retry payment + } + } catch (e) { + res.status(400).send(e); + } + }); ``` @@ -105,48 +107,49 @@ URL. - ```javascript title="server-side" - // Process POST request to "/iamport-callback/schedule" - app.post("/iamport-callback/schedule", async (req, res) => { - try { - const { imp_uid, merchant_uid } = req.body; - // Get access token - /* ...Omitted ... */ - // Get payment info from i'mport server using imp_uid - /* ...Omitted ... */ - const paymentData = getPaymentData.data.response; // Save payment info - const { status } = paymentData; - if (status === "paid") { // If payment is successful - // Save payment info in DB - await Orders.findByIdAndUpdate(merchant_uid, { $set: paymentData }); // Mongoose - ... - // Schedule next payment - axios({ - url: "{URL to receive payment schedule}", // Example: https://api.iamport.kr/subscribe/payments/schedule - method: "post", - headers: { "Authorization": access_token }, // Add access token to authorization header - data: { - customer_uid: "gildong_0001_1234", // Unique ID for each card (billing key) - schedules: [ - { - merchant_uid: "order_monthly_0001", // Order ID - schedule_at: 1519516800, // Schedule time in UNIX timestamp. - amount: 8900, - name: "Recurring payment for monthly subscription", - ... - } - ] - } - }); - } else { - // Retry payment - } - } catch (e) { - res.status(400).send(e); - } - }); + ```ts title="server-side" + // Process POST request to "/iamport-callback/schedule" + app.post("/iamport-callback/schedule", async (req, res) => { + try { + const { imp_uid, merchant_uid } = req.body; + // Get access token + /* ...Omitted ... */ + // Get payment info from i'mport server using imp_uid + /* ...Omitted ... */ + const paymentData = getPaymentData.data.response; // Save payment info + const { status } = paymentData; + if (status === "paid") { + // If payment is successful + // Save payment info in DB + await Orders.findByIdAndUpdate(merchant_uid, { $set: paymentData }); // Mongoose + // Schedule next payment + axios({ + url: "{URL to receive payment schedule}", // Example: https://api.iamport.kr/subscribe/payments/schedule + method: "post", + headers: { Authorization: access_token }, // Add access token to authorization header + data: { + customer_uid: "gildong_0001_1234", // Unique ID for each card (billing key) + schedules: [ + { + merchant_uid: "order_monthly_0001", // Order ID + schedule_at: 1519516800, // Schedule time in UNIX timestamp. + amount: 8900, + name: "Recurring payment for monthly subscription", + }, + ], + }, + }); + } else { + // Retry payment + } + } catch (e) { + res.status(400).send(e); + } + }); ``` - The above example processes the webhook event that occurs when a scheduled payment is attempted. If the scheduled payment is completed successfully, the payment information is saved in the database and the next payment is scheduled. + The above example processes the webhook event that occurs when a scheduled payment is attempted. + If the scheduled payment is completed successfully, the payment information is saved + in the database and the next payment is scheduled. diff --git a/src/content/docs/en/auth/guide-2/readme.mdx b/src/content/docs/en/auth/guide-2/readme.mdx index f77979dbf..22a98ceb1 100644 --- a/src/content/docs/en/auth/guide-2/readme.mdx +++ b/src/content/docs/en/auth/guide-2/readme.mdx @@ -4,134 +4,125 @@ description: Learn how to cancel a payment using the i'mport payment cancel API. --- import Codepen from "~/components/gitbook/Codepen.astro"; -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### **STEP 01.** Request cancellation +## **STEP 01.** Request cancellation Request a refund to the server with the required refund information. In the case of virtual account refund, you need to specify additional parameters for the refund deposit account information. The -following example requests a refund with the required refund information.\ +following example requests a refund with the required refund information.\\ - -```html title="client-side" - - - -``` - - - - - - -```jsx title="client-side" -class CancelPay extends React.Component { - cancelPay = () => { - axios({ - url: "{URL to receive refund request}", // Example: http://www.myservice.com/payments/cancel - method: "POST", - headers: { - "Content-Type": "application/json, - }, - data: { - merchant_uid: "mid_" + new Date().getTime(), // Order ID - cancel_request_amount: 2000, // Refund amount - reason: "Refund for test payment" // Reason for the refund - refund_holder: "Jone Doe", // [required for virtual account refund] refund account holder's name - refund_bank: "88" // [required for virtual account refund] refund account bank code (e.g. Shinhan Bank is 88 for KG Inicis) - refund_account: "56211105948400" // [required for virtual account refund] refund account number + + ```html title="client-side" + + + + ``` + + + - + + ```tsx title="client-side" + class CancelPay extends React.Component { + cancelPay = () => { + axios({ + url: "{URL to receive refund request}", // Example: http://www.myservice.com/payments/cancel + method: "POST", + headers: { + "Content-Type": "application/json", + }, + data: { + merchant_uid: "mid_" + new Date().getTime(), // Order ID + cancel_request_amount: 2000, // Refund amount + reason: "Refund for test payment", // Reason for the refund + refund_holder: "Jone Doe", // [required for virtual account refund] refund account holder's name + refund_bank: "88", // [required for virtual account refund] refund account bank code (e.g. Shinhan Bank is 88 for KG Inicis) + refund_account: "56211105948400", // [required for virtual account refund] refund account number + }, + }); + }; + render() { + return ; + } + } + ``` + ### **STEP 02.** Get payment information Assume that there is a **`Payments`** table that stores payment information as follows: -```javascript title="server-side" +```js title="server-side" /* ... model/payments.js ... */ - var mongoose = require('mongoose'); - var Schema = mongoose.Schema; - ... - var PaymentsSchema = new Schema({ - imp_uid: String, // i'mport unique ID (unique key for refund) - merchant_uid: String, // order ID (used to query payment information) - amount: { type: Number, default: 0 }, // Payment amount (for calculating refundable amount) - cancel_amount: { type: Number, default: 0 }, // Total amount refunded (for calculating refundable amount) - ... - }); - ... - module.exports = mongoose.model('Payments', PaymentsSchema); +const mongoose = require("mongoose"); +const Schema = mongoose.Schema; +const PaymentsSchema = new Schema({ + imp_uid: String, // i'mport unique ID (unique key for refund) + merchant_uid: String, // order ID (used to query payment information) + amount: { type: Number, default: 0 }, // Payment amount (for calculating refundable amount) + cancel_amount: { type: Number, default: 0 }, // Total amount refunded (for calculating refundable amount) +}); +module.exports = mongoose.model("Payments", PaymentsSchema); ``` Query the payment information of the order from the **`Payments`** table using the order ID (**`merchant_uid`**) received from the client. -```javascript title="server-side" - /* ... Omitted ... */ - var Payments = require('./models/payments'); - app.post('/payments/cancel', async (req, res, next) => { - try { - /* Get access token */ - /* ... Omitted ... */ - /* Get payment information */ - const { body } = req; - const { merchant_uid } = body; // Order ID from the client - Payments.find({ merchant_uid }, async function(err, payment) { - if (err) { - return res.json(err); - } - const paymentData = payment[0]; // Save payment information - /* Call i'mport REST API to request refund */ - ... - }); - } catch (error) { - res.status(400).send(error); - } - }); - +```js title="server-side" +/* ... Omitted ... */ +const Payments = require("./models/payments"); +app.post("/payments/cancel", async (req, res, next) => { + try { + /* Get access token */ + /* ... Omitted ... */ + /* Get payment information */ + const { body } = req; + const { merchant_uid } = body; // Order ID from the client + Payments.find({ merchant_uid }, async function (err, payment) { + if (err) { + return res.json(err); + } + const paymentData = payment[0]; // Save payment information + /* Call i'mport REST API to request refund */ + }); + } catch (error) { + res.status(400).send(error); + } +}); ``` ### **STEP 03.** Request refund to i'mport server -To request a refund, you must first get a [**REST API access token**](../../api/rest-api-access-token). Use the **`access token`** to call the [**i'mport cancel ****API**](../../api/payment-api/cancel-payment-api) to request a refund. +To request a refund, you must first get a [**REST API access token**](../../api/rest-api-access-token). Use the **`access token`** to call the [**i'mport cancel** **API**](../../api/payment-api/cancel-payment-api) to request a refund. -**Note - Refunding mobile micropayments** - -- If a refund is **requested on a different month from when the payment is made, a full refund is not allowed**. For example, a payment made on January 31st is not refundable on February 1st. + **Note - Refunding mobile micropayments** + - If a refund is **requested on a different month from when the payment is made, a full refund is not allowed**. For example, a payment made on January 31st is not refundable on February 1st. **Setting parameters for refund request:** @@ -155,66 +146,66 @@ To request a refund, you must first get a [**REST API > refund request will fail. If the `checksum` is not specified, the verification is not performed. -**Reason for entering checksum** + **Reason for entering checksum** -`checksum` is not required, but it is recommended for **comparing the refundable amount between the merchant server and the i'mport server**. + `checksum` is not required, but it is recommended for **comparing the refundable amount between the merchant server and the i'mport server**. -For example, consider the case when a partial refund request of 1,000 won for a 10,000 won payment was completed on the i'mport server, but not on the merchant server due to a server or database error. In this case, the checksum of the i'mport server is changed to 9000, but that of the merchant server remains 10,000. - -If you attempt to make a refund request with `checksum(10000)`, the request will fail because the value does not match the `checksum(9000)` of the i'mport server. + For example, consider the case when a partial refund request of 1,000 won for a 10,000 won payment was completed on the i'mport server, but not on the merchant server due to a server or database error. In this case, the checksum of the i'mport server is changed to 9000, but that of the merchant server remains 10,000. + If you attempt to make a refund request with `checksum(10000)`, the request will fail because the value does not match the `checksum(9000)` of the i'mport server. #### The following example requests a refund. -```javascript title="Node.js" - /* ... Omitted ... */ - app.post('/payments/cancel', async (req, res, next) => { - try { - /* Get access token */ +```ts title="Node.js" +/* ... Omitted ... */ +app.post("/payments/cancel", async (req, res, next) => { + try { + /* Get access token */ + /* ... Omitted ... */ + /* Get payment information */ + const { body } = req; + const { merchant_uid, reason, cancel_request_amount } = body; // Order ID from the client, reason for refund, refund amount + Payments.find({ merchant_uid }, async function (err, payment) { /* ... Omitted ... */ - /* Get payment information */ - const { body } = req; - const { merchant_uid, reason, cancel_request_amount } = body; // Order ID from the client, reason for refund, refund amount - Payments.find({ merchant_uid }, async function(err, payment) { - /* ... Omitted ... */ - const paymentData = payment[0]; // Save payment information - const { imp_uid, amount, cancel_amount } = paymentData; // Get imp_uid, amount(paid amount), cancel_amount(total refund amount) from payment information - const cancelableAmount = amount - cancel_amount; // Refundable amount (= paid amount - total refund amount) - if (cancelableAmount <= 0) { // If refundable amount is 0 - return res.status(400).json({ message: "This order has already been fully refunded." }); - } - ... - /* Call i'mport REST API to request refund */ - const getCancelData = await axios({ - url: "{URL to receive refund request}", // Example: http://www.myservice.com/payments/cancel - method: "post", - headers: { - "Content-Type": "application/json", - "Authorization": access_token // Access token from i'mport server - }, - data: { - reason, // Reason for refund from client - imp_uid, // Unique key for refund - amount: cancel_request_amount, // Requested refund amount - checksum: cancelableAmount // [Recommended] refundable amount - } - }); - const { response } = getCancelData.data; // Refund result - /* Save refund result */ - ... + const paymentData = payment[0]; // Save payment information + const { imp_uid, amount, cancel_amount } = paymentData; // Get imp_uid, amount(paid amount), cancel_amount(total refund amount) from payment information + const cancelableAmount = amount - cancel_amount; // Refundable amount (= paid amount - total refund amount) + if (cancelableAmount <= 0) { + // If refundable amount is 0 + return res + .status(400) + .json({ message: "This order has already been fully refunded." }); + } + /* Call i'mport REST API to request refund */ + const getCancelData = await axios({ + url: "{URL to receive refund request}", // Example: http://www.myservice.com/payments/cancel + method: "post", + headers: { + "Content-Type": "application/json", + Authorization: access_token, // Access token from i'mport server + }, + data: { + reason, // Reason for refund from client + imp_uid, // Unique key for refund + amount: cancel_request_amount, // Requested refund amount + checksum: cancelableAmount, // [Recommended] refundable amount + }, }); - } catch (error) { - res.status(400).send(error); - } - }); + const { response } = getCancelData.data; // Refund result + /* Save refund result */ + }); + } catch (error) { + res.status(400).send(error); + } +}); ``` ### **STEP 04.** Save refund result -#### After the refund process is completed, save the result in the database as follows: +After the refund process is completed, save the result in the database as follows: -```javascript title="Node.js" +```ts title="Node.js" /* ... Omitted ... */ app.post("/payments/cancel", async (req, res, next) => { try { @@ -238,7 +229,7 @@ app.post("/payments/cancel", async (req, res, next) => { return res.json(err); } res.json(payment); // Return refund result to the client - } + }, ); }); } catch (error) { @@ -248,10 +239,9 @@ app.post("/payments/cancel", async (req, res, next) => { ``` -**Note - When cancelling a payment** - -Even if a **response code of 200 (OK)** is returned for the REST API ([**POST https://api.iamport.kr/payments/cancel**](https://api.iamport.kr/#!/payments/cancelPayment)) request, a non-zero code in the response body **means that the refund has failed**. You can check the reason for the failure in the message of the body. + **Note - When cancelling a payment** + Even if a **response code of 200 (OK)** is returned for the REST API ([**POST https://api.iamport.kr/payments/cancel**](https://api.iamport.kr/#!/payments/cancelPayment)) request, a non-zero code in the response body **means that the refund has failed**. You can check the reason for the failure in the message of the body. ### **STEP 04.** Handle response for refund request @@ -259,46 +249,47 @@ Even if a **response code of 200 (OK)** is returned for the REST API ([**POST ht Add the client-side logic to handle the response from the server as follows: - -```html title="client-side" - - - -``` - - - - -```jsx title="client-side" -class CancelPay extends React.Component { - cancelPay = () => { - axios({ - /* ... Omitted ... */ - }).then(response => { // If refund is successful - alert("Refund successful"); - }).catch(error => { // If refund fails - alert("Refund failed"); - }); - } - ... - render() { - return ; - } -} -``` - - + + ```html title="client-side" + + + + ``` + + + + ```tsx title="client-side" + class CancelPay extends React.Component { + cancelPay = () => { + axios({ + /* ... Omitted ... */ + }) + .then((response) => { + // If refund is successful + alert("Refund successful"); + }) + .catch((error) => { + // If refund fails + alert("Refund failed"); + }); + }; + render() { + return ; + } + } + ``` + diff --git a/src/content/docs/en/auth/guide-2/refund.mdx b/src/content/docs/en/auth/guide-2/refund.mdx index 871f8d3bd..6ace37b4a 100644 --- a/src/content/docs/en/auth/guide-2/refund.mdx +++ b/src/content/docs/en/auth/guide-2/refund.mdx @@ -6,84 +6,91 @@ description: Request a refund for a virtual account payment. import Figure from "~/components/Figure.astro"; import Hint from "~/components/Hint.astro"; -### For a virtual account refund, you must sign up for the v**irtual account special service** provided by each PG. +For a virtual account refund, you must sign up for the **virtual account special service** +provided by each PG. -**Why do you need to sign up for a virtual account special service?** + **Why do you need to sign up for a virtual account special service?** -Unlike credit cards, fees for payment/refund are not subject to refund for virtual account refund. For example, for a 10,000 won payment, the merchant: + Unlike credit cards, fees for payment/refund are not subject to refund for virtual account refund. For example, for a 10,000 won payment, the merchant: -- receives 9700 won (10,000 won - virtual account issuance fee of 300 won) from the PG at the time of payment. -- pays 10,300 won (10,000 won to be refunded + 300 won remittance fee for the refund account) to the PG company when the payment is refunded. - -To prevent confusion that may arise regarding fees for virtual account refund, PGs provide **virtual account refunds only to merchants who are signed up for the virtual account special service**. + - receives 9700 won (10,000 won - virtual account issuance fee of 300 won) from the PG at the time of payment. + - pays 10,300 won (10,000 won to be refunded + 300 won remittance fee for the refund account) to the PG company when the payment is refunded. + To prevent confusion that may arise regarding fees for virtual account refund, PGs provide **virtual account refunds only to merchants who are signed up for the virtual account special service**. -Since a virtual account transaction involves a one-way payment method, the target account for refund is unknown. Hence, you must specify the following refund account information in addition to the refund amount. +Since a virtual account transaction involves a one-way payment method, +the target account for refund is unknown. +Hence, you must specify the following refund account information in addition to the refund amount. - `refund_holder`: Refund account holder's name - `refund_account`: Refund account number - `refund_bank`: Refund account bank code -**Note - Virtual account bank codes by PG** - -Since the **virtual account bank code** varies by PG even for the same bank, be sure to check the [**Bank codes by PG**](../../tips/bank-codes-by-pg) list. + **Note - Virtual account bank codes by PG** + Since the **virtual account bank code** varies by PG even for the same bank, be sure to check the [**Bank codes by PG**](../../tips/bank-codes-by-pg) list. -#### The following example requests for a virtual account refund. - -```javascript title="Node.js" - /* ... Omitted ... */ - app.post('/payments/cancel', async (req, res, next) => { - try { - /* Get access token */ +The following example requests for a virtual account refund. + +```ts title="Node.js" +/* ... Omitted ... */ +app.post("/payments/cancel", async (req, res, next) => { + try { + /* Get access token */ + /* ... Omitted ... */ + /* Get payment information */ + const { body } = req; + const { + merchant_uid, + reason, + cancel_request_amount, + refund_holder, + refund_bank, + refund_account, + } = body; // Order ID from the client, reason for refund, refund amount, virtual accoun info (account holder, account number, bank code + Payments.find({ merchant_uid }, async function (err, payment) { /* ... Omitted ... */ - /* Get payment information */ - const { body } = req; - const { merchant_uid, reason, cancel_request_amount, refund_holder, refund_bank, refund_account } = body; // Order ID from the client, reason for refund, refund amount, virtual accoun info (account holder, account number, bank code - Payments.find({ merchant_uid }, async function(err, payment) { - /* ... Omitted ... */ - const paymentData = payment[0]; // Save payment information - const { imp_uid, amount, cancel_amount } = paymentData; // Get imp_uid, amount(paid amount), cancel_amount(total refund amount) from payment information - const cancelableAmount = amount - cancel_amount; // Refundable amount (= paid amount - total refund amount) - if (cancelableAmount <= 0) { // If refundable amount is 0 - return res.status(400).json({ message: "This order has already been fully refunded." }); - } - ... - /* Call i'mport REST API to request refund */ - const getCancelData = await axios({ - url: "https://api.iamport.kr/payments/cancel", - method: "post", - headers: { - "Content-Type": "application/json", - "Authorization": access_token // Access token from i'mport server - }, - data: { - reason, // Reason for refund from client - imp_uid, // Unique key for refund - amount: cancel_request_amount, // Requested refund amount - checksum: cancelableAmount, // [Recommended] refundable amount - refund_holder, // [required when refunding virtual account payment] refund account holder's name - refund_bank, // [required for virtual account refund] refund account bank code (e.g. Shinhan Bank is 88 for KG Inicis) - refund_account // [required for virtual account refund] refund account number - } - }); - const { response } = getCancelData.data; // Refund result - /* Save refund result */ - ... + const paymentData = payment[0]; // Save payment information + const { imp_uid, amount, cancel_amount } = paymentData; // Get imp_uid, amount(paid amount), cancel_amount(total refund amount) from payment information + const cancelableAmount = amount - cancel_amount; // Refundable amount (= paid amount - total refund amount) + if (cancelableAmount <= 0) { + // If refundable amount is 0 + return res + .status(400) + .json({ message: "This order has already been fully refunded." }); + } + /* Call i'mport REST API to request refund */ + const getCancelData = await axios({ + url: "https://api.iamport.kr/payments/cancel", + method: "post", + headers: { + "Content-Type": "application/json", + Authorization: access_token, // Access token from i'mport server + }, + data: { + reason, // Reason for refund from client + imp_uid, // Unique key for refund + amount: cancel_request_amount, // Requested refund amount + checksum: cancelableAmount, // [Recommended] refundable amount + refund_holder, // [required when refunding virtual account payment] refund account holder's name + refund_bank, // [required for virtual account refund] refund account bank code (e.g. Shinhan Bank is 88 for KG Inicis) + refund_account, // [required for virtual account refund] refund account number + }, }); - } catch (error) { - res.status(400).send(error); - } - }); + const { response } = getCancelData.data; // Refund result + /* Save refund result */ + }); + } catch (error) { + res.status(400).send(error); + } +}); ``` -If the virtual account refund request is successful, the refund amount will be deposited (from PG) into the specified refund account normally in about one working day. +If the virtual account refund request is successful, the refund amount will be deposited (from PG) +into the specified refund account normally in about one working day. -
+
diff --git a/src/content/docs/en/auth/guide/1.mdx b/src/content/docs/en/auth/guide/1.mdx index 5273dd300..e447baf7e 100644 --- a/src/content/docs/en/auth/guide/1.mdx +++ b/src/content/docs/en/auth/guide/1.mdx @@ -8,7 +8,7 @@ description: >- import Youtube from "~/components/gitbook/Youtube.astro"; import Hint from "~/components/Hint.astro"; -#### Add the following JS library to the client-side page for payment integration. +Add the following JS library to the client-side page for payment integration. You must first install **jQuery 1.0 or later version**. diff --git a/src/content/docs/en/auth/guide/2.mdx b/src/content/docs/en/auth/guide/2.mdx index 8fa2ce4f2..c01c5da6e 100644 --- a/src/content/docs/en/auth/guide/2.mdx +++ b/src/content/docs/en/auth/guide/2.mdx @@ -7,20 +7,20 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Hint from "~/components/Hint.astro"; -#### On the checkout page, initialize the IMP object using your [Merchant ID](../../ready/3.). +On the checkout page, initialize the IMP object using your [Merchant ID](../../ready/3.). - ```javascript title="Client-side" - var IMP = window.IMP; // Can be omitted - IMP.init("Merchant ID"); // Example: imp00000000 + ```ts title="Client-side" + const IMP = window.IMP; // Can be omitted + IMP.init("Merchant ID"); // Example: imp00000000 ``` - ```javascript title="Client-side" - const IMP = window.IMP; // Can be omitted - IMP.init("{Merchant ID}"); // Example: imp00000000a + ```ts title="Client-side" + const IMP = window.IMP; // Can be omitted + IMP.init("{Merchant ID}"); // Example: imp00000000a ``` diff --git a/src/content/docs/en/auth/guide/3.mdx b/src/content/docs/en/auth/guide/3.mdx index cf06e1972..aa2d46999 100644 --- a/src/content/docs/en/auth/guide/3.mdx +++ b/src/content/docs/en/auth/guide/3.mdx @@ -16,41 +16,39 @@ the first argument of the **request\_pay** function. - ```javascript - + }, + ); ``` - ```jsx - class RequestPay extends React.Component { - requestPay = () => { - IMP.request_pay({ // param + ```tsx + export class RequestPay extends React.Component { + requestPay = () => { + IMP.request_pay( + { + // param pg: "kcp", pay_method: "card", merchant_uid: "ORD20180131-0000011", @@ -60,54 +58,53 @@ the first argument of the **request\_pay** function. buyer_name: "Hong Gildong", buyer_tel: "010-4242-4242", buyer_addr: "Shinsa-dong, Gangnam-gu, Seoul", - buyer_postcode: "01181" - }, rsp => { // callback + buyer_postcode: "01181", + }, + (rsp) => { + // callback if (rsp.success) { - ..., // Payment is successful - ... } else { - ..., // Payment failed - ... } - }); - } + }, + ); + }; + } ``` - ```javascript - + ```ts + export default { + methods: { + requestPay: function () { + IMP.request_pay( + { + // param + pg: "kcp", + pay_method: "card", + merchant_uid: "ORD20180131-0000011", + name: "Norway swivel chair", + amount: 64900, + buyer_email: "gildong@gmail.com", + buyer_name: "Hong Gildong", + buyer_tel: "010-4242-4242", + buyer_addr: "Shinsa-dong, Gangnam-gu, Seoul", + buyer_postcode: "01181", + }, + (rsp) => { + // callback + if (rsp.success) { + // Payment is successful + } else { + // Payment failed + } + }, + ); + }, + }, + }; ``` @@ -115,11 +112,11 @@ the first argument of the **request\_pay** function. **Note - Creating an order ID (merchant\_uid)** - - The order number must always be assigned a **unique** **value** when the payment window is requested. + - The order number must always be assigned a **unique value** when the payment window is requested. - After the payment process is complete, the server uses the order ID to retrieve the order information for **payment fraud check**. Be sure to create a **unique ID** on the merchant server and **store it in the DB**. -#### The following is the above sample code with the Pay button added. +The following is the above sample code with the Pay button added. ```html title="sample.html" diff --git a/src/content/docs/en/auth/guide/4/iframe.mdx b/src/content/docs/en/auth/guide/4/iframe.mdx index caa36d444..dac52015e 100644 --- a/src/content/docs/en/auth/guide/4/iframe.mdx +++ b/src/content/docs/en/auth/guide/4/iframe.mdx @@ -15,7 +15,8 @@ import Hint from "~/components/Hint.astro";
-#### Most payments that are processed in the PC environment can receive payment results through the callback function, which is the second argument of the request\_pay() function. +Most payments that are processed in the PC environment can receive payment results +through the callback function, which is the second argument of the request\_pay() function. For **PayPal** payments, the payment window is loaded as a **pop-up (new window)** in a PC environment and you can also receive the payment result through **m\_redirect\_url**. @@ -26,36 +27,47 @@ import Hint from "~/components/Hint.astro"; - ```javascript title="client-side" - IMP.request_pay({ - /* ...Omitted... */ - }, function (rsp) { // callback - if (rsp.success) { // payment successful: payment accepted or virtual account issued - // HTTP request with jQuery - jQuery.ajax({ - url: "{Merchant endpoint that receives server's payment info}", - method: "POST", - headers: { "Content-Type": "application/json" }, - data: { - imp_uid: rsp.imp_uid, // Payment ID - merchant_uid: rsp.merchant_uid // Order ID - } - }).done(function (data) { - // Merchant server payment API call is successful + ```ts title="client-side" + IMP.request_pay( + { + /* ...Omitted... */ + }, + function (rsp) { + // callback + if (rsp.success) { + // payment successful: payment accepted or virtual account issued + // HTTP request with jQuery + jQuery + .ajax({ + url: "{Merchant endpoint that receives server's payment info}", + method: "POST", + headers: { "Content-Type": "application/json" }, + data: { + imp_uid: rsp.imp_uid, // Payment ID + merchant_uid: rsp.merchant_uid, // Order ID + }, }) - } else { - alert("Payment failed. Error: " + rsp.error_msg); - } - }); + .done(function (data) { + // Merchant server payment API call is successful + console.log(data); + }); + } else { + alert("Payment failed. Error: " + rsp.error_msg); + } + }, + ); ``` - ```javascript title="client-side" - IMP.request_pay({ + ```ts title="client-side" + IMP.request_pay( + { /* ...Omitted... */ - }, rsp => { // callback - if (rsp.success) { + }, + (rsp) => { + // callback + if (rsp.success) { // HTTP request with axios axios({ url: "{Endpoint that receives server's payment info}", @@ -63,15 +75,17 @@ import Hint from "~/components/Hint.astro"; headers: { "Content-Type": "application/json" }, data: { imp_uid: rsp.imp_uid, - merchant_uid: rsp.merchant_uid - } + merchant_uid: rsp.merchant_uid, + }, }).then((data) => { // Server payment API call is successful - }) + console.log(data); + }); } else { - alert(\`Payment failed. Error: \${rsp.error_msg}\`); + alert(`Payment failed. Error: ${rsp.error_msg}`); } - }); + }, + ); ``` @@ -85,5 +99,6 @@ above. > For information about the response parameter passed to the **callback** function, refer to [**rsp**](../../../sdk/javascript-sdk/undefined-1). - The final payment result logic processing must be handled stably by using a [**webhook**](../../../result/webhook). If you don't set up a webhook, you may fail to receive the payment result. + The final payment result logic processing must be handled stably by using a [**webhook**](../../../result/webhook). + If you don't set up a webhook, you may fail to receive the payment result. diff --git a/src/content/docs/en/auth/guide/4/redirect.mdx b/src/content/docs/en/auth/guide/4/redirect.mdx index 822f9876a..4e4d4c695 100644 --- a/src/content/docs/en/auth/guide/4/redirect.mdx +++ b/src/content/docs/en/auth/guide/4/redirect.mdx @@ -9,7 +9,6 @@ import ContentRef from "~/components/gitbook/ContentRef.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; -import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Hint from "~/components/Hint.astro"; @@ -22,25 +21,30 @@ import Hint from "~/components/Hint.astro"; - ```javascript title="client-side" - IMP.request_pay({ - /* ...Omitted... */, - m_redirect_url: "{redirect URL}" - }, /* callback */); // callback is not called + ```ts title="client-side" + IMP.request_pay( + { + /* ...Omitted... */ + m_redirect_url: "{redirect URL}", + } /* callback */, + ); // callback is not called ``` - ```javascript title="client-side" - IMP.request_pay({ - /* ...Omitted... */, - m_redirect_url: "{redirect URL}" - }, /* callback */); // callback is not called + ```ts title="client-side" + IMP.request_pay( + { + /* ...Omitted... */ + m_redirect_url: "{redirect URL}", + } /* callback */, + ); // callback is not called ``` -If **m\_redirect\_url** is specified as the **request\_pay** function parameter as above, the payment result is sent to the URL address in the form of a query string after **payment is completed**. +If **m\_redirect\_url** is specified as the **request\_pay** function parameter as above, +the payment result is sent to the URL address in the form of a query string after **payment is completed**. **What is a query string?** @@ -53,9 +57,9 @@ If **m\_redirect\_url** is specified as the **request\_pay** function parameter You can receive the following parameters through the specified URL as a query string. - ### Parameters + ## Parameters - #### Query + ### Query i'mport payment ID @@ -80,13 +84,13 @@ The following is an example of a redirecting URL based on the query string. - ```url + ```sh curl https://myservice.com/payments/complete?imp_uid=unique_iamport_paymentID&merchant_uid=unique_merchant_orderID&imp_success=true ``` - ``` + ```sh curl https://myservice.com/payments/complete?imp_uid=unique_iamport_paymentID&merchant_uid=unique_merchant_orderID&imp_success=false&error_code=error_code(none_defined_currently)&error_msg=error_message ``` @@ -105,16 +109,26 @@ The following is an example of a redirecting URL based on the query string. > The `payment process is complete` when: > > 1. **Payment is successful** (Status: `paid`, imp\_success: `true`) +> > 2. **Payment fails** (Status: `failed`, imp\_success: `false`) +> > 3. **Payment window fails to open** due to PG module setting error +> > 4. User **terminates the payment process** by clicking the X or Cancel button -> 5. **Payment is suspended** due to invalid card information, limit exceeded, insufficient balance, etc. +> +> 5. **Payment is suspended** due to invalid card information, +> limit exceeded, insufficient balance, etc. +> > 6. **Virtual account is issued** (status: `ready`, imp\_success: `true`) **Note - imp\_success parameter** - The `imp_success` parameter indicates **whether or not the payment process completed successfully**. However, since the payment page is opened by calling a JavaScript function from the client-side, **the payment amount can be forged** by a malicious user. Hence, **this value should not be used to determine the success of the payment**. Depending on the value of `imp_success`, determine the payment success as follows: + The `imp_success` parameter indicates **whether or not the payment process completed successfully**. + However, since the payment page is opened by calling a JavaScript function from the client-side, + **the payment amount can be forged** by a malicious user. + Hence, **this value should not be used to determine the success of the payment**. + Depending on the value of `imp_success`, determine the payment success as follows: - imp\_success = true: First send payment information (imp\_uid, merchant\_uid) to the server to verify the payment amount, and then finalize payment success. - imp\_success = false: Alert the user that the payment failed. diff --git a/src/content/docs/en/auth/guide/5.mdx b/src/content/docs/en/auth/guide/5.mdx index 7489452cb..d12d952e8 100644 --- a/src/content/docs/en/auth/guide/5.mdx +++ b/src/content/docs/en/auth/guide/5.mdx @@ -10,24 +10,27 @@ import Hint from "~/components/Hint.astro"; Based on the payment information from the client, the server verifies the **payment amount for fraud** and saves the payment information in the database if needed. The following are the steps for verifying the payment information. - Server receives the i'mport payment ID (**imp\_uid**) and order ID (**merchant\_uid**) + - Call the [**Get payment API**](https://api.iamport.kr/#!/payments/getPaymentByImpUid) to get the payment details. + - Based on the response, compare the actual payment amount with the payment request amount (from merchant's database). -### **STEP 01** Server receives payment result +## **STEP 01** Server receives payment result Example of receiving a POST request to the merchant endpoint URL that receives the payment information - ```javascript title="server-side" + ```ts title="server-side" app.use(bodyParser.json()); // "{Merchant endpoint that receives server's payment info}" POST request receiver app.post("/payments/complete", async (req, res) => { try { // Get imp_uid, merchant_uid from req.body const { imp_uid, merchant_uid } = req.body; + console.log(imp_uid, merchant_uid); } catch (e) { res.status(400).send(e); } @@ -42,41 +45,40 @@ Based on the payment information from the client, the server verifies the Example of calling the [**Get payment**](https://api.iamport.kr/#!/payments/getPaymentByImpUid) **API** with the i'mport **payment ID (imp\_uid)** to retrieve the payment info. - ```javascript title="server-side" + ```ts title="server-side" app.use(bodyParser.json()); - ... - app.post("/payments/complete", async (req, res) => { - try { - // Get imp_uid, merchant_uid from req.body - const { imp_uid, merchant_uid } = req.body; - ... - // Get access token - const getToken = await axios({ - url: "https://api.iamport.kr/users/getToken", - method: "post", // POST method - headers: { "Content-Type": "application/json" }, - data: { - imp_key: "imp_apikey", // REST API key - imp_secret: "ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6bkA5lamv9OqDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f" // REST API Secret - } - }); - const { access_token } = getToken.data.response; // access token - ... - // Get payment info from i'mport server using imp_uid - const getPaymentData = await axios({ - // Pass imp_uid - url: \`https://api.iamport.kr/payments/\${imp_uid}\`, - // GET method - method: "get", - // Add access toke to Authorization header - headers: { "Authorization": access_token } - }); - const paymentData = getPaymentData.data.response; // Payment info - ... - } catch (e) { - res.status(400).send(e); - } + app.post("/payments/complete", async (req, res) => { + try { + // Get imp_uid, merchant_uid from req.body + const { imp_uid, merchant_uid } = req.body; + console.log(imp_uid, merchant_uid); + // Get access token + const getToken = await axios({ + url: "https://api.iamport.kr/users/getToken", + method: "post", // POST method + headers: { "Content-Type": "application/json" }, + data: { + imp_key: "imp_apikey", // REST API key + imp_secret: + "ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6bkA5lamv9OqDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f", // REST API Secret + }, + }); + const { access_token } = getToken.data.response; // access token + // Get payment info from i'mport server using imp_uid + const getPaymentData = await axios({ + // Pass imp_uid + url: `https://api.iamport.kr/payments/${imp_uid}`, + // GET method + method: "get", + // Add access toke to Authorization header + headers: { Authorization: access_token }, }); + const paymentData = getPaymentData.data.response; // Payment info + console.log(paymentData); + } catch (e) { + res.status(400).send(e); + } + }); ``` @@ -99,49 +101,60 @@ Based on the payment information from the client, the server verifies the Example of comparing the actual payment amount with the payment request amount, performing fraud check on the payment amount, and saving the data in the DB. - ```javascript title="server-side" + ```ts title="server-side" app.use(bodyParser.json()); - ... - app.post("/payments/complete", async (req, res) => { - try { - // Get imp_uid, merchant_uid from req.body - const { imp_uid, merchant_uid } = req.body; - // Get access token - /* ...Omitted... */ - // Get payment info from iamport server using imp_uid - /* ...Omitted... */ - const paymentData = getPaymentData.data.response; // Payment info - ... - // Get the requested payment amount from the DB - const order = await Orders.findById(paymentData.merchant_uid); - const amountToBePaid = order.amount; // Requested payment amount - ... - // Verify payment - const { amount, status } = paymentData; - // If amount matches. Processed amount === Requested amount - if (amount === amountToBePaid) { - await Orders.findByIdAndUpdate(merchant_uid, { $set: paymentData }); // Save payment info to DB - ... - switch (status) { - case "ready": // Issue virtual account - // Save virtual account info in DB - const { vbank_num, vbank_date, vbank_name } = paymentData; - await Users.findByIdAndUpdate("/* customer id */", { $set: { vbank_num, vbank_date, vbank_name }}); - // Send virtual account issuance text message - SMS.send({ text: \`Virtual account issued successfully. Account info \${vbank_num} \${vbank_date} \${vbank_name}\`}); - res.send({ status: "vbankIssued", message: "Virtual account issued successfully" }); - break; - case "paid": // Payment complete - res.send({ status: "success", message: "General payment successful" }); - break; - } - } else { // Amount mismatch. Forged/falsified payment. - throw { status: "forgery", message: "Forged/falsified payment attempted" }; + app.post("/payments/complete", async (req, res) => { + try { + // Get imp_uid, merchant_uid from req.body + const { imp_uid, merchant_uid } = req.body; + console.log(imp_uid, merchant_uid); + // Get access token + /* ...Omitted... */ + // Get payment info from iamport server using imp_uid + /* ...Omitted... */ + const paymentData = getPaymentData.data.response; // Payment info + // Get the requested payment amount from the DB + const order = await Orders.findById(paymentData.merchant_uid); + const amountToBePaid = order.amount; // Requested payment amount + // Verify payment + const { amount, status } = paymentData; + // If amount matches. Processed amount === Requested amount + if (amount === amountToBePaid) { + await Orders.findByIdAndUpdate(merchant_uid, { $set: paymentData }); // Save payment info to DB + switch (status) { + case "ready": // Issue virtual account + // Save virtual account info in DB + const { vbank_num, vbank_date, vbank_name } = paymentData; + await Users.findByIdAndUpdate("/* customer id */", { + $set: { vbank_num, vbank_date, vbank_name }, + }); + // Send virtual account issuance text message + SMS.send({ + text: `Virtual account issued successfully. Account info ${vbank_num} ${vbank_date} ${vbank_name}`, + }); + res.send({ + status: "vbankIssued", + message: "Virtual account issued successfully", + }); + break; + case "paid": // Payment complete + res.send({ + status: "success", + message: "General payment successful", + }); + break; } - } catch (e) { - res.status(400).send(e); + } else { + // Amount mismatch. Forged/falsified payment. + throw { + status: "forgery", + message: "Forged/falsified payment attempted", + }; } - }); + } catch (e) { + res.status(400).send(e); + } + }); ``` diff --git a/src/content/docs/en/auth/guide/6.mdx b/src/content/docs/en/auth/guide/6.mdx index 9dd2dd4f6..b04751481 100644 --- a/src/content/docs/en/auth/guide/6.mdx +++ b/src/content/docs/en/auth/guide/6.mdx @@ -16,55 +16,69 @@ following example. - ```javascript title="client-side" - IMP.request_pay({ + ```ts title="client-side" + IMP.request_pay( + { /* ...Omitted... */ - }, function (rsp) { // callback - if (rsp.success) { // payment successful: payment accepted or virtual account issued - // jQuery HTTP request - jQuery.ajax({ + }, + function (rsp) { + // callback + if (rsp.success) { + // payment successful: payment accepted or virtual account issued + // jQuery HTTP request + jQuery + .ajax({ /* ...Omitted... */ - }).done(function(data) { // response processing - switch(data.status) { - case: "vbankIssued": + }) + .done(function (data) { + // response processing + switch (data.status) { + case "vbankIssued": // Virtual account issued break; - case: "success": + case "success": // Payment successful break; } }); } else { - alert("Payment failed. Error message: " + rsp.error_msg); + alert("Payment failed. Error message: " + rsp.error_msg); } - }); + }, + ); ``` - ```javascript title="client-side" - IMP.request_pay({ + ```ts title="client-side" + IMP.request_pay( + { /* ...Omitted... */ - }, rsp => { // callback - if (rsp.success) { // payment successful: payment accepted or virtual account issued + }, + (rsp) => { + // callback + if (rsp.success) { + // payment successful: payment accepted or virtual account issued // axios HTTP request axios({ /* ...Omitted... */ - }).then((data) => { // Response processing - switch(data.status) { - case: "vbankIssued": + }).then((data) => { + // Response processing + switch (data.status) { + case "vbankIssued": // Virtual account issued break; - case: "success": + case "success": // Payment successful break; } }); } else { - alert(\`Payment failed. Error message: \${rsp.error_msg}\`); + alert(`Payment failed. Error message: ${rsp.error_msg}`); } - }); + }, + ); ``` diff --git a/src/content/docs/en/auth/guide/def.mdx b/src/content/docs/en/auth/guide/def.mdx index e3deb6c30..c70a2726b 100644 --- a/src/content/docs/en/auth/guide/def.mdx +++ b/src/content/docs/en/auth/guide/def.mdx @@ -19,7 +19,8 @@ authentication result. Communication for a live payment request is made directly between the merchant server and the PG server, and card information is not used in the payment request process. -#### Authenticated payment is traditionally categorized into the following two types based on the authentication method. +Authenticated payment is traditionally categorized into the followingtwo types +based on the authentication method. - ISP: authenticates pre-registered card information through a public key-based digital certificate - MPI: authenticates card information by entering the card number, CVC, and secure click password. @@ -29,4 +30,4 @@ to pre-register a credit card and use the **6-digit payment password** to easily
-#### You can easily integrate authenticated payment through i'mport! +You can easily integrate authenticated payment through i'mport! diff --git a/src/content/docs/en/auth/guide/readme.mdx b/src/content/docs/en/auth/guide/readme.mdx index 8aae9ffd1..ed0c60b7f 100644 --- a/src/content/docs/en/auth/guide/readme.mdx +++ b/src/content/docs/en/auth/guide/readme.mdx @@ -23,7 +23,8 @@ authentication result. Communication for a live payment request is made directly between the merchant server and the PG server, and card information is not used in the payment request process. -#### Authenticated payment is traditionally categorized into the following two types based on the authentication method. +Authenticated payment is traditionally categorized into the following two types +based on the authentication method. - ISP: authenticates pre-registered card information through a public key-based digital certificate - MPI: authenticates card information by entering the card number, CVC, and secure click password. @@ -33,7 +34,7 @@ to pre-register a credit card and use the **6-digit payment password** to easily
-#### You can easily integrate authenticated payments through i'mport! +You can easily integrate authenticated payments through i'mport! ## 1. Add i'mport library @@ -58,20 +59,20 @@ Add the JS library to your checkout page. ## 2. Initialize IMP object -#### On the checkout page, initialize the IMP object using your [Merchant ID](../../ready/3.). +On the checkout page, initialize the IMP object using your [Merchant ID](../../ready/3.). - ```javascript title="Client-side" - var IMP = window.IMP; // Can be omitted - IMP.init("Merchant ID"); // Example: imp00000000 + ```ts title="Client-side" + const IMP = window.IMP; // Can be omitted + IMP.init("Merchant ID"); // Example: imp00000000 ``` - ```javascript title="Client-side" - const IMP = window.IMP; // Can be omitted - IMP.init("{Merchant ID}"); // Example: imp00000000a + ```ts title="Client-side" + const IMP = window.IMP; // Can be omitted + IMP.init("{Merchant ID}"); // Example: imp00000000a ``` @@ -89,41 +90,39 @@ the first argument of the **request\_pay** function. - ```javascript - + }, + ); ``` - ```jsx - class RequestPay extends React.Component { - requestPay = () => { - IMP.request_pay({ // param + ```tsx + export class RequestPay extends React.Component { + requestPay = () => { + IMP.request_pay( + { + // param pg: "kcp", pay_method: "card", merchant_uid: "ORD20180131-0000011", @@ -133,54 +132,53 @@ the first argument of the **request\_pay** function. buyer_name: "Hong Gildong", buyer_tel: "010-4242-4242", buyer_addr: "Shinsa-dong, Gangnam-gu, Seoul", - buyer_postcode: "01181" - }, rsp => { // callback + buyer_postcode: "01181", + }, + (rsp) => { + // callback if (rsp.success) { - ..., // Payment is successful - ... } else { - ..., // Payment failed - ... } - }); - } + }, + ); + }; + } ``` - ```javascript - + ```ts + export default { + methods: { + requestPay: function () { + IMP.request_pay( + { + // param + pg: "kcp", + pay_method: "card", + merchant_uid: "ORD20180131-0000011", + name: "Norway swivel chair", + amount: 64900, + buyer_email: "gildong@gmail.com", + buyer_name: "Hong Gildong", + buyer_tel: "010-4242-4242", + buyer_addr: "Shinsa-dong, Gangnam-gu, Seoul", + buyer_postcode: "01181", + }, + (rsp) => { + // callback + if (rsp.success) { + // Payment is successful + } else { + // Payment failed + } + }, + ); + }, + }, + }; ``` @@ -188,11 +186,11 @@ the first argument of the **request\_pay** function. **Note - Creating an order ID (merchant\_uid)** - - The order number must always be assigned a **unique** **value** each time the payment window is requested. + - The order number must always be assigned a **unique value** each time the payment window is requested. - After the payment process is complete, the server uses the order ID to retrieve the order information for **payment fraud check**. Be sure to create a **unique ID** on the merchant server and **store it in the DB**. -#### The following is the above sample code with the Pay button added. +The following is the above sample code with the Pay button added. ```html title="sample.html" @@ -263,7 +261,8 @@ the payment window type as follows:
-#### Most payments that are processed in the PC environment can receive payment results through the callback function, which is the second argument of the request\_pay() function. +Most payments that are processed in the PC environment can receive payment results +through the callback function, which is the second argument of the request\_pay() function. For **PayPal** payments, the payment window is loaded as a **pop-up (new window)** in a PC environment and you can also receive the payment result through **m\_redirect\_url**. @@ -274,36 +273,47 @@ the payment window type as follows: - ```javascript title="client-side" - IMP.request_pay({ - /* ...Omitted... */ - }, function (rsp) { // callback - if (rsp.success) { // payment successful: payment accepted or virtual account issued - // HTTP request with jQuery - jQuery.ajax({ - url: "{Merchant endpoint that receives server's payment info}", - method: "POST", - headers: { "Content-Type": "application/json" }, - data: { - imp_uid: rsp.imp_uid, // Payment ID - merchant_uid: rsp.merchant_uid // Order ID - } - }).done(function (data) { - // Merchant server payment API call is successful + ```ts title="client-side" + IMP.request_pay( + { + /* ...Omitted... */ + }, + function (rsp) { + // callback + if (rsp.success) { + // payment successful: payment accepted or virtual account issued + // HTTP request with jQuery + jQuery + .ajax({ + url: "{Merchant endpoint that receives server's payment info}", + method: "POST", + headers: { "Content-Type": "application/json" }, + data: { + imp_uid: rsp.imp_uid, // Payment ID + merchant_uid: rsp.merchant_uid, // Order ID + }, }) - } else { - alert("Payment failed. Error: " + rsp.error_msg); - } - }); + .done(function (data) { + // Merchant server payment API call is successful + console.log(data); + }); + } else { + alert("Payment failed. Error: " + rsp.error_msg); + } + }, + ); ``` - ```javascript title="client-side" - IMP.request_pay({ + ```ts title="client-side" + IMP.request_pay( + { /* ...Omitted... */ - }, rsp => { // callback - if (rsp.success) { + }, + (rsp) => { + // callback + if (rsp.success) { // HTTP request with axios axios({ url: "{Endpoint that receives server's payment info}", @@ -311,15 +321,17 @@ the payment window type as follows: headers: { "Content-Type": "application/json" }, data: { imp_uid: rsp.imp_uid, - merchant_uid: rsp.merchant_uid - } + merchant_uid: rsp.merchant_uid, + }, }).then((data) => { // Server payment API call is successful - }) + console.log(data); + }); } else { - alert(\`Payment failed. Error: \${rsp.error_msg}\`); + alert(`Payment failed. Error: ${rsp.error_msg}`); } - }); + }, + ); ``` @@ -344,20 +356,26 @@ above. - ```javascript title="client-side" - IMP.request_pay({ - /* ...Omitted... */, - m_redirect_url: "{redirect URL}" - }, /* callback */); // callback is not called + ```ts title="client-side" + IMP.request_pay( + { + /* ...Omitted... */ + m_redirect_url: "{redirect URL}", + }, + /* callback */ + ); // callback is not called ``` - ```javascript title="client-side" - IMP.request_pay({ - /* ...Omitted... */, - m_redirect_url: "{redirect URL}" - }, /* callback */); // callback is not called + ```ts title="client-side" + IMP.request_pay( + { + /* ...Omitted... */ + m_redirect_url: "{redirect URL}", + }, + /* callback */ + ); // callback is not called ``` @@ -369,13 +387,13 @@ The following is an example of redirecting URL based on the query string. - ```url + ```sh curl https://myservice.com/payments/complete?imp_uid=unique_iamport_paymentID&merchant_uid=unique_merchant_orderID&imp_success=true ``` - ``` + ```sh curl https://myservice.com/payments/complete?imp_uid=unique_iamport_paymentID&merchant_uid=unique_merchant_orderID&imp_success=false&error_code=error_code(none_defined_currently)&error_msg=error_message ``` @@ -398,19 +416,28 @@ The following is an example of redirecting URL based on the query string. > The `payment process is complete` when: > > 1. **Payment is successful** (Status: `paid`, imp\_success: `true`) +> > 2. **Payment fails** (Status: `failed`, imp\_success: `false`) +> > 3. **Payment window fails to open** due to PG module setting error +> > 4. User **terminates the payment process** by clicking the X or Cancel button -> 5. **Payment is suspended** due to invalid card information, limit exceeded, insufficient balance, etc. +> +> 5. **Payment is suspended** due to invalid card information, +> limit exceeded, insufficient balance, etc. +> > 6. **Virtual account is issued** (status: `ready`, imp\_success: `true`) - The final payment result logic processing must be handled stably by using a [**webhook**](../../result/webhook). If you don't set up a webhook, you may fail to receive the payment result. + The final payment result logic processing must be handled stably by using a [**webhook**](../../result/webhook). + If you don't set up a webhook, you may fail to receive the payment result. ## 5. Verify payment information -Based on the payment information from the client, the server verifies the **payment amount for fraud** and saves the payment information in the database if needed. The following are the steps for verifying the payment information. +Based on the payment information from the client, the server verifies the **payment amount for fraud** +and saves the payment information in the database if needed. +The following are the steps for verifying the payment information. - Server receives the i'mport payment ID (**imp\_uid**) and order ID (**merchant\_uid**) @@ -426,7 +453,7 @@ Based on the payment information from the client, the server verifies the Example of handling a POST request to the merchant endpoint URL that receives the payment information - ```javascript title="server-side" + ```ts title="server-side" app.use(bodyParser.json()); // "{Merchant endpoint that receives server's payment info}" POST request receiver app.post("/payments/complete", async (req, res) => { @@ -447,41 +474,38 @@ Based on the payment information from the client, the server verifies the Example of calling the [**Get payment**](https://api.iamport.kr/#!/payments/getPaymentByImpUid) **API** with the i'mport **payment ID (imp\_uid)** to retrieve the payment info. - ```javascript title="server-side" + ```ts title="server-side" app.use(bodyParser.json()); - ... - app.post("/payments/complete", async (req, res) => { - try { - // Get imp_uid, merchant_uid from req.body - const { imp_uid, merchant_uid } = req.body; - ... - // Get access token - const getToken = await axios({ - url: "https://api.iamport.kr/users/getToken", - method: "post", // POST method - headers: { "Content-Type": "application/json" }, - data: { - imp_key: "imp_apikey", // REST API key - imp_secret: "ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6bkA5lamv9OqDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f" // REST API Secret - } - }); - const { access_token } = getToken.data.response; // access token - ... - // Get payment info from i'mport server using imp_uid - const getPaymentData = await axios({ - // Pass imp_uid - url: \`https://api.iamport.kr/payments/\${imp_uid}\`, - // GET method - method: "get", - // Add access toke to Authorization header - headers: { "Authorization": access_token } - }); - const paymentData = getPaymentData.data.response; // Payment info - ... - } catch (e) { - res.status(400).send(e); - } + app.post("/payments/complete", async (req, res) => { + try { + // Get imp_uid, merchant_uid from req.body + const { imp_uid, merchant_uid } = req.body; + // Get access token + const getToken = await axios({ + url: "https://api.iamport.kr/users/getToken", + method: "post", // POST method + headers: { "Content-Type": "application/json" }, + data: { + imp_key: "imp_apikey", // REST API key + imp_secret: + "ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6bkA5lamv9OqDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f", // REST API Secret + }, + }); + const { access_token } = getToken.data.response; // access token + // Get payment info from i'mport server using imp_uid + const getPaymentData = await axios({ + // Pass imp_uid + url: `https://api.iamport.kr/payments/${imp_uid}`, + // GET method + method: "get", + // Add access toke to Authorization header + headers: { Authorization: access_token }, }); + const paymentData = getPaymentData.data.response; // Payment info + } catch (e) { + res.status(400).send(e); + } + }); ``` @@ -504,56 +528,66 @@ Based on the payment information from the client, the server verifies the Example of comparing the actual payment amount and the payment request amount, performing fraud check on the payment amount, and saving the data in the DB. - ```javascript title="server-side" + ```ts title="server-side" app.use(bodyParser.json()); - ... - app.post("/payments/complete", async (req, res) => { - try { - // Get imp_uid, merchant_uid from req.body - const { imp_uid, merchant_uid } = req.body; - // Get access token - /* ...Omitted... */ - // Get payment info from iamport server using imp_uid - /* ...Omitted... */ - const paymentData = getPaymentData.data.response; // Payment info - ... - // Get the requested payment amount from the DB - const order = await Orders.findById(paymentData.merchant_uid); - const amountToBePaid = order.amount; // Requested payment amount - ... - // Verify payment - const { amount, status } = paymentData; - // If amount matches. Processed amount === Requested amount - if (amount === amountToBePaid) { - await Orders.findByIdAndUpdate(merchant_uid, { $set: paymentData }); // Save payment info to DB - ... - switch (status) { - case "ready": // Issue virtual account - // Save virtual account info in DB - const { vbank_num, vbank_date, vbank_name } = paymentData; - await Users.findByIdAndUpdate("/* customer id */", { $set: { vbank_num, vbank_date, vbank_name }}); - // Send virtual account issuance text message - SMS.send({ text: \`Virtual account issued successfully. Account info \${vbank_num} \${vbank_date} \${vbank_name}\`}); - res.send({ status: "vbankIssued", message: "Virtual account issued successfully" }); - break; - case "paid": // Payment complete - res.send({ status: "success", message: "General payment successful" }); - break; - } - } else { // Amount mismatch. Forged/falsified payment. - throw { status: "forgery", message: "Forged/falsified payment attempted" }; + app.post("/payments/complete", async (req, res) => { + try { + // Get imp_uid, merchant_uid from req.body + const { imp_uid, merchant_uid } = req.body; + // Get access token + /* ...Omitted... */ + // Get payment info from iamport server using imp_uid + /* ...Omitted... */ + const paymentData = getPaymentData.data.response; // Payment info + // Get the requested payment amount from the DB + const order = await Orders.findById(paymentData.merchant_uid); + const amountToBePaid = order.amount; // Requested payment amount + // Verify payment + const { amount, status } = paymentData; + // If amount matches. Processed amount === Requested amount + if (amount === amountToBePaid) { + await Orders.findByIdAndUpdate(merchant_uid, { $set: paymentData }); // Save payment info to DB + switch (status) { + case "ready": // Issue virtual account + // Save virtual account info in DB + const { vbank_num, vbank_date, vbank_name } = paymentData; + await Users.findByIdAndUpdate("/* customer id */", { + $set: { vbank_num, vbank_date, vbank_name }, + }); + // Send virtual account issuance text message + SMS.send({ + text: `Virtual account issued successfully. Account info ${vbank_num} ${vbank_date} ${vbank_name}`, + }); + res.send({ + status: "vbankIssued", + message: "Virtual account issued successfully", + }); + break; + case "paid": // Payment complete + res.send({ + status: "success", + message: "General payment successful", + }); + break; } - } catch (e) { - res.status(400).send(e); + } else { + // Amount mismatch. Forged/falsified payment. + throw { + status: "forgery", + message: "Forged/falsified payment attempted", + }; } - }); + } catch (e) { + res.status(400).send(e); + } + }); ``` The original requested amount is queried from the database with the **`merchant_uid`**, and the actual processed amount is retrieved from the i'mport server with the **`imp_uid`**. The **two -values ​​are compared** to verify that they match. **If the verification is successful, +values are compared** to verify that they match. **If the verification is successful, the payment information is saved in the database** and a response is returned based on the payment status (**`status`**). Otherwise, an error message is returned. @@ -570,57 +604,69 @@ example. - ```javascript title="client-side" - IMP.request_pay({ + ```ts title="client-side" + IMP.request_pay( + { /* ...Omitted... */ - }, function (rsp) { // callback - if (rsp.success) { // payment successful: payment accepted or virtual account issued - // jQuery HTTP request - jQuery.ajax({ + }, + function (rsp) { + // callback + if (rsp.success) { + // payment successful: payment accepted or virtual account issued + // jQuery HTTP request + jQuery + .ajax({ /* ...Omitted... */ - }).done(function(data) { // response processing - switch(data.status) { - case: "vbankIssued": + }) + .done(function (data) { + // response processing + switch (data.status) { + case "vbankIssued": // Virtual account issued break; - case: "success": + case "success": // Payment successful break; } }); } else { - alert("Payment failed. Error message: " + rsp.error_msg); + alert("Payment failed. Error message: " + rsp.error_msg); } - }); + }, + ); ``` - ```javascript title="client-side" - IMP.request_pay({ + ```ts title="client-side" + IMP.request_pay( + { /* ...Omitted... */ - }, rsp => { // callback - if (rsp.success) { // payment successful: payment accepted or virtual account issued + }, + (rsp) => { + // callback + if (rsp.success) { + // payment successful: payment accepted or virtual account issued // axios HTTP request axios({ /* ...Omitted... */ - }).then((data) => { // Response processing - switch(data.status) { - case: "vbankIssued": + }).then((data) => { + // Response processing + switch (data.status) { + case "vbankIssued": // Virtual account issued break; - case: "success": + case "success": // Payment successful break; } }); } else { - alert(\`Payment failed. Error message: \${rsp.error_msg}\`); + alert(`Payment failed. Error message: ${rsp.error_msg}`); } - - }); - + }, + ); ``` @@ -633,6 +679,3 @@ payment complete message from the merchant endpoint URL** set in the **m\_redire These parameters are returned as a response when the payment fails and they contains the same values returned from the PG without additional processing. Note that we don't yet provide definitions for the error codes and error messages that have accumulated in our system. - -``` -``` diff --git a/src/content/docs/en/console/guide/account.mdx b/src/content/docs/en/console/guide/account.mdx index 56131d136..a59155bb7 100644 --- a/src/content/docs/en/console/guide/account.mdx +++ b/src/content/docs/en/console/guide/account.mdx @@ -10,12 +10,28 @@ import Figure from "~/components/Figure.astro"; ## i'mport Admin console accounts -- Merchant Admin account (Admin): The Merchant Admin account that is created when a merchant signs up in the Admin console. This account has access to all features. -- Merchant Manager account (Manager): The Merchant Admin account can create and issue this account. This account only has read-only access to merchant/account management and integration, but has full access to any other features. -- Merchant Developer account (Dev): The Merchant Manager account can create and issue this account. This account has full access to the integration feature, only read-only access to merchant account management, and access to no other features. -- Merchant User account (Read Only): The Merchant Manager account can create and issue this account. This account has read-only access to all features. -- Sub-merchant Manager account (Manager): The Merchant Manager account or its Sub-merchant Manager account can create and issue this account. This account has access to all features of the sub-merchant, and read-only access to the Merchant Admin account and merchant's business information. -- Sub-merchant User account (Read Only): The Merchant Admin account or its Sub-merchant Manager account can create and issue this account. This account has read-only access to all features of the sub-merchant. +- Merchant Admin account (Admin): The Merchant Admin account that is created + when a merchant signs up in the Admin console. This account has access to all features. + +- Merchant Manager account (Manager): The Merchant Admin account can create and issue this account. + This account only has read-only access to merchant/account management and integration, + but has full access to any other features. + +- Merchant Developer account (Dev): The Merchant Manager account can create and issue this account. + This account has full access to the integration feature, + only read-only access to merchant account management, and access to no other features. + +- Merchant User account (Read Only): The Merchant Manager account can create and issue this account. + This account has read-only access to all features. + +- Sub-merchant Manager account (Manager): The Merchant Manager account + or its Sub-merchant Manager account can create and issue this account. + This account has access to all features of the sub-merchant, + and read-only access to the Merchant Admin account and merchant's business information. + +- Sub-merchant User account (Read Only): The Merchant Admin account + or its Sub-merchant Manager account can create and issue this account. + This account has read-only access to all features of the sub-merchant. ## Admin account management @@ -23,41 +39,50 @@ _Available menus/buttons are marked in blue._
-
+
+ +- The Admin account can create, issue, modify roles and information, + and delete accounts under the merchant. -- The Admin account can create, issue, modify roles and information, and delete accounts under the merchant. - Non-admin accounts can only view the accounts under the merchant. ![](/gitbook-assets/en/image.png)![]() ## Merchant and sub-merchant accounts -- Merchant: A business with a unique business registration number except for agencies that develop payment service for other merchants. -- Sub-merchant: Merchants can manage and integrate payments through the Admin console by dividing its business by service, product line, region, etc. Such a division is defined as a sub-merchant. - - Payment integration: The merchant can assign its payment methods and PGs to a specific sub-merchant from the Admin console. - - Sub-merchant account: Sub-merchant accounts are limited to read-only access to features and payments associated with the sub-merchant. +- Merchant: A business with a unique business registration number + except for agencies that develop payment service for other merchants. + +- Sub-merchant: Merchants can manage and integrate payments through the Admin console + by dividing its business by service, product line, region, etc. + Such a division is defined as a sub-merchant. + + - Payment integration: The merchant can assign its payment methods and PGs + to a specific sub-merchant from the Admin console. + + - Sub-merchant account: Sub-merchant accounts are limited to read-only access + to features and payments associated with the sub-merchant. ## Sub-merchant management ### Merchant Admin account view -
+
-- The Merchant Admin account can add and edit sub-merchants and create, edit, and delete accounts belonging to the sub-merchant. +- The Merchant Admin account can add and edit sub-merchants + and create, edit, and delete accounts belonging to the sub-merchant. #### Add/edit sub-merchant ![]()![]() -- To add a sub-merchant, enter the sub-merchant name, payment channel, service url, contact information, and tier code. - - The payment channel is assigned through the online payment application, and it can be assigned to a merchant in payment integration. +- To add a sub-merchant, enter the sub-merchant name, payment channel, + service url, contact information, and tier code. + - The payment channel is assigned through the online payment application, + and it can be assigned to a merchant in payment integration. + - A payment channel already assigned to another sub-merchant cannot be assigned. + - To call the i'mport Payment SDK from the sub-merchant's URL, use the tier code and call `import.agency (‘tier code’)`. #### Add sub-merchant account @@ -68,17 +93,8 @@ _Available menus/buttons are marked in blue._ ### Non-admin account view -
+
-
+
-
+
diff --git a/src/content/docs/en/console/guide/list.mdx b/src/content/docs/en/console/guide/list.mdx index a872384b0..3b559d11d 100644 --- a/src/content/docs/en/console/guide/list.mdx +++ b/src/content/docs/en/console/guide/list.mdx @@ -5,116 +5,169 @@ description: Check the details of each payment transaction. Payment activity page -* Filter payments by date range during which payment was attempted. -* Perform comprehensive search by specifying a search condition or for all data if no condition is specified. -* Filter payments by payment status, method, PG, type, and mode. -* Total search results by status. -* Payment activity list that shows payment status, customer information, payment method, PG, payment amount, mode, request time, and completion time. -* Click the right corner of a payment record in the list to copy MID, UID or cancel payment. -* Click on a payment to view its details. -* Click on a payment to cancel it. -* Click on a payment to resend a webhook. -* Total transaction amount of search results - Total sales by currency calculated based on the total refund amount. -* Excel download of basic payment details and selected additional data including customer, PG, credit card payment, and account transfer payment information. +- Filter payments by date range during which payment was attempted. + +- Perform comprehensive search by specifying a search condition + or for all data if no condition is specified. + +- Filter payments by payment status, method, PG, type, and mode. + +- Total search results by status. + +- Payment activity list that shows payment status, customer information, payment method, + PG, payment amount, mode, request time, and completion time. + +- Click the right corner of a payment record in the list to copy MID, UID or cancel payment. + +- Click on a payment to view its details. + +- Click on a payment to cancel it. + +- Click on a payment to resend a webhook. + +- Total transaction amount of search results - Total sales by currency + calculated based on the total refund amount. + +- Excel download of basic payment details and selected additional data + including customer, PG, credit card payment, and account transfer payment information. ## Calendar filter ![]() -* Specify the start and end date/time of the payment request to search for. - * A payment request occurs when a customer attempts to make a payment. - * Hence, the time of refund and completion may occur outside of the specified search period. -* You can specify the year, month, day, hour, and minute. -* For convenience, you can quickly set the dates using the buttons for today, yesterday, past 7 days, 30 days, or 90 days. -* You can also manually enter the dates. +- Specify the start and end date/time of the payment request to search for. + - A payment request occurs when a customer attempts to make a payment. + - Hence, the time of refund and completion may occur outside of the specified search period. + +- You can specify the year, month, day, hour, and minute. + +- For convenience, you can quickly set the dates using the buttons + for today, yesterday, past 7 days, 30 days, or 90 days. + +- You can also manually enter the dates. ## Comprehensive search ![]() -* Perform a search by specifying a filter or on all payment data. -* Comprehensive search filters: - * i'mport transaction number - * Merchant transaction number - * Credit card approval number - * Customer name - * Customer mobile number - * Customer email - * PG approval number - * Credit card number - * Merchant ID - * Payment environment - * Live account bank - * Virtual account bank - * Bank account number - * Name of depositor - * Cash receipt issuance number - * Customer address - * Reason for cancellation - * Payment environment details - * Order name -* The search logic is specified as 'like %value' that returns the values that start with the specified value. - * In the future, the order name and customer address will be changed to 'like %value%'. +- Perform a search by specifying a filter or on all payment data. + +- Comprehensive search filters: + - i'mport transaction number + - Merchant transaction number + - Credit card approval number + - Customer name + - Customer mobile number + - Customer email + - PG approval number + - Credit card number + - Merchant ID + - Payment environment + - Live account bank + - Virtual account bank + - Bank account number + - Name of depositor + - Cash receipt issuance number + - Customer address + - Reason for cancellation + - Payment environment details + - Order name + +- The search logic is specified as 'like %value' that returns the values + that start with the specified value. + - In the future, the order name and customer address will be changed to 'like %value%'. ## Filters ![]() -* You can search payments by filtering on payment status, payment method, PG, payment type, and payment mode. - * Payment status: All, Scheduled, Completed, Cancelled (full), Cancelled (partial), Failed - * Payment method: Payment method - * PG: PG - * Payment type: All, subscription, general - * Payment mode: All, live, test +- You can search payments by filtering on payment status, payment method, + PG, payment type, and payment mode. + - Payment status: All, Scheduled, Completed, Cancelled (full), Cancelled (partial), Failed + - Payment method: Payment method + - PG: PG + - Payment type: All, subscription, general + - Payment mode: All, live, test ## Total payments by status ![]() -* Shows payment totals by status (all, completed, scheduled, failed, and cancelled). - * Failed payments include partial and full cancellations. +- Shows payment totals by status (all, completed, scheduled, failed, and cancelled). + - Failed payments include partial and full cancellations. ## Payment activity list -
+
+ + +
+
+ +- Payment activity list shows results from a date range, comprehensive, or data filter search. + +- The default view shows all payment data for the last 6 months. -* Payment activity list shows results from a date range, comprehensive, or data filter search. -* The default view shows all payment data for the last 6 months. -* The list shows the payment status, customer information, payment method, PG, payment amount, payment type, request time, and approval time. - * Customer information includes the customer's name, email, and phone number (displayed in order) that are specified at payment request via SDK. - * Payment type is general, subscription, or test. -* Request and approval times are displayed in descending order, and you can click on either value to sort based the value. -* If you click on the the dots to the right of a payment row in the Payment activity list, you can copy the merchant transaction number (merchant\_uid) and i'mport transaction number (imp\_uid). You can also cancel a completed or cancelled (partial) payment. +- The list shows the payment status, customer information, payment method, PG, + payment amount, payment type, request time, and approval time. + + - Customer information includes the customer's name, email, and phone number (displayed in order) + that are specified at payment request via SDK. + + - Payment type is general, subscription, or test. + +- Request and approval times are displayed in descending order, + and you can click on either value to sort based the value. + +- If you click on the the dots to the right of a payment row in the Payment activity list, you can + copy the merchant transaction number (merchant\_uid) and i'mport transaction number (imp\_uid). + You can also cancel a completed or cancelled (partial) payment. ## Payment details ![]() -* The Payment details page consists of the customer and payment information sections. -* Customer information shows the customer's name, phone number, e-mail, and address submitted via SDK. -* Payment information shows: - * Payment status - * i'mport transaction number - * Each payment method shows: - * Credit card: acquirer and masked card number - * Virtual account: account bank, account holder, account number, and time of deposit - * Bank transfer: account bank - * Mobile micropayment: carrier - * Total payment amount - * Order amount - discount amount - * Order amount - * List price (VAT) - * Paid with points - * Paid with points refers to the points rewarded by simple payment companies and PGs. - * Discount amount - * Value retrieved from PG's message. Note that the availability of this data varies by PG. - * Credit card approval number - * Merchant ID - * PG - * PG approval number - * Payment ID assigned by the PG. - * Payment environment - * Parsed device and web/app environment information +- The Payment details page consists of the customer and payment information sections. + +- Customer information shows the customer's name, phone number, + e-mail, and address submitted via SDK. + +- Payment information shows: + + - Payment status + + - i'mport transaction number + + - Each payment method shows: + - Credit card: acquirer and masked card number + - Virtual account: account bank, account holder, account number, and time of deposit + - Bank transfer: account bank + - Mobile micropayment: carrier + + - Total payment amount + - Order amount - discount amount + + - Order amount + + - List price (VAT) + + - Paid with points + - Paid with points refers to the points rewarded by simple payment companies and PGs. + + - Discount amount + - Value retrieved from PG's message. Note that the availability of this data varies by PG. + + - Credit card approval number + + - Merchant ID + + - PG + + - PG approval number + - Payment ID assigned by the PG. + + - Payment environment + - Parsed device and web/app environment information ## Payment cancellation @@ -122,17 +175,26 @@ Payment activity page ![]() -* You can cancel a payment from the Payment details page of a completed or partially cancelled payment. -* The default setting is full refund. If you want a partial refund, you can directly edit the refund amount or click `Partial refund` to edit and then click `Cancel Payment` at the bottom to finish. -* When you cancel a payment, the reason for cancellation is saved and sent to i'mport and PG. -* If a payment to cancel includes tax-free amount, you can specify this amount in the provided input field. -* When you cancel from the Admin console, a webhook is sent to the merchant's database for status update. -* For virtual accounts, you can additionally enter the following refund account information: - * Refund account bank - * Refund bank account number - * Refund account holder +- You can cancel a payment from the Payment details page + of a completed or partially cancelled payment. + +- The default setting is full refund. If you want a partial refund, + you can directly edit the refund amount or click `Partial refund` + to edit and then click `Cancel Payment` at the bottom to finish. + +- When you cancel a payment, the reason for cancellation is saved and sent to i'mport and PG. + +- If a payment to cancel includes tax-free amount, + you can specify this amount in the provided input field. + +- When you cancel from the Admin console, a webhook is sent + to the merchant's database for status update. + +- For virtual accounts, you can additionally enter the following refund account information: + - Refund account bank + - Refund bank account number + - Refund account holder ## Resend webhook ![]() - diff --git a/src/content/docs/en/console/guide/readme.mdx b/src/content/docs/en/console/guide/readme.mdx index 5a137d559..c54850f51 100644 --- a/src/content/docs/en/console/guide/readme.mdx +++ b/src/content/docs/en/console/guide/readme.mdx @@ -10,11 +10,11 @@ i'mport Admin console: [https://admin.iamport.kr/](https://admin.iamport.kr/) ## Apply for online payment -### [Apply for online payment](reg) +### [Apply for online payment](reg) ## Merchant and account management -### [My ID & API Keys](my-id-and-api-keys) +### [My ID & API Keys](my-id-and-api-keys)
### [Manage admin & sub-merchant accounts](account) diff --git a/src/content/docs/en/console/pg.mdx b/src/content/docs/en/console/pg.mdx index b0057255d..9e135be80 100644 --- a/src/content/docs/en/console/pg.mdx +++ b/src/content/docs/en/console/pg.mdx @@ -4,56 +4,58 @@ description: Learn how to set up and use multiple PGs. --- import Figure from "~/components/Figure.astro"; -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Set up multiple PGs in the i'mport **Admin console** and open a payment window for the desired payment method. +Set up multiple PGs in the i'mport **Admin console** +and open a payment window for the desired payment method. -### 1. Configure authenticated payment (general) +## 1. Configure authenticated payment (general) -Go to [**i'mport Admin Console > System Settings > PG Settings tab > Default PG tab**](https://admin.iamport.kr/settings#tab_pg) to set the `default PG` that is used as the default `param.pg` value when you call [`IMP.request_pay`](https://docs.iamport.kr/en-US/sdk/javascript-sdk#request_pay) to open the payment window. The default value is used when the `pg` value is missing or invalid. +Go to [**i'mport Admin Console > System Settings > PG Settings tab > Default PG tab**](https://admin.iamport.kr/settings#tab_pg) +to set the `default PG` that is used as the default `param.pg` value +when you call [`IMP.request_pay`](https://docs.iamport.kr/en-US/sdk/javascript-sdk#request_pay) +to open the payment window. The default value is used when the `pg` value is missing or invalid. -
+
-### 2. Add PG for subscription payment (for non-authenticated/**PG payment window)** +## 2. Add PG for subscription payment (for non-authenticated/**PG payment window)** -After acquiring a separate Merchant ID (MID) for subscription (non-authenticated) payment from the PG, use it to add the PG from the [**i'mport Admin Console > System Settings > PG Settings (general/subscription) tab**](https://admin.iamport.kr/settings#tab_pg). +After acquiring a separate Merchant ID (MID) for subscription (non-authenticated) payment +from the PG, use it to add the PG from the [**i'mport Admin Console > System Settings > PG Settings (general/subscription) tab**](https://admin.iamport.kr/settings#tab_pg).
-### 3. **Add PG for simple payment (Kakao Pay)** +## 3. **Add PG for simple payment (Kakao Pay)** Repeat step 2 to add PG setting for Kakao Pay. -
+
-## Open PG's payment window +## Open PG's payment window -To open a PG's payment window, call [**JavaScript SDK**](../sdk/javascript-sdk/) `IMP.request_pay` by specifying the PG that is already configured in **Admin console** in the `param.pg` property. +To open a PG's payment window, call [**JavaScript SDK**](../sdk/javascript-sdk/) `IMP.request_pay` +by specifying the PG that is already configured in **Admin console** in the `param.pg` property. -The [`pg` value](https://docs.iamport.kr/en-US/sdk/javascript-sdk#request_pay) can have the following format: +The [`pg` value](https://docs.iamport.kr/en-US/sdk/javascript-sdk#request_pay) +can have the following format: - **`{ PG code }`** - **`{ PG code }.{ PG Merchant ID }`** Assume that we have added **3 PG settings** as follows: -| PG | Merchant ID | Pay Type | Default PG | -| --------------- | ----------------- | ---------------- | ---------- | -| **`KG INICIS`** | `MID-a` (example) | **General** | O | -| **`KG INICIS`** | `MID-b` (example) | **Subscription** | X | -| `Kakao Pay` | `MID-c` (example) | Simple | X | +|PG |Merchant ID |Pay Type |Default PG| +|---------------|-----------------|----------------|----------| +|**`KG INICIS`**|`MID-a` (example)|**General** |O | +|**`KG INICIS`**|`MID-b` (example)|**Subscription**|X | +|`Kakao Pay` |`MID-c` (example)|Simple |X | -Of the previously added PG settings, `Kakao Pay` can be identified just with the `PG service code`. Set **`kakaopay`** in the `pg` property for the Kakao Pay payment request as follows: +Of the previously added PG settings, `Kakao Pay` can be identified just with the `PG service code`. +Set **`kakaopay`** in the `pg` property for the Kakao Pay payment request as follows: -```javascript title="client-side" +```ts title="client-side" IMP.request_pay({ pg: "kakaopay", //Open Kakao Pay payment page amount: 1000, @@ -63,39 +65,39 @@ IMP.request_pay({ }); ``` -Of the previously added PG settings, **`KG INICIS (general)`** and **`KG INICIS (subscription)`** have the **same PG service code**. Hence, you need to set `pg` to a value that combines the service code with the Merchant ID, **`{ PG Code }.{ PG Merchant ID }`**. +Of the previously added PG settings, **`KG INICIS (general)`** and **`KG INICIS (subscription)`** +have the **same PG service code**. +Hence, you need to set `pg` to a value that combines the service code with the Merchant ID, **`{ PG Code }.{ PG Merchant ID }`**. - -```javascript title="JavaScript" -IMP.request_pay({ - pg : "html5_inicis.MID-a", // Call KG INICIS general payment window (merchant ID: MID-a) - amount : 1000, - name : "Sample order", - buyer_name : "Buyer", - buyer_email : "buyer@iamport.kr" - }); -``` - - - - -```javascript title="JavaScript" -IMP.request_pay({ - pg : "html5_inicis.MID-b", // Call KG INICIS subscription payment window (merchant ID: MID-b) - amount : 1000, - name : "Sample order", - buyer_name : "Buyer", - buyer_email : "buyer@iamport.kr" - }); -``` - - + + ```ts title="JavaScript" + IMP.request_pay({ + pg: "html5_inicis.MID-a", // Call KG INICIS general payment window (merchant ID: MID-a) + amount: 1000, + name: "Sample order", + buyer_name: "Buyer", + buyer_email: "buyer@iamport.kr", + }); + ``` + + + + ```ts title="JavaScript" + IMP.request_pay({ + pg: "html5_inicis.MID-b", // Call KG INICIS subscription payment window (merchant ID: MID-b) + amount: 1000, + name: "Sample order", + buyer_name: "Buyer", + buyer_email: "buyer@iamport.kr", + }); + ``` + -**Matching priority for PG** - -[`IMP.request_pay`](https://docs.iamport.kr/en-US/sdk/javascript-sdk#request_pay) finds the setting that matches the `pg` value in the order the PG settings are shown in the **Admin console**. It opens the payment window for the first matching PG setting. + **Matching priority for PG** + [`IMP.request_pay`](https://docs.iamport.kr/en-US/sdk/javascript-sdk#request_pay) finds the setting that matches the `pg` value + in the order the PG settings are shown in the **Admin console**. It opens the payment window for the first matching PG setting. diff --git a/src/content/docs/en/etc/all/get-verification-info.mdx b/src/content/docs/en/etc/all/get-verification-info.mdx index b7be3f4e7..23fc50d9b 100644 --- a/src/content/docs/en/etc/all/get-verification-info.mdx +++ b/src/content/docs/en/etc/all/get-verification-info.mdx @@ -5,82 +5,80 @@ description: >- purposes. --- -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; Use the **`imp_uid`** obtained through integrated identity verification to get the customer's verification information. -### **STEP 01.** Get verification ID (imp_uid) on the server-side +## **STEP 01.** Get verification ID (imp\_uid) on the server-side The following server-side code fetches the data returned from identity verification. - -```javascript title="server-side" -app.use(bodyParser.json()); - ... - // controller that handles POST request to "/certifications" - app.post("/certifications", async (request, response) => { - // Get imp_uid from req.body - const { imp_uid } = request.body; -}) -``` - - + + ```ts title="server-side" + app.use(bodyParser.json()); + // controller that handles POST request to "/certifications" + app.post("/certifications", async (request, response) => { + // Get imp_uid from req.body + const { imp_uid } = request.body; + }); + ``` + + + + ```ts title="server-side" + app.use(bodyParser.json()); + // controller that handles GET request to "/certifications/redirect" + app.get("/certifications/redirect", async (request, response) => { + const { imp_uid } = request.query; // Get imp_uid from req.query + }); + ``` + + - -```javascript title="server-side" -app.use(bodyParser.json()); - ... - // controller that handles GET request to "/certifications/redirect" - app.get("/certifications/redirect", async (request, response) => { - const { imp_uid } = request.query; // Get imp_uid from req.query -}) -``` +## **STEP 02.** Get verification information - - +To get verification information from the i'mport server, +you must first get a [**REST API access token**](../../api/rest-api-access-token). +Use the `access token` and `imp_uid` (verification ID) +to call the **Get identity verification info REST API** +that returns the verification information as follows: -### **STEP 02.** Get verification information - -To get verification information from the i'mport server, you must first get a [**REST API access token**](../../api/rest-api-access-token). Use the `access token` and `imp_uid` (verification ID) to call the **Get identity verification info REST API** that returns the verification information as follows: - -```javascript title="sever-side(Node.js)" - app.use(bodyParser.json()); - ... - // controller that handles POST request to "/certifications" - app.post("/certifications", async (request, response) => { - const { imp_uid } = request.body; // Get imp_uid from request.body - try { - // Get access token - const getToken = await axios({ - url: "https://api.iamport.kr/users/getToken", - method: "post", // POST method - headers: { "Content-Type": "application/json" }, // "Content-Type": "application/json" - data: { - imp_key: "imp_apikey", // REST API Key - imp_secret: "ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6bkA5lamv9OqDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f" // REST API Secret - } - }); - const { access_token } = getToken.data.response; // Access token - ... - // Get verification info from i'mport server using imp_uid - const getCertifications = await axios({ - url: \`https://api.iamport.kr/certifications/\${imp_uid}\`, // Pass imp_uid - method: "get", // GET method - headers: { "Authorization": access_token } // Add access token to Authorization header - }); - const certificationsInfo = getCertifications.data.response; // Save verification info - ... - } catch(e) { - console.error(e); - } - }); +```ts title="sever-side(Node.js)" +app.use(bodyParser.json()); +// controller that handles POST request to "/certifications" +app.post("/certifications", async (request, response) => { + const { imp_uid } = request.body; // Get imp_uid from request.body + try { + // Get access token + const getToken = await axios({ + url: "https://api.iamport.kr/users/getToken", + method: "post", // POST method + headers: { "Content-Type": "application/json" }, // "Content-Type": "application/json" + data: { + imp_key: "imp_apikey", // REST API Key + imp_secret: + "ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6bkA5lamv9OqDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f", // REST API Secret + }, + }); + const { access_token } = getToken.data.response; // Access token + // Get verification info from i'mport server using imp_uid + const getCertifications = await axios({ + url: `https://api.iamport.kr/certifications/${imp_uid}`, // Pass imp_uid + method: "get", // GET method + headers: { Authorization: access_token }, // Add access token to Authorization header + }); + const certificationsInfo = getCertifications.data.response; // Save verification info + } catch (e) { + console.error(e); + } +}); ``` -### **STEP 03.** Using verification information +## **STEP 03.** Using verification information Retrieve the following user information from the verification information and add the necessary service logic. @@ -95,33 +93,32 @@ service logic. such as online social security number. -Besides what is listed above, other user information, such as foreigner status, is not provided. Kakao's policy prohibits the provision of the CI value when using the Kakao Certificate. - + Besides what is listed above, other user information, such as foreigner status, is not provided. + Kakao's policy prohibits the provision of the CI value when using the Kakao Certificate. Get the user information and use it as needed. For example, you can use it to check age restrictions as follows: -```javascript title="Node.js" - // controller that handles POST request to "/certifications" - app.post("/certifications", async (request, response) => { - const { imp_uid } = request.body; // Get imp_uid from request.body - try { - // Get access token - /* ...Omitted... */ - // Get verification info using imp_uid - /* ...Omitted... */ - const certificationsInfo = getCertifications.data.response; // Save verification info - const { name, birth } = certificationsInfo; - ... - // Check age restrictions - if (new Date(birth).getFullYear() <= 1999) { - // Check successful - } else { - // Check failed - } - } catch(e) { - console.error(e); +```ts title="Node.js" +// controller that handles POST request to "/certifications" +app.post("/certifications", async (request, response) => { + const { imp_uid } = request.body; // Get imp_uid from request.body + try { + // Get access token + /* ...Omitted... */ + // Get verification info using imp_uid + /* ...Omitted... */ + const certificationsInfo = getCertifications.data.response; // Save verification info + const { name, birth } = certificationsInfo; + // Check age restrictions + if (new Date(birth).getFullYear() <= 1999) { + // Check successful + } else { + // Check failed } - }); + } catch (e) { + console.error(e); + } +}); ``` diff --git a/src/content/docs/en/etc/all/prepare-for-verification.mdx b/src/content/docs/en/etc/all/prepare-for-verification.mdx index 20e917d50..4b2a756c7 100644 --- a/src/content/docs/en/etc/all/prepare-for-verification.mdx +++ b/src/content/docs/en/etc/all/prepare-for-verification.mdx @@ -3,51 +3,43 @@ title: Prepare for verification description: Prepare for integrated identity verification integration. --- -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Add the **i'mport library** to the target page. +## Add the **i'mport library** to the target page. -Integrated identity verification is supported in **i'mport JavaScript v1.1.8 or later** versions. - + Integrated identity verification is supported in **i'mport JavaScript v1.1.8 or later** versions. - -```html title="client-side" - - - - -``` - - + + ```html title="client-side" + + + + + ``` + -You **must install jQuery 1.0 or later version**. - + You **must install jQuery 1.0 or later version**. -### Initialize the `IMP` object using the **`Merchant ID`** on the identity verification page. +## Initialize the `IMP` object using the **`Merchant ID`** on the identity verification page. - -```javascript title="client-side" -var IMP = window.IMP; // Can be omitted -IMP.init("{Merchant ID}"); // Example: imp00000000 -``` - - - - -```javascript -client-side -const IMP = window.IMP; // Can be omitted -IMP.init("{Merchant ID}"); // Example: imp00000000 -``` - - + + ```ts title="client-side" + IMP.init("{Merchant ID}"); // Example: imp00000000 + ``` + + + + ```ts title="client-side" + IMP.init("{Merchant ID}"); // Example: imp00000000 + ``` + diff --git a/src/content/docs/en/etc/all/readme.mdx b/src/content/docs/en/etc/all/readme.mdx index 83400b300..ebabcc8a0 100644 --- a/src/content/docs/en/etc/all/readme.mdx +++ b/src/content/docs/en/etc/all/readme.mdx @@ -5,13 +5,15 @@ description: Learn how to integrate integrated identity verification service. import Figure from "~/components/Figure.astro"; -### What is an integrated identity verification service? +## What is an integrated identity verification service? -This is a service that verifies the identity of the person and the accuracy of the information entered during the verification process through a private certificate, such as KakaoTalk and Naver Certificate. Integrated identity verification is provided through **KG Inicis** and processed by using a private certificate or by sending a verification request through the user's registered simple identity verification service. +This is a service that verifies the identity of the person and the accuracy +of the information entered during the verification process through a private certificate, +such as KakaoTalk and Naver Certificate. +Integrated identity verification is provided through **KG Inicis** +and processed by using a private certificate or by sending a verification request +through the user's registered simple identity verification service. > **Supported providers: Naver / PASS / Payco / TOSS / Financial Certificate / Kakao** -
+
diff --git a/src/content/docs/en/etc/all/request-verification.mdx b/src/content/docs/en/etc/all/request-verification.mdx index 172ed832a..888f1ddcb 100644 --- a/src/content/docs/en/etc/all/request-verification.mdx +++ b/src/content/docs/en/etc/all/request-verification.mdx @@ -3,10 +3,10 @@ title: Request verification description: Call the integrated identity verification window. --- -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; -### The integrated identity verification window can be invoked in the following two modes: +## The integrated identity verification window can be invoked in the following two modes: > **Popup** (Default) > @@ -28,25 +28,25 @@ The following example calls the JavaScript SDK to open the integrated identity verification window. - -```javascript title="client-side" - // Call IMP.certification(param, callback) - IMP.certification({ // param - merchant_uid: "ORD20180131-0000011", // Order ID - m_redirect_url : "{Redirect URL}", // Required when popup:false in mobile, Example: https://www.myservice.com/payments/complete/mobile - popup : false // Always set to true in PC - }, function (rsp) { // callback - if (rsp.success) { - ..., - // When verification is successful, - ... - } else { - ..., - // When verification fails, - ... - } - }); -``` - - + + ```ts title="client-side" + // Call IMP.certification(param, callback) + IMP.certification( + { + // param + merchant_uid: "ORD20180131-0000011", // Order ID + m_redirect_url: "{Redirect URL}", // Required when popup:false in mobile, Example: https://www.myservice.com/payments/complete/mobile + popup: false, // Always set to true in PC + }, + function (rsp) { + // callback + if (rsp.success) { + // When verification is successful, + } else { + // When verification fails, + } + }, + ); + ``` + diff --git a/src/content/docs/en/etc/all/send-verification-result.mdx b/src/content/docs/en/etc/all/send-verification-result.mdx index a91e2264a..459bd3e3f 100644 --- a/src/content/docs/en/etc/all/send-verification-result.mdx +++ b/src/content/docs/en/etc/all/send-verification-result.mdx @@ -3,62 +3,70 @@ title: Send verification result description: Process the result obtained from integrated identity verification. --- -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; Based on the the verification result in the response object (**`rsp`**) returned after the verification process is completed, add the post-verification processing logic in the **`callback`** function. When the verification is successful, add the logic to **send the verification ID (`imp_uid`) to the server** as in the following example. Check the **value returned** when the verification is successful. -### 1. Example of sending data via callback +## 1. Example of sending data via callback - -```javascript title="client-side" - IMP.certification({ - /* ...Omitted... */ - }, function (rsp) { // callback - if (rsp.success) { // When verification is successful - // jQuery HTTP request - jQuery.ajax({ - url: "{server-side endpoint to receive verification info}", - method: "POST", - headers: { "Content-Type": "application/json" }, - data: { imp_uid: rsp.imp_uid } - }); - } else { - alert("Verification failed. Error: " + rsp.error_msg); - } - });Example of sending data via redirection -``` - - + + ```ts title="client-side" + IMP.certification( + { + /* ...Omitted... */ + }, + function (rsp) { + // callback + if (rsp.success) { + // When verification is successful + // jQuery HTTP request + jQuery.ajax({ + url: "{server-side endpoint to receive verification info}", + method: "POST", + headers: { "Content-Type": "application/json" }, + data: { imp_uid: rsp.imp_uid }, + }); + } else { + alert("Verification failed. Error: " + rsp.error_msg); + } + }, + ); + ``` + - -```javascript title="client-side" -IMP.certification({ - /* ...Omitted... */ - }, rsp => { // callback - if (rsp.success) { // When verification is successful - // axios HTTP request - axios({ - url: "{server-side endpoint to receive verification info}", - method: "post", - headers: { "Content-Type": "application/json" }, - data: { imp_uid: rsp.imp_uid } - }); - } else { - alert(\`Verification failed. Error: \${rsp.error_msg}\`); - } - }); -``` - - + + ```ts title="client-side" + IMP.certification( + { + /* ...Omitted... */ + }, + (rsp) => { + // callback + if (rsp.success) { + // When verification is successful + // axios HTTP request + axios({ + url: "{server-side endpoint to receive verification info}", + method: "post", + headers: { "Content-Type": "application/json" }, + data: { imp_uid: rsp.imp_uid }, + }); + } else { + alert(`Verification failed. Error: ${rsp.error_msg}`); + } + }, + ); + ``` + ### 2. Example of sending data via redirection -The page is redirected to the URL specified in `param.`**`m_redirect_url`** of `IMP.`**`certification`** with the verification data as follows: +The page is redirected to the URL specified in `param.`**`m_redirect_url`** +of `IMP.`**`certification`** with the verification data as follows: -```uri title="Query String" +```http title="Query String" GET {m_redirect_url}?imp_uid={}&merchant_uid={merchant_uid for verification}&success={true or false} ``` - diff --git a/src/content/docs/en/etc/budget.mdx b/src/content/docs/en/etc/budget.mdx index e1cb65ca9..a76c09f52 100644 --- a/src/content/docs/en/etc/budget.mdx +++ b/src/content/docs/en/etc/budget.mdx @@ -3,4 +3,4 @@ title: Integrate budget handler description: Learn how to integrate credit card promotion service. --- -### Refer to the [**Budget handler guide**](http://localhost:5000/o/nad6nqI7LNE1TGdY19Od/s/zzqz39hKDV7YEtDAeA1v/). +###Refer to the [**Budget handler guide**](http://localhost:5000/o/nad6nqI7LNE1TGdY19Od/s/zzqz39hKDV7YEtDAeA1v/). diff --git a/src/content/docs/en/etc/credit-auth/1-prepare-for-verification.mdx b/src/content/docs/en/etc/credit-auth/1-prepare-for-verification.mdx index dabba663c..08923e011 100644 --- a/src/content/docs/en/etc/credit-auth/1-prepare-for-verification.mdx +++ b/src/content/docs/en/etc/credit-auth/1-prepare-for-verification.mdx @@ -3,42 +3,37 @@ title: 1. Prepare for verification description: Prepare for credit card verification integration. --- -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### Add the **i'mport library** to the target page. +## Add the **i'mport library** to the target page. -Credit card identity verification is supported in **i'mport JavaScript v1.1.7 or later** versions. - + Credit card identity verification is supported in **i'mport JavaScript v1.1.7 or later** versions. - -```html title="client-side" - - - - -``` - - + + ```html title="client-side" + + + + + ``` + -You **must install jQuery 1.0 or later version.** - + You **must install jQuery 1.0 or later version.** ### Initialize the `IMP` object using the **`Merchant ID`** on the identity verification page. - -```javascript title="client-side" -var IMP = window.IMP; // Can be omitted -IMP.init("{Merchant ID}"); // Example: imp00000000 -``` - - + + ```ts title="client-side" + IMP.init("{Merchant ID}"); // Example: imp00000000 + ``` + diff --git a/src/content/docs/en/etc/credit-auth/2-request-verification.mdx b/src/content/docs/en/etc/credit-auth/2-request-verification.mdx index 5147713a9..cdec51491 100644 --- a/src/content/docs/en/etc/credit-auth/2-request-verification.mdx +++ b/src/content/docs/en/etc/credit-auth/2-request-verification.mdx @@ -3,10 +3,10 @@ title: 2. Request verification description: Call the credit card identity verification window. --- -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; -### The credit card identity verification window can be invoked in the following two modes: +## The credit card identity verification window can be invoked in the following two modes: > **Popup** (Default) > @@ -28,47 +28,47 @@ The following example calls the JavaScript SDK to open the credit card identity verification window. - -```javascript title="client-side" -// Call IMP.certification(param, callback) -IMP.certification({ // param - merchant_uid: "ORD20180131-0000011", // Order ID - m_redirect_url : "{Redirect URL}", // Required when popup:false in mobile, Example: https://www.myservice.com/payments/complete/mobile - popup : false // Always set to true in PC - }, function (rsp) { // callback - if (rsp.success) { - ..., - // When verification is successful, - ... - } else { - ..., - // When verification fails, - ... - } - }); -``` - - - - -```javascript title="client-side" - // Call IMP.certification(param, callback) - IMP.certification({ // param - merchant_uid: "ORD20180131-0000011", // Order ID - m_redirect_url : "{Redirect URL}", // Required when popup:false in mobile, Example: https://www.myservice.com/payments/complete/mobile - popup : false // Always set to true in PC - }, rsp => { // callback - if (rsp.success) { - ..., - // When verification is successful, - ... - } else { - ..., - // When verification fails, - ... - } - }); -``` + + ```ts title="client-side" + // Call IMP.certification(param, callback) + IMP.certification( + { + // param + merchant_uid: "ORD20180131-0000011", // Order ID + m_redirect_url: "{Redirect URL}", // Required when popup:false in mobile, Example: https://www.myservice.com/payments/complete/mobile + popup: false, // Always set to true in PC + }, + function (rsp) { + // callback + if (rsp.success) { + // When verification is successful, + } else { + // When verification fails, + } + }, + ); + ``` + - + + ```ts title="client-side" + // Call IMP.certification(param, callback) + IMP.certification( + { + // param + merchant_uid: "ORD20180131-0000011", // Order ID + m_redirect_url: "{Redirect URL}", // Required when popup:false in mobile, Example: https://www.myservice.com/payments/complete/mobile + popup: false, // Always set to true in PC + }, + (rsp) => { + // callback + if (rsp.success) { + // When verification is successful, + } else { + // When verification fails, + } + }, + ); + ``` + diff --git a/src/content/docs/en/etc/credit-auth/3-send-verification-result.mdx b/src/content/docs/en/etc/credit-auth/3-send-verification-result.mdx index 68f1fab82..05ff06e16 100644 --- a/src/content/docs/en/etc/credit-auth/3-send-verification-result.mdx +++ b/src/content/docs/en/etc/credit-auth/3-send-verification-result.mdx @@ -3,64 +3,75 @@ title: 3. Send verification result description: Process the result obtained from credit card identity verification. --- -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; -Based on the the verification result in the response object ( **`rsp`** ) returned after the verification process is complete, add the post-verification processing logic in the **`callback`** function. When the verification is successful, add the logic to **send the verification ID (`imp_uid`) to the server** as in the following example. Check the **value returned** when the verification is successful. +Based on the the verification result in the response object (**`rsp`**) +returned after the verification process is complete, +add the post-verification processing logic in the **`callback`** function. +When the verification is successful, add the logic to **send the verification ID (`imp_uid`) +to the server** as in the following example. +Check the **value returned** when the verification is successful. -### 1. Example of sending data via callback +## 1. Example of sending data via callback - -```javascript - IMP.certification({ - /* ...Omitted... */ - }, function (rsp) { // callback - if (rsp.success) { // When verification is successful - // jQuery HTTP request - jQuery.ajax({ - url: "{server-side endpoint to receive verification info}", - method: "POST", - headers: { "Content-Type": "application/json" }, - data: { imp_uid: rsp.imp_uid } - }); - } else { - alert("Verification failed. Error: " + rsp.error_msg); - } - }); -``` - - - - + + ```ts + IMP.certification( + { + /* ...Omitted... */ + }, + function (rsp) { + // callback + if (rsp.success) { + // When verification is successful + // jQuery HTTP request + jQuery.ajax({ + url: "{server-side endpoint to receive verification info}", + method: "POST", + headers: { "Content-Type": "application/json" }, + data: { imp_uid: rsp.imp_uid }, + }); + } else { + alert("Verification failed. Error: " + rsp.error_msg); + } + }, + ); + ``` + -```javascript title="client-side" - IMP.certification({ - /* ...Omitted... */ - }, rsp => { // callback - if (rsp.success) { // When verification is successful - // axios HTTP request - axios({ - url: "{server-side endpoint to receive verification info}", - method: "post", - headers: { "Content-Type": "application/json" }, - data: { imp_uid: rsp.imp_uid } - }); - } else { - alert(`Verification failed. Error: ${rsp.error_msg}`); - } - }); - -``` - - + + ```ts title="client-side" + IMP.certification( + { + /* ...Omitted... */ + }, + (rsp) => { + // callback + if (rsp.success) { + // When verification is successful + // axios HTTP request + axios({ + url: "{server-side endpoint to receive verification info}", + method: "post", + headers: { "Content-Type": "application/json" }, + data: { imp_uid: rsp.imp_uid }, + }); + } else { + alert(`Verification failed. Error: ${rsp.error_msg}`); + } + }, + ); + ``` + -### 2. Example of sending data via redirection +## 2. Example of sending data via redirection -The page is redirected to the URL specified in `param.`**`m_redirect_url`** of `IMP.` **`certification`** with the verification data as follows: +The page is redirected to the URL specified in `param.`**`m_redirect_url`** +of `IMP.` **`certification`** with the verification data as follows: -```uri title="Query String" +```http title="Query String" GET {m_redirect_url}?imp_uid={}&merchant_uid={merchant_uid for verification}&success ``` - diff --git a/src/content/docs/en/etc/credit-auth/4-get-verification-info.mdx b/src/content/docs/en/etc/credit-auth/4-get-verification-info.mdx index 05a8d93ec..5e7838589 100644 --- a/src/content/docs/en/etc/credit-auth/4-get-verification-info.mdx +++ b/src/content/docs/en/etc/credit-auth/4-get-verification-info.mdx @@ -5,79 +5,73 @@ description: >- purposes. --- -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; Use the **`imp_uid`** obtained through identity verification to get the customer's verification information. -### **STEP 01.** Get verification ID (imp_uid) on the server-side +## **STEP 01.** Get verification ID (imp\_uid) on the server-side The following server-side code fetches the data returned from identity verification. - -```javascript title="server-side" -app.use(bodyParser.json()); - ... - // controller that handles POST request to "/certifications" - app.post("/certifications", async (request, response) => { - // Get imp_uid from req.body - const { imp_uid } = request.body; -}) -``` - - - - -```javascript title="server-side" -app.use(bodyParser.json()); - ... - // controller that handles GET request to "/certifications/redirect" - app.get("/certifications/redirect", async (request, response) => { - const { imp_uid } = request.query; // Get imp_uid from req.query -}) -``` - - + + ```ts title="server-side" + app.use(bodyParser.json()); + // controller that handles POST request to "/certifications" + app.post("/certifications", async (request, response) => { + // Get imp_uid from req.body + const { imp_uid } = request.body; + }); + ``` + + + + ```ts title="server-side" + app.use(bodyParser.json()); + // controller that handles GET request to "/certifications/redirect" + app.get("/certifications/redirect", async (request, response) => { + const { imp_uid } = request.query; // Get imp_uid from req.query + }); + ``` + ### **STEP 02.** Get verification information To get verification information from the i'mport server, you must first get a [**REST API access token**](../../api/rest-api-access-token). Use the `access token` and `imp_uid` (verification ID) to call the **Get identity verification info REST API** that returns the verification information as follows: -```javascript title="sever-side" - app.use(bodyParser.json()); - ... - // controller that handles POST request to "/certifications" - app.post("/certifications", async (request, response) => { - const { imp_uid } = request.body; // Get imp_uid from request.body - try { - // Get access token - const getToken = await axios({ - url: "https://api.iamport.kr/users/getToken", - method: "post", // POST method - headers: { "Content-Type": "application/json" }, // "Content-Type": "application/json" - data: { - imp_key: "imp_apikey", // REST API Key - imp_secret: "ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6bkA5lamv9OqDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f" // REST API Secret - } - }); - const { access_token } = getToken.data.response; // Access token - ... - // Get verification info from i'mport server using imp_uid - const getCertifications = await axios({ - url: \`https://api.iamport.kr/certifications/\${imp_uid}\`, // Pass imp_uid - method: "get", // GET method - headers: { "Authorization": access_token } // Add access token to Authorization header - }); - const certificationsInfo = getCertifications.data.response; // Save verification info - ... - } catch(e) { - console.error(e); - } - }); +```ts title="sever-side" +app.use(bodyParser.json()); +// controller that handles POST request to "/certifications" +app.post("/certifications", async (request, response) => { + const { imp_uid } = request.body; // Get imp_uid from request.body + try { + // Get access token + const getToken = await axios({ + url: "https://api.iamport.kr/users/getToken", + method: "post", // POST method + headers: { "Content-Type": "application/json" }, // "Content-Type": "application/json" + data: { + imp_key: "imp_apikey", // REST API Key + imp_secret: + "ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6bkA5lamv9OqDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f", // REST API Secret + }, + }); + const { access_token } = getToken.data.response; // Access token + // Get verification info from i'mport server using imp_uid + const getCertifications = await axios({ + url: `https://api.iamport.kr/certifications/${imp_uid}`, // Pass imp_uid + method: "get", // GET method + headers: { Authorization: access_token }, // Add access token to Authorization header + }); + const certificationsInfo = getCertifications.data.response; // Save verification info + } catch (e) { + console.error(e); + } +}); ``` ### **STEP 03.** Using verification information @@ -97,44 +91,43 @@ service logic. - `unique_in_site`: same as DI value - unique key to identify the user per Merchant ID (website). -**unique\_key and unique\_in\_site** - -Even if multiple credit cards are used to verify the same person, the same `unique_key` and `unique_in_site` values are returned for the cards under the same name.\ + **unique\_key and unique\_in\_site** + Even if multiple credit cards are used to verify the same person, + the same `unique_key` and `unique_in_site` values are returned + for the cards under the same name. -```javascript title="Node.js" - // controller that handles POST request to "/certifications" - app.post("/certifications", async (request, response) => { - const { imp_uid } = request.body; // Get imp_uid from request.body - try { - // Get access token - /* ...Omitted... */ - // Get verification info using imp_uid - /* ...Omitted... */ - const certificationsInfo = getCertifications.data.response; // Save verification info - // unique_key: Unique key for user, unique_in_site: Unique key for user per site - const { unique_key, unique_in_site, name, gender, birth } = certificationsInfo; - ... - // Check age restrictions - if (new Date(birth).getFullYear() <= 1999) { - // Check successful +```ts title="Node.js" +// controller that handles POST request to "/certifications" +app.post("/certifications", async (request, response) => { + const { imp_uid } = request.body; // Get imp_uid from request.body + try { + // Get access token + /* ...Omitted... */ + // Get verification info using imp_uid + /* ...Omitted... */ + const certificationsInfo = getCertifications.data.response; // Save verification info + // unique_key: Unique key for user, unique_in_site: Unique key for user per site + const { unique_key, unique_in_site, name, gender, birth } = + certificationsInfo; + // Check age restrictions + if (new Date(birth).getFullYear() <= 1999) { + // Check successful + } else { + // Check failed + } + // one account per person check + // Query database with unique_key to check for existing account + Users.find({ certificationKey: unique_key }).then((user) => { + if (!user) { + // New user } else { - // Check failed + // Existing user } - ... - // one account per person check - // Query database with unique_key to check for existing account - Users.find({ certificationKey: unique_key }) - .then((user) => { - if (!user) { - // New user - } else { - // Existing user - } - }); - } catch(e) { - console.error(e); - } - }); + }); + } catch (e) { + console.error(e); + } +}); ``` diff --git a/src/content/docs/en/etc/credit-auth/readme.mdx b/src/content/docs/en/etc/credit-auth/readme.mdx index 7389f43fd..9c5f4de1c 100644 --- a/src/content/docs/en/etc/credit-auth/readme.mdx +++ b/src/content/docs/en/etc/credit-auth/readme.mdx @@ -7,7 +7,4 @@ import Figure from "~/components/Figure.astro"; The **credit card identity verification service** is used to confirm the accuracy of the identity information (name, date of birth, gender, foreigner status, and KISA ID) of the credit card holder. -
+
diff --git a/src/content/docs/en/etc/native-mobile-sdks.mdx b/src/content/docs/en/etc/native-mobile-sdks.mdx index 8458ad551..25f5ee210 100644 --- a/src/content/docs/en/etc/native-mobile-sdks.mdx +++ b/src/content/docs/en/etc/native-mobile-sdks.mdx @@ -3,14 +3,14 @@ title: Native mobile SDKs description: You can integrate i'mport services through our native mobile SDKs (plugins). --- -### Refer to the SDK GitHub link for your development platform. +## Refer to the SDK GitHub link for your development platform. -#### iOS/Android +### iOS/Android - [iOS](https://github.com/iamport/iamport-ios) - [Android](https://github.com/iamport/iamport-android) -#### Cross-Platform Frameworks +### Cross-Platform Frameworks - [Flutter](https://github.com/iamport/iamport-flutter) - [Ionic](https://github.com/iamport/iamport-ionic) diff --git a/src/content/docs/en/etc/phone/1-prepare-for-verification.mdx b/src/content/docs/en/etc/phone/1-prepare-for-verification.mdx index 84815bc4f..fb26050de 100644 --- a/src/content/docs/en/etc/phone/1-prepare-for-verification.mdx +++ b/src/content/docs/en/etc/phone/1-prepare-for-verification.mdx @@ -3,25 +3,21 @@ title: 1. Prepare for verification description: Prepare for mobile identity verification integration. --- -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; Initialize the `IMP` object using the **`Merchant ID`**. - -```javascript title="client-side" -var IMP = window.IMP; // Can be omitted -IMP.init("{Merchant ID}"); // Example: imp00000000 -``` - - - - -```javascript title="client-side" -const IMP = window.IMP; // Can be omitted -IMP.init("{Merchant ID}"); // Example: imp00000000 -``` + + ```ts title="client-side" + IMP.init("{Merchant ID}"); // Example: imp00000000 + ``` + - + + ```ts title="client-side" + IMP.init("{Merchant ID}"); // Example: imp00000000 + ``` + diff --git a/src/content/docs/en/etc/phone/2-request-verification.mdx b/src/content/docs/en/etc/phone/2-request-verification.mdx index f8de42cd2..d855354e8 100644 --- a/src/content/docs/en/etc/phone/2-request-verification.mdx +++ b/src/content/docs/en/etc/phone/2-request-verification.mdx @@ -3,9 +3,9 @@ title: 2. Request verification description: Call the mobile identity verification window. --- -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; The mobile identity verification window can be invoked in the following two modes: @@ -26,58 +26,58 @@ The mobile identity verification window can be invoked in the following two mode > `false`. -**Redirection mode** - -Redirection is supported in i'mport JavaScript **SDK 1.1.7** or later versions. + **Redirection mode** + Redirection is supported in i'mport JavaScript **SDK 1.1.7** or later versions. The following example calls the mobile identity verification window. - -```javascript title="client-side" - // Call IMP.certification(param, callback) - IMP.certification({ // param - merchant_uid: "ORD20180131-0000011", // Order ID - m_redirect_url : "{Redirect URL}", // Required when popup:false in mobile, Example: https://www.myservice.com/payments/complete/mobile - popup : false // Always set to true in PC - }, function (rsp) { // callback - if (rsp.success) { - ..., - // When verification is successful, - ... - } else { - ..., - // When verification fails, - ... - } - }); -``` - -Check the [**parameters list**](../../sdk/javascript-sdk/identity-verification-request-parameters) for requesting the mobile identity verification window. - - + + ```ts title="client-side" + // Call IMP.certification(param, callback) + IMP.certification( + { + // param + merchant_uid: "ORD20180131-0000011", // Order ID + m_redirect_url: "{Redirect URL}", // Required when popup:false in mobile, Example: https://www.myservice.com/payments/complete/mobile + popup: false, // Always set to true in PC + }, + function (rsp) { + // callback + if (rsp.success) { + // When verification is successful, + } else { + // When verification fails, + } + }, + ); + ``` - -```javascript title="client-side" - // Call IMP.certification(param, callback) - IMP.certification({ // param - merchant_uid: "ORD20180131-0000011", // Order ID - m_redirect_url : "{Redirect URL}", // Required when popup:false in mobile, Example: https://www.myservice.com/payments/complete/mobile - popup : false // Always set to true in PC - }, rsp => { // callback - if (rsp.success) { - ..., - // When verification is successful, - ... - } else { - ..., - // When verification fails, - ... - } - }); -``` + Check the [**parameters list**](../../sdk/javascript-sdk/identity-verification-request-parameters) + for requesting the mobile identity verification window. + - + + ```ts title="client-side" + // Call IMP.certification(param, callback) + IMP.certification( + { + // param + merchant_uid: "ORD20180131-0000011", // Order ID + m_redirect_url: "{Redirect URL}", // Required when popup:false in mobile, Example: https://www.myservice.com/payments/complete/mobile + popup: false, // Always set to true in PC + }, + (rsp) => { + // callback + if (rsp.success) { + // When verification is successful, + } else { + // When verification fails, + } + }, + ); + ``` + diff --git a/src/content/docs/en/etc/phone/3-send-verification-result.mdx b/src/content/docs/en/etc/phone/3-send-verification-result.mdx index cf6431765..6401b6201 100644 --- a/src/content/docs/en/etc/phone/3-send-verification-result.mdx +++ b/src/content/docs/en/etc/phone/3-send-verification-result.mdx @@ -3,62 +3,75 @@ title: 3. Send verification result description: Process the result obtained from mobile identity verification. --- -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; -Based on the the verification result in the response object (**`rsp`**) returned after the verification process is complete, add the post-verification processing logic in the **`callback`** function. When the verification is successful, add the logic to **send the verification ID (`imp_uid`) to the server** as in the following example. Check the **value returned** when the verification is successful. \ +Based on the the verification result in the response object (**`rsp`**) +returned after the verification process is complete, +add the post-verification processing logic in the **`callback`** function. +When the verification is successful, add the logic to **send the verification ID (`imp_uid`) +to the server** as in the following example. +Check the **value returned** when the verification is successful. -### 1. Example of sending data via callback +## 1. Example of sending data via callback - -```javascript -IMP.certification({ - /* ...Omitted... */ -}, function (rsp) { // callback - if (rsp.success) { // When verification is successful - // jQuery HTTP request - jQuery.ajax({ - url: "{server-side endpoint to receive verification info}", - method: "POST", - headers: { "Content-Type": "application/json" }, - data: { imp_uid: rsp.imp_uid } - }); - } else { - alert("Verification failed. Error: " + rsp.error_msg); - } - }); -``` - - + + ```ts + IMP.certification( + { + /* ...Omitted... */ + }, + function (rsp) { + // callback + if (rsp.success) { + // When verification is successful + // jQuery HTTP request + jQuery.ajax({ + url: "{server-side endpoint to receive verification info}", + method: "POST", + headers: { "Content-Type": "application/json" }, + data: { imp_uid: rsp.imp_uid }, + }); + } else { + alert("Verification failed. Error: " + rsp.error_msg); + } + }, + ); + ``` + - -```javascript title="client-side" - IMP.certification({ - /* ...Omitted... */ - }, rsp => { // callback - if (rsp.success) { // When verification is successful - // axios HTTP request - axios({ - url: "{server-side endpoint to receive verification info}", - method: "post", - headers: { "Content-Type": "application/json" }, - data: { imp_uid: rsp.imp_uid } - }); - } else { - alert(\`Verification failed. Error: \${rsp.error_msg}\`); - } - }); -``` - - + + ```ts title="client-side" + IMP.certification( + { + /* ...Omitted... */ + }, + (rsp) => { + // callback + if (rsp.success) { + // When verification is successful + // axios HTTP request + axios({ + url: "{server-side endpoint to receive verification info}", + method: "post", + headers: { "Content-Type": "application/json" }, + data: { imp_uid: rsp.imp_uid }, + }); + } else { + alert(`Verification failed. Error: ${rsp.error_msg}`); + } + }, + ); + ``` + -### 2. Example of sending data via redirection +## 2. Example of sending data via redirection -The page is redirected to the URL specified in `param.`**`m_redirect_url`** of `IMP.`**`certification`** with the verification data as follows: +The page is redirected to the URL specified in `param.`**`m_redirect_url`** of +`IMP.`**`certification`** with the verification data as follows: -```uri title="Query String" +```http title="Query String" GET {m_redirect_url}?imp_uid={}&merchant_uid={merchant_uid for verification}&success={true or false} ``` - diff --git a/src/content/docs/en/etc/phone/4-get-verification-info.mdx b/src/content/docs/en/etc/phone/4-get-verification-info.mdx index 77c91a1ba..92ef79b89 100644 --- a/src/content/docs/en/etc/phone/4-get-verification-info.mdx +++ b/src/content/docs/en/etc/phone/4-get-verification-info.mdx @@ -5,83 +5,75 @@ description: >- purposes. --- -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; Use the **`imp_uid`** obtained from mobile identity verification to get the customer's verification information. -### **STEP 01.** Get verification ID (imp_uid) on the server-side +## **STEP 01.** Get verification ID (imp\_uid) on the server-side The following server-side code fetches the data returned from mobile identity verification. - - -```javascript title="server-side" -app.use(bodyParser.json()); - ... - // controller that handles POST request to "/certifications" - app.post("/certifications", async (request, response) => { - const { imp_uid } = request.body; // Get imp_uid from req.body -}) - -``` - - - - -```javascript -app.use(bodyParser.json()); - ... - // controller that handles GET request to "/certifications/redirect" - app.get("/certifications/redirect", async (request, response) => { - const { imp_uid } = request.query; // Get imp_uid from req.query -}) -``` - - + + ```ts title="server-side" + app.use(bodyParser.json()); + // controller that handles POST request to "/certifications" + app.post("/certifications", async (request, response) => { + const { imp_uid } = request.body; // Get imp_uid from req.body + }); + ``` + + + + ```ts + app.use(bodyParser.json()); + // controller that handles GET request to "/certifications/redirect" + app.get("/certifications/redirect", async (request, response) => { + const { imp_uid } = request.query; // Get imp_uid from req.query + }); + ``` + -### **STEP 02.** Get verification information +## **STEP 02.** Get verification information To get verification information from the i'mport server, you must first get a [**REST API access token**](../../api/rest-api-access-token). Use the `access token` and `imp_uid` (verification ID) to call the **Get identity verification info REST API** that returns the verification information as follows: -```javascript title="sever-side" +```ts title="sever-side" app.use(bodyParser.json()); - ... - // controller that handles POST request to "/certifications" - app.post("/certifications", async (request, response) => { - const { imp_uid } = request.body; // Get imp_uid from request.body - try { - // Get access token - const getToken = await axios({ - url: "https://api.iamport.kr/users/getToken", - method: "post", // POST method - headers: { "Content-Type": "application/json" }, // "Content-Type": "application/json" - data: { - imp_key: "imp_apikey", // REST API Key - imp_secret: "ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6bkA5lamv9OqDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f" // REST API Secret - } - }); - const { access_token } = getToken.data.response; // Access token - ... - // Get verification info from i'mport server using imp_uid - const getCertifications = await axios({ - url: `https://api.iamport.kr/certifications/\${imp_uid}\`, // Pass imp_uid - method: "get", // GET method - headers: { "Authorization": access_token } // Add access token to Authorization header - }); - const certificationsInfo = getCertifications.data.response; // Save verification info - ... - } catch(e) { - console.error(e); - } - }); +// controller that handles POST request to "/certifications" +app.post("/certifications", async (request, response) => { + const { imp_uid } = request.body; // Get imp_uid from request.body + try { + // Get access token + const getToken = await axios({ + url: "https://api.iamport.kr/users/getToken", + method: "post", // POST method + headers: { "Content-Type": "application/json" }, // "Content-Type": "application/json" + data: { + imp_key: "imp_apikey", // REST API Key + imp_secret: + "ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6bkA5lamv9OqDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f", // REST API Secret + }, + }); + const { access_token } = getToken.data.response; // Access token + // Get verification info from i'mport server using imp_uid + const getCertifications = await axios({ + url: `https://api.iamport.kr/certifications/${imp_uid}`, // Pass imp_uid + method: "get", // GET method + headers: { Authorization: access_token }, // Add access token to Authorization header + }); + const certificationsInfo = getCertifications.data.response; // Save verification info + } catch (e) { + console.error(e); + } +}); ``` -### **STEP 03.** Using verification information +## **STEP 03.** Using verification information Retrieve the following user information from the verification information and add the necessary service logic. @@ -98,55 +90,52 @@ service logic. - `unique_in_site`: same as DI value - unique key to identify the user per Merchant ID (website). -In addition to the above information, if you need access to a user's mobile phone number (**`phone`**) and carrier (**`carrier`**) or foreigner status (**`foreigner`**), you must post a **Consent to Provision of Personal Information on your website** and send a **request to ****cs@iamport.kr**. Note that this service is available once it is requested to Danal PG and approved after contracting with i'mport.\ - -**\** + In addition to the above information, if you need access to a user's mobile phone number (**`phone`**) and carrier (**`carrier`**) or foreigner status (**`foreigner`**), you must post a **Consent to Provision of Personal Information on your website** and send a **request to** **[cs@iamport.kr](mailto:cs@iamport.kr)**. Note that this service is available once it is requested to Danal PG and approved after contracting with i'mport.\\ -- Business name: -- Business registration number: -- Danal Merchant ID (CPID) for identity verification: -- Privacy Policy URL: If unable to provide the URL when using an app service, capture and send the 'Privacy Policy' path. + **\** -**\** + - Business name: + - Business registration number: + - Danal Merchant ID (CPID) for identity verification: + - Privacy Policy URL: If unable to provide the URL when using an app service, capture and send the 'Privacy Policy' path. -- `Marpple Co., Ltd.: https://marpple.shop/kr/@/privacy` -- `Brave Mobile Co., Ltd./Soomgo: https://soomgo.com/terms/privacy` -- `Marketit Co., Ltd.: https://static.marketit.asia/static/privacy-terms.pdf` + **\** + - `Marpple Co., Ltd.: https://marpple.shop/kr/@/privacy` + - `Brave Mobile Co., Ltd./Soomgo: https://soomgo.com/terms/privacy` + - `Marketit Co., Ltd.: https://static.marketit.asia/static/privacy-terms.pdf` -```javascript title="Node.js" - // controller that handles POST request to "/certifications" - app.post("/certifications", async (request, response) => { - const { imp_uid } = request.body; // Get imp_uid from request.body - try { - // Get access token - /* ...Omitted... */ - // Get verification info using imp_uid - /* ...Omitted... */ - const certificationsInfo = getCertifications.data.response; // Save verification info - // unique_key: Unique key for user, unique_in_site: Unique key for user per site - const { unique_key, unique_in_site, name, gender, birth } = certificationsInfo; - ... - // Check age restrictions - if (new Date(birth).getFullYear() <= 1999) { - // Check successful +```ts title="Node.js" +// controller that handles POST request to "/certifications" +app.post("/certifications", async (request, response) => { + const { imp_uid } = request.body; // Get imp_uid from request.body + try { + // Get access token + /* ...Omitted... */ + // Get verification info using imp_uid + /* ...Omitted... */ + const certificationsInfo = getCertifications.data.response; // Save verification info + // unique_key: Unique key for user, unique_in_site: Unique key for user per site + const { unique_key, unique_in_site, name, gender, birth } = + certificationsInfo; + // Check age restrictions + if (new Date(birth).getFullYear() <= 1999) { + // Check successful + } else { + // Check failed + } + // one account per person check + // Query database with unique_key to check for existing account + Users.find({ certificationKey: unique_key }).then((user) => { + if (!user) { + // New user } else { - // Check failed + // Existing user } - ... - // one account per person check - // Query database with unique_key to check for existing account - Users.find({ certificationKey: unique_key }) - .then((user) => { - if (!user) { - // New user - } else { - // Existing user - } - }); - } catch(e) { - console.error(e); - } - }); + }); + } catch (e) { + console.error(e); + } +}); ``` diff --git a/src/content/docs/en/etc/phone/readme.mdx b/src/content/docs/en/etc/phone/readme.mdx index 803861e90..738649875 100644 --- a/src/content/docs/en/etc/phone/readme.mdx +++ b/src/content/docs/en/etc/phone/readme.mdx @@ -5,13 +5,18 @@ description: Learn how to integrate mobile identity verification service using i import Figure from "~/components/Figure.astro"; -**Mobile phone identity verification service** is used to confirm the identity of the user and the accuracy of the user's identity information submitted through the mobile phone under the user's name. +**Mobile phone identity verification service** is used to confirm +the identity of the user and the accuracy of the user's identity information +submitted through the mobile phone under the user's name. -User's identity verification is needed to sign up for websites, make payments, or verify age. You can perform identity verification by using the identity verification app installed on a mobile device, or by submitting your identity information (**name, date of birth, mobile phone number**) through the verification request page and then confirming the verification number received via text message. +User's identity verification is needed to sign up for websites, make payments, or verify age. +You can perform identity verification by using the identity verification app +installed on a mobile device, or by submitting your identity information +(**name, date of birth, mobile phone number**) through the verification request page +and then confirming the verification number received via text message. -
+
-The flow of i'mport mobile identity verification involves performing verification using the JavaScript SDK and then the merchant server **retrieving the verification result** using the ChaiPort REST API. +The flow of i'mport mobile identity verification involves performing verification +using the JavaScript SDK and then the merchant server +**retrieving the verification result** using the ChaiPort REST API. diff --git a/src/content/docs/en/etc/url.mdx b/src/content/docs/en/etc/url.mdx index 2d2ae58bf..02dddc9f6 100644 --- a/src/content/docs/en/etc/url.mdx +++ b/src/content/docs/en/etc/url.mdx @@ -4,19 +4,20 @@ description: Learn about the payment URL generation API. --- import Figure from "~/components/Figure.astro"; -import Hint from "~/components/Hint.astro"; import Swagger from "~/components/gitbook/swagger/Swagger.astro"; import SwaggerDescription from "~/components/gitbook/swagger/SwaggerDescription.astro"; import SwaggerParameter from "~/components/gitbook/swagger/SwaggerParameter.astro"; import SwaggerResponse from "~/components/gitbook/swagger/SwaggerResponse.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### 1. Overview +## 1. Overview -This document describes i'mport payment URL generation API specification. i'mport Merchants can use the service without any restrictions. +This document describes i'mport payment URL generation API specification. +i'mport Merchants can use the service without any restrictions. -### 2. API URI +## 2. API URI Payment API is exposed as REST web service. @@ -25,230 +26,203 @@ Payment API is exposed as REST web service. > **Content-Type : application/json;charset=UTF-8** - - -```url title="URI" -https://api.iamport-dev.co/api/supplements/v1/link/payment -``` - - - - - -```title="URI" -https://api.iamport.co/api/supplements/v1/link/payment -``` - - + + ```http title="URI" + POST https://api.iamport-dev.co/api/supplements/v1/link/payment + ``` + + + + ```http title="URI" + POST https://api.iamport.co/api/supplements/v1/link/payment + ``` + -### 3. Description +## 3. Description -Customers can access the generated payment URL to make a payment. It supports all payment methods supported by the PG. When the link expires, payment is no longer available. +Customers can access the generated payment URL to make a payment. +It supports all payment methods supported by the PG. +When the link expires, payment is no longer available. -### 4. Request message specification +## 4. Request message specification - -HTTP Method : POST - -Content-Type : Application.json;charset=UTF-8 - - - -### Parameters - -#### Body - - - - -Title of the bridge page - - - - - - - -Merchant ID - - + + HTTP Method : POST - - - + Content-Type : Application.json;charset=UTF-8 + -Amount + ### Parameters - + #### Body - - - + + + Title of the bridge page + + -Order ID + + + Merchant ID + + - + + + Amount + + - - - + + + Order ID + + -Product name + + + Product name + + - + + Tax free amount + - - -Tax free amount + + + Currency code + + - - - + + Payment window language -Currency code + -ko - + -en + - - -Payment window language + + Customer name + -\-ko + + + Customer phone + + -\-en + + Customer address + - - -Customer name + + Customer email + - - - + + Customer zip + -Customer phone + + Custom data + - + + Notification URL to receive payment result + - - -Customer address + + + Page expiration + + - - -Customer email + + Bridge page language - - -Customer zip + -ko : Korean - - -Custom data + -en : English + - - -Notification URL to receive payment result + + **pg** **\*** **string** - - - + PG code -Page expiration + [#undefined](../sdk/javascript-sdk/rps#undefined "mention") - + --- - - -Bridge page language + **pay\_method** **\*** **string** -\-ko : Korean + Payment method code -\-en : English + [#undefined](../sdk/javascript-sdk/rps#undefined "mention") - - -**pg** **\*** **string** + --- -PG code + **label** **\*** **string** -[#undefined](../sdk/javascript-sdk/rps#undefined "mention") + Payment method shown on bridge page + ---- - -**pay_method** **\*** **string** - -Payment method code - -[#undefined](../sdk/javascript-sdk/rps#undefined "mention") - ---- - -**label** **\*** **string** - -Payment method shown on bridge page - - - -### Responses - - -```json title="json" -{ - "shortenedUrl": "https://dev.impay.link/4bdf239e" //Create payment link -} -``` - - + ### Responses + + ```json title="json" + { + "shortenedUrl": "https://dev.impay.link/4bdf239e" //Create payment link + } + ``` + **#Sample JSON request message** -```title="json" +```json title="json" { - "payment_info": "{\"title\":\"Test merchant\",\"user_code\":\"imp68124833\",\"amount\":10000,\"merchant_uid\":\"merchant_1630665784552\",\"name\":\"payment link test\",\"tax_free\":\"tax free amount\",\"currency\":\"KRW\",\"language\":\"ko\",\"buyer_name\":\"\",\"buyer_tel\":\"\",\"buyer_addr\":\"\",\"buyer_email\":\"\",\"buyer_postcode\":\"\",\"custom_data\":\"json_object\",\"notice_url\":\"notification url\",\"pay_methods\":[{\"pg\":\"INIpayTest\",\"pay_method\":\"card\",\"label\":\"credit/check card\"},{\"pg\":\"INIpayTest\",\"pay_method\":\"naverpay\",\"label\":\"Naver Pay\"},{\"pg\":\"INIpayTest\",\"pay_method\":\"kakaopay\",\"label\":\"Kakao Pay\"},{\"pg\":\"INIpayTest\",\"pay_method\":\"phone\",\"label\":\"mobile micropayment\"},{\"pg\":\"INIpayTest\",\"pay_method\":\"trans\",\"label\":\"account transfer\"},{\"pg\":\"INIpayTest\",\"pay_method\":\"vbank\",\"label\":\"virtual account\"}]}", - "expired_at": 1634324016 + "payment_info": "{\"title\":\"Test merchant\",\"user_code\":\"imp68124833\",\"amount\":10000,\"merchant_uid\":\"merchant_1630665784552\",\"name\":\"payment link test\",\"tax_free\":\"tax free amount\",\"currency\":\"KRW\",\"language\":\"ko\",\"buyer_name\":\"\",\"buyer_tel\":\"\",\"buyer_addr\":\"\",\"buyer_email\":\"\",\"buyer_postcode\":\"\",\"custom_data\":\"json_object\",\"notice_url\":\"notification url\",\"pay_methods\":[{\"pg\":\"INIpayTest\",\"pay_method\":\"card\",\"label\":\"credit/check card\"},{\"pg\":\"INIpayTest\",\"pay_method\":\"naverpay\",\"label\":\"Naver Pay\"},{\"pg\":\"INIpayTest\",\"pay_method\":\"kakaopay\",\"label\":\"Kakao Pay\"},{\"pg\":\"INIpayTest\",\"pay_method\":\"phone\",\"label\":\"mobile micropayment\"},{\"pg\":\"INIpayTest\",\"pay_method\":\"trans\",\"label\":\"account transfer\"},{\"pg\":\"INIpayTest\",\"pay_method\":\"vbank\",\"label\":\"virtual account\"}]}", + "expired_at": 1634324016 } ``` **#Sample payment (bridge) page** - -**Sample response URL page displayed when payment URL API request is successful.** - -
- - + + **Sample response URL page displayed when payment URL API request is successful.** - -**Sample page displayed for an expired payment URL page (expire\_at exceeded).** +
+ -
+ + **Sample page displayed for an expired payment URL page (expire\_at exceeded).** - +
+ -### 5. Disabling payment URL +## 5. Disabling payment URL -**Append the last part of the response** (**shortenedUrl**) **URL to the payment URI API address and call it.** +**Append the last part of the response** (**shortenedUrl**) +**URL to the payment URI API address and call it.** > **HTTP Method :** **PUT** -**For the following API response** - -```json -{ "shortenedUrl": "https://dev.impay.link/4bdf239e" } -``` + **For the following API response** -[https://api.iamport.co/api/supplements/v1/link/payment/](https://api.iamport.co/api/supplements/v1/link/payment/%7BGUID%7D) **4bdf239e** + ```json + { "shortenedUrl": "https://dev.impay.link/4bdf239e" } + ``` -Call the above payment URL to disable it. + [https://api.iamport.co/api/supplements/v1/link/payment/](https://api.iamport.co/api/supplements/v1/link/payment/%7BGUID%7D) **4bdf239e** + Call the above payment URL to disable it. diff --git a/src/content/docs/en/faq/undefined.mdx b/src/content/docs/en/faq/undefined.mdx index 888aa616e..2235bba15 100644 --- a/src/content/docs/en/faq/undefined.mdx +++ b/src/content/docs/en/faq/undefined.mdx @@ -7,50 +7,50 @@ import Details from "~/components/gitbook/Details.astro"; import Hint from "~/components/Hint.astro";
-

Webhook call rules

+

Webhook call rules

-- Webhook is only sent once by default. -- You can set to resend (retry) the webhook up to 5 times in 1 minute increments. i'mport will stop sending the webhook once the merchant responds with HTTP STATUS 200. -- You can also manually resend the webhook from the Admin console. (Payment approvals -> Webhook log -> Resend) -- If you change the webhook address, webhooks for past transactions are sent to the previous webhook URL. + - Webhook is only sent once by default. + - You can set to resend (retry) the webhook up to 5 times in 1 minute increments. + i'mport will stop sending the webhook once the merchant responds with HTTP STATUS 200. + + - You can also manually resend the webhook from the Admin console. (Payment approvals -> Webhook log -> Resend) + + - If you change the webhook address, webhooks for past transactions are sent to the previous webhook URL.
-

Provision of comprehensive response code list

- -The error code and message in the payment response are the same as those sent by the source (PG). There is no comprehensive error code list because the response codes and messages differ by each PG linked with i'mport. +

Provision of comprehensive response code list

+ The error code and message in the payment response are the same as those sent by the source (PG). + There is no comprehensive error code list because the response codes and messages differ by each PG linked with i'mport.
-

How to distinguish between production account and developer account

+

How to distinguish between production account and developer account

-### **Single account for both production and test modes** + ## **Single account for both production and test modes** -Enter the merchant information for testing by clicking 'Add PG' from existing settings. + Enter the merchant information for testing by clicking 'Add PG' from existing settings. -- Pros: Can use the same Merchant ID and API key/secret for testing. -- Cons: Care needs to be taken in setting/saving PGs because the settings are shared with the production account. + - Pros: Can use the same Merchant ID and API key/secret for testing. + - Cons: Care needs to be taken in setting/saving PGs because the settings are shared with the production account. -**\[Checklist]** + **\[Checklist]** -To request payment with a specific Merchant ID for the same PG, you must specify the `pg` parameter as **PG. Merchant ID**. + To request payment with a specific Merchant ID for the same PG, + you must specify the `pg` parameter as **PG. Merchant ID**. -### **Create a separate test-only account** + ### **Create a separate test-only account** -You can create a developer account by signing up in the i'mport Admin page ([https://admin.iamport.kr/](https://admin.iamport.kr/)). - -- Pros: Enables stable testing by using separate accounts for production and development. -- Cons: Requires source code branching due to having different Merchant ID and API key/secret for each account. + You can create a developer account by signing up in the i'mport Admin page ([https://admin.iamport.kr/](https://admin.iamport.kr/)). + - Pros: Enables stable testing by using separate accounts for production and development. + - Cons: Requires source code branching due to having different Merchant ID and API key/secret for each account.
-**For additional FAQs, refer to:** - -[https://faq.iamport.kr/](https://faq.iamport.kr/) + **For additional FAQs, refer to:** + [https://faq.iamport.kr/](https://faq.iamport.kr/) - - diff --git a/src/content/docs/en/payment-integration-by-pg/payment-gateways/blue-walnut.mdx b/src/content/docs/en/payment-integration-by-pg/payment-gateways/blue-walnut.mdx index 4556ac1e0..dfbd0f08a 100644 --- a/src/content/docs/en/payment-integration-by-pg/payment-gateways/blue-walnut.mdx +++ b/src/content/docs/en/payment-integration-by-pg/payment-gateways/blue-walnut.mdx @@ -5,88 +5,86 @@ description: Blue Walnut payment window integration guide import Codepen from "~/components/gitbook/Codepen.astro"; import Details from "~/components/gitbook/Details.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; -### 1. Configure Blue Walnut PG settings +## 1. Configure Blue Walnut PG settings -Refer to the [**Blue Walnut settings**](../../ready/2.-pg/payment-gateway-settings/undefined-7) page to configure the PG settings. +Refer to the [**Blue Walnut settings**](../../ready/2.-pg/payment-gateway-settings/undefined-7) +page to configure the PG settings. ![]() -### 2. Request payment +## 2. Request payment -To open the payment window, call [JavaScript SDK](../../sdk/javascript-sdk/) IMP.**request_pay**(param, callback). +To open the payment window, call [JavaScript SDK](../../sdk/javascript-sdk/) +IMP.**request\_pay**(param, callback). -In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. In mobile browsers, the page is redirected to **m_redirect_url**. +In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. +In mobile browsers, the page is redirected to **m\_redirect\_url**. - -```javascript title="Javascript SDK" -IMP.request_pay({ - pg : 'bluewalnut', - pay_method : 'card', - merchant_uid : '{Merchant created Order ID}', // Example: order_no_0001 - name : 'Order name: Test payment request', - amount : 14000, - buyer_email : 'iamport@siot.do', // required - buyer_name : 'Jack Son', // Must include a space between Firstname Lastname - buyer_tel : '010-1234-5678', - buyer_addr : 'Shinsa-dong, Gangnam-gu, Seoul', - buyer_postcode : '123-456', - m_redirect_url : '{Mobile only - URL to redirect to after payment approval}' // Example: https://www.my-service.com/payments/complete/mobile -}, function(rsp) { // callback logic - //* ...Omitted... *// -}); -``` - -### - -### Key parameter description - -**`pg`** **\***\*\* ****s****tring\*\* - -**PG code** + + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "bluewalnut", + pay_method: "card", + merchant_uid: "{Merchant created Order ID}", // Example: order_no_0001 + name: "Order name: Test payment request", + amount: 14000, + buyer_email: "iamport@siot.do", // required + buyer_name: "Jack Son", // Must include a space between Firstname Lastname + buyer_tel: "010-1234-5678", + buyer_addr: "Shinsa-dong, Gangnam-gu, Seoul", + buyer_postcode: "123-456", + m_redirect_url: "{Mobile only - URL to redirect to after payment approval}", // Example: https://www.my-service.com/payments/complete/mobile + }, + function (rsp) { + // callback logic + //* ...Omitted... *// + }, + ); + ``` -- If not specified and this is the only PG setting that exists, `default PG` is automatically set. -- If there are multiple PG settings, set to **`bluewalnut`**. + ### Key parameter description -**`pay_method`** **\***\*\* ****s****tring\*\* + **`pg`** **\*** **string** -**Payment method code** + **PG code** -
-

Payment method codes

+ - If not specified and this is the only PG setting that exists, `default PG` is automatically set. + - If there are multiple PG settings, set to **`bluewalnut`**. -- `card` (credit card) -- `trans`(instant account transfer) -- `vbank`(virtual account) -- `phone`(mobile micropayment) + **`pay_method`** **\*** **string** -
+ **Payment method code** -**`merchant_uid`** **\***\*\* ****s****tring\*\* +
+

Payment method codes

-**Order ID** + - `card` (credit card) + - `trans`(instant account transfer) + - `vbank`(virtual account) + - `phone`(mobile micropayment) +
-Must be unique for each request. + **`merchant_uid`** **\*** **string** -**`amount`** **\***\*\* ****integer\*\* + **Order ID** -**Payment amount** + Must be unique for each request. -Must be an integer (not string) + **`amount`** **\*** **integer** - + **Payment amount** -
+ Must be an integer (not string) - -#### Not supported + + -
+ + Not supported +
diff --git a/src/content/docs/en/payment-integration-by-pg/payment-gateways/danal.mdx b/src/content/docs/en/payment-integration-by-pg/payment-gateways/danal.mdx index 0a8f1c2bc..1fe8c2857 100644 --- a/src/content/docs/en/payment-integration-by-pg/payment-gateways/danal.mdx +++ b/src/content/docs/en/payment-integration-by-pg/payment-gateways/danal.mdx @@ -5,256 +5,254 @@ description: Danal payment window integration guide import Codepen from "~/components/gitbook/Codepen.astro"; import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### 1. Configure Danal PG settings +## 1. Configure Danal PG settings -Refer to the [**Danal settings**](../../ready/2.-pg/payment-gateway-settings/undefined-2) page to configure the PG settings. +Refer to the [**Danal settings**](../../ready/2.-pg/payment-gateway-settings/undefined-2) page +to configure the PG settings. ![]() -### 2. Request payment +## 2. Request payment -To open the Danal TPay payment window, call [JavaScript SDK](../../sdk/javascript-sdk/) IMP.**request_pay**(param, callback). +To open the Danal TPay payment window, call [JavaScript SDK](../../sdk/javascript-sdk/) +IMP.**request\_pay**(param, callback). In both PC and mobile browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. - - -```javascript title="Javascript SDK" -IMP.request_pay( - { - pg: "danal_tpay", - pay_method: "card", - merchant_uid: "{Merchant created Order ID}", // Example: order_no_0001 - name: "Order name: Test payment request", - amount: 14000, - buyer_email: "iamport@siot.do", - buyer_name: "John Doe", - buyer_tel: "010-1234-5678", - buyer_addr: "Shinsa-dong, Gangnam-gu, Seoul", - buyer_postcode: "123-456", - }, - function (rsp) { - // callback logic - //* ...Omitted... *// - } -); -``` + + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "danal_tpay", + pay_method: "card", + merchant_uid: "{Merchant created Order ID}", // Example: order_no_0001 + name: "Order name: Test payment request", + amount: 14000, + buyer_email: "iamport@siot.do", + buyer_name: "John Doe", + buyer_tel: "010-1234-5678", + buyer_addr: "Shinsa-dong, Gangnam-gu, Seoul", + buyer_postcode: "123-456", + }, + function (rsp) { + // callback logic + //* ...Omitted... *// + }, + ); + ``` -### Key parameter description + ### Key parameter description -**`pg`** **\*** **s** **tring** + **`pg`** **\*** **string** -**PG code** + **PG code** -- If not specified and this is the only PG setting that exists, `default PG` is automatically set. -- If there are multiple PG settings, set to **`danal_tpay`**. + - If not specified and this is the only PG setting that exists, `default PG` is automatically set. + - If there are multiple PG settings, set to **`danal_tpay`**. -**`pay_method`** **\*** **s** **tring** + **`pay_method`** **\*** **string** -**Payment method code** + **Payment method code** -
-

Payment method codes

+
+

Payment method codes

-- `card` (credit card) -- `trans`(instant account transfer) -- `vbank`(virtual account) -- `cultureland`(Cultureland) -- `happymoney`(Happy Money) -- `booknlife` (Book n culture gift card) + - `card` (credit card) + - `trans`(instant account transfer) + - `vbank`(virtual account) + - `cultureland`(Cultureland) + - `happymoney`(Happy Money) + - `booknlife` (Book n culture gift card) +
-
+ **`merchant_uid`** **\*** **string** -**`merchant_uid`** **\*** **s** **tring** + **Order ID** -**Order ID** + Must be unique for each request. -Must be unique for each request. + **`buyer_tel`** **\*** **`string`** -**`buyer_tel`** **`*`** **`string`** + **Customer phone number** -**Customer phone number** + Danal payment window may throw an error if omitted -Danal payment window may throw an error if omitted + **`amount`** **\*** **integer** -**`amount`** **\*** **integer** + **Payment amount** -**Payment amount** + Must be an integer (not string) -Must be an integer (not string) + + #### Virtual account payment requirement - -#### Virtual account payment requirement + - **`biz_num`**: 10-digit business registration number (required) + -- **`biz_num`**: 10-digit business registration number (required) + +
- + + To open non-authenticated payment window, specify the **customer\_uid** parameter. - - + + #### **amount** - -To open non-authenticated payment window, specify the **customer\_uid** parameter. + - If requesting **both billing key and initial payment**, specify the payment amount. - -#### **amount** - -- If requesting **both billing key and initial payment**, specify the payment amount. -- If only requesting for billing key, set to **0**.\ - (if amount is set to 0, Danal executes a test payment of 10 won which is automatically cancelled after 30 minutes.) - - - -```javascript title="Javascript SDK" -IMP.request_pay( - { - pg: "danal_tpay", - pay_method: "card", // only 'card' supported. - merchant_uid: "{Merchant created Order ID}", // Example: issue_billingkey_monthly_0001 - name: "Order name: Billing key request test", - amount: 0, // For display purpose only (set actual amount to also request payment approval). - customer_uid: "{Unique ID for the card (billing key)}", // Required (Example: gildong_0001_1234) - buyer_email: "johndoe@gmail.com", - buyer_name: "John Doe", - buyer_tel: "02-1234-1234", - buyer_addr: "Samseong-dong, Gangnam-gu, Seoul", - period: { - from: "20200101", //YYYYMMDD - to: "20201231", //YYYYMMDD - }, - }, - function (rsp) { - if (rsp.success) { - alert("Success"); - } else { - alert("Failed"); - } - } -); -``` + - If only requesting for billing key, set to **0**.\ + (if amount is set to 0, Danal executes a test payment of 10 won which is automatically cancelled after 30 minutes.) + -### Key parameter description + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "danal_tpay", + pay_method: "card", // only 'card' supported. + merchant_uid: "{Merchant created Order ID}", // Example: issue_billingkey_monthly_0001 + name: "Order name: Billing key request test", + amount: 0, // For display purpose only (set actual amount to also request payment approval). + customer_uid: "{Unique ID for the card (billing key)}", // Required (Example: gildong_0001_1234) + buyer_email: "johndoe@gmail.com", + buyer_name: "John Doe", + buyer_tel: "02-1234-1234", + buyer_addr: "Samseong-dong, Gangnam-gu, Seoul", + period: { + from: "20200101", //YYYYMMDD + to: "20201231", //YYYYMMDD + }, + }, + function (rsp) { + if (rsp.success) { + alert("Success"); + } else { + alert("Failed"); + } + }, + ); + ``` -**`pg`** **\***\*\* ****s****tring\*\* + ### Key parameter description -**PG code** + **`pg`** **\*** **string** -- If not specified and this is the only PG setting that exists, `default PG` is automatically set. -- If there are multiple PG settings, set to **`danal_tpay`**. + **PG code** -**`customer_uid`** **\*** **string** + - If not specified and this is the only PG setting that exists, `default PG` is automatically set. + - If there are multiple PG settings, set to **`danal_tpay`**. -**Credit card billing key** + **`customer_uid`** **\*** **string** -Billing key to be mapped 1:1 with the user-entered credit card information. + **Credit card billing key** -**`amount`** **\*** **Integer** + Billing key to be mapped 1:1 with the user-entered credit card information. -**Payment amount** + **`amount`** **\*** **Integer** -0: only billing key, **> 0: billing key + initial payment** + **Payment amount** -**` period`` `****`array`** + 0: only billing key, **> 0: billing key + initial payment** -Product subscription payment for subscription payment. The date is displayed on the Danal payment window. + **`period`` `****`array`** -**`from`****`: YYYYMMDD`** + Product subscription payment for subscription payment. The date is displayed on the Danal payment window. -**`to`****`: YYYYMMDD`**\ + **`from`****`: YYYYMMDD`** -### Request payment with billing key (customer_uid) + **`to`****`: YYYYMMDD`**\\ -After successfully getting the billing key, the billing key is **stored on the i'mport server** mapped 1:1 with the specified `customer_uid`. For security reasons, the server cannot directly access the billing key. Subsequent payments can be requested by calling the [**non-authenticated payment request REST API**](../../api/api/api) with the `customer_uid` as follows: + ### Request payment with billing key (customer\_uid) -```title="sever-side" -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 -``` + After successfully getting the billing key, + the billing key is **stored on the i'mport server** mapped 1:1 with the specified `customer_uid`. + For security reasons, the server cannot directly access the billing key. + Subsequent payments can be requested by calling + the [**non-authenticated payment request REST API**](../../api/api/api) + with the `customer_uid` as follows: -
+ ```sh title="sever-side" + 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 + ``` +
-### 3. Additional functions +## 3. Additional functions - -```javascript title="javascript" -display: { - card_quota: [6] // Display up to 6 months installment plans -} -``` - -**Parameters** - -- **card_quota :** - - `[]`: Only immediate pay - - `3,6`: immediate, 3, 6 month installment plans - - -Installment plan option is available only for **KRW 50,000 or more**. - - - - - - - - -```javascript title="javascript" -card: { - direct: { - code: "367", - quota: 3, - usePoint : “Y” + + ```json title="javascript" + { + "display": { + "card_quota": [6] // Display up to 6 months installment plans + } } -} -``` - -**Parameters** - -- **code**: [**Credit card code**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) (**string**) -- **quota**: Installment plan. For immediate, set to 0. (**integer**) -- **usePoint**: Option to use points (post applied) - - -**Danal setup required** - -- Direct module call requires pre-setup by Danal. - - - - - - -```javascript title="javascript" -card : { - detail : [ - {card_code:"*", enabled:false}, // Disable all credit cards - {card_code:'366', enabled:true} // Enable specific credit card - ] -} -``` + ``` + + **Parameters** + + - **card\_quota :** + - `[]`: Only immediate pay + - `3,6`: immediate, 3, 6 month installment plans + + + Installment plan option is available only for **KRW 50,000 or more**. + + + + + + + ```json title="javascript" + { + "card": { + "direct": { + "code": "367", + "quota": 3, + "usePoint": "Y" + } + } + } + ``` + + **Parameters** + + - **code**: [**Credit card code**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) (**string**) + - **quota**: Installment plan. For immediate, set to 0. (**integer**) + - **usePoint**: Option to use points (post applied) + + + **Danal setup required** + + - Direct module call requires pre-setup by Danal. + + + + + ```json title="javascript" + { + "card": { + "detail": [ + { "card_code": "*", "enabled": false }, // Disable all credit cards + { "card_code": "366", "enabled": true }, // Enable specific credit card + ] + } + } + ``` -**Parameters** + **Parameters** -- **card_code:** [**Credit card code**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) (**string)** -- **enabled:** Option to enable the credit card (**boolean)** + - **card\_code:** [**Credit card code**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) + (**string)** - + - **enabled:** Option to enable the credit card (**boolean)** - + + diff --git a/src/content/docs/en/payment-integration-by-pg/payment-gateways/daou-payjoa/precautions-for-using-payjoa.mdx b/src/content/docs/en/payment-integration-by-pg/payment-gateways/daou-payjoa/precautions-for-using-payjoa.mdx index be0c7aaf4..9a147afee 100644 --- a/src/content/docs/en/payment-integration-by-pg/payment-gateways/daou-payjoa/precautions-for-using-payjoa.mdx +++ b/src/content/docs/en/payment-integration-by-pg/payment-gateways/daou-payjoa/precautions-for-using-payjoa.mdx @@ -8,171 +8,169 @@ import Details from "~/components/gitbook/Details.astro"; ## Things to note when integrating PAYJOA
-

Returns success in PC and imp_success in mobile

- -The payment window call (`IMP.request_pay`) and post-payment processing differs for PC and mobile. In PC, the call is made using iframe and the callback function (the second argument of IMP.request_pay) is called after the payment process is completed. In mobile, the page is redirected (302) to the specified URL (`m_redirect_url`_)._ At this time, the payment result (success/failure) is returned using the `success` parameter for PC and `imp_success` parameter for mobile. To summarize the flow: - -- \[PC] iframe → callback → result delivered in response.`success` returned via callback - - ```jsx - IMP.request_pay( - { - // Omitted - }, - function (response) { - const { success } = response; // payment successul or failed - if (success) { - // Success logic - } else { - // Failure logic - } - } - ); - ``` - -- \[Mobile] Redirect → redirct (302) to m_redirect_url → result delivered in `imp_success` query parameter - - ```jsx - /** - * Sample 302 redirect URL redirected to after payment process is completed - * when m_redirect_url is set to 'https://myservice.com/payments/complete' - */ - https://myservice.com/payments/complete?**imp_success=true**&imp_uid=imp1234567890&merchant_uid=mid_123467890 - ``` - -#### **`imp_success` and `success` are deprecated** - -Regardless you should not determine the success/failure of a payment based on either of these parameters. It only indicates the failure/success of payment at the time of the response from i'mport → merchant client, and its value can only be finalized when notification of the result is sent from PAYJOA → i'mport and then it is updated in the i'mport DB. - -Since the **payment result is sent asynchronously in \[PAYJOA → i'mport → i'mport DB update] and \[i'mport → merchant client]**, **the `imp_success` or `success` parameter received by the merchant client can be false (failed) for a successful transaction if it has not been updated in the database yet**. - -Hence, only the i'mport order ID (`imp_uid`) and the merchant order ID (`merchant_uid`) of the result are accurate. You must send these values to the merchant server and use them to call the i'mport Get payment API ([GET /payments/\{imp_uid}](https://api.iamport.kr/#!/payments/getPaymentByImpUid)) to accurately determine whether the payment is successful (`status`=`paid`) or failed (`status`=`failed`). - +

Returns success in PC and imp\_success in mobile

+ + The payment window call (`IMP.request_pay`) and post-payment processing differs for PC and mobile. + In PC, the call is made using iframe and the callback function + (the second argument of IMP.request\_pay) is called after the payment process is completed. + In mobile, the page is redirected (302) to the specified URL (`m_redirect_url`). + At this time, the payment result (success/failure) is returned using the `success` parameter for PC + and `imp_success` parameter for mobile. To summarize the flow: + + - \[PC] iframe → callback → result delivered in response.`success` returned via callback + + ```tsx + IMP.request_pay( + { + // Omitted + }, + function (response) { + const { success } = response; // payment successul or failed + if (success) { + // Success logic + } else { + // Failure logic + } + }, + ); + ``` + + - \[Mobile] Redirect → redirct (302) to m\_redirect\_url → result delivered in `imp_success` query parameter + + ```js + /** + * Sample 302 redirect URL redirected to after payment process is completed + * when m_redirect_url is set to 'https://myservice.com/payments/complete' + */ + "https://myservice.com/payments/complete?imp_success=true&imp_uid=imp1234567890&merchant_uid=mid_123467890"; + ``` + + ### **`imp_success` and `success` are deprecated** + + Regardless you should not determine the success/failure of a payment based on either of these parameters. + It only indicates the failure/success of payment at the time of the response from i'mport → merchant client, + and its value can only be finalized when notification of the result is sent from PAYJOA → i'mport + and then it is updated in the i'mport DB. + + Since the **payment result is sent asynchronously in \[PAYJOA → i'mport → i'mport DB update] + and \[i'mport → merchant client]**, **the `imp_success` or `success` parameter received + by the merchant client can be false (failed) for a successful transaction + if it has not been updated in the database yet**. + + Hence, only the i'mport order ID (`imp_uid`) and the merchant order ID + (`merchant_uid`) of the result are accurate. + You must send these values to the merchant server and use them + to call the i'mport Get payment API ([GET /payments/\{imp\_uid}](https://api.iamport.kr/#!/payments/getPaymentByImpUid)) + to accurately determine whether the payment is successful (`status`=`paid`) or failed (`status`=`failed`).
-

Session related issues when paying with Hana card/NH Apps Cache in Safari

- -When paying with Hana card/NH Apps Cache (account transfer) in Safari, the message below (the session has expired and the connection with the card company has been terminated) is displayed and payment cannot be processed. +

Session related issues when paying with Hana card/NH Apps Cache in Safari

-참고이미지 + When paying with Hana card/NH Apps Cache (account transfer) in Safari, + the message below (the session has expired and the connection with the card company has been terminated) + is displayed and payment cannot be processed. -If you are experiencing this, make sure that the `Prevent cross-site tracking` and `Block all cookies` options are not checked in Safari Preferences as shown below, and then try again. + 참고이미지 -참고이미지 + If you are experiencing this, make sure that the `Prevent cross-site tracking` and `Block all cookies` options + are not checked in Safari Preferences as shown below, and then try again. + 참고이미지
-

Issues when paying with BC card in Safari/Firefox

- -If you click the Next button after selecting BC Card in the credit card payment window, “Payment failed” alert message is displayed and you cannot proceed any further. In other browsers (Chrome, Opera, Edge, etc.) or when using other credit cards, the Facebook QR code for BC card payment is rendered without any problem. +

Issues when paying with BC card in Safari/Firefox

-참고이미지 + If you click the Next button after selecting BC Card in the credit card payment window, + “Payment failed” alert message is displayed and you cannot proceed any further. + In other browsers (Chrome, Opera, Edge, etc.) or when using other credit cards, + the Facebook QR code for BC card payment is rendered without any problem. -If you are experiencing this, make sure that pop-ups are allowed for the `*.payjoa.co.kr` domain in Safari Preferences as shown below, and then try again. + 참고이미지 -참고이미지 + If you are experiencing this, make sure that pop-ups are allowed for the `*.payjoa.co.kr` domain + in Safari Preferences as shown below, and then try again. + 참고이미지
-

Instant account transfer payment flow difference

+

Instant account transfer payment flow difference

-Since PAYJOA internally uses Toss Payments - account transfer, account transfer is available only through Toss Simple Payment, NH Apps Cache, and direct input of account information. Entering account information directly requires security card/OTP authentication → public certificate authentication. + Since PAYJOA internally uses Toss Payments - account transfer, account transfer is available + only through Toss Simple Payment, NH Apps Cache, and direct input of account information. + Entering account information directly requires security card/OTP authentication → public certificate authentication. -For mobile payment, account transfer payment is available only through Toss Simple Payment and NH Apps Cache. + For mobile payment, account transfer payment is available only through Toss Simple Payment and NH Apps Cache. -PC 결제 - -모바일 결제 + PC 결제 + 모바일 결제
-

Only depositor's name can be accessed after virtual account deposit

- -When deposit is made to the (issued) virtual account, PAYJOA only reveals the name among the depositor's information (bank name, account number, sender). Therefore, when you retrieve the i'mport payment details ([**GET /payments/\{imp_uid}**](../../../api/payment-api/get-payment-api)), the depositor's bank code (`bank_code`) and bank name (`bank_name`) are both NULL. To get the depositor's name, you must set the query parameter (`extension`) to `true` as follows: - -```jsx -GET http://api.iamport.kr/payments/{i'mport number}?extension=true - -{ - // ... Omitted - bank_code: null, // Depositor's bank code not provided - bank_name: null, // Depositor's bank name not provided - extension: { - // ... Omitted - **"REMITTER": "John Doe" // Depositor's name** - } -} -``` - +

Only depositor's name can be accessed after virtual account deposit

+ + When deposit is made to the (issued) virtual account, + PAYJOA only reveals the name among the depositor's information (bank name, account number, sender). + Therefore, when you retrieve the i'mport payment details ([**GET /payments/\{imp\_uid}**](../../../api/payment-api/get-payment-api)), + the depositor's bank code (`bank_code`) and bank name (`bank_name`) are both NULL. + To get the depositor's name, you must set the query parameter (`extension`) to `true` as follows: + + ```json + // GET http://api.iamport.kr/payments/{i'mport number}?extension=true + { + // ... Omitted + "bank_code": null, // Depositor's bank code not provided + "bank_name": null, // Depositor's bank name not provided + "extension": { + // ... Omitted + "REMITTER": "John Doe" // Depositor's name + } + } + ```
-

Special contract with PAYJOA is required to cancel virtual account payment

- -Cancellation (refund) of payment for completed virtual account deposit is available only through a special contract with PAYJOA due to virtual account issuance fee issues. Refunds for virtual account payments cannot be processed without this contract. +

Special contract with PAYJOA is required to cancel virtual account payment

+ Cancellation (refund) of payment for completed virtual account deposit is available + only through a special contract with PAYJOA due to virtual account issuance fee issues. + Refunds for virtual account payments cannot be processed without this contract.
-

Cancellation of virtual account payment takes more than 7 business days to process

- -Cancellation (refund) of PAYJOA virtual account payment is requested from the merchant → i'mport → PAYJOA. Since the refund is processed after a PAYJOA staff manually checks the request, it takes more than 7 business days for the refund amount to be deposited. +

Cancellation of virtual account payment takes more than 7 business days to process

+ Cancellation (refund) of PAYJOA virtual account payment is requested from the merchant → i'mport → PAYJOA. + Since the refund is processed after a PAYJOA staff manually checks the request, + it takes more than 7 business days for the refund amount to be deposited.
-

Only one taxable/tax-free/combination CPID is issued for each case

- -You need to request PAYJOA to issue the CPID on a `case-by-case` basis. In this way, all taxable/tax-free/combination transactions can be processed with one CPID. +

Only one taxable/tax-free/combination CPID is issued for each case

+ You need to request PAYJOA to issue the CPID on a `case-by-case` basis. + In this way, all taxable/tax-free/combination transactions can be processed with one CPID.
-

Tax-free amount can be set only for card payment

- -When calling the payment window (IMP.request_pay function), you can set the tax-free amount (`tax_free`) out of the total amount (`amount`). In the PAYJOA system, the tax-free amount is only available when paying by card (pay_method: `card`). Account transfer and virtual account payments are taxed in full. +

Tax-free amount can be set only for card payment

+ When calling the payment window (IMP.request\_pay function), + you can set the tax-free amount (`tax_free`) out of the total amount (`amount`). + In the PAYJOA system, the tax-free amount is only available when paying by card (pay\_method: `card`). + Account transfer and virtual account payments are taxed in full.
-

PAYJOA bug

- -#### Customer's phone number is not automatically filled in the escrow payment window +

PAYJOA bug

-참고이미지 + ### Customer's phone number is not automatically filled in the escrow payment window -- Unlike other payment windows, the customer's phone number (`buyer_tel`) passed into IMP.request_pay is not automatically filled in the escrow payment window. Note that PAYJOA does not support this function. + 참고이미지 + - Unlike other payment windows, the customer's phone number (`buyer_tel`) passed into IMP.request\_pay + is not automatically filled in the escrow payment window. Note that PAYJOA does not support this function.
diff --git a/src/content/docs/en/payment-integration-by-pg/payment-gateways/daou-payjoa/readme.mdx b/src/content/docs/en/payment-integration-by-pg/payment-gateways/daou-payjoa/readme.mdx index 9ecbf5181..e54c964d4 100644 --- a/src/content/docs/en/payment-integration-by-pg/payment-gateways/daou-payjoa/readme.mdx +++ b/src/content/docs/en/payment-integration-by-pg/payment-gateways/daou-payjoa/readme.mdx @@ -5,232 +5,232 @@ description: Daou payment window integration guide import ContentRef from "~/components/gitbook/ContentRef.astro"; import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### 1. Configure Daou PG settings +## 1. Configure Daou PG settings Refer to the [**Daou settings**](../../../ready/2.-pg/payment-gateway-settings/daou) page to configure the PG settings. ![]() -### 2. Request payment +## 2. Request payment To open the payment window, call [JavaScript SDK](../../../sdk/javascript-sdk/) -IMP.**request_pay**(param, callback). +IMP.**request\_pay**(param, callback). -In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. In mobile browsers, the page is redirected to **m_redirect_url**. +In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. +In mobile browsers, the page is redirected to **m\_redirect\_url**. -**PAYJOA payment window integration requires ****JS SDK 1.2.0**** or later version.** - + **PAYJOA payment window integration requires ****JS SDK 1.2.0**** or later version.** - -```javascript title="Javascript SDK" -IMP.request_pay({ - pg : 'daou', - pay_method : 'card', - merchant_uid: 'mid_1234567890', - escrow: false, - amount: 1004, - name: 'NF long padding jacket M', - buyer_name: 'John Doe', - buyer_email: 'hello@world.com', - buyer_tel: '01012345678', - digital : false, // Set to true if contracted as digital - m_redirect_url: 'https://allerts.com/payments/complete', - bypass: { - // PAYJOA (DaouData) specific parameters - daou: { - PRODUCTCODE: 'iamport', - CASHRECEIPTFLAG: 2, - }, - }, - app_scheme: 'iamportappscheme', -}, function(rsp) { // callback logic - //* ...Omitted... *// -}); -``` - -### - -### Key parameter description - -**`pg`** **\*** **s** **tring** - -**PG code** + + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "daou", + pay_method: "card", + merchant_uid: "mid_1234567890", + escrow: false, + amount: 1004, + name: "NF long padding jacket M", + buyer_name: "John Doe", + buyer_email: "hello@world.com", + buyer_tel: "01012345678", + digital: false, // Set to true if contracted as digital + m_redirect_url: "https://allerts.com/payments/complete", + bypass: { + // PAYJOA (DaouData) specific parameters + daou: { + PRODUCTCODE: "iamport", + CASHRECEIPTFLAG: 2, + }, + }, + app_scheme: "iamportappscheme", + }, + function (rsp) { + // callback logic + //* ...Omitted... *// + }, + ); + ``` -- If not specified and this is the only PG setting that exists, `default PG` is automatically set. -- If there are multiple PG settings, set to **`daou`**. + ### Key parameter description -**`pay_method`** **\*** **s** **tring** + **`pg`** **\*** **string** -**Payment method code** + **PG code** -
-

Payment method codes

+ - If not specified and this is the only PG setting that exists, `default PG` is automatically set. + - If there are multiple PG settings, set to **`daou`**. -- `card` (credit card) -- `trans`(instant account transfer) -- `vbank`(virtual account) + **`pay_method`** **\*** **string** -
+ **Payment method code** -**`merchant_uid`** **\*** **s** **tring** +
+

Payment method codes

-**Order ID** + - `card` (credit card) + - `trans`(instant account transfer) + - `vbank`(virtual account) +
-Must be unique for each request. + **`merchant_uid`** **\*** **string** -**`digital`** **`*`** **`string`** + **Order ID** -**Digital contents option** + Must be unique for each request. -Must specify the value based on the contract between merchant and PAYJOA. Otherwise, request will fail. + **`digital`** **`*`** **`string`** -**`bypass.daou.PRODUCTCODE`** **`string`** + **Digital contents option** -**Product code** + Must specify the value based on the contract between merchant and PAYJOA. Otherwise, request will fail. -If there is no specification for the value and the value is not specified, i'mport sets it to the default value (iamport) and sends it to PAYJOA. + **`bypass.daou.PRODUCTCODE`** **`string`** -**`bypass.daou.CASHRECEIPTFLAG`** **``** **`integer`** + **Product code** -**Cash receipt issuance code** + If there is no specification for the value and the value is not specified, i'mport sets it to the default value (iamport) and sends it to PAYJOA. -Auto cash receipt issuance code for cash payments (account transfer, virtual account) + **`bypass.daou.CASHRECEIPTFLAG`** **\`\`** **`integer`** -**`1: Allow`** + **Cash receipt issuance code** -**`2: Block`** + Auto cash receipt issuance code for cash payments (account transfer, virtual account) -**`app_scheme`** **`string`** + **`1: Allow`** -**Mobile app URL scheme** + **`2: Block`** -Required in mobile app + **`app_scheme`** **`string`** -**`amount`** **\*** **integer** + **Mobile app URL scheme** -**Payment amount** + Required in mobile app -Must be an integer (not string) + **`amount`** **\*** **integer** -**`escrow`** **`boolean`** + **Payment amount** -**Escrow option** + Must be an integer (not string) -Only supports account transfer and virtual account payment. + **`escrow`** **`boolean`** -
+ **Escrow option** - -#### **You can use i'mport REST API to request billing key, request payment, and schedule payment.** + Only supports account transfer and virtual account payment. + -### Request one-time payment + + **You can use i'mport REST API to request billing key, request payment, and schedule payment.** -To request a one-time payment, use the key-in REST[ **API POST /subscribe/payments/onetime**](../../../api/api/request-non-authenticated-payment-one-time-api). The card information is not saved during this process. + ### Request one-time payment -``` -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 -``` + To request a one-time payment, use the key-in REST[**API POST /subscribe/payments/onetime**](../../../api/api/request-non-authenticated-payment-one-time-api). + The card information is not saved during this process. -### + ```sh + 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 + ``` -### Request billing key + ### Request billing key -To request a billing key, use the billing key request REST [**API POST /subscribe/customers/\{customer_uid}**](../../../api/billing-key-api/api-1). + To request a billing key, use the billing key request REST [**API POST /subscribe/customers/\{customer\_uid}**](../../../api/billing-key-api/api-1). -``` -curl -H "Content-Type: application/json" \ - -X POST -d '{"card_number":"1234-1234-1234-1234", "expiry":"2025-12", "birth":"820213", "pwd_2digit":"00"}' \ - https://api.iamport.kr/subscribe/customers/your-customer-unique-id -``` + ```sh + curl -H "Content-Type: application/json" \ + -X POST -d '{"card_number":"1234-1234-1234-1234", "expiry":"2025-12", "birth":"820213", "pwd_2digit":"00"}' \ + https://api.iamport.kr/subscribe/customers/your-customer-unique-id + ``` -### Request billing key + initial payment + ### Request billing key + initial payment -To request a billing key and initial payment, use the key-in REST [**API POST /subscribe/payments/onetime**](../../../api/api/request-non-authenticated-payment-one-time-api). + To request a billing key and initial payment, use the key-in REST [**API POST /subscribe/payments/onetime**](../../../api/api/request-non-authenticated-payment-one-time-api). -- **`customer_uid`** : required for saving the billing key. + - **`customer_uid`** : required for saving the billing key. -``` -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 -``` + ```sh + 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 + ``` -### Request payment with billing key + ### Request payment with billing key -After successfully getting the billing key and making the initial payment, the billing key is stored on the i'mport server mapped 1:1 with the specified `customer_uid`. For security reasons, the server cannot directly access the billing key. Subsequent payments can be requested by calling the repeat pay REST API ([**POST /subscribe/payments/again**](../../../api/api/api)) with the `customer_uid` as follows: + After successfully getting the billing key and making the initial payment, the billing key is stored on the i'mport server mapped 1:1 with the specified `customer_uid`. For security reasons, the server cannot directly access the billing key. Subsequent payments can be requested by calling the repeat pay REST API ([**POST /subscribe/payments/again**](../../../api/api/api)) with the `customer_uid` as follows: -``` -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 -``` + ```sh + 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 + ``` -**For detailed information, refer to:** + **For detailed information, refer to:** - - - + +
-### 3. Additional functions +## 3. Additional functions - -```javascript title="javascript" -display: { - card_quota: [6] // Display up to 6 months installment plans -} -``` - -**Parameters** - -- **card_quota :** - - `[]`: Only immediate pay - - `2,3,4,5,6`: immediate, 2, 3, 4, 5, 6 month installment plans\ + + ```json title="javascript" + { + "display": { + "card_quota": [6], // Display up to 6 months installment plans + } + } + ``` - -Installment plan option is available only for **KRW 50,000 or more**. + **Parameters** - + - **card\_quota :** + - `[]`: Only immediate pay + - `2,3,4,5,6`: immediate, 2, 3, 4, 5, 6 month installment plans\\ - + + Installment plan option is available only for **KRW 50,000 or more**. + + - -For escrow payment, the **`escrow`** parameter must be set to **true** . When the escrow payment is completed, the merchant must register the shipping information for **settlement**. You can manage shipping information by using the [**Add delivery info**](../../../api/escrow-api/add-delivery-info-api) and [**Update delivery info**](../../../api/escrow-api/update-delivery-info-api) APIs. + + For escrow payment, the **`escrow`** parameter must be set to **true** . + When the escrow payment is completed, the merchant must register the shipping information for **settlement**. + You can manage shipping information by using the [**Add delivery info**](../../../api/escrow-api/add-delivery-info-api) + and [**Update delivery info**](../../../api/escrow-api/update-delivery-info-api) APIs. -```javascript title="API Body Example" -{ - "logis": { + ```json title="API Body Example" + { + "logis": { "invoice": "1728384716123", "company": "CJGLS", "receiving_at": "20220215", "address": "16, Seongsui-ro 20-gil" - }, - "receiver": { + }, + "receiver": { "name": "John DOe" - }, - "sender": { + }, + "sender": { "relationship": "self" + } } -} -``` - - -**Precaution** + ``` -- When adding/updating the escrow delivery information, PAYJOA does not validate the delivery information (tracking number, courier name, etc.) received from the merchant. - - + + **Precaution** - + - When adding/updating the escrow delivery information, PAYJOA does not validate the delivery information + (tracking number, courier name, etc.) received from the merchant. + + diff --git a/src/content/docs/en/payment-integration-by-pg/payment-gateways/eximbay.mdx b/src/content/docs/en/payment-integration-by-pg/payment-gateways/eximbay.mdx index 7cad6f0e1..1f551a4d0 100644 --- a/src/content/docs/en/payment-integration-by-pg/payment-gateways/eximbay.mdx +++ b/src/content/docs/en/payment-integration-by-pg/payment-gateways/eximbay.mdx @@ -4,143 +4,147 @@ description: Eximbay payment window integration guide --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### 1. Configure Eximbay PG settings +## 1. Configure Eximbay PG settings Refer to the [**Eximbay settings**](../../ready/2.-pg/payment-gateway-settings/undefined-6) page to configure the PG settings. ![]() -### 2. Request payment +## 2. Request payment To open the payment window, call [JavaScript SDK](../../sdk/javascript-sdk/) -IMP.**request_pay**(param, callback). +IMP.**request\_pay**(param, callback). In PC and mobile browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. - -```javascript title="Javascript SDK" -IMP.request_pay({ - pg : 'eximbay', - pay_method : 'card', - merchant_uid : '{Merchant created Order ID}', // Example: order_no_0001 - name : 'Order name: Test payment request', - amount : 14.20, - currency : 'USD', - buyer_email : 'iamport@siot.do', - buyer_name : 'John Doe', - buyer_tel : '010-1234-5678', // Required - buyer_addr : 'Shinsa-dong, Gangnam-gu, Seoul', - buyer_postcode : '123-456' -}, function(rsp) { // callback logic - //* ...Omitted... *// -}); -``` + + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "eximbay", + pay_method: "card", + merchant_uid: "{Merchant created Order ID}", // Example: order_no_0001 + name: "Order name: Test payment request", + amount: 14.2, + currency: "USD", + buyer_email: "iamport@siot.do", + buyer_name: "John Doe", + buyer_tel: "010-1234-5678", // Required + buyer_addr: "Shinsa-dong, Gangnam-gu, Seoul", + buyer_postcode: "123-456", + }, + function (rsp) { + // callback logic + //* ...Omitted... *// + }, + ); + ``` -#### + ### Key parameter description -### Key parameter description + **`pg`** **\*** **string** -**`pg`** **\***\*\* ****s****tring\*\* + **PG code** -**PG code** + - If not specified and this is the only PG setting that exists, `default PG` is automatically set. + - If there are multiple PG settings, set to **`eximbay`**. -- If not specified and this is the only PG setting that exists, `default PG` is automatically set. -- If there are multiple PG settings, set to **`eximbay`**. + **`pay_method`** **\*** **string** -**`pay_method`** **\***\*\* ****s****tring\*\* + **Payment method code** -**Payment method code** +
+

Payment method codes

-
-

Payment method codes

- -- `card` (credit card) -- `wechat` -- `alipay` -- `card` (foreign credit card) -- `unionpay` -- `tenpay` -- `econtext` (payment via Japanese convenience store) - -
+ - `card` (credit card) + - `wechat` + - `alipay` + - `card` (foreign credit card) + - `unionpay` + - `tenpay` + - `econtext` (payment via Japanese convenience store) +
-**`merchant_uid`** **\***\*\* ****s****tring\*\* + **`merchant_uid`** **\*** **string** -**Order ID** + **Order ID** -Must be unique for each request.\ + Must be unique for each request. -**`buyer_tel`****`*`****`string`** + **`buyer_tel`****\*****`string`** -**`Customer phone`** + **`Customer phone`** -**`amount`** **\***\*\* ****integer\*\* + **`amount`** **\*** **integer** -**Payment amount** + **Payment amount** -Must be an integer (not string) + Must be an integer (not string) -**`currency`****`string`** + **`currency`****`string`** -**Currency** + **Currency** -- KRW -- USD -- EUR -- GBP -- JPY -- THB -- SGD -- RUB -- HKD -- CAD -- AUD + - KRW + - USD + - EUR + - GBP + - JPY + - THB + - SGD + - RUB + - HKD + - CAD + - AUD -**` language`` `****`string`** + **`language`` `****`string`** -- Korean : ko -- English : en -- Chinese : zh -- Japanese : jp - -
+ - Korean : ko + - English : en + - Chinese : zh + - Japanese : jp +
-### Note - -i'mport does not support Eximbay subscription payment. + ### Note + i'mport does not support Eximbay subscription payment.
-

How to test convenience store payment

+

How to test convenience store payment

+ + ### Convenience store payment method + + As with virtual accounts in Korea, payment is processed at the convenience store counter using the message sent to the customer by e-mail or text message after requesting payment via the payment window. + + - i'mport internally sets pay\_method : vbank + - Sends callback and webhook to notify that Econtext has been created (status: ready / vbank\_num is fixed as unknown) + - When Econtext confirms payment deposit, i'mport receives a response from Eximbay, changes status to `paid`, and sends a webhook for post-payment processing + + ### **Convenience store payment test procedure** + + As with the virtual account, you need to test the result of the customer's deposit and receive a notification upon deposit. -### Convenience store payment method + 1. Set Eximbay test mode to `ON` and proceed with the payment window. -As with virtual accounts in Korea, payment is processed at the convenience store counter using the message sent to the customer by e-mail or text message after requesting payment via the payment window. + 2. Write down the `pg_tid` value from the callback response (check the value from the PG approval number column in the i'mport Admin console) -- i'mport internally sets pay_method : vbank -- Sends callback and webhook to notify that Econtext has been created (status: ready / vbank_num is fixed as unknown) -- When Econtext confirms payment deposit, i'mport receives a response from Eximbay, changes status to `paid`, and sends a webhook for post-payment processing + 3. Log in from [http://test.econ.ne.jp/site/tuchi\_2/tuchi\_menu\_2.html](http://test.econ.ne.jp/site/tuchi_2/tuchi_menu_2.html) \ + (ID: ectest / password: #eg0810# ) -### **Convenience store payment test procedure** + 4. ShopID : 361301, orderID : `pg_tid` (from step 2) -As with the virtual account, you need to test the result of the customer's deposit and receive a notification upon deposit. + 5. Click **登録** button at the bottom -1. Set Eximbay test mode to `ON` and proceed with the payment window. -2. Write down the `pg_tid` value from the callback response (check the value from the PG approval number column in the i'mport Admin console) -3. Log in from [http://test.econ.ne.jp/site/tuchi_2/tuchi_menu_2.html](http://test.econ.ne.jp/site/tuchi_2/tuchi_menu_2.html) \ - (ID: ectest / password: #eg0810# ) -4. ShopID : 361301, orderID : `pg_tid` (from step 2) -5. Click **登録** button at the bottom -6. On the next page, click **登録** button -7. Wait 10 minutes and then check that the status is changed to **paid** (at this point, webhook is sent to notify of the deposit) + 6. On the next page, click **登録** button + 7. Wait 10 minutes and then check that the status is changed to **paid** (at this point, webhook is sent to notify of the deposit)
diff --git a/src/content/docs/en/payment-integration-by-pg/payment-gateways/inicis.mdx b/src/content/docs/en/payment-integration-by-pg/payment-gateways/inicis.mdx index f7eede393..48b9ce626 100644 --- a/src/content/docs/en/payment-integration-by-pg/payment-gateways/inicis.mdx +++ b/src/content/docs/en/payment-integration-by-pg/payment-gateways/inicis.mdx @@ -6,294 +6,289 @@ description: KG INICIS payment window integration guide import Codepen from "~/components/gitbook/Codepen.astro"; import ContentRef from "~/components/gitbook/ContentRef.astro"; import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### 1. Configure KG INICIS settings +## 1. Configure KG INICIS settings -Refer to the [**KG INICIS settings**](../../ready/2.-pg/payment-gateway-settings/nhn-kcp-1) page to configure the PG settings. +Refer to the [**KG INICIS settings**](../../ready/2.-pg/payment-gateway-settings/nhn-kcp-1) page +to configure the PG settings. ![](/gitbook-assets/en/7043_14679_1310.jpeg) -### 2. Request payment +## 2. Request payment -To open the payment window, call [JavaScript SDK](../../sdk/javascript-sdk/) IMP.**request_pay**(param, callback). +To open the payment window, call [JavaScript SDK](../../sdk/javascript-sdk/) +IMP.**request\_pay**(param, callback). -In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. In mobile browsers, the page is redirected to **m_redirect_url** . +In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. +In mobile browsers, the page is redirected to **m\_redirect\_url** . - + + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "html5_inicis", + pay_method: "card", + merchant_uid: "{Merchant created Order ID}", // Example: order_no_0001 + name: "Order name: Test payment request", + amount: 14000, + buyer_email: "iamport@siot.do", + buyer_name: "John Doe", + buyer_tel: "010-1234-5678", + buyer_addr: "Shinsa-dong, Gangnam-gu, Seoul", + buyer_postcode: "123-456", + m_redirect_url: "{Mobile only - URL to redirect to after payment approval}", // Example: https://www.my-service.com/payments/complete/mobile + }, + function (rsp) { + // callback logic + //* ...Omitted... *// + }, + ); + ``` + + ### Key parameter description + + **`pg`** **\*** **string** -```javascript title="Javascript SDK" -IMP.request_pay( - { - pg: "html5_inicis", - pay_method: "card", - merchant_uid: "{Merchant created Order ID}", // Example: order_no_0001 - name: "Order name: Test payment request", - amount: 14000, - buyer_email: "iamport@siot.do", - buyer_name: "John Doe", - buyer_tel: "010-1234-5678", - buyer_addr: "Shinsa-dong, Gangnam-gu, Seoul", - buyer_postcode: "123-456", - m_redirect_url: "{Mobile only - URL to redirect to after payment approval}", // Example: https://www.my-service.com/payments/complete/mobile - }, - function (rsp) { - // callback logic - //* ...Omitted... *// - } -); -``` - -#### - -### Key parameter description - -**`pg`** **\*** **s** **tring** - -**PG code** - -- If not specified and this is the only PG setting that exists, `default PG` is automatically set. -- If there are multiple PG settings, set to **`html5_inicis`**. - -**`pay_method`** **\*** **s** **tring** - -**Payment method code** - -
-

Payment method codes

- -- `card` (credit card) -- `trans`(instant account transfer) -- `vbank`(virtual account) -- `phone`(mobile micropayment) -- `samsung`(Samsung Pay hub-type) -- `kakaopay`(Kakao Pay) -- `payco` ( PAYCO hub-type) -- `tosspay` (Toss Simple Pay hub-type) -- `ssgpay` (SSG Pay hub-type) -- `chai` (CHAI Pay) -- `lpay` (LPAY hub-type) -- `naverpay` (Naver Pay) -- `cultureland`(Cultureland) -- `smartculture`(Smart Culture) -- `happymoney`(Happy Money) - -
- -**`merchant_uid`** **\*** **s** **tring** - -**Order ID** - -Must be unique for each request. - -**`amount`** **\*** **integer** - -**Payment amount** - -Must be an integer (not string) - -**`buyer_tel`** **`*`** **`string`** - -**Customer phone number** - -Required - - - -
- - -### You can request for a billing key through the KG INICIS payment window. - -- To open non-authenticated payment window, specify the **customer_uid** parameter. -- After getting a billing key from the window, you can request payment using the billing key. -- **`amount`** parameter is for display purpose only. Actual payment approval is not processed. - -```javascript title="Javascript SDK" -IMP.request_pay( - { - pg: "html5_inicis", - pay_method: "card", // only 'card' supported. - merchant_uid: "{Merchant created Order ID}", // Example: issue_billingkey_monthly_0001 - name: "Initial billing key request", - amount: 0, // For display purpose only (no payment approval). - customer_uid: "{Unique ID for the card (billing key)}", // Required (Example: gildong_0001_1234) - buyer_email: "johndoe@gmail.com", - buyer_name: "John Doe", - buyer_tel: "02-1234-1234", - m_redirect_url: "{redirect URL}", // Example: https://www.my-service.com/payments/complete/mobile (for mobile only) - }, - function (rsp) { - if (rsp.success) { - alert("Success"); - } else { - alert("Failed"); - } - } -); -``` + **PG code** -### Key parameter description + - If not specified and this is the only PG setting that exists, `default PG` is automatically set. + - If there are multiple PG settings, set to **`html5_inicis`**. -**`pg`** **\*** **s** **tring** + **`pay_method`** **\*** **string** -**PG code** + **Payment method code** -- If not specified and this is the only PG setting that exists, `default PG` is automatically set. -- If there are multiple PG settings, set to **`html5_inicis`**. +
+

Payment method codes

-> If you have multiple merchant IDs (each for general and subscription) issued by KG INCIS, set to `html5_inicis.{Merchant ID}` or `inicis.{Merchant ID}`(for ActiveX). + - `card` (credit card) + - `trans`(instant account transfer) + - `vbank`(virtual account) + - `phone`(mobile micropayment) + - `samsung`(Samsung Pay hub-type) + - `kakaopay`(Kakao Pay) + - `payco` ( PAYCO hub-type) + - `tosspay` (Toss Simple Pay hub-type) + - `ssgpay` (SSG Pay hub-type) + - `chai` (CHAI Pay) + - `lpay` (LPAY hub-type) + - `naverpay` (Naver Pay) + - `cultureland`(Cultureland) + - `smartculture`(Smart Culture) + - `happymoney`(Happy Money) +
-**`customer_uid`** **\*** **string** + **`merchant_uid`** **\*** **string** -**Credit card billing key** + **Order ID** + + Must be unique for each request. -Billing key to be mapped 1:1 with the user-entered credit card information. + **`amount`** **\*** **integer** -**`amount`** **\*** **Integer** + **Payment amount** -**Payment amount** + Must be an integer (not string) -Amount to display in the payment window, but actual payment approval is not processed. (To request payment, use the **REST API with the customer_uid**.)\ + **`buyer_tel`** **`*`** **`string`** -### Request payment with billing key (customer_uid) + **Customer phone number** -After successfully getting the billing key, the billing key is **stored on the i'mport server** mapped 1:1 with the specified `customer_uid`. For security reasons, the server cannot directly access the billing key. Subsequent payments can be requested by calling the [**non-authenticated payment request REST API**](../../api/api/api) with the `customer_uid` as follows: + Required -```title="sever-side" -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 -``` + +
-
+ + ### You can request for a billing key through the KG INICIS payment window. - -#### **You can use i'mport REST API to request billing key, request payment, and schedule payment.** + - To open non-authenticated payment window, specify the **customer\_uid** parameter. + - After getting a billing key from the window, you can request payment using the billing key. + - **`amount`** parameter is for display purpose only. Actual payment approval is not processed. -### Request one-time payment + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "html5_inicis", + pay_method: "card", // only 'card' supported. + merchant_uid: "{Merchant created Order ID}", // Example: issue_billingkey_monthly_0001 + name: "Initial billing key request", + amount: 0, // For display purpose only (no payment approval). + customer_uid: "{Unique ID for the card (billing key)}", // Required (Example: gildong_0001_1234) + buyer_email: "johndoe@gmail.com", + buyer_name: "John Doe", + buyer_tel: "02-1234-1234", + m_redirect_url: "{redirect URL}", // Example: https://www.my-service.com/payments/complete/mobile (for mobile only) + }, + function (rsp) { + if (rsp.success) { + alert("Success"); + } else { + alert("Failed"); + } + }, + ); + ``` -To request a one-time payment, use the key-in REST[ **API POST /subscribe/payments/onetime**](../../api/api/request-non-authenticated-payment-one-time-api). The card information is not saved during this process. + ### Key parameter description -``` -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 -``` + **`pg`** **\*** **string** -### + **PG code** -### Request billing key + - If not specified and this is the only PG setting that exists, `default PG` is automatically set. + - If there are multiple PG settings, set to **`html5_inicis`**. -To request a billing key, use the billing key request REST [**API POST /subscribe/customers/\{customer_uid}**](../../api/billing-key-api/api-1). + > If you have multiple merchant IDs (each for general and subscription) issued by KG INCIS, set to `html5_inicis.{Merchant ID}` or `inicis.{Merchant ID}`(for ActiveX). -``` -curl -H "Content-Type: application/json" \ - -X POST -d '{"card_number":"1234-1234-1234-1234", "expiry":"2025-12", "birth":"820213", "pwd_2digit":"00"}' \ - https://api.iamport.kr/subscribe/customers/your-customer-unique-id -``` + **`customer_uid`** **\*** **string** -### Request billing key + initial payment + **Credit card billing key** -To request a billing key and initial payment, use the key-in REST [**API POST /subscribe/payments/onetime**](../../api/api/request-non-authenticated-payment-one-time-api). + Billing key to be mapped 1:1 with the user-entered credit card information. -- **`customer_uid`** : required for saving the billing key. + **`amount`** **\*** **Integer** -``` -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 -``` + **Payment amount** -### Request payment with billing key + Amount to display in the payment window, but actual payment approval is not processed. + (To request payment, use the **REST API with the customer\_uid**.) -After successfully getting the billing key and making the initial payment, the billing key is stored on the i'mport server mapped 1:1 with the specified `customer_uid`. For security reasons, the server cannot directly access the billing key. Subsequent payments can be requested by calling the repeat pay REST API ([**POST /subscribe/payments/again**](../../api/api/api)) with the `customer_uid` as follows: + ### Request payment with billing key (customer\_uid) -``` -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 -``` + After successfully getting the billing key, the billing key is **stored on the i'mport server** mapped 1:1 + with the specified `customer_uid`. For security reasons, the server cannot directly access the billing key. + Subsequent payments can be requested by calling + the [**non-authenticated payment request REST API**](../../api/api/api) + with the `customer_uid` as follows: -**For detailed information, refer to:** + ```sh title="sever-side" + 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 + ``` + - + + **You can use i'mport REST API to request billing key, request payment, and schedule payment.** - -
+ ### Request one-time payment -### 3. Additional functions + To request a one-time payment, use the key-in [**REST API POST /subscribe/payments/onetime**](../../api/api/request-non-authenticated-payment-one-time-api). + The card information is not saved during this process. - - + ```sh + 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 + ``` -```javascript title="javascript" -display: { - card_quota: [6]; // Display up to 6 months installment plans -} -``` + ### Request billing key -**Parameters** + To request a billing key, use the billing key request [**REST API POST /subscribe/customers/\{customer\_uid}**](../../api/billing-key-api/api-1). -- **card_quota :** - - `[]`: Only immediate pay - - `2,3,4,5,6`: immediate, 2, 3, 4, 5, 6 month installment plans\ + ```sh + curl -H "Content-Type: application/json" \ + -X POST -d '{"card_number":"1234-1234-1234-1234", "expiry":"2025-12", "birth":"820213", "pwd_2digit":"00"}' \ + https://api.iamport.kr/subscribe/customers/your-customer-unique-id + ``` - -Installment plan option is available only for **KRW 50,000 or more**. + ### Request billing key + initial payment - + To request a billing key and initial payment, use the key-in [**REST API POST /subscribe/payments/onetime**](../../api/api/request-non-authenticated-payment-one-time-api). - + - **`customer_uid`** : required for saving the billing key. - + ```sh + 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 + ``` - + ### Request payment with billing key -```javascript title="javascript" -card: { - direct: { - code: "367", - quota: 3 - } -} -``` + After successfully getting the billing key and making the initial payment, + the billing key is stored on the i'mport server mapped 1:1 with the specified `customer_uid`. + For security reasons, the server cannot directly access the billing key. + Subsequent payments can be requested by calling the repeat pay + REST API ([**POST /subscribe/payments/again**](../../api/api/api)) with the `customer_uid` as follows: -**Parameters** + ```sh + 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 + ``` -- **code**: [ **Credit card code** ](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) (**string**) -- **quota**: Installment plan. For immediate, set to 0. (**integer**) + **For detailed information, refer to:** - + + + - +## 3. Additional functions - + + + ```json title="javascript" + { + "display": { + "card_quota": [6] // Display up to 6 months installment plans + } + } + ``` + + **Parameters** + + - **card\_quota :** + - `[]`: Only immediate pay + - `2,3,4,5,6`: immediate, 2, 3, 4, 5, 6 month installment plans\\ + + + Installment plan option is available only for **KRW 50,000 or more**. + + + + + + + ```json title="javascript" + { + "card": { + "direct": { + "code": "367", + "quota": 3 + } + } + } + ``` -```javascript title="javascript" -card: { - detail: [ - { card_code: "*", enabled: false }, // Disable all credit cards - { card_code: "366", enabled: true }, // Enable specific credit card - ]; -} -``` + **Parameters** -**Parameters** + - **code**: [**Credit card code**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) (**string**) + - **quota**: Installment plan. For immediate, set to 0. (**integer**) + + + + + + ```json title="javascript" + { + "card": { + "detail": [ + { "card_code": "*", "enabled": false }, // Disable all credit cards + { "card_code": "366", "enabled": true }, // Enable specific credit card + ] + } + } + ``` -- **card_code:** [ **Credit card code** ](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) (**string**) -- **enabled:** Option to enable the credit card (**boolean**) + **Parameters** - + - **card\_code:** [**Credit card code**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) (**string**) + - **enabled:** Option to enable the credit card (**boolean**) + diff --git a/src/content/docs/en/payment-integration-by-pg/payment-gateways/jtnet.mdx b/src/content/docs/en/payment-integration-by-pg/payment-gateways/jtnet.mdx index b00d17780..2bf0cb160 100644 --- a/src/content/docs/en/payment-integration-by-pg/payment-gateways/jtnet.mdx +++ b/src/content/docs/en/payment-integration-by-pg/payment-gateways/jtnet.mdx @@ -6,231 +6,233 @@ description: JTNet payment window integration guide import Codepen from "~/components/gitbook/Codepen.astro"; import ContentRef from "~/components/gitbook/ContentRef.astro"; import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### 1. Configure JTNet settings +## 1. Configure JTNet settings Refer to the [**JTNET settings**](../../ready/2.-pg/payment-gateway-settings/jtnet) page to configure the PG settings. ![]() -### 2. Request payment +## 2. Request payment To open the payment window, call [JavaScript SDK](../../sdk/javascript-sdk/) -IMP.**request_pay**(param, callback). +IMP.**request\_pay**(param, callback). -In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. In mobile browsers, the page is redirected to **m_redirect_url**. +In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. +In mobile browsers, the page is redirected to **m\_redirect\_url**. - - -```javascript title="Javascript SDK" -IMP.request_pay( - { - pg: "jtnet", - pay_method: "card", - merchant_uid: "{Merchant created Order ID}", // Example: order_no_0001 - name: "Order name: Test payment request", - amount: 14000, - buyer_email: "iamport@siot.do", - buyer_name: "John Doe", - buyer_tel: "010-1234-5678", - buyer_addr: "Shinsa-dong, Gangnam-gu, Seoul", - buyer_postcode: "123-456", - m_redirect_url: "{Mobile only - URL to redirect to after payment approval}", // Example: https://www.my-service.com/payments/complete/mobile - }, - function (rsp) { - // callback logic - //* ...Omitted... *// - } -); -``` - -#### - -### Key parameter description - -**`pg`** **\***\*\* ****s****tring\*\* + + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "jtnet", + pay_method: "card", + merchant_uid: "{Merchant created Order ID}", // Example: order_no_0001 + name: "Order name: Test payment request", + amount: 14000, + buyer_email: "iamport@siot.do", + buyer_name: "John Doe", + buyer_tel: "010-1234-5678", + buyer_addr: "Shinsa-dong, Gangnam-gu, Seoul", + buyer_postcode: "123-456", + m_redirect_url: "{Mobile only - URL to redirect to after payment approval}", // Example: https://www.my-service.com/payments/complete/mobile + }, + function (rsp) { + // callback logic + //* ...Omitted... *// + }, + ); + ``` -**PG code** + ### Key parameter description -- If not specified and this is the only PG setting that exists, `default PG` is automatically set. -- If there are multiple PG settings, set to **`jtnet`**. + **`pg`** **\*** **string** -**`pay_method`** **\***\*\* ****s****tring\*\* + **PG code** -**Payment method code** + - If not specified and this is the only PG setting that exists, `default PG` is automatically set. + - If there are multiple PG settings, set to **`jtnet`**. -
-

Payment method codes

+ **`pay_method`** **\*** **string** -- `card` (credit card) -- `trans`(instant account transfer) -- `vbank`(virtual account) -- `phone`(mobile micropayment) + **Payment method code** -
+
+

Payment method codes

-**`merchant_uid`** **\***\*\* ****s****tring\*\* + - `card` (credit card) + - `trans`(instant account transfer) + - `vbank`(virtual account) + - `phone`(mobile micropayment) +
-**Order ID** + **`merchant_uid`** **\*** **string** -Must be unique for each request. + **Order ID** -**`amount`** **\***\*\* ****integer\*\* + Must be unique for each request. -**Payment amount** + **`amount`** **\*** **integer** -Must be an integer (not string) + **Payment amount** - + Must be an integer (not string) -
+ +
- -To open non-authenticated payment window, specify the **customer\_uid** parameter. + + To open non-authenticated payment window, specify the **customer\_uid** parameter. - -#### **amount** + + #### **amount** -- If requesting **both billing key and initial payment**, specify the payment amount. -- If only requesting for billing key, set to **0**. + - If requesting **both billing key and initial payment**, specify the payment amount. + - If only requesting for billing key, set to **0**. + - + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "jtnet", + pay_method: "card", // only 'card' supported. + merchant_uid: "{Merchant created Order ID}", // Example: issue_billingkey_monthly_0001 + name: "Initial billing key request", + amount: 0, // For display purpose only (no payment approval). + customer_uid: "{Unique ID for the card (billing key)}", // Required (Example: gildong_0001_1234) + buyer_email: "johndoe@gmail.com", + buyer_name: "John Doe", + buyer_tel: "02-1234-1234", + m_redirect_url: "{redirect URL}", // Example: https://www.my-service.com/payments/complete/mobile (for mobile only) + }, + function (rsp) { + if (rsp.success) { + alert("Success"); + } else { + alert("Failed"); + } + }, + ); + ``` -```javascript title="Javascript SDK" -IMP.request_pay( - { - pg: "jtnet", - pay_method: "card", // only 'card' supported. - merchant_uid: "{Merchant created Order ID}", // Example: issue_billingkey_monthly_0001 - name: "Initial billing key request", - amount: 0, // For display purpose only (no payment approval). - customer_uid: "{Unique ID for the card (billing key)}", // Required (Example: gildong_0001_1234) - buyer_email: "johndoe@gmail.com", - buyer_name: "John Doe", - buyer_tel: "02-1234-1234", - m_redirect_url: "{redirect URL}", // Example: https://www.my-service.com/payments/complete/mobile (for mobile only) - }, - function (rsp) { - if (rsp.success) { - alert("Success"); - } else { - alert("Failed"); - } - } -); -``` - -### Key parameter description - -**`pg`** **\***\*\* ****s****tring\*\* - -**PG code** + ### Key parameter description -- If not specified and this is the only PG setting that exists, `default PG` is automatically set. -- If there are multiple PG settings, set to **`jtnet`**. + **`pg`** **\*** **string** -> + **PG code** -**`customer_uid`** **\***\*\* ****string\*\* + - If not specified and this is the only PG setting that exists, `default PG` is automatically set. + - If there are multiple PG settings, set to **`jtnet`**. -**Credit card billing key** + > -Billing key to be mapped 1:1 with the user-entered credit card information. + **`customer_uid`** **\*** **string** -**`amount`** **\***\*\* ****Integer\*\* + **Credit card billing key** -**Payment amount** + Billing key to be mapped 1:1 with the user-entered credit card information. -0: only billing key, **> 0: billing key + initial payment**\ + **`amount`** **\*** **Integer** -### Request payment with billing key (customer_uid) + **Payment amount** -After successfully getting the billing key, the billing key is **stored on the i'mport server** mapped 1:1 with the specified `customer_uid`. For security reasons, the server cannot directly access the billing key. Subsequent payments can be requested by calling the [**non-authenticated payment request REST API**](../../api/api/api) with the `customer_uid` as follows: + 0: only billing key, **> 0: billing key + initial payment**\\ -```title="sever-side" -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 -``` + ### Request payment with billing key (customer\_uid) - + After successfully getting the billing key, the billing key is **stored on the i'mport server** + mapped 1:1 with the specified `customer_uid`. + For security reasons, the server cannot directly access the billing key. + Subsequent payments can be requested by calling + the [**non-authenticated payment request REST API**](../../api/api/api) + with the `customer_uid` as follows: - -#### **You can use i'mport REST API to request billing key, request payment, and schedule payment.** + ```sh title="sever-side" + 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 + ``` + -### Request one-time payment + + **You can use i'mport REST API to request billing key, request payment, and schedule payment.** -To request a one-time payment, use the key-in REST[ **API POST /subscribe/payments/onetime**](../../api/api/request-non-authenticated-payment-one-time-api). The card information is not saved during this process. + ### Request one-time payment -``` -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 -``` + To request a one-time payment, use the key-in [**REST API POST /subscribe/payments/onetime**](../../api/api/request-non-authenticated-payment-one-time-api). The card information is not saved during this process. -### + ```sh + 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 + ``` -### Request billing key + ### Request billing key -To request a billing key, use the billing key request REST [**API POST /subscribe/customers/\{customer_uid}**](../../api/billing-key-api/api-1). + To request a billing key, use the billing key request REST [**API POST /subscribe/customers/\{customer\_uid}**](../../api/billing-key-api/api-1). -``` -curl -H "Content-Type: application/json" \ - -X POST -d '{"card_number":"1234-1234-1234-1234", "expiry":"2025-12", "birth":"820213", "pwd_2digit":"00"}' \ - https://api.iamport.kr/subscribe/customers/your-customer-unique-id -``` + ```sh + curl -H "Content-Type: application/json" \ + -X POST -d '{"card_number":"1234-1234-1234-1234", "expiry":"2025-12", "birth":"820213", "pwd_2digit":"00"}' \ + https://api.iamport.kr/subscribe/customers/your-customer-unique-id + ``` -### Request billing key + initial payment + ### Request billing key + initial payment -To request a billing key and initial payment, use the key-in REST [**API POST /subscribe/payments/onetime**](../../api/api/request-non-authenticated-payment-one-time-api). + To request a billing key and initial payment, use the key-in REST [**API POST /subscribe/payments/onetime**](../../api/api/request-non-authenticated-payment-one-time-api). -- **`customer_uid`** : required for saving the billing key. + - **`customer_uid`** : required for saving the billing key. -``` -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 -``` + ```sh + 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 + ``` -### Request payment with billing key + ### Request payment with billing key -After successfully getting the billing key and making the initial payment, the billing key is stored on the i'mport server mapped 1:1 with the specified `customer_uid`. For security reasons, the server cannot directly access the billing key. Subsequent payments can be requested by calling the repeat pay REST API ([**POST /subscribe/payments/again**](../../api/api/api)) with the `customer_uid` as follows: + After successfully getting the billing key and making the initial payment, + the billing key is stored on the i'mport server mapped 1:1 with the specified `customer_uid`. + For security reasons, the server cannot directly access the billing key. + Subsequent payments can be requested by calling + the repeat pay REST API ([**POST /subscribe/payments/again**](../../api/api/api)) + with the `customer_uid` as follows: -``` -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 -``` + ```sh + 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 + ``` -**For detailed information, refer to:** + **For detailed information, refer to:** - - - + +
-### 3. Additional functions +## 3. Additional functions - -```javascript title="javascript" -card : { - detail : [ - {card_code:"*", enabled:false}, // Disable all credit cards - {card_code:'366', enabled:true} // Enable specific credit card - ] -} -``` - -**Parameters** - -- **card_code:** [**Credit card code**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) (**string)** -- **enabled:** Option to enable the credit card (**boolean)** - - + + ```json title="javascript" + { + "card": { + "detail": [ + { "card_code": "*", "enabled": false }, // Disable all credit cards + { "card_code": "366", "enabled": true }, // Enable specific credit card + ] + } + } + ``` + + **Parameters** + + - **card\_code:** [**Credit card code**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) (**string)** + - **enabled:** Option to enable the credit card (**boolean)** + diff --git a/src/content/docs/en/payment-integration-by-pg/payment-gateways/kg-mobilians.mdx b/src/content/docs/en/payment-integration-by-pg/payment-gateways/kg-mobilians.mdx index a37496b30..9aac1b71d 100644 --- a/src/content/docs/en/payment-integration-by-pg/payment-gateways/kg-mobilians.mdx +++ b/src/content/docs/en/payment-integration-by-pg/payment-gateways/kg-mobilians.mdx @@ -5,161 +5,168 @@ description: KG Mobilians payment window integration guide import Codepen from "~/components/gitbook/Codepen.astro"; import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### 1. Configure KG Mobilians PG Settings +## 1. Configure KG Mobilians PG Settings Refer to the [**KG Mobilians settings**](../../ready/2.-pg/payment-gateway-settings/kg) page to configure the PG settings. ![]() -### 2. Request payment +## 2. Request payment To open the payment window, call [JavaScript SDK](../../sdk/javascript-sdk/) -IMP.**request_pay**(param, callback). +IMP.**request\_pay**(param, callback). -In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. In mobile browsers, the page is redirected to **m_redirect_url**. +In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. +In mobile browsers, the page is redirected to **m\_redirect\_url**. - -```javascript title="Javascript SDK" -IMP.request_pay({ - pg : 'mobilians', - pay_method : 'phone', - merchant_uid : '{Merchant created Order ID}', // Example: order_no_0001 - name : 'Order name: Test payment request', - amount : 14000, - buyer_email : 'iamport@siot.do', - buyer_name : 'John Doe', - buyer_tel : '010-1234-5678', //required - buyer_addr : 'Shinsa-dong, Gangnam-gu, Seoul', - buyer_postcode : '123-456', - m_redirect_url : '{Mobile only - URL to redirect to after payment approval}' // Example: https://www.my-service.com/payments/complete/mobile -}, function(rsp) { // callback logic - //* ...Omitted... *// -}); -``` - -### - -### Key parameter description - -**`pg`** **\***\*\* ****s****tring\*\* - -**PG code** - -- If not specified and this is the only PG setting that exists, `default PG` is automatically set. -- If there are multiple PG settings, set to **`mobilians`**. + + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "mobilians", + pay_method: "phone", + merchant_uid: "{Merchant created Order ID}", // Example: order_no_0001 + name: "Order name: Test payment request", + amount: 14000, + buyer_email: "iamport@siot.do", + buyer_name: "John Doe", + buyer_tel: "010-1234-5678", //required + buyer_addr: "Shinsa-dong, Gangnam-gu, Seoul", + buyer_postcode: "123-456", + m_redirect_url: "{Mobile only - URL to redirect to after payment approval}", // Example: https://www.my-service.com/payments/complete/mobile + }, + function (rsp) { + // callback logic + //* ...Omitted... *// + }, + ); + ``` -**`pay_method`** **\***\*\* ****s****tring\*\* + ### Key parameter description -**Payment method code** + **`pg`** **\*** **string** -
-

Payment method codes

+ **PG code** -- `card` (credit card) -- `trans`(instant account transfer) -- `phone`(mobile micropayment) + - If not specified and this is the only PG setting that exists, `default PG` is automatically set. + - If there are multiple PG settings, set to **`mobilians`**. -
+ **`pay_method`** **\*** **string** -**`merchant_uid`** **\***\*\* ****s****tring\*\* + **Payment method code** -**Order ID** +
+

Payment method codes

-Must be unique for each request. + - `card` (credit card) + - `trans`(instant account transfer) + - `phone`(mobile micropayment) +
-**`buyer_tel`****`*`****`string`** + **`merchant_uid`** **\*** **string** -**Customer phone number** + **Order ID** -Required + Must be unique for each request. -**`amount`** **\***\*\* ****integer\*\* + **`buyer_tel`****`*`** **`string`** -**Payment amount** + **Customer phone number** -Must be an integer (not string) + Required - + **`amount`** **\*** **integer** -
+ **Payment amount** - -To open non-authenticated payment window, specify the **customer\_uid** parameter. After getting a billing key from this window, you can request payment using the billing key. + Must be an integer (not string) -```javascript title="Javascript SDK" -IMP.request_pay( - { - pg: "mobilians", - pay_method: "phone", - merchant_uid: "{Merchant created Order ID}", // Example: issue_billingkey_monthly_0001 - name: "Initial billing key request", - amount: 0, // For display purpose only (no payment approval). - customer_uid: "{Unique ID for the card (billing key)}", // Required (Example: gildong_0001_1234) - buyer_email: "johndoe@gmail.com", - buyer_name: "John Doe", - buyer_tel: "02-1234-1234", - m_redirect_url: "{redirect URL}", // Example: https://www.my-service.com/payments/complete/mobile (for mobile only) - }, - function (rsp) { - if (rsp.success) { - alert("Success"); - } else { - alert("Failed"); - } - } -); -``` + + -#### + + To open non-authenticated payment window, specify the **customer\_uid** parameter. + After getting a billing key from this window, you can request payment using the billing key. - -- To request non-authenticated payment, you must set the **MID info issued by KG Mobilians** in the Admin console. -- KG Mobilians **does not process the payment** when issuing the billing key even if you specify an amount. -- Subsequent payments using the billing key must be for the **same amount and on the same day** as the initial payment on monthly basis. + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "mobilians", + pay_method: "phone", + merchant_uid: "{Merchant created Order ID}", // Example: issue_billingkey_monthly_0001 + name: "Initial billing key request", + amount: 0, // For display purpose only (no payment approval). + customer_uid: "{Unique ID for the card (billing key)}", // Required (Example: gildong_0001_1234) + buyer_email: "johndoe@gmail.com", + buyer_name: "John Doe", + buyer_tel: "02-1234-1234", + m_redirect_url: "{redirect URL}", // Example: https://www.my-service.com/payments/complete/mobile (for mobile only) + }, + function (rsp) { + if (rsp.success) { + alert("Success"); + } else { + alert("Failed"); + } + }, + ); + ``` - + + - To request non-authenticated payment, you must set the **MID info issued by KG Mobilians** in the Admin console. -### Key parameter description + - KG Mobilians **does not process the payment** + when issuing the billing key even if you specify an amount. -**`pg`** **\***\*\* ****s****tring\*\* + - Subsequent payments using the billing key must be for + the **same amount and on the same day** + as the initial payment on monthly basis. + -**PG code** + ### Key parameter description -- If not specified and this is the only PG setting that exists, `default PG` is automatically set. -- If there are multiple PG settings, set to **`mobilians.[MID]`**. + **`pg`** **\*** **string** -**`customer_uid`** **\***\*\* ****string\*\* + **PG code** -**Credit card billing key** + - If not specified and this is the only PG setting that exists, `default PG` is automatically set. + - If there are multiple PG settings, set to **`mobilians.[MID]`**. -Billing key to be mapped 1:1 with the user-entered credit card information. + **`customer_uid`** **\*** **string** -**`amount`** **\***\*\* ****Integer\*\* + **Credit card billing key** -**Payment amount** + Billing key to be mapped 1:1 with the user-entered credit card information. -Amount to display in the payment window, but actual payment approval is not processed. (To request payment, use the **REST API with the customer_uid**.)\ + **`amount`** **\*** **Integer** -### Request payment with billing key (customer_uid) + **Payment amount** -After successfully getting the billing key, the billing key is **stored on the i'mport server** mapped 1:1 with the specified `customer_uid`. For security reasons, the server cannot directly access the billing key. Subsequent payments can be requested by calling the [**non-authenticated payment request REST API**](../../api/api/api) with the `customer_uid` as follows: + Amount to display in the payment window, but actual payment approval is not processed. + (To request payment, use the **REST API with the customer\_uid**.)\\ -```title="sever-side" -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 -``` + ### Request payment with billing key (customer\_uid) - + After successfully getting the billing key, the billing key is **stored on the i'mport server** mapped 1:1 with the specified `customer_uid`. + For security reasons, the server cannot directly access the billing key. + Subsequent payments can be requested by calling the + [**non-authenticated payment request REST API**](../../api/api/api) + with the `customer_uid` as follows: - -#### **Not supported.** + ```sh title="sever-side" + 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 + ``` + -
+ + #### **Not supported.** +
diff --git a/src/content/docs/en/payment-integration-by-pg/payment-gateways/kicc.mdx b/src/content/docs/en/payment-integration-by-pg/payment-gateways/kicc.mdx index 1ad8bf70a..838b3ef6b 100644 --- a/src/content/docs/en/payment-integration-by-pg/payment-gateways/kicc.mdx +++ b/src/content/docs/en/payment-integration-by-pg/payment-gateways/kicc.mdx @@ -5,265 +5,270 @@ description: KICC payment window integration guide import Codepen from "~/components/gitbook/Codepen.astro"; import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### 1. Configure KICC PG settings +## 1. Configure KICC PG settings Refer to the [**KICC settings**](../../ready/2.-pg/payment-gateway-settings/kicc) page to configure the PG settings. ![]() -### 2. Request payment +## 2. Request payment To open the payment window, call [JavaScript SDK](../../sdk/javascript-sdk/) -IMP.**request_pay**(param, callback). +IMP.**request\_pay**(param, callback). -In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. In mobile browsers, the page is redirected to **m_redirect_url** . +In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. +In mobile browsers, the page is redirected to **m\_redirect\_url** . - - -```javascript title="Javascript SDK" -IMP.request_pay( - { - pg: "kicc", - pay_method: "card", - merchant_uid: "{Merchant created Order ID}", // Example: order_no_0001 - name: "Order name: Test payment request", - amount: 14000, - buyer_email: "iamport@siot.do", - buyer_name: "John Doe", - buyer_tel: "010-1234-5678", - buyer_addr: "Shinsa-dong, Gangnam-gu, Seoul", - buyer_postcode: "123-456", - m_redirect_url: "{Mobile only - URL to redirect to after payment approval}", // Example: https://www.my-service.com/payments/complete/mobile - }, - function (rsp) { - // callback logic - //* ...Omitted... *// - } -); -``` - -### - -### Key parameter description - -**`pg`** **\*** **s** **tring** - -**PG code** - -- If not specified and this is the only PG setting that exists, `default PG` is automatically set. -- If there are multiple PG settings, set to **`kicc`**. + + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "kicc", + pay_method: "card", + merchant_uid: "{Merchant created Order ID}", // Example: order_no_0001 + name: "Order name: Test payment request", + amount: 14000, + buyer_email: "iamport@siot.do", + buyer_name: "John Doe", + buyer_tel: "010-1234-5678", + buyer_addr: "Shinsa-dong, Gangnam-gu, Seoul", + buyer_postcode: "123-456", + m_redirect_url: "{Mobile only - URL to redirect to after payment approval}", // Example: https://www.my-service.com/payments/complete/mobile + }, + function (rsp) { + // callback logic + //* ...Omitted... *// + }, + ); + ``` -**`pay_method`** **\*** **s** **tring** + ### Key parameter description -**Payment method code** + **`pg`** **\*** **string** -
-

Payment method codes

+ **PG code** -- `card` (credit card) -- `trans`(instant account transfer) -- `vbank`(virtual account) -- `phone`(mobile micropayment) + - If not specified and this is the only PG setting that exists, `default PG` is automatically set. + - If there are multiple PG settings, set to **`kicc`**. -
+ **`pay_method`** **\*** **string** -**`merchant_uid`** **\*** **s** **tring** + **Payment method code** -**Order ID** +
+

Payment method codes

-Must be unique for each request. + - `card` (credit card) + - `trans`(instant account transfer) + - `vbank`(virtual account) + - `phone`(mobile micropayment) +
-**`buyer_tel`** **`*`** **`string`** + **`merchant_uid`** **\*** **string** -**Customer phone number** + **Order ID** -**`amount`** **\*** **integer** + Must be unique for each request. -**Payment amount** + **`buyer_tel`** **`*`** **`string`** -Must be an integer (not string) + **Customer phone number** -**`escrow`** **`boolean`** + **`amount`** **\*** **integer** -**Escrow option** + **Payment amount** -Only supports account transfer and virtual account payment. + Must be an integer (not string) - -
+ **`escrow`** **`boolean`** - -To open non-authenticated payment window, specify the **customer\_uid** parameter. After getting a billing key from this window, you can request payment using the billing key. + **Escrow option** -```javascript title="Javascript SDK" -IMP.request_pay( - { - pg: "kicc", - pay_method: "card", // only 'card' supported. - merchant_uid: "{Merchant created Order ID}", // Example: issue_billingkey_monthly_0001 - name: "Initial billing key request", - amount: 0, // For display purpose only (no payment approval). - customer_uid: "{Unique ID for the card (billing key)}", // Required (Example: gildong_0001_1234) - buyer_email: "johndoe@gmail.com", - buyer_name: "John Doe", - buyer_tel: "02-1234-1234", - m_redirect_url: "{redirect URL}", // Example: https://www.my-service.com/payments/complete/mobile (for mobile only) - }, - function (rsp) { - if (rsp.success) { - alert("Success"); - } else { - alert("Failed"); - } - } -); -``` + Only supports account transfer and virtual account payment. -#### + + - -- To request non-authenticated payment, you must set the **MID info issued by KICC** in the Admin console. -- KICC **does not process the payment** when issuing the billing key even if you specify an amount. + + To open non-authenticated payment window, specify the **customer\_uid** parameter. After getting a billing key from this window, you can request payment using the billing key. - + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "kicc", + pay_method: "card", // only 'card' supported. + merchant_uid: "{Merchant created Order ID}", // Example: issue_billingkey_monthly_0001 + name: "Initial billing key request", + amount: 0, // For display purpose only (no payment approval). + customer_uid: "{Unique ID for the card (billing key)}", // Required (Example: gildong_0001_1234) + buyer_email: "johndoe@gmail.com", + buyer_name: "John Doe", + buyer_tel: "02-1234-1234", + m_redirect_url: "{redirect URL}", // Example: https://www.my-service.com/payments/complete/mobile (for mobile only) + }, + function (rsp) { + if (rsp.success) { + alert("Success"); + } else { + alert("Failed"); + } + }, + ); + ``` -### Key parameter description + #### -**`pg`** **\*** \*\* ** **s** **tring\*\* + + - To request non-authenticated payment, you must set the **MID info issued by KICC** in the Admin console. + - KICC **does not process the payment** when issuing the billing key even if you specify an amount. + -**PG code** + ### Key parameter description -- If not specified and this is the only PG setting that exists, `default PG` is automatically set. -- If there are multiple PG settings, set to **`kicc.[billing MID]`**. + **`pg`** **\*** **string** -**`customer_uid`** **\*** **string** + **PG code** -**Credit card billing key** + - If not specified and this is the only PG setting that exists, `default PG` is automatically set. + - If there are multiple PG settings, set to **`kicc.[billing MID]`**. -Billing key to be mapped 1:1 with the user-entered credit card information. + **`customer_uid`** **\*** **string** -**`amount`** **\*** **Integer** + **Credit card billing key** -**Payment amount** + Billing key to be mapped 1:1 with the user-entered credit card information. -Amount to display in the payment window, but actual payment approval is not processed. (To request payment, use the **REST API with the customer_uid**.)\ + **`amount`** **\*** **Integer** -### Request payment with billing key (customer_uid) + **Payment amount** -After successfully getting the billing key, the billing key is **stored on the i'mport server** mapped 1:1 with the specified `customer_uid`. For security reasons, the server cannot directly access the billing key. Subsequent payments can be requested by calling the [**non-authenticated payment request REST API**](../../api/api/api) with the `customer_uid` as follows: + Amount to display in the payment window, but actual payment approval is not processed. (To request payment, use the **REST API with the customer\_uid**.)\\ -```title="sever-side" -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 -``` + ### Request payment with billing key (customer\_uid) -
+ After successfully getting the billing key, the billing key is **stored on the i'mport server** + mapped 1:1 with the specified `customer_uid`. + For security reasons, the server cannot directly access the billing key. + Subsequent payments can be requested by calling + the [**non-authenticated payment request REST API**](../../api/api/api) + with the `customer_uid` as follows: - -#### **Not supported.** + ```sh title="sever-side" + 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 + ``` + - + + #### **Not supported.** +
### 3. Additional functions - -KICC supports escrow payments only for **cash payment methods** (instant account transfer or virtual bank account). - -> To enable escrow payment, first set the following parameters and then configure additional parameters below. -> -> - **escrow : true** - -### Additional parameters - -When making an escrow payment, you must enter the following required parameters: - -- `buyer_name` : Customer name -- `buyer_email` : Customer email -- `buyer_tel` : Customer phone number -- `kiccProducts` : An array of objects consisting of the following 4 required properties. The `amount` value has no relation to the payment amount (`param.amount`) value and is not used for comparison. - - `orderNumber` : Product order number - - `name` : Product name - - `quantity` : Quantity - - `amount` : Product price - -```javascript title="JavaScript SDK" -IMP.request_pay({ - ... - escrow : true, // Required for escrow payment - kiccProducts : [ - { - "orderNumber" : "xxxx", - "name" : "Product A", - "quantity" : 3, - "amount" : 1000 - }, - { - "orderNumber" : "yyyy", - "name" : "Product B", - "quantity" : 2, - "amount" : 3000 - } - ] - ... -}, function(rsp) { // callback logic - //* ...Omitted ... *// -}); -``` - - - - -```javascript title="javascript" -card: { - direct: { - code: "367", - quota: 3 + + KICC supports escrow payments only for **cash payment methods** (instant account transfer or virtual bank account). + + > To enable escrow payment, first set the following parameters and then configure additional parameters below. + > + > - **escrow : true** + + ### Additional parameters + + When making an escrow payment, you must enter the following required parameters: + + - `buyer_name` : Customer name + + - `buyer_email` : Customer email + + - `buyer_tel` : Customer phone number + + - `kiccProducts` : An array of objects consisting of the following 4 required properties. The `amount` value has no relation to the payment amount (`param.amount`) value and is not used for comparison. + - `orderNumber` : Product order number + - `name` : Product name + - `quantity` : Quantity + - `amount` : Product price + + ```ts title="JavaScript SDK" + IMP.request_pay( + { + escrow: true, // Required for escrow payment + kiccProducts: [ + { + orderNumber: "xxxx", + name: "Product A", + quantity: 3, + amount: 1000, + }, + { + orderNumber: "yyyy", + name: "Product B", + quantity: 2, + amount: 3000, + }, + ], + }, + function (rsp) { + // callback logic + //* ...Omitted ... *// + }, + ); + ``` + + + + ```json title="javascript" + { + "card": { + "direct": { + "code": "367", + "quota": 3 + } + } } -} -``` - -**Parameters** - -- **code**: [**Credit card code**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) (**string**) -- **quota**: Installment plan. For immediate, set to 0. (**integer**) - - -**Precautions** - -- Some PGs do not support direct call to credit card company's payment windows for all Merchant IDs. You must check your Merchant ID with each PG for direct call support. - - - - - - -```javascript title="javascript" -card : { - detail : [ - {card_code:"*", enabled:false}, // Disable all credit cards - {card_code:'366', enabled:true} // Enable specific credit card - ] -} -``` - -**Parameters** + ``` + + **Parameters** + + - **code**: [**Credit card code**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) (**string**) + - **quota**: Installment plan. For immediate, set to 0. (**integer**) + + + **Precautions** + + - Some PGs do not support direct call to credit card company's payment windows for all Merchant IDs. + You must check your Merchant ID with each PG for direct call support. + + + + + ```json title="javascript" + { + "card": { + "detail": [ + { "card_code": "*", "enabled": false }, // Disable all credit cards + { "card_code": "366", "enabled": true }, // Enable specific credit card + ] + } + } + ``` -- **card_code:** [**Credit card code**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) (**string)** -- **enabled:** Option to enable the credit card (**boolean)** + **Parameters** - + - **card\_code:** [**Credit card code**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) (**string)** + - **enabled:** Option to enable the credit card (**boolean)** -**Example of enabling only ****Shinhan Card**** payment -window**" /> + - + **Example of enabling only ****Shinhan Card**** payment + window** + diff --git a/src/content/docs/en/payment-integration-by-pg/payment-gateways/nhh-kcp.mdx b/src/content/docs/en/payment-integration-by-pg/payment-gateways/nhh-kcp.mdx index 0c50197fb..6ea521495 100644 --- a/src/content/docs/en/payment-integration-by-pg/payment-gateways/nhh-kcp.mdx +++ b/src/content/docs/en/payment-integration-by-pg/payment-gateways/nhh-kcp.mdx @@ -6,486 +6,519 @@ description: NHN KCP payment window integration guide import Codepen from "~/components/gitbook/Codepen.astro"; import ContentRef from "~/components/gitbook/ContentRef.astro"; import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### 1. Configure NHH KCP PG settings +## 1. Configure NHH KCP PG settings -Refer to the [**NHN KCP settings**](../../ready/2.-pg/payment-gateway-settings/nhn-kcp) page to configure the PG settings. +Refer to the [**NHN KCP settings**](../../ready/2.-pg/payment-gateway-settings/nhn-kcp) page +to configure the PG settings. ![]() -### 2. Request payment +## 2. Request payment -To open the payment window, call [JavaScript SDK](../../sdk/javascript-sdk/) IMP.**request_pay**(param, callback). +To open the payment window, call [JavaScript SDK](../../sdk/javascript-sdk/) +IMP.**request\_pay**(param, callback). -In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. In mobile browsers, the page is redirected to **m_redirect_url**. +In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. +In mobile browsers, the page is redirected to **m\_redirect\_url**. - -```javascript title="Javascript SDK" -IMP.request_pay({ - pg : 'kcp', - pay_method : 'card', - merchant_uid : '{Merchant created Order ID}', // Example: order_no_0001 - name : 'Order name: Test payment request', - amount : 14000, - buyer_email : 'iamport@siot.do', - buyer_name : 'John Doe', - buyer_tel : '010-1234-5678', - buyer_addr : 'Shinsa-dong, Gangnam-gu, Seoul', - buyer_postcode : '123-456', - language : 'ko', // default: ko (Korean) - m_redirect_url : '{Mobile only - URL to redirect to after payment approval}' // Example: https://www.my-service.com/payments/complete/mobile -}, function(rsp) { // callback logic - //* ...Omitted... *// -}); -``` - -#### - -### Key parameter description - -**`pg`** **\***\*\* ****s****tring\*\* - -**PG code** - -- If not specified and this is the only PG setting that exists, `default PG` is automatically set. -- If there are multiple PG settings, set to `kcp`. - -**`pay_method`** **\***\*\* ****s****tring\*\* - -**Payment method code** - -
-

Payment method codes

- -- `card` (credit card) -- `trans`(instant account transfer) -- `vbank`(virtual account) -- `phone`(mobile micropayment) -- `samsung`(Samsung Pay) -- `kakaopay`(Kakao Pay) -- `payco` ( PAYCO hub-type) -- `lpay` (LPAY hub-type) -- `naverpay` (Naver Pay) -- `cultureland`(Cultureland) -- `smartculture`(Smart Culture) -- `happymoney`(Happy Money) -- `booknlife`(Book culture gift certificate) -- `point`(Benepia) - -
- -**`merchant_uid`** **\***\*\* ****s****tring\*\* - -**Order ID** - -Must be unique for each request. - -**`amount`** **\***\*\* ****integer\*\* - -**Payment amount** - -Must be an integer (not string). - - -**For Payco hub-type**, you must apply through KCP Admin page and configure the settings. - -How to apply: [https://sir.kr/main/service/p_payco_hub.php](https://sir.kr/main/service/p_payco_hub.php) - - - - -
- - -To open non-authenticated payment window, specify the **customer\_uid** parameter. After getting a billing key from this window, you can request payment using the billing key. - -```javascript title="Javascript SDK" -IMP.request_pay( - { - pg: "kcp_billing", - pay_method: "card", // only 'card' supported. - merchant_uid: "{Merchant created Order ID}", // Example: issue_billingkey_monthly_0001 - name: "Initial billing key request", - amount: 0, // For display purpose only (no payment approval). - customer_uid: "{Unique ID for the card (billing key)}", // Required (Example: gildong_0001_1234) - buyer_email: "johndoe@gmail.com", - buyer_name: "John Doe", - buyer_tel: "02-1234-1234", - m_redirect_url: "{redirect URL}", // Example: https://www.my-service.com/payments/complete/mobile (for mobile only) - }, - function (rsp) { - if (rsp.success) { - alert("Success"); - } else { - alert("Failed"); - } - } -); -``` - - -* To request non-authenticated payment, you must set the **site code issued by KCP** in the Admin console. -* KCP **does not process the payment** when issuing the billing key even if you specify an amount. - - + + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "kcp", + pay_method: "card", + merchant_uid: "{Merchant created Order ID}", // Example: order_no_0001 + name: "Order name: Test payment request", + amount: 14000, + buyer_email: "iamport@siot.do", + buyer_name: "John Doe", + buyer_tel: "010-1234-5678", + buyer_addr: "Shinsa-dong, Gangnam-gu, Seoul", + buyer_postcode: "123-456", + language: "ko", // default: ko (Korean) + m_redirect_url: "{Mobile only - URL to redirect to after payment approval}", // Example: https://www.my-service.com/payments/complete/mobile + }, + function (rsp) { + // callback logic + //* ...Omitted... *// + }, + ); + ``` + + ### Key parameter description + + **`pg`** **\*** **string** + + **PG code** + + - If not specified and this is the only PG setting that exists, `default PG` is automatically set. + - If there are multiple PG settings, set to `kcp`. + + **`pay_method`** **\*** **string** + + **Payment method code** + +
+

Payment method codes

+ + - `card` (credit card) + - `trans`(instant account transfer) + - `vbank`(virtual account) + - `phone`(mobile micropayment) + - `samsung`(Samsung Pay) + - `kakaopay`(Kakao Pay) + - `payco` ( PAYCO hub-type) + - `lpay` (LPAY hub-type) + - `naverpay` (Naver Pay) + - `cultureland`(Cultureland) + - `smartculture`(Smart Culture) + - `happymoney`(Happy Money) + - `booknlife`(Book culture gift certificate) + - `point`(Benepia) +
+ + **`merchant_uid`** **\*** **string** + + **Order ID** + + Must be unique for each request. + + **`amount`** **\*** **integer** + + **Payment amount** + + Must be an integer (not string). + + + **For Payco hub-type**, you must apply through KCP Admin page and configure the settings. + + How to apply: [https://sir.kr/main/service/p\_payco\_hub.php](https://sir.kr/main/service/p_payco_hub.php) + + + +
+ + + To open non-authenticated payment window, specify the **customer\_uid** parameter. + After getting a billing key from this window, you can request payment using the billing key. -### Key parameter description + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "kcp_billing", + pay_method: "card", // only 'card' supported. + merchant_uid: "{Merchant created Order ID}", // Example: issue_billingkey_monthly_0001 + name: "Initial billing key request", + amount: 0, // For display purpose only (no payment approval). + customer_uid: "{Unique ID for the card (billing key)}", // Required (Example: gildong_0001_1234) + buyer_email: "johndoe@gmail.com", + buyer_name: "John Doe", + buyer_tel: "02-1234-1234", + m_redirect_url: "{redirect URL}", // Example: https://www.my-service.com/payments/complete/mobile (for mobile only) + }, + function (rsp) { + if (rsp.success) { + alert("Success"); + } else { + alert("Failed"); + } + }, + ); + ``` -**`pg`** **\***\*\* ****s****tring\*\* + + - To request non-authenticated payment, you must set the **site code issued by KCP** in the Admin console. -**PG code** + - KCP **does not process the payment** + when issuing the billing key even if you specify an amount. + -- If not specified and this is the only PG setting that exists, `default PG` is automatically set. -- If there are multiple PG settings, set to `kcp_billing`. + ### Key parameter description -**`customer_uid`** **\***\*\* ****string\*\* + **`pg`** **\*** **string** -**Credit card billing key** + **PG code** -Billing key to be mapped 1:1 with the user-entered credit card information. + - If not specified and this is the only PG setting that exists, `default PG` is automatically set. + - If there are multiple PG settings, set to `kcp_billing`. -**`amount`** **\***\*\* ****Integer\*\* + **`customer_uid`** **\*** **string** -**Payment amount** + **Credit card billing key** -Amount to display in the payment window, but actual payment approval is not processed. (To request payment, use the **REST API with the customer_uid**.)\ + Billing key to be mapped 1:1 with the user-entered credit card information. -### Request payment with billing key (customer_uid) + **`amount`** **\*** **Integer** -After successfully getting the billing key, the billing key is **stored on the i'mport server** mapped 1:1 with the specified `customer_uid`. For security reasons, the server cannot directly access the billing key. Subsequent payments can be requested by calling the [**non-authenticated payment request REST API**](../../api/api/api) with the `customer_uid` as follows: + **Payment amount** -```title="sever-side" -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 -``` + Amount to display in the payment window, but actual payment approval is not processed. + (To request payment, use the **REST API with the customer\_uid**.)\\ - + ### Request payment with billing key (customer\_uid) - -#### **You can use i'mport REST API to request billing key, request payment, and schedule payment.** + After successfully getting the billing key, the billing key is **stored on the i'mport server** + mapped 1:1 with the specified `customer_uid`. + For security reasons, the server cannot directly access the billing key. + Subsequent payments can be requested by calling + the [**non-authenticated payment request REST API**](../../api/api/api) + with the `customer_uid` as follows: -### Request one-time payment + ```sh title="sever-side" + 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 + ``` + -To request a one-time payment, use the key-in REST[ **API POST /subscribe/payments/onetime**](../../api/api/request-non-authenticated-payment-one-time-api). The card information is not saved during this process. + + **You can use i'mport REST API to request billing key, request payment, and schedule payment.** -``` -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 -``` + ### Request one-time payment -### + To request a one-time payment, use the key-in [**REST API POST /subscribe/payments/onetime**](../../api/api/request-non-authenticated-payment-one-time-api). + The card information is not saved during this process. -### Request billing key + ```sh + 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 + ``` -To request a billing key, use the billing key request REST [**API POST /subscribe/customers/\{customer_uid}**](../../api/billing-key-api/api-1). + ### Request billing key -``` -curl -H "Content-Type: application/json" \ - -X POST -d '{"card_number":"1234-1234-1234-1234", "expiry":"2025-12", "birth":"820213", "pwd_2digit":"00"}' \ - https://api.iamport.kr/subscribe/customers/your-customer-unique-id -``` + To request a billing key, use the billing key request REST [**API POST /subscribe/customers/\{customer\_uid}**](../../api/billing-key-api/api-1). -### Request billing key + initial payment + ```sh + curl -H "Content-Type: application/json" \ + -X POST -d '{"card_number":"1234-1234-1234-1234", "expiry":"2025-12", "birth":"820213", "pwd_2digit":"00"}' \ + https://api.iamport.kr/subscribe/customers/your-customer-unique-id + ``` -To request a billing key and initial payment, use the key-in REST [**API POST /subscribe/payments/onetime**](../../api/api/request-non-authenticated-payment-one-time-api). + ### Request billing key + initial payment -- **`customer_uid`** : required for saving the billing key. + To request a billing key and initial payment, use the key-in REST [**API POST /subscribe/payments/onetime**](../../api/api/request-non-authenticated-payment-one-time-api). -``` -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`** : required for saving the billing key. -### Request payment with billing key + ```sh + 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 + ``` -After successfully getting the billing key and making the initial payment, the billing key is stored on the i'mport server mapped 1:1 with the specified `customer_uid`. For security reasons, the server cannot directly access the billing key. Subsequent payments can be requested by calling the repeat pay REST API ([**POST /subscribe/payments/again**](../../api/api/api)) with the `customer_uid` as follows: + ### Request payment with billing key -``` -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 -``` + After successfully getting the billing key and making the initial payment, + the billing key is stored on the i'mport server mapped 1:1 with the specified `customer_uid`. + For security reasons, the server cannot directly access the billing key. + Subsequent payments can be requested by calling + the repeat pay REST API ([**POST /subscribe/payments/again**](../../api/api/api)) + with the `customer_uid` as follows: -**For detailed information, refer to:** + ```sh + 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 + ``` - + **For detailed information, refer to:** - + +
-### 3. Additional functions +## 3. Additional functions - -```javascript title="javascript" -display: { - card_quota: [6] // Display up to 6 months installment plans -} -``` - -**Parameters** - -- **card_quota :** - - `[]`: Only immediate pay - - `2,3,4,5,6`: immediate, 2, 3, 4, 5, 6 month installment plans\ - - -Installment plan option is available only for **KRW 50,000 or more**. - - - - -Example of allowing up to **3 months**** -installment plans**" /> - - - - -```javascript title="javascript" -card: { - direct: { - code: "367", - quota: 3 - // When want to use points of credit card - // quota: 80 = 80(Hyundai Card Point installment) + 0(pay all at once) - // quota: 93 = 80(Hyundai Card Point installment) + 13(number of installments) - // quota: 60 = 60(Other Card Point installment) + 0(pay all at once) - // quota: 63 = 60(Other Card Point installment) + 3(number of installments) + + ```json title="javascript" + { + "display": { + "card_quota": [6] // Display up to 6 months installment plans + } } -} -``` - -**Parameters** - -- **code**: [**Credit card code**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) (**string**) -- **quota**: Installment plan. For immediate, set to 0. If you want to use points of credit card, you need to add the point installment per credit card[1] to number of installments (**integer**) -
- [1] point installment per credit card - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Point of Credit Card

-
-

Point Installment

-
-

Hyundai M

-
-

+80

-
-

Kookmin

-
-

+60

-
-

BC

-
-

+60

-
-

Samsung

-
-

+60

-
-

Hana/KEB

-
-

+60

-
-

Lotte

-
-

+60

-
-

Shinhan

-
-

+60

-
-

NongHyup

-
-

+60

-
-

Citi

-
-

+60

-
-

Woori

-
-

+60

-
-
- - -**Precautions** - -- Currently, direct call to the credit card company's payment window is only supported by 6 PGs: **KG Inicis, KCP, Toss Payments, Nice Payments, KICC, and Danal**. -- Some PGs do not support direct call to credit card company's payment windows for all Merchant IDs. You must check your Merchant ID with each PG for direct call support. - - - - - -
- - -```javascript title="javascript" -card : { - detail : [ - {card_code:"*", enabled:false}, // Disable all credit cards - {card_code:'366', enabled:true} // Enable specific credit card - ] -} -``` - -**Parameters** - -- **card_code:** [**Credit card code**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) (**string)** -- **enabled:** Option to enable the credit card (**boolean)** - - - - - - -Set the following parameter to only expose app cards for authenticated payments. - -```javascript title="request_pay()" -... -appCard : true . // Set to true to only expose app cards. -... -``` - - -
+ ``` -### 4. Additional parameters + **Parameters** - - -To use the **gift certificate payment method**, set the merchant assigned user ID as follows: - -```javascript title="javascript SDK " -bypass : { - shop_user_id : ‘ABCD123’ // Merchant user ID (20 bytes) -} -``` - - -**This parameter is required for gift certificate providers' RM action.** - - - -**Example of paying with Cultureland gift certificate** - -```javascript -MP.request_pay({ - pg : 'kcp.{Site code for gift certificate use}', - pay_method : 'cultureland', //Gift certificate - merchant_uid: "A00021-TEST", - name : 'Carrots 10kg', - amount : 1004, - buyer_email : 'iamport@chai.finance', - buyer_name : 'iamport tech support', - buyer_tel : '010-1234-5678', - buyer_addr : 'Shinsa-dong, Gangnam-gu, Seoul', - buyer_postcode : '123-456', - bypass : { - shop_user_id : 'abaddd' // Merchant user ID - } -} -``` + - **card\_quota :** + - `[]`: Only immediate pay + - `2,3,4,5,6`: immediate, 2, 3, 4, 5, 6 month installment plans\\ - + + Installment plan option is available only for **KRW 50,000 or more**. + - -For escrow payment, set the **`escrow`** parameter to **true**. To bundle products in the shopping cart when making an escrow payment request, pass the item-related information as an additional parameter (**`kcpProducts`**). + -**`kcpProducts`** is an object array consisting of the following four required properties: + Example of allowing up to **3 months** + **installment plans** + -**`amount`** is not related or compared with the payment amount (`param.amount`). + + ```json title="javascript" + { + "card": { + "direct": { + "code": "367", + "quota": 3 + // When want to use points of credit card + // quota: 80 = 80(Hyundai Card Point installment) + 0(pay all at once) + // quota: 93 = 80(Hyundai Card Point installment) + 13(number of installments) + // quota: 60 = 60(Other Card Point installment) + 0(pay all at once) + // quota: 63 = 60(Other Card Point installment) + 3(number of installments) + } + } + } + ``` + + **Parameters** + + - **code**: [**Credit card code**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) (**string**) + + - **quota**: Installment plan. For immediate, set to 0. If you want to use points of credit card, you need to add the point installment per credit card\[1] to number of installments (**integer**) + +
+ \[1] point installment per credit card + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Point of Credit Card

+
+

Point Installment

+
+

Hyundai M

+
+

+80

+
+

Kookmin

+
+

+60

+
+

BC

+
+

+60

+
+

Samsung

+
+

+60

+
+

Hana/KEB

+
+

+60

+
+

Lotte

+
+

+60

+
+

Shinhan

+
+

+60

+
+

NongHyup

+
+

+60

+
+

Citi

+
+

+60

+
+

Woori

+
+

+60

+
+
+ + + **Precautions** + + - Currently, direct call to the credit card company's payment window is only supported by 6 PGs: + **KG Inicis, KCP, Toss Payments, Nice Payments, KICC, and Danal**. + + - Some PGs do not support direct call to credit card company's payment windows for all Merchant IDs. + You must check your Merchant ID with each PG for direct call support. + + + +
+ + + ```json title="javascript" + { + "card": { + "detail": [ + { "card_code": "*", "enabled": false }, // Disable all credit cards + { "card_code": "366", "enabled": true }, // Enable specific credit card + ] + } + } + ``` + + **Parameters** -- orderNumber : Order ID -- name : Product name -- quantity : Product quantity -- amount : Product price + - **card\_code:** [**Credit card code**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) (**string)** + - **enabled:** Option to enable the credit card (**boolean)** -```javascript title="JavaScript SDK" -IMP.request_pay({ - pg: "kcp", - escrow: true, // For escrow payment - kcpProducts: [ + + + + + Set the following parameter to only expose app cards for authenticated payments. + + ```json title="request_pay()" { - orderNumber: "xxxx", - name: "Product A", - quantity: 3, - amount: 1000, - }, + "appCard": true // Set to true to only expose app cards. + } + ``` + +
+ +## 4. Additional parameters + + + + To use the **gift certificate payment method**, set the merchant assigned user ID as follows: + + ```json title="javascript SDK" { - orderNumber: "yyyy", - name: "Product B", - quantity: 2, - amount: 3000, - }, - ], - //* ...Omitted... *// -}); -``` - - + "bypass": { + "shop_user_id": "ABCD123" // Merchant user ID (20 bytes) + } + } + ``` + + + **This parameter is required for gift certificate providers' RM action.** + + + **Example of paying with Cultureland gift certificate** + + ```ts + IMP.request_pay({ + pg: "kcp.{Site code for gift certificate use}", + pay_method: "cultureland", //Gift certificate + merchant_uid: "A00021-TEST", + name: "Carrots 10kg", + amount: 1004, + buyer_email: "iamport@chai.finance", + buyer_name: "iamport tech support", + buyer_tel: "010-1234-5678", + buyer_addr: "Shinsa-dong, Gangnam-gu, Seoul", + buyer_postcode: "123-456", + bypass: { + shop_user_id: "abaddd", // Merchant user ID + }, + }); + ``` + + + + For escrow payment, set the **`escrow`** parameter to **true**. + To bundle products in the shopping cart when making an escrow payment request, + pass the item-related information as an additional parameter (**`kcpProducts`**). + + **`kcpProducts`** is an object array consisting of the following four required properties: + + **`amount`** is not related or compared with the payment amount (`param.amount`). + + - orderNumber : Order ID + - name : Product name + - quantity : Product quantity + - amount : Product price + + ```ts title="JavaScript SDK" + IMP.request_pay({ + pg: "kcp", + escrow: true, // For escrow payment + kcpProducts: [ + { + orderNumber: "xxxx", + name: "Product A", + quantity: 3, + amount: 1000, + }, + { + orderNumber: "yyyy", + name: "Product B", + quantity: 2, + amount: 3000, + }, + ], + //* ...Omitted... *// + }); + ``` + diff --git a/src/content/docs/en/payment-integration-by-pg/payment-gateways/nice.mdx b/src/content/docs/en/payment-integration-by-pg/payment-gateways/nice.mdx index 62178fb2d..a786c42e7 100644 --- a/src/content/docs/en/payment-integration-by-pg/payment-gateways/nice.mdx +++ b/src/content/docs/en/payment-integration-by-pg/payment-gateways/nice.mdx @@ -5,243 +5,228 @@ description: NICE Payments payment window integration guideNICE import Codepen from "~/components/gitbook/Codepen.astro"; import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### 1. Configure NICE Payments PG settings +## 1. Configure NICE Payments PG settings -Refer to the [**NICE Payments settings**](../../ready/2.-pg/payment-gateway-settings/nice-payments) page to configure the PG settings. +Refer to the [**NICE Payments settings**](../../ready/2.-pg/payment-gateway-settings/nice-payments) +page to configure the PG settings. ![]() -### 2. Request payment +## 2. Request payment -To open the payment window, call [JavaScript SDK](../../sdk/javascript-sdk/) IMP.**request_pay**(param, callback). +To open the payment window, call [JavaScript SDK](../../sdk/javascript-sdk/) +IMP.**request\_pay**(param, callback). -In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. In mobile browsers, the page is redirected to **m_redirect_url** . +In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. +In mobile browsers, the page is redirected to **m\_redirect\_url** . - - -```javascript title="Javascript SDK" -IMP.request_pay( - { - pg: "nice", - pay_method: "card", - merchant_uid: "{Merchant created Order ID}", // Example: order_no_0001 - name: "Order name: Test payment request", - amount: 14000, - buyer_email: "iamport@siot.do", - buyer_name: "John Doe", - buyer_tel: "010-1234-5678", - buyer_addr: "Shinsa-dong, Gangnam-gu, Seoul", - buyer_postcode: "123-456", - m_redirect_url: "{Mobile only - URL to redirect to after payment approval}", // Example: https://www.my-service.com/payments/complete/mobile - niceMobileV2: true, // Set to 'true' to enable new mobile version - }, - function (rsp) { - // callback logic - //* ...Omitted... *// - } -); -``` - -#### - -### Key parameter description + + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "nice", + pay_method: "card", + merchant_uid: "{Merchant created Order ID}", // Example: order_no_0001 + name: "Order name: Test payment request", + amount: 14000, + buyer_email: "iamport@siot.do", + buyer_name: "John Doe", + buyer_tel: "010-1234-5678", + buyer_addr: "Shinsa-dong, Gangnam-gu, Seoul", + buyer_postcode: "123-456", + m_redirect_url: "{Mobile only - URL to redirect to after payment approval}", // Example: https://www.my-service.com/payments/complete/mobile + niceMobileV2: true, // Set to 'true' to enable new mobile version + }, + function (rsp) { + // callback logic + //* ...Omitted... *// + }, + ); + ``` -**`pg`** **\*** **s** **tring** + ### Key parameter description -**PG code** + **`pg`** **\*** **string** -- If not specified and this is the only PG setting that exists, `default PG` is automatically set. -- If there are multiple PG settings, set to **`nice`**. + **PG code** -**`pay_method`** **\*** **s** **tring** + - If not specified and this is the only PG setting that exists, `default PG` is automatically set. + - If there are multiple PG settings, set to **`nice`**. -**Payment method code** + **`pay_method`** **\*** **string** -
-

Payment method codes

+ **Payment method code** -- `card` (credit card) -- `trans`(instant account transfer) -- `vbank`(virtual account) -- `samsung`(Samsung Pay) -- `phone`(mobile micropayment) -- `kakaopay`(Kakao Pay) -- `payco` ( PAYCO hub-type) -- `naverpay` (Naver Pay) +
+

Payment method codes

-
+ - `card` (credit card) + - `trans`(instant account transfer) + - `vbank`(virtual account) + - `samsung`(Samsung Pay) + - `phone`(mobile micropayment) + - `kakaopay`(Kakao Pay) + - `payco` ( PAYCO hub-type) + - `naverpay` (Naver Pay) +
-**`merchant_uid`** **\*** **s** **tring** + **`merchant_uid`** **\*** **string** -**Order ID** + **Order ID** -Must be unique for each request. + Must be unique for each request. -**`amount`** **\*** **integer** + **`amount`** **\*** **integer** -**Payment amount** + **Payment amount** -Must be an integer (not string). + Must be an integer (not string). -**`niceMobileV2`** **`boolean`** + **`niceMobileV2`** **`boolean`** -Option to enable new NICE mobile version (default: false) + Option to enable new NICE mobile version (default: false) -**`escrow`** **`boolean`** + **`escrow`** **`boolean`** -**Ecrow option** + **Ecrow option** - + +
-
+ + **You can use i'mport REST API to request billing key, request payment, and schedule payment.** - -#### **You can use i'mport REST API to request billing key, request payment, and schedule payment.** + ### Request one-time payment -### Request one-time payment + To request a one-time payment, use the key-in [**REST API POST /subscribe/payments/onetime**](../../api/api/request-non-authenticated-payment-one-time-api). + The card information is not saved during this process. -To request a one-time payment, use the key-in REST[ **API POST /subscribe/payments/onetime**](../../api/api/request-non-authenticated-payment-one-time-api). The card information is not saved during this process. + ```sh + 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 + ``` -``` -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 -``` + ### Request billing key -### + To request a billing key, use the billing key request REST [**API POST /subscribe/customers/\{customer\_uid}**](../../api/billing-key-api/api-1). -### Request billing key + ```sh + curl -H "Content-Type: application/json" \ + -X POST -d '{"card_number":"1234-1234-1234-1234", "expiry":"2025-12", "birth":"820213", "pwd_2digit":"00"}' \ + https://api.iamport.kr/subscribe/customers/your-customer-unique-id + ``` -To request a billing key, use the billing key request REST [**API POST /subscribe/customers/\{customer_uid}**](../../api/billing-key-api/api-1). + ### Request billing key + initial payment -``` -curl -H "Content-Type: application/json" \ - -X POST -d '{"card_number":"1234-1234-1234-1234", "expiry":"2025-12", "birth":"820213", "pwd_2digit":"00"}' \ - https://api.iamport.kr/subscribe/customers/your-customer-unique-id -``` + To request a billing key and initial payment, use the key-in REST [**API POST /subscribe/payments/onetime**](../../api/api/request-non-authenticated-payment-one-time-api). -### Request billing key + initial payment + - **`customer_uid`** : required for saving the billing key. -To request a billing key and initial payment, use the key-in REST [**API POST /subscribe/payments/onetime**](../../api/api/request-non-authenticated-payment-one-time-api). + ```sh + 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`** : required for saving the billing key. + ### Request payment with billing key -``` -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 -``` + After successfully getting the billing key and making the initial payment, + the billing key is stored on the i'mport server mapped 1:1 with the specified `customer_uid`. + For security reasons, the server cannot directly access the billing key. + Subsequent payments can be requested by calling + the repeat pay REST API ([**POST /subscribe/payments/again**](../../api/api/api)) + with the `customer_uid` as follows: -### Request payment with billing key + ```sh + 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 + ``` -After successfully getting the billing key and making the initial payment, the billing key is stored on the i'mport server mapped 1:1 with the specified `customer_uid`. For security reasons, the server cannot directly access the billing key. Subsequent payments can be requested by calling the repeat pay REST API ([**POST /subscribe/payments/again**](../../api/api/api)) with the `customer_uid` as follows: + + **NICE Payments supports non-authenticated payments only through the API method.** -``` -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 -``` - - -**NICE Payments supports non-authenticated payments only through the API method.** - -To integrate non-authenticated payments, you need to provide a UI for accepting user's card information. For more information, refer to the [**REST API**](../../auth/guide-1/bill/rest-api) page. - - - - + To integrate non-authenticated payments, you need to provide a UI for accepting user's card information. + For more information, refer to the [**REST API**](../../auth/guide-1/bill/rest-api) page. + +
-### 3. Additional functions +## 3. Additional functions - - -```javascript title="javascript" -display: { - card_quota: [6]; // Display up to 6 months installment plans -} -``` - -**Parameters** - -- **card_quota :** - - `[]`: Only immediate pay - - `2,3,4,5,6`: immediate, 2, 3, 4, 5, 6 month installment plans - - -Installment plan option is available only for **KRW 50,000 or more**. - - - - - - - - - -```javascript title="javascript" -card: { - direct: { - code: "367", - quota: 3 + + ```json title="javascript" + { + "display": { + "card_quota": [6] // Display up to 6 months installment plans + } } -} -``` - -**Parameters** - -- **code**: [**Credit card code**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) (**string**) -- **quota**: Installment plan. For immediate, set to 0. (**integer**) - - -**Precautions** + ``` + + **Parameters** + + - **card\_quota :** + - `[]`: Only immediate pay + - `2,3,4,5,6`: immediate, 2, 3, 4, 5, 6 month installment plans + + + Installment plan option is available only for **KRW 50,000 or more**. + + + + + + + ```json title="javascript" + { + "card": { + "direct": { + "code": "367", + "quota": 3 + } + } + } + ``` -- Some PGs do not support direct call to credit card company's payment windows for all Merchant IDs. You must check your Merchant ID with each PG for direct call support. + **Parameters** - + - **code**: [**Credit card code**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) (**string**) + - **quota**: Installment plan. For immediate, set to 0. (**integer**) - + + **Precautions** - + - Some PGs do not support direct call to credit card company's payment windows for all Merchant IDs. + You must check your Merchant ID with each PG for direct call support. + - -```javascript title="javascript" -card : { - detail : [ - {card_code:"*", enabled:false}, // Disable all credit cards - {card_code:'366', enabled:true} // Enable specific credit card - ] -} -``` + + -**Parameters** + + ```json title="javascript" + { + "card": { + "detail": [ + { "card_code": "*", "enabled": false }, // Disable all credit cards + { "card_code": "366", "enabled": true }, // Enable specific credit card + ] + } + } + ``` -- **card_code:** [ **Credit card code** ](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) (**string**) -- **enabled:** Option to enable the credit card (**boolean**) + **Parameters** - + - **card\_code:** [**Credit card code**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) (**string**) + - **enabled:** Option to enable the credit card (**boolean**) - + + diff --git a/src/content/docs/en/payment-integration-by-pg/payment-gateways/paymentwall.mdx b/src/content/docs/en/payment-integration-by-pg/payment-gateways/paymentwall.mdx index 3163f5cce..42f92d079 100644 --- a/src/content/docs/en/payment-integration-by-pg/payment-gateways/paymentwall.mdx +++ b/src/content/docs/en/payment-integration-by-pg/payment-gateways/paymentwall.mdx @@ -3,106 +3,107 @@ title: Paymentwall description: Paymentwall payment window integration guide --- -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; -### 1. Configure Paymentwall PG settings +## 1. Configure Paymentwall PG settings Refer to the [**Paymentwall settings**](../../ready/2.-pg/payment-gateway-settings/undefined-1) page to configure the PG settings. ![](/gitbook-assets/en/Paymentwall_logo_dark_latest.jpeg) -### 2. Request payment +## 2. Request payment To open the payment window, call [JavaScript SDK](../../sdk/javascript-sdk/) -IMP.**request_pay**(param, callback). +IMP.**request\_pay**(param, callback). -In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. In mobile browsers, the page is redirected to **m_redirect_url**. +In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. +In mobile browsers, the page is redirected to **m\_redirect\_url**. - -```javascript title="Javascript SDK" -IMP.request_pay({ - pg : 'paymentwall', - pay_method : 'card', // In Paymentwall, the payment method is activated based on the country IP. (Can be omitted) - merchant_uid : '{Merchant created Order ID}', // Example: order_no_0001 - name : 'Order name: Test payment request', - amount : 14000, - currency : 'KRW' // required - buyer_email : 'iamport@siot.do', // required - buyer_name : 'Jack Son', // Must include a space between Firstname Lastname - buyer_tel : '010-1234-5678', - buyer_addr : 'Shinsa-dong, Gangnam-gu, Seoul', - buyer_postcode : '123-456', - m_redirect_url : '{Mobile only - URL to redirect to after payment approval}', // Example: https://www.my-service.com/payments/complete/mobile - bypass: { - // Set this for Terminal 3 only, Defualt: general payment window opens - widget_code: "t3_1", - // Set to enable specific payment method, set to 'all'(default) to enable all methods supported by your country - ps : "all", - country_code:"DE" // Set this to enable all payment methods supported by the country - }, -}, function(rsp) { // callback logic - //* ...Omitted... *// -}); -``` - -### - -### Key parameter description - -**`pg`** **\***\*\* ****s****tring\*\* + + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "paymentwall", + pay_method: "card", // In Paymentwall, the payment method is activated based on the country IP. (Can be omitted) + merchant_uid: "{Merchant created Order ID}", // Example: order_no_0001 + name: "Order name: Test payment request", + amount: 14000, + currency: "KRW", // required + buyer_email: "iamport@siot.do", // required + buyer_name: "Jack Son", // Must include a space between Firstname Lastname + buyer_tel: "010-1234-5678", + buyer_addr: "Shinsa-dong, Gangnam-gu, Seoul", + buyer_postcode: "123-456", + m_redirect_url: "{Mobile only - URL to redirect to after payment approval}", // Example: https://www.my-service.com/payments/complete/mobile + bypass: { + // Set this for Terminal 3 only, Defualt: general payment window opens + widget_code: "t3_1", + // Set to enable specific payment method, set to 'all'(default) to enable all methods supported by your country + ps: "all", + country_code: "DE", // Set this to enable all payment methods supported by the country + }, + }, + function (rsp) { + // callback logic + //* ...Omitted... *// + }, + ); + ``` -**PG code** + ### Key parameter description -- If not specified and this is the only PG setting that exists, `default PG` is automatically set. -- If there are multiple PG settings, set to **`paymentwall`**. + **`pg`** **\*** **string** -**`pay_method`** **s****tring** + **PG code** -**Payment method code (Can be omitted)** + - If not specified and this is the only PG setting that exists, `default PG` is automatically set. + - If there are multiple PG settings, set to **`paymentwall`**. -You can manage your payment methods by enabling Project from the [Paymentwall website](https://api.paymentwall.com/). + **`pay_method`** **string** -(Payment methods are enabled based on your country IP by default) + **Payment method code (Can be omitted)** -**`merchant_uid`** **\***\*\* ****s****tring\*\* + You can manage your payment methods by enabling Project from the [Paymentwall website](https://api.paymentwall.com/). -**Order ID** + (Payment methods are enabled based on your country IP by default) -Must be unique for each request. + **`merchant_uid`** **\*** **string** -**`amount`** **\***\*\* ****integer\*\* + **Order ID** -**Payment amount** + Must be unique for each request. -Must be an integer (not string) + **`amount`** **\*** **integer** -**`buyer_name`****`*`****`string`** + **Payment amount** -**`Customer name`** + Must be an integer (not string) -**`buyer_email`****`*`****`string`** + **`buyer_name`****`*`****`string`** -**`Customer email address`** + **`Customer name`** -**`currency`****`*`****`string`** + **`buyer_email`****`*`****`string`** -**`Currency`** + **`Customer email address`** -**`bypass`** + **`currency`****`*`****`string`** -**`Paymentwall specific parameter`** + **`Currency`** -- **`widget_code` :** Set this to **t3_1** for Terminal 3 only, Defualt: general payment window -- **`ps` :** Set to enable specific payment method. For available codes, refer to [**Payment system short codes**](https://docs.paymentwall.com/reference/payment-system-shortcodes). Example: `kakaopaykr` = Kakao Pay -- **country_code** : Payment methods are shown based on this code. ([**Country codes**](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)) + **`bypass`** - + **`Paymentwall specific parameter`** - -**Preparing for service** + - **`widget_code` :** Set this to **t3\_1** for Terminal 3 only, Defualt: general payment window + - **`ps` :** Set to enable specific payment method. For available codes, refer to [**Payment system short codes**](https://docs.paymentwall.com/reference/payment-system-shortcodes). Example: `kakaopaykr` = Kakao Pay + - **country\_code** : Payment methods are shown based on this code. ([**Country codes**](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)) + - + + **Preparing for service** + diff --git a/src/content/docs/en/payment-integration-by-pg/payment-gateways/paypal.mdx b/src/content/docs/en/payment-integration-by-pg/payment-gateways/paypal.mdx index f19fd008e..ae507ae79 100644 --- a/src/content/docs/en/payment-integration-by-pg/payment-gateways/paypal.mdx +++ b/src/content/docs/en/payment-integration-by-pg/payment-gateways/paypal.mdx @@ -4,97 +4,96 @@ description: PayPal payment window integration guide --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### 1. Configure PayPal PG settings +## 1. Configure PayPal PG settings Refer to the [**PayPal settings**](../../ready/2.-pg/payment-gateway-settings/undefined-5) page to configure the PG settings. ![]() -### 2. Request payment +## 2. Request payment To open the payment window, call [JavaScript SDK](../../sdk/javascript-sdk/) -IMP.**request_pay**(param, callback). +IMP.**request\_pay**(param, callback). -In PC and mobile browsers, the page is redirected to **m_redirect_url**. +In PC and mobile browsers, the page is redirected to **m\_redirect\_url**. - -```javascript title="Javascript SDK" -IMP.request_pay({ - pg : 'paypal', - pay_method : 'card', - merchant_uid : '{Merchant created Order ID}', // Example: order_no_0001 - name : 'Order name: Test payment request', - amount : 14.20, - currency : 'USD' // default: USD (KRW not supported) - buyer_email : 'iamport@siot.do', - buyer_name : 'John Doe', - buyer_tel : '010-1234-5678', // Required - buyer_addr : 'Shinsa-dong, Gangnam-gu, Seoul', - buyer_postcode : '123-456' - m_redirect_url : '{URL to redirect to after payment approval}' // Example: https://www.my-service.com/payments/complete/mobile -}, function(rsp) { // callback logic - //* ...Omitted... *// -}); -``` + + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "paypal", + pay_method: "card", + merchant_uid: "{Merchant created Order ID}", // Example: order_no_0001 + name: "Order name: Test payment request", + amount: 14.2, + currency: "USD", // default: USD (KRW not supported) + buyer_email: "iamport@siot.do", + buyer_name: "John Doe", + buyer_tel: "010-1234-5678", // Required + buyer_addr: "Shinsa-dong, Gangnam-gu, Seoul", + buyer_postcode: "123-456", + m_redirect_url: "{URL to redirect to after payment approval}", // Example: https://www.my-service.com/payments/complete/mobile + }, + function (rsp) { + // callback logic + //* ...Omitted... *// + }, + ); + ``` -#### + ### Key parameter description -### Key parameter description + **`pg`** **\*** **string** -**`pg`** **\***\*\* ****s****tring\*\* + **PG code** -**PG code** + - If not specified and this is the only PG setting that exists, `default PG` is automatically set. + - If there are multiple PG settings, set to **`paypal`**. -- If not specified and this is the only PG setting that exists, `default PG` is automatically set. -- If there are multiple PG settings, set to **`paypal`**. + **`pay_method`** **\*** **string** -**`pay_method`** **\***\*\* ****s****tring\*\* + **Payment method code** -**Payment method code** +
+

Payment method codes

-
-

Payment method codes

+ - `card` (credit card) +
-- `card` (credit card) + **`merchant_uid`** **\*** **string** -
+ **Order ID** -**`merchant_uid`** **\***\*\* ****s****tring\*\* + Must be unique for each request. -**Order ID** + **`amount`** **\*** **integer** -Must be unique for each request. + **Payment amount** -**`amount`** **\***\*\* ****integer\*\* + Must be an integer (not string)\ + \ + **`currency`****`*`****`string`** -**Payment amount** + **Currency** -Must be an integer (not string)\ -\ -**`currency`****`*`****`string`** + For supported currencies, refer to [PayPal currency codes](https://developer.paypal.com/docs/api/reference/currency-codes/#paypal-account-payments). -**Currency** + **`m_redirect_url`****`*`****`string`** -For supported currencies, refer to [PayPal currency codes](https://developer.paypal.com/docs/api/reference/currency-codes/#paypal-account-payments). + **Redirect URL** -**`m_redirect_url`****`*`****`string`** - -**Redirect URL** - -Required in both PC and mobile to receive payment result. - -
+ Required in both PC and mobile to receive payment result. +
-### Note - -i'mport does not support PayPal subscription payment. + ### Note + i'mport does not support PayPal subscription payment. diff --git a/src/content/docs/en/payment-integration-by-pg/payment-gateways/readme.mdx b/src/content/docs/en/payment-integration-by-pg/payment-gateways/readme.mdx index 36434112e..53b797357 100644 --- a/src/content/docs/en/payment-integration-by-pg/payment-gateways/readme.mdx +++ b/src/content/docs/en/payment-integration-by-pg/payment-gateways/readme.mdx @@ -3,4 +3,4 @@ title: Payment gateways description: Learn how to integrate with each PG. --- -### Learn how to integrate authenticated and non-authenticated payments by PG. +Learn how to integrate authenticated and non-authenticated payments by PG. diff --git a/src/content/docs/en/payment-integration-by-pg/payment-gateways/settlebank.mdx b/src/content/docs/en/payment-integration-by-pg/payment-gateways/settlebank.mdx index 72763a2f5..0bcc5b9e1 100644 --- a/src/content/docs/en/payment-integration-by-pg/payment-gateways/settlebank.mdx +++ b/src/content/docs/en/payment-integration-by-pg/payment-gateways/settlebank.mdx @@ -6,148 +6,150 @@ description: Settlebank payment window integration guide import Codepen from "~/components/gitbook/Codepen.astro"; import ContentRef from "~/components/gitbook/ContentRef.astro"; import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### 1. Configure **Settlebank** PG settings +## 1. Configure **Settlebank** PG settings -Refer to the [**Settlebank settings**](../../ready/2.-pg/payment-gateway-settings/undefined-3) page to configure the PG settings. +Refer to the [**Settlebank settings**](../../ready/2.-pg/payment-gateway-settings/undefined-3) page +to configure the PG settings. ![]() -### 2. Request payment +## 2. Request payment -To open the payment window, call [JavaScript SDK](../../sdk/javascript-sdk/) IMP.**request_pay**(param, callback). +To open the payment window, call [JavaScript SDK](../../sdk/javascript-sdk/) +IMP.**request\_pay**(param, callback). -In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. In mobile browsers, the page is redirected to **m_redirect_url**. +In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. +In mobile browsers, the page is redirected to **m\_redirect\_url**. - -```javascript title="Javascript SDK" -IMP.request_pay({ - pg : 'settle', - pay_method : 'card', - merchant_uid : '{Merchant created Order ID}', // Example: order_no_0001 - name : 'Order name: Test payment request', - amount : 14000, - buyer_email : 'iamport@siot.do', - buyer_name : 'John Doe', - buyer_tel : '010-1234-5678', // Required - buyer_addr : 'Shinsa-dong, Gangnam-gu, Seoul', - company : 'iamport', // Recommended for virtual account payment - buyer_postcode : '123-456', - m_redirect_url : '{Mobile only - URL to redirect to after payment approval}' // Example: https://www.my-service.com/payments/complete/mobile -}, function(rsp) { // callback logic - //* ...Omitted... *// -}); -``` - -#### - -### Key parameter description - -**`pg`** **\***\*\* ****s****tring\*\* - -**PG code** - -- If not specified and this is the only PG setting that exists, `default PG` is automatically set. -- If there are multiple PG settings, set to **`settle`**. - -**`pay_method`** **\***\*\* ****s****tring\*\* + + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "settle", + pay_method: "card", + merchant_uid: "{Merchant created Order ID}", // Example: order_no_0001 + name: "Order name: Test payment request", + amount: 14000, + buyer_email: "iamport@siot.do", + buyer_name: "John Doe", + buyer_tel: "010-1234-5678", // Required + buyer_addr: "Shinsa-dong, Gangnam-gu, Seoul", + company: "iamport", // Recommended for virtual account payment + buyer_postcode: "123-456", + m_redirect_url: "{Mobile only - URL to redirect to after payment approval}", // Example: https://www.my-service.com/payments/complete/mobile + }, + function (rsp) { + // callback logic + //* ...Omitted... *// + }, + ); + ``` -**Payment method code** + ### Key parameter description -
-

Payment method codes

+ **`pg`** **\*** **string** -- `card` (credit card) -- `trans`(instant account transfer) -- `vbank`(virtual account) -- `phone`(mobile micropayment) + **PG code** -
+ - If not specified and this is the only PG setting that exists, `default PG` is automatically set. + - If there are multiple PG settings, set to **`settle`**. -**`merchant_uid`** **\***\*\* ****s****tring\*\* + **`pay_method`** **\*** **string** -**Order ID** + **Payment method code** -Must be unique for each request. +
+

Payment method codes

-**`amount`** **\***\*\* ****integer\*\* + - `card` (credit card) + - `trans`(instant account transfer) + - `vbank`(virtual account) + - `phone`(mobile micropayment) +
-**Payment amount** + **`merchant_uid`** **\*** **string** -Must be an integer (not string) + **Order ID** -**`buyer_tel`****`*`****`string`** + Must be unique for each request. -**Customer phone number** + **`amount`** **\*** **integer** -Required + **Payment amount** -**` company`` `****`string`** + Must be an integer (not string) -**`Company name`** + **`buyer_tel`****`*`****`string`** -Required for virtual account payment + **Customer phone number** - + Required -
+ **`company`` `****`string`** - -#### Not supported + **`Company name`** - + Required for virtual account payment - -#### **You can use i'mport REST API to request payment and schedule payment.** + + -### Request one-time payment + + #### Not supported + -To request a one-time payment, use the key-in REST[ **API POST /subscribe/payments/onetime**](../../api/api/request-non-authenticated-payment-one-time-api). The card information is not saved during this process. + + #### **You can use i'mport REST API to request payment and schedule payment.** -``` -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 -``` + ### Request one-time payment -### Request billing key + initial payment + To request a one-time payment, use the key-in [**REST API POST /subscribe/payments/onetime**](../../api/api/request-non-authenticated-payment-one-time-api). + The card information is not saved during this process. -To request a billing key and initial payment, use the key-in REST [**API POST /subscribe/payments/onetime**](../../api/api/request-non-authenticated-payment-one-time-api). + ```sh + 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 + ``` -- **`customer_uid`** : required for saving the billing key. + ### Request billing key + initial payment -``` -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 -``` + To request a billing key and initial payment, use the key-in REST [**API POST /subscribe/payments/onetime**](../../api/api/request-non-authenticated-payment-one-time-api). -### Request payment with billing key + - **`customer_uid`** : required for saving the billing key. -After successfully getting the billing key and making the initial payment, the billing key is stored on the i'mport server mapped 1:1 with the specified `customer_uid`. For security reasons, the server cannot directly access the billing key. Subsequent payments can be requested by calling the repeat pay REST API ([**POST /subscribe/payments/again**](../../api/api/api)) with the `customer_uid` as follows: + ```sh + 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 + ``` -``` -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 -``` + ### Request payment with billing key - -**Settlebank does not support** [**Request billing key API**](../../api/billing-key-api/api-1)**.** + After successfully getting the billing key and making the initial payment, + the billing key is stored on the i'mport server mapped 1:1 with the specified `customer_uid`. + For security reasons, the server cannot directly access the billing key. + Subsequent payments can be requested by calling + the repeat pay REST API ([**POST /subscribe/payments/again**](../../api/api/api)) + with the `customer_uid` as follows: - + ```sh + 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 + ``` -**For detailed information, refer to:** + + **Settlebank does not support** [**Request billing key API**](../../api/billing-key-api/api-1)**.** + - + **For detailed information, refer to:** - + +
diff --git a/src/content/docs/en/payment-integration-by-pg/payment-gateways/smartro.mdx b/src/content/docs/en/payment-integration-by-pg/payment-gateways/smartro.mdx index e7659d1c7..1ca6e100e 100644 --- a/src/content/docs/en/payment-integration-by-pg/payment-gateways/smartro.mdx +++ b/src/content/docs/en/payment-integration-by-pg/payment-gateways/smartro.mdx @@ -4,78 +4,79 @@ description: Smartro payment window integration guide --- import Details from "~/components/gitbook/Details.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; -### 1. Configure Smartro PG settings +## 1. Configure Smartro PG settings Refer to the [**Smartro settings**](../../ready/2.-pg/payment-gateway-settings/undefined-4) page to configure the PG settings. ![]() -### 2. Request payment +## 2. Request payment To open the payment window, call [JavaScript SDK](../../sdk/javascript-sdk/) -IMP.**request_pay**(param, callback). +IMP.**request\_pay**(param, callback). -In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. In mobile browsers, the page is redirected to **m_redirect_url**. +In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. +In mobile browsers, the page is redirected to **m\_redirect\_url**. - -```javascript title="Javascript SDK" -IMP.request_pay({ - pg : 'smartro', - pay_method : 'card', - merchant_uid : '{Merchant created Order ID}', // Example: order_no_0001 - name : 'Order name: Test payment request', - amount : 14000, - buyer_email : 'iamport@siot.do', - buyer_name : 'John Doe', - buyer_tel : '010-1234-5678', // Required - buyer_addr : 'Shinsa-dong, Gangnam-gu, Seoul', - buyer_postcode : '123-456', - m_redirect_url : '{Mobile only - URL to redirect to after payment approval}' // Example: https://www.my-service.com/payments/complete/mobile -}, function(rsp) { // callback logic - //* ...Omitted... *// -}); -``` - -#### - -### Key parameter description - -**`pg`** **\***\*\* ****s****tring\*\* + + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "smartro", + pay_method: "card", + merchant_uid: "{Merchant created Order ID}", // Example: order_no_0001 + name: "Order name: Test payment request", + amount: 14000, + buyer_email: "iamport@siot.do", + buyer_name: "John Doe", + buyer_tel: "010-1234-5678", // Required + buyer_addr: "Shinsa-dong, Gangnam-gu, Seoul", + buyer_postcode: "123-456", + m_redirect_url: "{Mobile only - URL to redirect to after payment approval}", // Example: https://www.my-service.com/payments/complete/mobile + }, + function (rsp) { + // callback logic + //* ...Omitted... *// + }, + ); + ``` -**PG code** + ### Key parameter description -- If not specified and this is the only PG setting that exists, `default PG` is automatically set. -- If there are multiple PG settings, set to **`smartro`**. + **`pg`** **\*** **string** -**`pay_method`** **\***\*\* ****s****tring\*\* + **PG code** -**Payment method code** + - If not specified and this is the only PG setting that exists, `default PG` is automatically set. + - If there are multiple PG settings, set to **`smartro`**. -
-

Payment method codes

+ **`pay_method`** **\*** **string** -- `card` (credit card) -- `trans`(instant account transfer) -- `vbank`(virtual account) + **Payment method code** -
+
+

Payment method codes

-**`merchant_uid`** **\***\*\* ****s****tring\*\* + - `card` (credit card) + - `trans`(instant account transfer) + - `vbank`(virtual account) +
-**Order ID** + **`merchant_uid`** **\*** **string** -Must be unique for each request. + **Order ID** -**`amount`** **\***\*\* ****integer\*\* + Must be unique for each request. -**Payment amount** + **`amount`** **\*** **integer** -Must be an integer (not string) + **Payment amount** -
+ Must be an integer (not string) +
diff --git a/src/content/docs/en/payment-integration-by-pg/payment-gateways/toss.mdx b/src/content/docs/en/payment-integration-by-pg/payment-gateways/toss.mdx index 21df0a75e..0a6ea6bee 100644 --- a/src/content/docs/en/payment-integration-by-pg/payment-gateways/toss.mdx +++ b/src/content/docs/en/payment-integration-by-pg/payment-gateways/toss.mdx @@ -6,285 +6,294 @@ description: Toss Payments payment window integration guide import Codepen from "~/components/gitbook/Codepen.astro"; import ContentRef from "~/components/gitbook/ContentRef.astro"; import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### 1. Configure Toss Payments PG settings +## 1. Configure Toss Payments PG settings -Refer to the [**Toss Payments settings**](../../ready/2.-pg/payment-gateway-settings/undefined) page to configure the PG settings. +Refer to the [**Toss Payments settings**](../../ready/2.-pg/payment-gateway-settings/undefined) page +to configure the PG settings. ![]() ### 2. Request payment -To open the payment window, call [JavaScript SDK](../../sdk/javascript-sdk/) IMP.**request_pay**(param, callback). +To open the payment window, call [JavaScript SDK](../../sdk/javascript-sdk/) +IMP.**request\_pay**(param, callback). -In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. In mobile browsers, the page is redirected to **m_redirect_url**. +In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. +In mobile browsers, the page is redirected to **m\_redirect\_url**. - -```javascript title="Javascript SDK" -IMP.request_pay({ - pg : 'uplus', - pay_method : 'card', - merchant_uid : '{Merchant created Order ID}', // Example: order_no_0001 - name : 'Order name: Test payment request', - amount : 14000, - buyer_email : 'iamport@siot.do', - buyer_name : 'John Doe', - buyer_tel : '010-1234-5678', - buyer_addr : 'Shinsa-dong, Gangnam-gu, Seoul', - buyer_postcode : '123-456', - m_redirect_url : '{Mobile only - URL to redirect to after payment approval}' // Example: https://www.my-service.com/payments/complete/mobile -}, function(rsp) { // callback logic - //* ...Omitted... *// -}); -``` - -#### - -### Key parameter description - -**`pg`** **\***\*\* ****s****tring\*\* + + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "uplus", + pay_method: "card", + merchant_uid: "{Merchant created Order ID}", // Example: order_no_0001 + name: "Order name: Test payment request", + amount: 14000, + buyer_email: "iamport@siot.do", + buyer_name: "John Doe", + buyer_tel: "010-1234-5678", + buyer_addr: "Shinsa-dong, Gangnam-gu, Seoul", + buyer_postcode: "123-456", + m_redirect_url: "{Mobile only - URL to redirect to after payment approval}", // Example: https://www.my-service.com/payments/complete/mobile + }, + function (rsp) { + // callback logic + //* ...Omitted... *// + }, + ); + ``` -**PG code** + ### Key parameter description -- If not specified and this is the only PG setting that exists, `default PG` is automatically set. -- If there are multiple PG settings, set to **`uplus`**. + **`pg`** **\*** **string** -**`pay_method`** **\***\*\* ****s****tring\*\* + **PG code** -**Payment method code** + - If not specified and this is the only PG setting that exists, `default PG` is automatically set. + - If there are multiple PG settings, set to **`uplus`**. -
-

Payment method codes

+ **`pay_method`** **\*** **string** -- `card` (credit card) -- `trans`(instant account transfer) -- `vbank`(virtual account) -- `phone`(mobile micropayment) + **Payment method code** -
+
+

Payment method codes

-**`merchant_uid`** **\***\*\* ****s****tring\*\* + - `card` (credit card) + - `trans`(instant account transfer) + - `vbank`(virtual account) + - `phone`(mobile micropayment) +
-**Order ID** + **`merchant_uid`** **\*** **string** -Must be unique for each request. + **Order ID** -**`amount`** **\***\*\* ****integer\*\* + Must be unique for each request. -**Payment amount** + **`amount`** **\*** **integer** -Must be an integer (not string). + **Payment amount** -**` escrow`` `****`boolean`** + Must be an integer (not string). -**Ecrow option** + **`escrow`` `****`boolean`** - + **Ecrow option** -
+ +
- -To open non-authenticated payment window, specify the **customer\_uid** parameter. After getting a billing key from this window, you can request payment using the billing key. + + To open non-authenticated payment window, specify the **customer\_uid** parameter. + After getting a billing key from this window, you can request payment using the billing key. -```javascript title="Javascript SDK" -IMP.request_pay( - { - pg: "tosspayments", - pay_method: "card", // only 'card' supported. - merchant_uid: "{Merchant created Order ID}", // Example: issue_billingkey_monthly_0001 - name: "Initial billing key request", - amount: 0, // For display purpose only (no payment approval). - customer_uid: "{Unique ID for the card (billing key)}", // Required (Example: gildong_0001_1234) - buyer_email: "johndoe@gmail.com", - buyer_name: "John Doe", - buyer_tel: "02-1234-1234", - m_redirect_url: "{redirect URL}", // Example: https://www.my-service.com/payments/complete/mobile (for mobile only) - customer_id: "matthew", // Merchant user ID - }, - function (rsp) { - // callback - } -); -``` + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "tosspayments", + pay_method: "card", // only 'card' supported. + merchant_uid: "{Merchant created Order ID}", // Example: issue_billingkey_monthly_0001 + name: "Initial billing key request", + amount: 0, // For display purpose only (no payment approval). + customer_uid: "{Unique ID for the card (billing key)}", // Required (Example: gildong_0001_1234) + buyer_email: "johndoe@gmail.com", + buyer_name: "John Doe", + buyer_tel: "02-1234-1234", + m_redirect_url: "{redirect URL}", // Example: https://www.my-service.com/payments/complete/mobile (for mobile only) + customer_id: "matthew", // Merchant user ID + }, + function (rsp) { + // callback + }, + ); + ``` - -* To request non-authenticated payment, you must set the **MID issued by Toss Payments** in the Admin console. -* Toss Payments **does not process the payment** when issuing the billing key even if you specify an amount. - - - -### Key parameter description + + - To request non-authenticated payment, you must set the **MID issued by Toss Payments** in the Admin console. -**`pg`** **\***\*\* ****s****tring\*\* + - Toss Payments **does not process the payment** + when issuing the billing key even if you specify an amount. + -**PG code** + ### Key parameter description -- If not specified and this is the only PG setting that exists, `default PG` is automatically set. -- If there are multiple PG settings, set to **`tosspayments`**. + **`pg`** **\*** **string** -**`customer_uid`** **\***\*\* ****string\*\* + **PG code** -**Credit card billing key** + - If not specified and this is the only PG setting that exists, `default PG` is automatically set. + - If there are multiple PG settings, set to **`tosspayments`**. -Billing key to be mapped 1:1 with the user-entered credit card information. + **`customer_uid`** **\*** **string** -**`amount`** **\***\*\* ****Integer\*\* + **Credit card billing key** -**Payment amount** + Billing key to be mapped 1:1 with the user-entered credit card information. -Amount to display in the payment window, but actual payment approval is not processed. (To request payment, use the **REST API with the customer_uid**.) + **`amount`** **\*** **Integer** -**`customer_id`** **\***\*\* ****string\*\* + **Payment amount** -**Customer ID** + Amount to display in the payment window, but actual payment approval is not processed. (To request payment, use the **REST API with the customer\_uid**.) -Customer user ID that maps to billing key. If not specified, this is generated by i'mport.\ + **`customer_id`** **\*** **string** -### Request payment with billing key (customer_uid) + **Customer ID** -After successfully getting the billing key, the billing key is **stored on the i'mport server** mapped 1:1 with the specified `customer_uid`. For security reasons, the server cannot directly access the billing key. Subsequent payments can be requested by calling the [**non-authenticated payment request REST API**](../../api/api/api) with the `customer_uid` as follows: + Customer user ID that maps to billing key. If not specified, this is generated by i'mport.\\ -```title="sever-side" -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 -``` + ### Request payment with billing key (customer\_uid) - + After successfully getting the billing key, the billing key is **stored on the i'mport server** + mapped 1:1 with the specified `customer_uid`. + For security reasons, the server cannot directly access the billing key. + Subsequent payments can be requested by calling + the [**non-authenticated payment request REST API**](../../api/api/api) + with the `customer_uid` as follows: - -#### **You can use i'mport REST API to request billing key, request payment, and schedule payment.** + ```sh title="sever-side" + 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 + ``` + - -**MID Issuance** - -When you get an MID from Toss Payments, the **API version** must be **1.4**. - - + + #### **You can use i'mport REST API to request billing key, request payment, and schedule payment.** -### Request one-time payment + + **MID Issuance** -To request a one-time payment, use the key-in REST[ **API POST /subscribe/payments/onetime**](../../api/api/request-non-authenticated-payment-one-time-api). The card information is not saved during this process. + When you get an MID from Toss Payments, the **API version** must be **1.4**. + -``` -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 -``` + ### Request one-time payment -### + To request a one-time payment, use the key-in [**REST API POST /subscribe/payments/onetime**](../../api/api/request-non-authenticated-payment-one-time-api). + The card information is not saved during this process. -### Request billing key + ```sh + 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 + ``` -To request a billing key, use the billing key request REST [**API POST /subscribe/customers/\{customer_uid}**](../../api/billing-key-api/api-1). + ### Request billing key -``` -curl -H "Content-Type: application/json" \ - -X POST -d '{"card_number":"1234-1234-1234-1234", "expiry":"2025-12", "birth":"820213", "pwd_2digit":"00"}' \ - https://api.iamport.kr/subscribe/customers/your-customer-unique-id -``` + To request a billing key, use the billing key request REST [**API POST /subscribe/customers/\{customer\_uid}**](../../api/billing-key-api/api-1). -### Request billing key + initial payment + ```sh + curl -H "Content-Type: application/json" \ + -X POST -d '{"card_number":"1234-1234-1234-1234", "expiry":"2025-12", "birth":"820213", "pwd_2digit":"00"}' \ + https://api.iamport.kr/subscribe/customers/your-customer-unique-id + ``` -To request a billing key and initial payment, use the key-in REST [**API POST /subscribe/payments/onetime**](../../api/api/request-non-authenticated-payment-one-time-api). + ### Request billing key + initial payment -- **`customer_uid`** : required for saving the billing key. + To request a billing key and initial payment, use the key-in REST [**API POST /subscribe/payments/onetime**](../../api/api/request-non-authenticated-payment-one-time-api). -``` -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`** : required for saving the billing key. -### Request payment with billing key + ```sh + 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 + ``` -After successfully getting the billing key and making the initial payment, the billing key is stored on the i'mport server mapped 1:1 with the specified `customer_uid`. For security reasons, the server cannot directly access the billing key. Subsequent payments can be requested by calling the repeat pay REST API ([**POST /subscribe/payments/again**](../../api/api/api)) with the `customer_uid` as follows: + ### Request payment with billing key -``` -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 -``` + After successfully getting the billing key and making the initial payment, + the billing key is stored on the i'mport server mapped 1:1 with the specified `customer_uid`. + For security reasons, the server cannot directly access the billing key. + Subsequent payments can be requested by calling + the repeat pay REST API ([**POST /subscribe/payments/again**](../../api/api/api)) + with the `customer_uid` as follows: -**For detailed information, refer to:** + ```sh + 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 + ``` - + **For detailed information, refer to:** - + +
### 3. Additional functions - -```javascript title="javascript" -display: { - card_quota: [6], // Display up to 6 months installment plans - only_installment: true // Disable immediate pay option -} -``` - -**Parameters** - -- **card_quota :** - - Enable only specified installment months - - `[]`: Only immediate pay - - `2,3,4,5,6`: immediate, 2, 3, 4, 5, 6 month installment plans -- If **only_installment: `true`**, only shows specified months in **`card_quota`**.\ - - -Installment plan option is available only for **KRW 50,000 or more**. - - - - - - -```javascript title="javascript" -card: { - direct: { - code: "367", - quota: 3 + + ```json title="javascript" + { + "display": { + "card_quota": [6], // Display up to 6 months installment plans + "only_installment": true // Disable immediate pay option + } } -} -``` - -**Parameters** - -- **code**: [**Credit card code**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) (**string**) -- **quota**: Installment plan. For immediate, set to 0. (**integer**) - - - - -```javascript title="javascript" -card : { - detail : [ - {card_code:"*", enabled:false}, // Disable all credit cards - {card_code:'366', enabled:true} // Enable specific credit card - ] -} -``` - -**Parameters** + ``` + + **Parameters** + + - **card\_quota :** + - Enable only specified installment months + - `[]`: Only immediate pay + - `2,3,4,5,6`: immediate, 2, 3, 4, 5, 6 month installment plans + + - If **only\_installment: `true`**, only shows specified months in **`card_quota`**.\\ + + + Installment plan option is available only for **KRW 50,000 or more**. + + + + + ```json title="javascript" + { + "card": { + "direct": { + "code": "367", + "quota": 3 + } + } + } + ``` + + **Parameters** + + - **code**: [**Credit card code**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) (**string**) + - **quota**: Installment plan. For immediate, set to 0. (**integer**) + + + + ```json title="javascript" + { + "card": { + "detail": [ + { "card_code": "*", "enabled": false }, // Disable all credit cards + { "card_code": "366", "enabled": true }, // Enable specific credit card + ] + } + } + ``` -- **card_code:** [**Credit card code**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) (**string)** -- **enabled:** Option to enable the credit card (**boolean)** + **Parameters** - + - **card\_code:** [**Credit card code**](https://chaifinance.notion.site/53589280bbc94fab938d93257d452216?v=eb405baf52134b3f90d438e3bf763630) **(string)** + - **enabled:** Option to enable the credit card (**boolean)** + -**Hub-type simple payment** - -Simple payments (Kakao Pay, Naver Pay, etc.) are not supported in Toss Payments payment window. + **Hub-type simple payment** + Simple payments (Kakao Pay, Naver Pay, etc.) are not supported in Toss Payments payment window. diff --git a/src/content/docs/en/payment-integration-by-pg/simple/alipay.mdx b/src/content/docs/en/payment-integration-by-pg/simple/alipay.mdx index 1a3c3fb89..b7efa1598 100644 --- a/src/content/docs/en/payment-integration-by-pg/simple/alipay.mdx +++ b/src/content/docs/en/payment-integration-by-pg/simple/alipay.mdx @@ -3,71 +3,72 @@ title: Alipay description: Alipay simple payment integration guide --- -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; -### 1. Configure Alipay simple payment PG settings +## 1. Configure Alipay simple payment PG settings Refer to the [**Alipay settings**](../../ready/2.-pg/pg/undefined-5) page to configure the PG settings. ![]() -### 2. Request payment +## 2. Request payment To open the payment window, call [JavaScript SDK](../../sdk/javascript-sdk/) -IMP.**request_pay**(param, callback). +IMP.**request\_pay**(param, callback). -After calling `IMP.request_pay(param, callback)`, the page is redirected to **m_redirect_url**. +After calling `IMP.request_pay(param, callback)`, the page is redirected to **m\_redirect\_url**. - -```javascript title="Javascript SDK" -IMP.request_pay({ - pg : 'alipay', - merchant_uid: '{Merchant created Order ID}', //Example: order_no_0001 - name : 'Order name: Test payment', - amount : 1.20, // USD - currency : 'USD' // Default: USD - buyer_email : 'iamport@siot.do', - buyer_name : 'Customer name', - buyer_tel : '010-1234-5678', - buyer_addr : 'Samseong-dong, Gangnam-gu, Seoul', - buyer_postcode : '123-456', - m_redirect_url : "{URL to redirect to after payment approval}" //Example: http://yourservice.com/payments/complete -}, function(rsp) { // callback logic - //* ...Omitted... *// -}); -``` - -#### - -### Key parameter description + + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "alipay", + merchant_uid: "{Merchant created Order ID}", //Example: order_no_0001 + name: "Order name: Test payment", + amount: 1.2, // USD + currency: "USD", // Default: USD + buyer_email: "iamport@siot.do", + buyer_name: "Customer name", + buyer_tel: "010-1234-5678", + buyer_addr: "Samseong-dong, Gangnam-gu, Seoul", + buyer_postcode: "123-456", + m_redirect_url: "{URL to redirect to after payment approval}", //Example: http://yourservice.com/payments/complete + }, + function (rsp) { + // callback logic + //* ...Omitted... *// + }, + ); + ``` -**`pg`** **\***\*\* ****s****tring\*\* + ### Key parameter description -**PG code** + **`pg`** **\*** **string** -- If not specified and this is the only PG setting that exists, `default PG` is automatically set. -- If there are multiple PG settings, set to **`alipay`**. + **PG code** -**`merchant_uid`** **\***\*\* ****s****tring\*\* + - If not specified and this is the only PG setting that exists, `default PG` is automatically set. + - If there are multiple PG settings, set to **`alipay`**. -**Order ID** + **`merchant_uid`** **\*** **string** -Must be unique for each request. + **Order ID** -**` currency`` `****`string`** + Must be unique for each request. -**Currency code** + **`currency`` `****`string`** -Default: USD (KRW supported) + **Currency code** -**`amount`** **\***\*\* ****integer\*\* + Default: USD (KRW supported) -**Payment amount** + **`amount`** **\*** **integer** -Must be an integer (not string) + **Payment amount** - + Must be an integer (not string) + diff --git a/src/content/docs/en/payment-integration-by-pg/simple/kakao-pay.mdx b/src/content/docs/en/payment-integration-by-pg/simple/kakao-pay.mdx index b2314d5e1..3834f5774 100644 --- a/src/content/docs/en/payment-integration-by-pg/simple/kakao-pay.mdx +++ b/src/content/docs/en/payment-integration-by-pg/simple/kakao-pay.mdx @@ -4,150 +4,152 @@ description: Kakao Pay simple payment integration guide --- import Codepen from "~/components/gitbook/Codepen.astro"; -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### 1. Configure Kakao Pay simple payment PG settings +## 1. Configure Kakao Pay simple payment PG settings -Refer to the [**Kakao Pay settings**](../../ready/2.-pg/pg/undefined) page to configure the PG settings. +Refer to the [**Kakao Pay settings**](../../ready/2.-pg/pg/undefined) page +to configure the PG settings. ![]() -### 2. Request payment +## 2. Request payment -To open the payment window, call [JavaScript SDK](../../sdk/javascript-sdk/) IMP.**request_pay**(param, callback). +To open the payment window, call [JavaScript SDK](../../sdk/javascript-sdk/) +IMP.**request\_pay**(param, callback). -In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. In mobile browsers, the page is redirected to **m_redirect_url**. +In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. +In mobile browsers, the page is redirected to **m\_redirect\_url**. - -```javascript title="Javascript SDK" -IMP.request_pay({ - pg : 'kakaopay', - pay_method : 'card', // Can be omitted - merchant_uid: '{Merchant created Order ID}', //Example: order_no_0001 - name : 'Order name: Test payment', - amount : 14000, - buyer_email : 'iamport@siot.do', - buyer_name : 'Customer name', - buyer_tel : '010-1234-5678', - buyer_addr : 'Samseong-dong, Gangnam-gu, Seoul', - buyer_postcode : '123-456', - m_redirect_url : "{URL to redirect to after payment approval}" //Example: http://yourservice.com/payments/complete -}, function(rsp) { // callback logic - //* ...Omitted... *// -}); -``` - -#### + + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "kakaopay", + pay_method: "card", // Can be omitted + merchant_uid: "{Merchant created Order ID}", //Example: order_no_0001 + name: "Order name: Test payment", + amount: 14000, + buyer_email: "iamport@siot.do", + buyer_name: "Customer name", + buyer_tel: "010-1234-5678", + buyer_addr: "Samseong-dong, Gangnam-gu, Seoul", + buyer_postcode: "123-456", + m_redirect_url: "{URL to redirect to after payment approval}", //Example: http://yourservice.com/payments/complete + }, + function (rsp) { + // callback logic + //* ...Omitted... *// + }, + ); + ``` -### Key parameter description + ### Key parameter description -**`pg`** **\***\*\* ****s****tring\*\* + **`pg`** **\*** **string** -**PG code** + **PG code** -- If not specified and this is the only PG setting that exists, `default PG` is automatically set. -- If there are multiple PG settings, set to **`kakaopay`**. + - If not specified and this is the only PG setting that exists, `default PG` is automatically set. + - If there are multiple PG settings, set to **`kakaopay`**. -**`pay_method`** **s****tring** + **`pay_method`** **string** -**Payment method code** + **Payment method code** -Can be omitted + Can be omitted -(Overwritten by the option(credit card or Kakao money) selected in Kakao Pay app) + (Overwritten by the option(credit card or Kakao money) selected in Kakao Pay app) -**`merchant_uid`** **\***\*\* ****s****tring\*\* + **`merchant_uid`** **\*** **string** -**Order ID** + **Order ID** -Must be unique for each request. + Must be unique for each request. -**`amount`** **\***\*\* ****integer\*\* + **`amount`** **\*** **integer** -**Payment amount** + **Payment amount** -Must be an integer (not string) + Must be an integer (not string) - + + - + + To open subscription payment window, specify the **customer\_uid** parameter. - -To open subscription payment window, specify the **customer\_uid** parameter. + + **amount** - -**amount** + - If requesting **both billing key and initial payment**, specify the payment amount. + - If only requesting for billing key, set to **0**. + -- If requesting **both billing key and initial payment**, specify the payment amount. -- If only requesting for billing key, set to **0**. + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "kakaopay", + merchant_uid: "{Merchant created Order ID}", // Example: issue_billingkey_monthly_0001 + name: "Order name: Billing key request test", + amount: 0, // For display purpose only (set actual amount to also request payment approval). + customer_uid: "{Unique ID for the card (billing key)}", // Required (Example: gildong_0001_1234) + buyer_email: "johndoe@gmail.com", + buyer_name: "John Doe", + buyer_tel: "02-1234-1234", + m_redirect_url: "{Mobile only - URL to redirect to after payment approval}", // Example: https://www.my-service.com/payments/complete/mobile + }, + function (rsp) { + if (rsp.success) { + alert("Success"); + } else { + alert("Failed"); + } + }, + ); + ``` - - -```javascript title="Javascript SDK" -IMP.request_pay( - { - pg: "kakaopay", - merchant_uid: "{Merchant created Order ID}", // Example: issue_billingkey_monthly_0001 - name: "Order name: Billing key request test", - amount: 0, // For display purpose only (set actual amount to also request payment approval). - customer_uid: "{Unique ID for the card (billing key)}", // Required (Example: gildong_0001_1234) - buyer_email: "johndoe@gmail.com", - buyer_name: "John Doe", - buyer_tel: "02-1234-1234", - m_redirect_url: "{Mobile only - URL to redirect to after payment approval}", // Example: https://www.my-service.com/payments/complete/mobile - }, - function (rsp) { - if (rsp.success) { - alert("Success"); - } else { - alert("Failed"); - } - } -); -``` - -### Key parameter description + ### Key parameter description -**`pg`** **\***\*\* ****s****tring\*\* + **`pg`** **\*** **string** -**PG code** + **PG code** -- If not specified and this is the only PG setting that exists, `default PG` is automatically set. -- If there are multiple PG settings, set to **`kakaopay`**. + - If not specified and this is the only PG setting that exists, `default PG` is automatically set. + - If there are multiple PG settings, set to **`kakaopay`**. -**`customer_uid`** **\***\*\* ****string\*\* + **`customer_uid`** **\*** **string** -**Credit card billing key** + **Credit card billing key** -Billing key to be mapped 1:1 with the user-entered credit card information. + Billing key to be mapped 1:1 with the user-entered credit card information. -**`amount`** **\***\*\* ****Integer\*\* + **`amount`** **\*** **Integer** -**Payment amount** + **Payment amount** -0: only billing key, **> 0: billing key + initial payment**\ + 0: only billing key, **> 0: billing key + initial payment**\\ -### Request payment with billing key (customer_uid) + ### Request payment with billing key (customer\_uid) -After successfully getting the billing key, the billing key is **stored on the i'mport server** mapped 1:1 with the specified `customer_uid`. For security reasons, the server cannot directly access the billing key. Subsequent payments can be requested by calling the [**non-authenticated payment request REST API**](../../api/api/api) with the `customer_uid` as follows: + After successfully getting the billing key, the billing key is **stored on the i'mport server** + mapped 1:1 with the specified `customer_uid`. + For security reasons, the server cannot directly access the billing key. + Subsequent payments can be requested by calling + the [**non-authenticated payment request REST API**](../../api/api/api) + with the `customer_uid` as follows: -```title="sever-side" -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 -``` - - + ```sh title="sever-side" + 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 + ``` + -**Kakao Pay simple payment is processed in mobile Kakao App.** - + **Kakao Pay simple payment is processed in mobile Kakao App.** diff --git a/src/content/docs/en/payment-integration-by-pg/simple/naver-pay-standard.mdx b/src/content/docs/en/payment-integration-by-pg/simple/naver-pay-standard.mdx index 7d9a3ccf9..8ccd4437a 100644 --- a/src/content/docs/en/payment-integration-by-pg/simple/naver-pay-standard.mdx +++ b/src/content/docs/en/payment-integration-by-pg/simple/naver-pay-standard.mdx @@ -4,353 +4,376 @@ description: "\bNaver Pay simple payment integration guide" --- import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### 1. Configure Naver Pay simple payment PG settings +## 1. Configure Naver Pay simple payment PG settings Refer to the [**Naver Pay settings**](../../ready/2.-pg/pg/undefined-2) page to configure the PG settings. ![]() -### 2. Request payment +## 2. Request payment To open the payment window, call [JavaScript SDK](../../sdk/javascript-sdk/) -IMP.**request_pay**(param, callback). +IMP.**request\_pay**(param, callback). -In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. In mobile browsers, the page is redirected to **m_redirect_url**. +In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. +In mobile browsers, the page is redirected to **m\_redirect\_url**. - -```javascript title="Javascript SDK" -IMP.request_pay({ - pg : 'naverpay', - merchant_uid: '{Merchant created Order ID}', //Example: order_no_0001 - name : 'Order name: Test payment', - amount : 14000, - buyer_email : 'iamport@siot.do', - buyer_name : 'Customer name', - buyer_tel : '010-1234-5678', - buyer_addr : 'Samseong-dong, Gangnam-gu, Seoul', - buyer_postcode : '123-456', - naverUseCfm : '20201001', //Expiration date - naverPopupMode : true, //Enable popup mode - m_redirect_url : "{URL to redirect to after payment approval}", //Example: http://yourservice.com/payments/complete - naverPurchaserName: "Purchaser name", - naverPurchaserBirthday: "20151201", - naverProducts : [{ - "categoryType": "BOOK", - "categoryId": "GENERAL", - "uid": "107922211", - "name": "History of the World", - "payReferrer": "NAVER_BOOK", - "count": 10 - }, - { - "categoryType": "MUSIC", - "categoryId": "CD", - "uid": "299911002", - "name": "BTS", - "payReferrer": "NAVER_BOOK", - "count": 1 - }] -}, function(rsp) { // callback logic - //* ...Omitted... *// -}); -``` + + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "naverpay", + merchant_uid: "{Merchant created Order ID}", //Example: order_no_0001 + name: "Order name: Test payment", + amount: 14000, + buyer_email: "iamport@siot.do", + buyer_name: "Customer name", + buyer_tel: "010-1234-5678", + buyer_addr: "Samseong-dong, Gangnam-gu, Seoul", + buyer_postcode: "123-456", + naverUseCfm: "20201001", //Expiration date + naverPopupMode: true, //Enable popup mode + m_redirect_url: "{URL to redirect to after payment approval}", //Example: http://yourservice.com/payments/complete + naverPurchaserName: "Purchaser name", + naverPurchaserBirthday: "20151201", + naverProducts: [ + { + categoryType: "BOOK", + categoryId: "GENERAL", + uid: "107922211", + name: "History of the World", + payReferrer: "NAVER_BOOK", + count: 10, + }, + { + categoryType: "MUSIC", + categoryId: "CD", + uid: "299911002", + name: "BTS", + payReferrer: "NAVER_BOOK", + count: 1, + }, + ], + }, + function (rsp) { + // callback logic + //* ...Omitted... *// + }, + ); + ``` + + ### Key parameter description + + **`pg`** **\*** **string** + + **PG code** + + - If not specified and this is the only PG setting that exists, `default PG` is automatically set. + - If there are multiple PG settings, set to **`naverpay`**. + + **`merchant_uid`** **\*** **string** + + **Order ID** + + Must be unique for each request. + + **`amount`** **\*** **integer** + + **Payment amount** + + Must be an integer (not string) + + **`naverUseCfm`` `****`string`** + + **Expiration date** (string in yyyyMMdd format, **must be on or after the date of payment**). -#### + - Specify if contract between Naver Pay and merchant requires this value for the specified product type (such as music or performance tickets). -### Key parameter description + **`name`****`*`****`string`** -**`pg`** **\***\*\* ****s****tring\*\* + **`Product name`** -**PG code** + If multiple products are defined in the `naverProducts` parameter, Naver Pay automatically appends `and 2 others`. Hence, set this to the name of the first product (`naverProducts[0].name`) in the array. -- If not specified and this is the only PG setting that exists, `default PG` is automatically set. -- If there are multiple PG settings, set to **`naverpay`**. + **`naverPopupMode`` `****`boolean`** -**`merchant_uid`** **\***\*\* ****s****tring\*\* + **Option to proceed via popup window** -**Order ID** + - If `false`, payment process will proceed via page redirection and you must specify `m_redirect_url`. -Must be unique for each request. + **`m_redirect_url`****`string`** -**`amount`** **\***\*\* ****integer\*\* + **`Redirect URL`** -**Payment amount** + - URL to redirect to after payment approval when using redirection method (`naverPopupMode`: **false**). -Must be an integer (not string) + **`naverPurchaserName`****`string`** -**` naverUseCfm`` `****`string`** + **`Name of the purchaser`** -**Expiration date** (string in yyyyMMdd format, **must be on or after the date of payment**). + **Only required for merchants** who have been instructed + to enter this information at the time of the Naver Pay contract because the product + falls under a high-risk industry. -- Specify if contract between Naver Pay and merchant requires this value for the specified product type (such as music or performance tickets). + **`naverPurchaserBirthday`` `****`string`** -**`name`****`*`****`string`** + **`Purchaser's DOB (yyyyMMdd)`** -**`Product name`** + **Only required for merchants** who have been instructed + to enter this information at the time of the Naver Pay contract because the product + falls under a high-risk industry. -If multiple products are defined in the `naverProducts` parameter, Naver Pay automatically appends `and 2 others`. Hence, set this to the name of the first product (`naverProducts[0].name`) in the array. + **`naverChainId`** **`string`** -**` naverPopupMode`` `****`boolean`** + Enter the value received from Naver Pay only for group-type merchants that operate two or more services with the same partner ID. -**Option to proceed via popup window** + Non-target merchants are not entered. -- If `false`, payment process will proceed via page redirection and you must specify `m_redirect_url`. + **`naverProducts`****`*`****`array`** -**`m_redirect_url`****`string`** + **`Product information`** -**`Redirect URL`** + Same as the **`productItems`** parameter defined in Naver Pay manual. -- URL to redirect to after payment approval when using redirection method (`naverPopupMode`: **false**). + (If omitted, request will fail Naver Pay's inspection.) -**`naverPurchaserName`****`string`** + **`naverProducts`** is an array of objects consisting of the following 6 properties: -**`Name of the purchaser`** + - **`categoryType`** (Required): Refer to [NPay Developers](https://developer.pay.naver.com/docs/v2/api#etc-etc_product) -**Only required for merchants** who have been instructed -to enter this information at the time of the Naver Pay contract because the product -falls under a high-risk industry. + - **`categoryId`** (Required): Refer to [NPay Developers](https://developer.pay.naver.com/docs/v2/api#etc-etc_product) -**` naverPurchaserBirthday`` `****`string`** + - **`uid`** (Required) : Merchant created product ID in general. Refer to [NPay Developers](https://developer.pay.naver.com/docs/v2/api#etc-etc_product) -**`Purchaser's DOB (yyyyMMdd)`** + - **`name`** (Required) : Product name -**Only required for merchants** who have been instructed -to enter this information at the time of the Naver Pay contract because the product -falls under a high-risk industry. + - **`count`** (Required) : Selected quantity -**`naverChainId`** **`string`** + - **`sellerId`** (Optional) : Unique ID used by merchants to identify sub-merchants (uppercase and lowercase letters and numbers allowed) + - Only required for mail order brokerage merchants who have been instructed to enter this information at the time of the Naver Pay contract. + - Not required for other merchants. -Enter the value received from Naver Pay only for group-type merchants that operate two or more services with the same partner ID. + - **`payReferrer`** (Optional) : Funnel path to Naver Pay. Enter only when in partnership agreement with other services on the Naver platform. + Refer to [NPay Developers](https://developer.pay.naver.com/docs/v2/api#etc-etc_product_ref). + -Non-target merchants are not entered. + + ## Request billing key -\ -**`naverProducts`****`*`****`array`** + ```ts title="JavaScript SDK" + IMP.request_pay( + { + pg: "naverpay", + customer_uid: "gildong_0001_1234", //billing, required. + merchant_uid: "{Merchant created Order ID}", //Example: order_monthly_0001 + name: "Slim plan (montly)", + amount: 14000, // For display only, no payment approval + buyer_email: "iamport@siot.do", + buyer_name: "Customer name", + buyer_tel: "010-1234-5678", //Required + buyer_addr: "Samseong-dong, Gangnam-gu, Seoul", + buyer_postcode: "123-456", + naverProductCode: "Recurring payment product code", + naverPopupMode: true, //Enable popup mode + m_redirect_url: "{URL to redirect to after registration}", //Example: http://yourservice.com/payments/complete + }, + function (rsp) { + // callback logic + //* ...Omitted... *// + }, + ); + ``` -**`Product information`** + ### Key parameter description -Same as the **`productItems`** parameter defined in Naver Pay manual. + **`pg`** **\*** **string** -(If omitted, request will fail Naver Pay's inspection.) + **PG code** -> **`naverProducts`** is an array of objects consisting of the following 6 properties: -> -> - **`categoryType`** (Required): Refer to [NPay Developers](https://developer.pay.naver.com/docs/v2/api#etc-etc_product) -> - **`categoryId`** (Required): Refer to [NPay Developers](https://developer.pay.naver.com/docs/v2/api#etc-etc_product) -> - **`uid`** (Required) : Merchant created product ID in general. Refer to [NPay Developers](https://developer.pay.naver.com/docs/v2/api#etc-etc_product) -> - **`name`** (Required) : Product name -> - **`count`** (Required) : Selected quantity -> - **`sellerId`** (Optional) : Unique ID used by merchants to identify sub-merchants (uppercase and lowercase letters and numbers allowed) -> - Only required for mail order brokerage merchants who have been instructed to enter this information at the time of the Naver Pay contract. -> - Not required for other merchants. -> - **`payReferrer`** (Optional) : Funnel path to Naver Pay. Enter only when in partnership agreement with other services on the Naver platform. Refer to [NPay Developers](https://developer.pay.naver.com/docs/v2/api#etc-etc_product_ref). + - If not specified and this is the only PG setting that exists, `default PG` is automatically set. + - If there are multiple PG settings, set to **`naverpay`**. - + **`customer_uid`****`*`****`string`** - -## Request billing key + **`Billing key`** -```javascript title="JavaScript SDK" -IMP.request_pay( - { - pg: "naverpay", - customer_uid: "gildong_0001_1234", //billing, required. - merchant_uid: "{Merchant created Order ID}", //Example: order_monthly_0001 - name: "Slim plan (montly)", - amount: 14000, // For display only, no payment approval - buyer_email: "iamport@siot.do", - buyer_name: "Customer name", - buyer_tel: "010-1234-5678", //Required - buyer_addr: "Samseong-dong, Gangnam-gu, Seoul", - buyer_postcode: "123-456", - naverProductCode: "Recurring payment product code", - naverPopupMode: true, //Enable popup mode - m_redirect_url: "{URL to redirect to after registration}", //Example: http://yourservice.com/payments/complete - }, - function (rsp) { - // callback logic - //* ...Omitted... *// - } -); -``` + - Must be specified for subscription/recurring payment registration. If omitted, processed as general payment. + - After registration, you can use the key to request recurring payment approval. -### + **`merchant_uid`** **\*** **string** -### Key parameter description + **Order ID** -**`pg`** **\***\*\* ****s****tring\*\* + Must be unique for each request. -**PG code** + **`amount`** **\*** **integer** -- If not specified and this is the only PG setting that exists, `default PG` is automatically set. -- If there are multiple PG settings, set to **`naverpay`**. + **Payment amount** -**`customer_uid`****`*`****`string`** + Must be an integer (not string) -**`Billing key`** + **Payment approval is not processed** **during + subscription/recurring payment registration**. -- Must be specified for subscription/recurring payment registration. If omitted, processed as general payment. -- After registration, you can use the key to request recurring payment approval. + **`naverProductCode`****`*`****`string`** -**`merchant_uid`** **\***\*\* ****s****tring\*\* + **Product code managed by the merchant** -**Order ID** + - Used to prevent the same customer from registering duplicate payments for the same product. + - The default value is a randomly generated value allowing for duplicate payment registration. To avoid this, specify a value. -Must be unique for each request. + **`name`****`*`****`string`** -**`amount`** **\***\*\* ****integer\*\* + **`Product name`** -**Payment amount** + If multiple products are defined in the `naverProducts` parameter, Naver Pay automatically appends `and 2 others`. + Hence, set this to the name of the first product (`naverProducts[0].name`) in the array. -Must be an integer (not string) + **`naverPopupMode`` `****`boolean`** -**Payment approval is not processed**** during -subscription/recurring payment registration**. + **Option to proceed via popup window** -**`naverProductCode`****`*`****`string`** + - If `false`, payment process will proceed via page redirection and you must specify `m_redirect_url`. -**Product code managed by the merchant** + **`m_redirect_url`****`string`** -- Used to prevent the same customer from registering duplicate payments for the same product. -- The default value is a randomly generated value allowing for duplicate payment registration. To avoid this, specify a value. + **`Redirect URL`** -**`name`****`*`****`string`** + - URL to redirect to after payment approval when using redirection method (`naverPopupMode`: **false**). -**`Product name`** + ## **Request payment** -If multiple products are defined in the `naverProducts` parameter, Naver Pay automatically appends `and 2 others`. Hence, set this to the name of the first product (`naverProducts[0].name`) in the array. + After getting a billing key, you can request the initial payment or schedule future payment + by calling the payment approval API using the registered **`customer_uid`**. -**` naverPopupMode`` `****`boolean`** + ### **How to request payment** -**Option to proceed via popup window** + To request a payment approval, call the REST API [**/subscribe/payments/again**](../../api/api/api). -- If `false`, payment process will proceed via page redirection and you must specify `m_redirect_url`. + - `customer_uid` : `customer_uid` specified for subscription/recurring payment registration. -**`m_redirect_url`****`string`** + - `merchant_uid` : Merchant managed order number. -**`Redirect URL`** + - `amount` : Payment amount (can be different from the amount specified for subscription/recurring payment registration). -- URL to redirect to after payment approval when using redirection method (`naverPopupMode`: **false**). + - `tax_free` : Tax-free amount (out of total `amount`). Default value is 0. -## **Request payment** + - `name` : Order name. -After getting a billing key, you can request the initial payment or schedule future payment by calling the payment approval API using the registered **`customer_uid`**. + - `extra.naverUseCfm` : Expiration date (string in yyyyMMdd format, must be same as the date of payment or later). + - Specify if contract between Naver Pay and merchant requires this value for the specified product type (such as music or performance tickets). -### **How to request payment** + ```json title="sample json" + { + "customer_uid": "gildong_0001_1234", + "merchant_uid": "order_monthly_0002", // Cannot be reused + "amount": 10000, + "name": "Slim plan (initial payment)", + "extra": { + "naverUseCfm": "20201001" + } + } + ``` -To request a payment approval, call the REST API [**/subscribe/payments/again**](../../api/api/api). + ```txt title="form-urlencoded" + customer_uid={Unique key to identify the customer}&merchant_uid={Order number}&amount=10000&name=Slim plan (initial payment)&extra[naverUseCfm]=20201001 + ``` -- `customer_uid` : `customer_uid` specified for subscription/recurring payment registration. -- `merchant_uid` : Merchant managed order number. -- `amount` : Payment amount (can be different from the amount specified for subscription/recurring payment registration). -- `tax_free` : Tax-free amount (out of total `amount`). Default value is 0. -- `name` : Order name. -- `extra.naverUseCfm` : Expiration date (string in yyyyMMdd format, must be same as the date of payment or later). - - Specify if contract between Naver Pay and merchant requires this value for the specified product type (such as music or performance tickets). + ### Schedule payments -```json title="sample json" -{ - "customer_uid": "gildong_0001_1234", - "merchant_uid": "order_monthly_0002", // Cannot be reused - "amount": 10000, - "name": "Slim plan (initial payment)", - "extra": { - "naverUseCfm": "20201001" - } -} -``` + To schedule payments, call the REST API [**/subscribe/payments/schedule**](../../api/subscription-payment-api/schedule-payment-api). -```title="form-urlencoded" -customer_uid={Unique key to identify the customer}&merchant_uid={Order number}&amount=10000&name=Slim plan (initial payment)&extra[naverUseCfm]=20201001 -``` + - `customer_uid` : `customer_uid` specified for subscription/recurring payment registration. -### + - `schedules` : Payment schedule object array (one or more schedules). + - `merchant_uid` : Merchant managed order number. -### Schedule payments + - `schedule_at` : Scheduled time of payment (UNIX timestamp) -To schedule payments, call the REST API[ **/subscribe/payments/schedule**](../../api/subscription-payment-api/schedule-payment-api). + - `amount` : Payment amount (can be different from the amount specified for subscription/recurring payment registration). -- `customer_uid` : `customer_uid` specified for subscription/recurring payment registration. -- `schedules` : Payment schedule object array (one or more schedules). - - `merchant_uid` : Merchant managed order number. - - `schedule_at` : Scheduled time of payment (UNIX timestamp) - - `amount` : Payment amount (can be different from the amount specified for subscription/recurring payment registration). - - `extra.naverUseCfm` : Expiration date (string in yyyyMMdd format, must be same as the date of payment or later). - - Specify if contract between Naver Pay and merchant requires this value for the specified product type (such as music or performance tickets). + - `extra.naverUseCfm` : Expiration date (string in yyyyMMdd format, must be same as the date of payment or later). + - Specify if contract between Naver Pay and merchant requires this value for the specified product type (such as music or performance tickets). -```json title="sample json" -{ - "customer_uid": "gildong_0001_1234", - "schedules": [ + ```json title="sample json" { - "merchant_uid": "order_monthly_0003", // Cannot be reused - "schedule_at": 1519862400, - "amount": 10000, - "extra": { - "naverUseCfm": "20201001" - } + "customer_uid": "gildong_0001_1234", + "schedules": [ + { + "merchant_uid": "order_monthly_0003", // Cannot be reused + "schedule_at": 1519862400, + "amount": 10000, + "extra": { + "naverUseCfm": "20201001" + } + } + ] } - ] -} -``` + ``` -```title="form-urlencoded" -customer_uid={Unique key to identify the customer}&schedules[0][merchant_uid]={Oder number}&schedules[0][schedule_at]={Scheduled time of payment UNIX timestamp}&schedules[0][amount]=10000&schedules[0][extra][naverUseCfm]=20201001 -``` - - + ```txt title="form-urlencoded" + customer_uid={Unique key to identify the customer}&schedules[0][merchant_uid]={Oder number}&schedules[0][schedule_at]={Scheduled time of payment UNIX timestamp}&schedules[0][amount]=10000&schedules[0][extra][naverUseCfm]=20201001 + ``` + -### Note - -#### Must return error message as-is + ### Note -After calling the payment window (IMP.request_pay), if the payment process is interrupted by clicking the “Cancel” button at the bottom of the payment window, or if payment fails due to reasons such as insufficient balance, exceeding the limit, or less than 100 won, the reason for failure (error_msg) is included in the payment result (response object/query parameter) returned via callback (popup mode) or m_redirect_url (redirect mode). This error message must be returned to the user as it is without processing. If you do not comply with this rule, Naver Pay will request for correction during inspection. + #### Must return error message as-is -Example: Assuming that error_msg is “Insufficient balance”, it should not be returned to the user as “Payment failed. Reason for failure:" + "Insufficient balance". + After calling the payment window (IMP.request\_pay), + if the payment process is interrupted by clicking the “Cancel” button at the bottom of the payment window, + or if payment fails due to reasons such as insufficient balance, exceeding the limit, + or less than 100 won, the reason for failure (error\_msg) is included in the payment result (response object/query parameter) + returned via callback (popup mode) or m\_redirect\_url (redirect mode). + This error message must be returned to the user as it is without processing. + If you do not comply with this rule, Naver Pay will request for correction during inspection. -**Must implement exception handling for payment amount under 100 won** + Example: Assuming that error\_msg is “Insufficient balance”, + it should not be returned to the user as “Payment failed. Reason for failure:" + "Insufficient balance". -You must implement exception handling for payment amount less than 100 won, the minimum amount for Naver Pay. + **Must implement exception handling for payment amount under 100 won** -Example: Must return a 'less than minimum amount (100 won)' error message to the user. + You must implement exception handling for payment amount less than 100 won, + the minimum amount for Naver Pay. + Example: Must return a 'less than minimum amount (100 won)' error message to the user.
-

Payment cancellation

+

Payment cancellation

-To call the i'mport cancel payment API `POST` [**`/payments/cancel`**](../../api/payment-api/cancel-payment-api) , you must specify the following parameters. (**If omitted, Naver Pay's inspection will fail**) + To call the i'mport cancel payment API `POST` [**`/payments/cancel`**](../../api/payment-api/cancel-payment-api) , you must specify the following parameters. (**If omitted, Naver Pay's inspection will fail**) -- **`extra.requester`** : API requestor - - **`customer`** - - **`admin`**(default) -- **`reason`**: reason for cancellation + - **`extra.requester`** : API requestor + - **`customer`** + - **`admin`**(default) -**Example (json)** + - **`reason`**: reason for cancellation -```javascript -{ - "imp_uid" : "imp_123412341234", // i'mport transaction ID - "amount" : 3000, // Refund amount - "reason": "Reson for cancellation", // Must be the actual reason - "extra" : { - "requester" : "customer" - } -} -``` + **Example (json)** -**Example (form-urlencoded)** + ```json + { + "imp_uid": "imp_123412341234", // i'mport transaction ID + "amount": 3000, // Refund amount + "reason": "Reson for cancellation", // Must be the actual reason + "extra": { + "requester": "customer" + } + } + ``` -``` -imp_uid=imp_123412341234&amount=3000&extra[requester]=customer -``` + **Example (form-urlencoded)** + ```txt + imp_uid=imp_123412341234&amount=3000&extra[requester]=customer + ```
diff --git a/src/content/docs/en/payment-integration-by-pg/simple/payco.mdx b/src/content/docs/en/payment-integration-by-pg/simple/payco.mdx index 715a9a48f..6ebd63241 100644 --- a/src/content/docs/en/payment-integration-by-pg/simple/payco.mdx +++ b/src/content/docs/en/payment-integration-by-pg/simple/payco.mdx @@ -5,157 +5,158 @@ description: PAYCO simple payment integration guide import Codepen from "~/components/gitbook/Codepen.astro"; import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### 1. Configure PAYCO simple payment PG settings +## 1. Configure PAYCO simple payment PG settings -Refer to the [**PAYCO settings**](../../ready/2.-pg/pg/undefined-3) page to configure the PG settings. +Refer to the [**PAYCO settings**](../../ready/2.-pg/pg/undefined-3) page +to configure the PG settings. ![]() -### 2. Request payment +## 2. Request payment -To open the payment window, call [JavaScript SDK](../../sdk/javascript-sdk/) IMP.**request_pay**(param, callback). +To open the payment window, call [JavaScript SDK](../../sdk/javascript-sdk/) +IMP.**request\_pay**(param, callback). -In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. In mobile browsers, the page is redirected to **m_redirect_url**. +In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. +In mobile browsers, the page is redirected to **m\_redirect\_url**. - -```javascript title="Javascript SDK" -IMP.request_pay({ - pg : 'payco', - merchant_uid: '{Merchant created Order ID}', //Example: order_no_0001 - name : 'Order name: Test payment', - amount : 14000, - buyer_email : 'iamport@siot.do', - buyer_name : 'Customer name', - buyer_tel : '010-1234-5678', - buyer_addr : 'Samseong-dong, Gangnam-gu, Seoul', - buyer_postcode : '123-456' -}, function(rsp) { // callback logic - //* ...Omitted... *// -}); -``` - -#### - -### Key parameter description - -**`pg`** **\***\*\* ****s****tring\*\* - -**PG code** - -- If not specified and this is the only PG setting that exists, `default PG` is automatically set. -- If there are multiple PG settings, set to **`payco`**. - -**`pay_method`** **s****tring** + + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "payco", + merchant_uid: "{Merchant created Order ID}", //Example: order_no_0001 + name: "Order name: Test payment", + amount: 14000, + buyer_email: "iamport@siot.do", + buyer_name: "Customer name", + buyer_tel: "010-1234-5678", + buyer_addr: "Samseong-dong, Gangnam-gu, Seoul", + buyer_postcode: "123-456", + }, + function (rsp) { + // callback logic + //* ...Omitted... *// + }, + ); + ``` -**Payment method code** + ### Key parameter description -
-

Payment method codes

+ **`pg`** **\*** **string** -- `card` (credit card) -- `trans`(instant account transfer) -- `vbank`(virtual account) + **PG code** -
+ - If not specified and this is the only PG setting that exists, `default PG` is automatically set. + - If there are multiple PG settings, set to **`payco`**. -**`merchant_uid`** **\***\*\* ****s****tring\*\* + **`pay_method`** **string** -**Order ID** + **Payment method code** -Must be unique for each request. +
+

Payment method codes

-**`buyer_tel`****`*`****`string`** + - `card` (credit card) + - `trans`(instant account transfer) + - `vbank`(virtual account) +
-**Customer phone number** + **`merchant_uid`** **\*** **string** -Required + **Order ID** -**`amount`** **\***\*\* ****integer\*\* + Must be unique for each request. -**Payment amount** + **`buyer_tel`****`*`****`string`** -Must be an integer (not string) + **Customer phone number** - + Required -
+ **`amount`** **\*** **integer** - -To open subscription payment window, specify the **customer\_uid** parameter. + **Payment amount** - -**amount** + Must be an integer (not string) -- For display purpose only. No payment approval. + + - + + To open subscription payment window, specify the **customer\_uid** parameter. -```javascript title="Javascript SDK" -IMP.request_pay( - { - pg: "payco", - merchant_uid: "{Merchant created Order ID}", // Example: issue_billingkey_monthly_0001 - name: "Order name: Billing key request test", - amount: 0, // For display purpose only - customer_uid: "{Unique ID for the card (billing key)}", // Required (Example: gildong_0001_1234) - buyer_email: "johndoe@gmail.com", - buyer_name: "John Doe", - buyer_tel: "02-1234-1234", - }, - function (rsp) { - if (rsp.success) { - alert("Success"); - } else { - alert("Failed"); - } - } -); -``` + + **amount** -### Key parameter description + - For display purpose only. No payment approval. + -**`pg`** **\***\*\* ****s****tring\*\* + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "payco", + merchant_uid: "{Merchant created Order ID}", // Example: issue_billingkey_monthly_0001 + name: "Order name: Billing key request test", + amount: 0, // For display purpose only + customer_uid: "{Unique ID for the card (billing key)}", // Required (Example: gildong_0001_1234) + buyer_email: "johndoe@gmail.com", + buyer_name: "John Doe", + buyer_tel: "02-1234-1234", + }, + function (rsp) { + if (rsp.success) { + alert("Success"); + } else { + alert("Failed"); + } + }, + ); + ``` -**PG code** + ### Key parameter description -- If not specified and this is the only PG setting that exists, `default PG` is automatically set. -- If there are multiple PG settings, set to **`payco`**. + **`pg`** **\*** **string** -**`customer_uid`** **\***\*\* ****string\*\* + **PG code** -**Credit card billing key** + - If not specified and this is the only PG setting that exists, `default PG` is automatically set. + - If there are multiple PG settings, set to **`payco`**. -Billing key to be mapped 1:1 with the user-entered credit card information. + **`customer_uid`** **\*** **string** -**`amount`** **\***\*\* ****Integer\*\* + **Credit card billing key** -**Payment amount** + Billing key to be mapped 1:1 with the user-entered credit card information. -For display purpose only. No payment approval. + **`amount`** **\*** **Integer** -### Request payment with billing key (customer_uid) + **Payment amount** -After successfully getting the billing key, the billing key is **stored on the i'mport server** mapped 1:1 with the specified `customer_uid`. For security reasons, the server cannot directly access the billing key. Subsequent payments can be requested by calling the [**non-authenticated payment request REST API**](../../api/api/api) with the `customer_uid` as follows: + For display purpose only. No payment approval. -```title="sever-side" -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 -``` + ### Request payment with billing key (customer\_uid) - + After successfully getting the billing key, the billing key is **stored on the i'mport server** + mapped 1:1 with the specified `customer_uid`. + For security reasons, the server cannot directly access the billing key. + Subsequent payments can be requested by calling + the [**non-authenticated payment request REST API**](../../api/api/api) + with the `customer_uid` as follows: - -**Not supported.** + ```sh title="sever-side" + 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 + ``` + -
+ + **Not supported.** +
diff --git a/src/content/docs/en/payment-integration-by-pg/simple/readme.mdx b/src/content/docs/en/payment-integration-by-pg/simple/readme.mdx index 873d7591f..09cc87ea4 100644 --- a/src/content/docs/en/payment-integration-by-pg/simple/readme.mdx +++ b/src/content/docs/en/payment-integration-by-pg/simple/readme.mdx @@ -3,4 +3,4 @@ title: Simple payments description: Learn how to integrate simple payments. --- -### Learn how to integrate simple payments. +Learn how to integrate simple payments. diff --git a/src/content/docs/en/payment-integration-by-pg/simple/toss.mdx b/src/content/docs/en/payment-integration-by-pg/simple/toss.mdx index d12e0814d..61a94bd2f 100644 --- a/src/content/docs/en/payment-integration-by-pg/simple/toss.mdx +++ b/src/content/docs/en/payment-integration-by-pg/simple/toss.mdx @@ -4,86 +4,85 @@ description: Toss simple payment integration guide --- import Codepen from "~/components/gitbook/Codepen.astro"; -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -### 1. Configure Toss simple payment PG settings +## 1. Configure Toss simple payment PG settings -Refer to the [**Toss simple pay settings**](../../ready/2.-pg/pg/undefined-1) page to configure the PG settings. +Refer to the [**Toss simple pay settings**](../../ready/2.-pg/pg/undefined-1) page +to configure the PG settings. ![]() -### 2. Request payment +## 2. Request payment -To open the payment window, call [JavaScript SDK](../../sdk/javascript-sdk/) IMP.**request_pay**(param, callback). +To open the payment window, call [JavaScript SDK](../../sdk/javascript-sdk/) +IMP.**request\_pay**(param, callback). -In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. In mobile browsers, the page is redirected to **m_redirect_url**. +In PC browsers, **callback** is invoked after calling `IMP.request_pay(param, callback)`. +In mobile browsers, the page is redirected to **m\_redirect\_url**. - -```javascript title="Javascript SDK" -IMP.request_pay({ - pg : 'tosspay', - pay_method : 'card', - merchant_uid: '{Merchant created Order ID}', //Example: order_no_0001 - name : 'Order name: Test payment', - amount : 14000, - buyer_email : 'iamport@siot.do', - buyer_name : 'Customer name', - buyer_tel : '010-1234-5678', - buyer_addr : 'Samseong-dong, Gangnam-gu, Seoul', - buyer_postcode : '123-456', - m_redirect_url : "{URL to redirect to after payment approval}" //Example: http://yourservice.com/payments/complete -}, function(rsp) { // callback logic - //* ...Omitted... *// -}); -``` + + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "tosspay", + pay_method: "card", + merchant_uid: "{Merchant created Order ID}", //Example: order_no_0001 + name: "Order name: Test payment", + amount: 14000, + buyer_email: "iamport@siot.do", + buyer_name: "Customer name", + buyer_tel: "010-1234-5678", + buyer_addr: "Samseong-dong, Gangnam-gu, Seoul", + buyer_postcode: "123-456", + m_redirect_url: "{URL to redirect to after payment approval}", //Example: http://yourservice.com/payments/complete + }, + function (rsp) { + // callback logic + //* ...Omitted... *// + }, + ); + ``` -#### + ### Key parameter description -### Key parameter description + **`pg`** **\*** **string** -**`pg`** **\***\*\* ****s****tring\*\* + **PG code** -**PG code** + - If not specified and this is the only PG setting that exists, `default PG` is automatically set. + - If there are multiple PG settings, set to **`tosspay`**. -- If not specified and this is the only PG setting that exists, `default PG` is automatically set. -- If there are multiple PG settings, set to **`tosspay`**. + **`pay_method`** **string** -**`pay_method`** **s****tring** + **Payment method code** -**Payment method code** + - `card` (credit card) + - `trans` (instant account transfer) -- `card` (credit card) -- `trans` (instant account transfer) + **`name`** **\*** **string** -**`name`** **\***\*\* ****s****tring\*\* + **Product name** -**Product name** + **`merchant_uid`** **\*** **string** -**`merchant_uid`** **\***\*\* ****s****tring\*\* + **Order ID** -**Order ID** + Must be unique for each request. -Must be unique for each request. + **`amount`** **\*** **integer** -**`amount`** **\***\*\* ****integer\*\* + **Payment amount** -**Payment amount** + Must be an integer (not string) -Must be an integer (not string) - - - - + + -**Toss simple payment is processed in mobile Toss App.** - + **Toss simple payment is processed in mobile Toss App.** diff --git a/src/content/docs/en/readme/get-started.mdx b/src/content/docs/en/readme/get-started.mdx index dc0739b90..920dbe61b 100644 --- a/src/content/docs/en/readme/get-started.mdx +++ b/src/content/docs/en/readme/get-started.mdx @@ -5,20 +5,23 @@ description: Learn about i'mport online payments. import Figure from "~/components/Figure.astro"; -### i'mport provides payment window integration through JavaScript SDK so that anyone can easily implement complex PG payment integration specifications. +## i'mport provides payment window integration through JavaScript SDK so that anyone can easily implement complex PG payment integration specifications. - Simply add the library with 2 lines of code to complete the setup for payment window integration. -- Easily integrate the payment window using the JavaScript SDK that most developers are familiar with. + +- Easily integrate the payment window using the JavaScript SDK + that most developers are familiar with.
-### Changes to PGs and payment methods are also processed simply by changing the relevant parameter values. +## Changes to PGs and payment methods are also processed simply by changing the relevant parameter values. -- You can easily add and change payment methods and PGs by modifying the JavaScript input parameters. +- You can easily add and change payment methods and PGs + by modifying the JavaScript input parameters.
-### We provide all payment references and integration samples and guides for various programming languages in sync with the latest trends. +## We provide all payment references and integration samples and guides for various programming languages in sync with the latest trends. - JAVA - PHP @@ -28,12 +31,9 @@ import Figure from "~/components/Figure.astro"; - Golang - ... -
+
-### All payment data is protected in real time through monitoring so that you can use it with confidence. +## All payment data is protected in real time through monitoring so that you can use it with confidence. - Encryption of all payment data - Blocking of any attempts to forge/falsify payment data @@ -41,18 +41,22 @@ import Figure from "~/components/Figure.astro"; ![]() -### By storing payment progress cycles in real time, you can accurately analyze the reason and cause of payment failures. +## By storing payment progress cycles in real time, you can accurately analyze the reason and cause of payment failures. - When payment widow is active - When payment window is closed by the user - When payment is complete -### You can easily cancel payments for any PG payment method. +## You can easily cancel payments for any PG payment method. + +- Regardless of the payment method, you can use the same cancellation API + to cancel any PG payment transaction. -- Regardless of the payment method, you can use the same cancellation API to cancel any PG payment transaction. - We support full and partial cancellations. -- You no longer have to waste development resources for implementing specific cancellation integration for each payment method. -### i'mport offers three value propositions. +- You no longer have to waste development resources + for implementing specific cancellation integration for each payment method. + +## i'mport offers three value propositions. ![](/gitbook-assets/en/spaces_hTv8JEzyM5h4cYcL5StH_uploads_Lpr4komSQxZ7IYGwpmqG_image.png) diff --git a/src/content/docs/en/ready/2-pg/payment-gateway-settings/nhn-kcp-1.mdx b/src/content/docs/en/ready/2-pg/payment-gateway-settings/nhn-kcp-1.mdx index 45a63ca2a..7289a47b1 100644 --- a/src/content/docs/en/ready/2-pg/payment-gateway-settings/nhn-kcp-1.mdx +++ b/src/content/docs/en/ready/2-pg/payment-gateway-settings/nhn-kcp-1.mdx @@ -59,7 +59,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; ### Test environment setup 1. [i'mport Admin console](https://admin.iamport.kr)→ **Payment integration** → **Test settings** → Select PG (**KG INICIS**) → **KG INICIS** -> **Add** -2. **Subscription payment test `INIBillTst` Settings ->** **Save** +2. **Subscription payment test `INIBillTst` Settings -> Save**
diff --git a/src/content/docs/en/ready/2-pg/payment-gateway-settings/nhn-kcp.mdx b/src/content/docs/en/ready/2-pg/payment-gateway-settings/nhn-kcp.mdx index 91a7b17a7..eaaa71dce 100644 --- a/src/content/docs/en/ready/2-pg/payment-gateway-settings/nhn-kcp.mdx +++ b/src/content/docs/en/ready/2-pg/payment-gateway-settings/nhn-kcp.mdx @@ -63,7 +63,7 @@ Enter the live **Site Code** issued by KCP at contract signing as follows: **How to get a Batch Payment Group ID** \ Log in to the KCP merchant admin page with the **site code issued by KCP for subscription payments**, enter a desired user name and a password to get a private certificate.\ \- To get a certificate: [https://admin8.kcp.co.kr](https://admin8.kcp.co.kr/) > Log in with subscription payment ID > Customer service > Certificate issuance > KCP private certificate > Click Request NHN KCP certificate > Confirm Username (random input)\ - \- To get a group ID: [https://admin8.kcp.co.kr](https://admin8.kcp.co.kr/) > Log in with subscription payment ID > Payments > **General payment > Credit card** **> Batch payment ID >** Get group ID + \- To get a group ID: [https://admin8.kcp.co.kr](https://admin8.kcp.co.kr/) > Log in with subscription payment ID > Payments > **General payment > Credit card > Batch payment ID >** Get group ID @@ -97,7 +97,7 @@ Enter the **Site Code** and **Site Key** issued by KCP at contract signing as fo **How to get a Batch Payment Group ID** \ Log in to the KCP merchant admin page with the **site code issued by KCP for recurring payments**, and then enter a desired user name and a password to get a private certificate.\ \- To get a certificate: [https://admin8.kcp.co.kr](https://admin8.kcp.co.kr/) > Log in with recurring payment ID > Customer service > Certificate issuance > KCP private certificate > Click Request NHN KCP certificate > Confirm Username (random input)\ - \- To get a group ID: [https://admin8.kcp.co.kr](https://admin8.kcp.co.kr/) > Log in with recurring payment ID > Payments > **General payment > Credit card** **> Batch payment ID >** Get group ID + \- To get a group ID: [https://admin8.kcp.co.kr](https://admin8.kcp.co.kr/) > Log in with recurring payment ID > Payments > **General payment > Credit card > Batch payment ID >** Get group ID diff --git a/src/content/docs/en/ready/2-pg/payment-gateway-settings/undefined-1.mdx b/src/content/docs/en/ready/2-pg/payment-gateway-settings/undefined-1.mdx index ff4a3663b..4aec19ac1 100644 --- a/src/content/docs/en/ready/2-pg/payment-gateway-settings/undefined-1.mdx +++ b/src/content/docs/en/ready/2-pg/payment-gateway-settings/undefined-1.mdx @@ -101,7 +101,7 @@ as a pingback parameter. You can check this result by adding the `extension=true` query parameter when querying payment. -```jsx +```tsx GET http://api.iamport.kr/payments/{imp_uid}?extension=true ``` diff --git a/src/content/docs/en/ready/2-pg/payment-gateway-settings/undefined-2.mdx b/src/content/docs/en/ready/2-pg/payment-gateway-settings/undefined-2.mdx index dc88c3621..a0062591e 100644 --- a/src/content/docs/en/ready/2-pg/payment-gateway-settings/undefined-2.mdx +++ b/src/content/docs/en/ready/2-pg/payment-gateway-settings/undefined-2.mdx @@ -17,15 +17,9 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; 1. [포트원 관리자 콘솔](https://admin.portone.io/) → **결제 연동** → **테스트 연동 관리** → **다날** → **다날** 선택 → **추가** 2. 자동으로 기재되는 CPID 정보 확인 후 **저장** -
+
-
+
@@ -36,20 +30,11 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; 2. **다날 → ****다날**** 선택 → 추가** 3. 카드사 심사 완료 후 다날에서 발급받은 실상점 정보 기재 후 저장 -
+
-
+
-
+
@@ -63,15 +48,9 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; 1. [포트원 관리자 콘솔](https://admin.portone.io/) → **결제 연동** → **테스트 연동 관리** → **다날** → **다날** 선택 → **추가** 2. 자동으로 기재되는 CPID 정보 확인 후 **저장** -
+
-
+
**실 환경 구성방법** @@ -79,20 +58,11 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; 2. **다날 → ****다날**** 선택 → 추가** 3. 카드사 심사 완료 후 다날에서 발급받은 실상점 정보 기재 후 저장 -
+
-
+
-
+
@@ -116,15 +86,9 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; -
+
-
+
@@ -135,20 +99,11 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; 2. **다날** → **다날** **휴대폰결제** 선택 → **추가** 3. 카드사 심사 완료 후 다날에서 발급받은 실상점 정보로 기재후 저장 -
+
-
+
-
+
@@ -171,15 +126,9 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; -
+
-
+
@@ -190,20 +139,11 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; 2. **다날** → **다날** **휴대폰결제** 선택 → **추가** 3. 카드사 심사 완료 후 다날에서 발급받은 실상점 정보로 기재후 저장 -
+
-
+
-
+
diff --git a/src/content/docs/en/ready/2-pg/readme.mdx b/src/content/docs/en/ready/2-pg/readme.mdx index 8ee2848fe..66f91702f 100644 --- a/src/content/docs/en/ready/2-pg/readme.mdx +++ b/src/content/docs/en/ready/2-pg/readme.mdx @@ -7,7 +7,7 @@ description: >- import Figure from "~/components/Figure.astro"; -After creating an i'mport account, go to the Admin page and click **Payment integration** **->** +After creating an i'mport account, go to the Admin page and click **Payment integration ->** **Test settings** tab and select the target PG. You can configure PG-specific test settings from the **Test settings** tab. diff --git a/src/content/docs/en/ready/readme.mdx b/src/content/docs/en/ready/readme.mdx index 125ecc0a3..6cc47bc37 100644 --- a/src/content/docs/en/ready/readme.mdx +++ b/src/content/docs/en/ready/readme.mdx @@ -35,7 +35,7 @@ Click **Sign up** from the pages below to create an account. ## 2. Set up PG -After creating an i'mport account, go to the Admin page and click **Payment integration** **->** +After creating an i'mport account, go to the Admin page and click **Payment integration ->** **Test settings** tab and select the target PG. You can configure PG-specific test settings from the **Test settings** tab. diff --git a/src/content/docs/en/result/webhook.mdx b/src/content/docs/en/result/webhook.mdx index 0843aa4bc..85025cda2 100644 --- a/src/content/docs/en/result/webhook.mdx +++ b/src/content/docs/en/result/webhook.mdx @@ -61,7 +61,7 @@ Set the **notice\_url** parameter when calling (If this parameter is specified, the Admin console's **webhook setting is ignored**.) -```javascript title="client-side" +```ts title="client-side" function requestPay() { // IMP.request_pay(param, callback) call payment window IMP.request_pay({ @@ -137,7 +137,7 @@ Sample code of receiving a POST request to webhook endpoint URL Create an endpoint to receive the webhook event's `POST` request as follows and then parse, verify, and save the payment information. -```javascript title="server-side" +```ts title="server-side" app.use(bodyParser.json()); ... // Route POST request to "/iamport-webhook" diff --git a/src/content/docs/en/sdk/javascript-sdk/identity-verification-request-parameters.mdx b/src/content/docs/en/sdk/javascript-sdk/identity-verification-request-parameters.mdx index e62b6b4dd..a60d9045e 100644 --- a/src/content/docs/en/sdk/javascript-sdk/identity-verification-request-parameters.mdx +++ b/src/content/docs/en/sdk/javascript-sdk/identity-verification-request-parameters.mdx @@ -13,7 +13,7 @@ description: '' > **`min_age`** ******integer** > -> **Minimum age allowed** **for verification** +> **Minimum age allowed for verification** > > Only supported by Danal PG verification diff --git a/src/content/docs/en/sdk/javascript-sdk/rps.mdx b/src/content/docs/en/sdk/javascript-sdk/rps.mdx index 4b38f190f..47d8df6a1 100644 --- a/src/content/docs/en/sdk/javascript-sdk/rps.mdx +++ b/src/content/docs/en/sdk/javascript-sdk/rps.mdx @@ -5,13 +5,13 @@ description: "" import Codepen from "~/components/gitbook/Codepen.astro"; import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; ## Parameters -> **`pg`** **\***\*\* ****string\*\* +> **`pg`** **\*** **string** > > **PG code** > @@ -19,7 +19,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; > > [**PG codes**](../../tips/pg-codes) -> **`pay_method`** **\***\*\* ****string\*\* +> **`pay_method`** **\*** **string** > > **Payment method code** > @@ -61,7 +61,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; > > - [x] Requires pre-approval from PG -> **`merchant_uid`** **\***\*\* ****string\*\* +> **`merchant_uid`** **\*** **string** > > **Merchant order ID** > @@ -75,7 +75,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; > > - Max 16 bytes -> **`amount`** **\***\*\* ** **number\*\* +> **`amount`** **\*** **number** > > **Amount** > @@ -209,9 +209,9 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; -```javascript title="javascript" +```ts title="javascript" display: { - card_quota: [6] // Display up to 6 months installment plans + card_quota: [6]; // Display up to 6 months installment plans } ``` @@ -233,7 +233,7 @@ Example of allowing up to **3 months**** install -```javascript title="javascript" +```ts title="javascript" card: { direct: { code: "367", @@ -263,12 +263,12 @@ Example of direct call to **Hyundai Card** modul -```javascript title="javascript" -card : { - detail : [ - {card_code:"*", enabled:false}, // Disable all credit cards - {card_code:'366', enabled:true} // Enable specific credit card - ] +```ts title="javascript" +card: { + detail: [ + { card_code: "*", enabled: false }, // Disable all credit cards + { card_code: "366", enabled: true }, // Enable specific credit card + ]; } ``` diff --git a/src/content/docs/en/sdk/javascript-sdk/sdk-release-note.mdx b/src/content/docs/en/sdk/javascript-sdk/sdk-release-note.mdx index f37723511..934a29d22 100644 --- a/src/content/docs/en/sdk/javascript-sdk/sdk-release-note.mdx +++ b/src/content/docs/en/sdk/javascript-sdk/sdk-release-note.mdx @@ -46,7 +46,7 @@ To redirect to a page after payment process is completed, set `popup : false` wh Added support for multiple PG modules in identity verification due to the addition of the `INICIS-Credit card identity verification` method to the existing `Danal-Mobile identity verification` method. You can also get multiple CPIDs, one for each website, for 'Danal-Mobile identity verification', and specify a module via `pg: danal.{Danal CPID}`. -```javascript title="Danal-mobile identity verification" +```ts title="Danal-mobile identity verification" IMP.certification({ pg: "danal", // danal or danal.{Danal CPID}, other parameters omitted ... @@ -60,7 +60,7 @@ Added support for multiple PG modules in identity verification due to the additi }); ``` -```javascript title="Inicis-credit card identity verification" +```ts title="Inicis-credit card identity verification" // popup : true by default in both PC/mobile // PC : applies popup mode regardless of popup parameter setting (INICIS policy) // Mobile : for redirection mode, set popup : false and m_redirect_url is required @@ -89,7 +89,7 @@ This is caused by the page being rendered by restoring the DOM element in the st To open the payment window as pop-up, set `popup: true` when calling `IMP.request_pay(param, callback)`. The `callback` function is called after the payment process is completed. Previous versions only support the page redirection mode. -```javascript title="javascript popup mode" +```ts title="javascript popup mode" // Set popup : true and callback, other parameters omitted IMP.request_pay({ pg: "paypal", @@ -105,7 +105,7 @@ To open the payment window as pop-up, set `popup: true` when calling `IMP.reques }); ``` -```javascript title="javascript redirect mode" +```ts title="javascript redirect mode" // Set m_redirect_url (popup : false by default, not set explicitly) IMP.request_pay({ pg: "paypal", @@ -119,7 +119,7 @@ To open the payment window as pop-up, set `popup: true` when calling `IMP.reques To redirect to a page after identity verification, set the target page's URL in `m_redirect_url` when calling `IMP.certification`. Previous versions only support the callback mode. For more information about using the redirection mode, refer to the [Mobile identity verification](../../etc/phone/) page. -```javascript title="javascript (popup mode)" +```ts title="javascript (popup mode)" // Set popup : true IMP.certification({ merchant_uid : "verification transaction ID", @@ -133,7 +133,7 @@ To redirect to a page after identity verification, set the target page's URL in }); ``` -```javascript title="javascript redirect mode" +```ts title="javascript redirect mode" // Set m_redirect_url (popup : false by default, not set explicitly) IMP.certification({ merchant_uid : "verification transaction ID" diff --git a/src/content/docs/en/sdk/javascript-sdk/undefined-1.mdx b/src/content/docs/en/sdk/javascript-sdk/undefined-1.mdx index 9c50589f5..5d2e73a7c 100644 --- a/src/content/docs/en/sdk/javascript-sdk/undefined-1.mdx +++ b/src/content/docs/en/sdk/javascript-sdk/undefined-1.mdx @@ -150,7 +150,7 @@ Properties that are returned vary by PG or payment method. > **`paid_at`** **\*** **string** > -> **Payment approved at** **(UNIX timestamp)** +> **Payment approved at (UNIX timestamp)** **What is UNIX timestamp?** @@ -195,7 +195,7 @@ Shows business name on the contract. Some PGs may return null and requires addit > **`vbank_date`** **string** > -> **Virtual account expiration** **(UNIX timestamp)** +> **Virtual account expiration (UNIX timestamp)** ```json title="Sample response object" { diff --git a/src/content/docs/en/tips/confirm-process.mdx b/src/content/docs/en/tips/confirm-process.mdx index ad866b825..dc5a0b382 100644 --- a/src/content/docs/en/tips/confirm-process.mdx +++ b/src/content/docs/en/tips/confirm-process.mdx @@ -65,7 +65,7 @@ Send a technical support request email ([support@iamport.kr](mailto:support@iamp To use Confirm Process, you must define the **confirm\_url** parameter and set it to the merchant endpoint URL when calling the request\_pay() function. -```jsx title="JavaScript SDK" +```tsx title="JavaScript SDK" ... confirm_url : ‘Merchant EndPoint URL’, ... diff --git a/src/content/docs/en/tips/flow.mdx b/src/content/docs/en/tips/flow.mdx index 1a029e8fe..3156d2cfd 100644 --- a/src/content/docs/en/tips/flow.mdx +++ b/src/content/docs/en/tips/flow.mdx @@ -9,10 +9,7 @@ import Figure from "~/components/Figure.astro"; ## 1. Direct PG integration payment flow -
+
> For direct PG integration, payment request processing generally involves **2 transactions**. > @@ -23,9 +20,6 @@ import Figure from "~/components/Figure.astro"; ## 2. i'mport payment flow -
+
> For i'mport payment integration, the complex PG integration module part is handled by i'mport so that you can easily process payment without additional effort. diff --git a/src/content/docs/en/tips/tax.mdx b/src/content/docs/en/tips/tax.mdx index 4ade80d7b..26c113cf1 100644 --- a/src/content/docs/en/tips/tax.mdx +++ b/src/content/docs/en/tips/tax.mdx @@ -5,13 +5,13 @@ description: Learn how to set the tax-free amount when requesting a payment. import Hint from "~/components/Hint.astro"; -This guide is intended for businesses who sell tax-free products and services as stipulated in [**Article 26 of the VAT Act (Supply of Tax-Free Goods or Services)**](https://txsi.hometax.go.kr/docs/customer/comment/comment_jomun_main_internet.jsp?node_id=null&lawid=001571&jomunkey=0026005&lawnm=%EB%B6%80%EA%B0%80%EA%B0%80%EC%B9%98%EC%84%B8%EB%B2%95&jomun_nm=%EC%A0%9C26%EC%A1%B0%E3%80%90%EC%9E%AC%ED%99%94%20%EB%98%90%EB%8A%94%20%EC%9A%A9%EC%97%AD%EC%9D%98%20%EA%B3%B5%EA%B8%89%EC%97%90%20%EB%8C%80%ED%95%9C%20%EB%A9%B4%EC%84%B8%E3%80%91&public_ilja=20161220&public_no=14387). +This guide is intended for businesses who sell tax-free products and services as stipulated in [**Article 26 of the VAT Act (Supply of Tax-Free Goods or Services)**](https://txsi.hometax.go.kr/docs/customer/comment/comment_jomun_main_internet.jsp?node_id=null\&lawid=001571\&jomunkey=0026005\&lawnm=%EB%B6%80%EA%B0%80%EA%B0%80%EC%B9%98%EC%84%B8%EB%B2%95\&jomun_nm=%EC%A0%9C26%EC%A1%B0%E3%80%90%EC%9E%AC%ED%99%94%20%EB%98%90%EB%8A%94%20%EC%9A%A9%EC%97%AD%EC%9D%98%20%EA%B3%B5%EA%B8%89%EC%97%90%20%EB%8C%80%ED%95%9C%20%EB%A9%B4%EC%84%B8%E3%80%91\&public_ilja=20161220\&public_no=14387). If you are a general business that does not sell the goods or services specified in this article, you may skip this guide. A 10% VAT is automatically applied through the PG or credit card company for such businesses. -### Getting Tax-free Merchant ID through PG Contract +### Getting Tax-free Merchant ID through PG Contract If you are a **tax-free business**, you can submit a business registration card to prove your tax-exempt status when signing a PG contract. You will receive a merchant ID that allows you to set the following tax-free related properties when requesting a payment using `IMP.`**`request_pay`**. @@ -23,10 +23,9 @@ and tax-free amounts. They set the `tax_free` property to indicate the tax-free order. -**Merchant ID** - -The name of the merchant ID issued after applying for and signing a PG contract varies by PG. For example, the merchant ID for KG INICIS is `Merchant ID (MID)`, Kakao Pay is `Member Code (CID)`, and Naver Pay is `Partner ID`. + **Merchant ID** + The name of the merchant ID issued after applying for and signing a PG contract varies by PG. For example, the merchant ID for KG INICIS is `Merchant ID (MID)`, Kakao Pay is `Member Code (CID)`, and Naver Pay is `Partner ID`. #### Three types of merchant IDs can be issued according to your business's tax-exempt status. @@ -54,15 +53,14 @@ The name of the merchant ID issued after applying for and signing a PG contract > property. -**`tax_free` is required** - -For transactions using combination merchant ID, you must set **both the `amount` and `tax_free` properties**. If the `tax_free` value is missing, an error may occur when you attempt to open the payment page for some PGs. + **`tax_free` is required** -Note that KG Inicis **processes all payments as tax-free**; if you change to a combination merchant ID while using a taxable merchant ID, all previous taxed payments are converted to tax-free payments. + For transactions using combination merchant ID, you must set **both the `amount` and `tax_free` properties**. If the `tax_free` value is missing, an error may occur when you attempt to open the payment page for some PGs. + Note that KG Inicis **processes all payments as tax-free**; if you change to a combination merchant ID while using a taxable merchant ID, all previous taxed payments are converted to tax-free payments. -### Applying tax_free setting +### Applying tax\_free setting The scenarios in this section show how to set the `amount` and `tax_free` properties when purchasing tax-free and/or taxable items. @@ -78,7 +76,7 @@ as follows: For a purchase of one seedling, set the total payment amount to 11,000 won, and the total tax-free amount to 11,000 won as follows: -```javascript title="JavaScript" +```ts title="JavaScript" IMP.request_pay({ amount: 11000, // total payment amount tax_free: 11000, // total tax-free amount @@ -100,7 +98,7 @@ follows (terminology may vary by PG): For a purchase of one vase, set the total payment amount to 22,000 won, and the total tax-free amount to 0 won as follows: -```javascript title="JavaScript" +```ts title="JavaScript" IMP.request_pay({ amount: 22000, // total payment amount tax_free: 0, // total tax-free amount @@ -122,7 +120,7 @@ calculated as follows: For a purchase of 3 seedlings and 1 vase, set the total payment amount to 55,000 (33,000 + 22,000) won, and the total tax-free amount to 33,000 won (for seedlings) as follows: -```javascript title="JavaScript" +```ts title="JavaScript" IMP.request_pay({ amount: 55000, // total payment amount tax_free: 33000, // total tax-free amount diff --git a/src/content/docs/ko/api/billing-key-api/delete-billing-key-api.mdx b/src/content/docs/ko/api/billing-key-api/delete-billing-key-api.mdx index 236c0a3f1..7fba4d005 100644 --- a/src/content/docs/ko/api/billing-key-api/delete-billing-key-api.mdx +++ b/src/content/docs/ko/api/billing-key-api/delete-billing-key-api.mdx @@ -154,7 +154,7 @@ code값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -163,7 +163,7 @@ code값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/billing-key-api/get-billing-key-api.mdx b/src/content/docs/ko/api/billing-key-api/get-billing-key-api.mdx index 21c01fdeb..97e298b37 100644 --- a/src/content/docs/ko/api/billing-key-api/get-billing-key-api.mdx +++ b/src/content/docs/ko/api/billing-key-api/get-billing-key-api.mdx @@ -141,7 +141,7 @@ code값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -150,7 +150,7 @@ code값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/billing-key-api/get-billing-keys-api.mdx b/src/content/docs/ko/api/billing-key-api/get-billing-keys-api.mdx index 11f10873e..44cf17213 100644 --- a/src/content/docs/ko/api/billing-key-api/get-billing-keys-api.mdx +++ b/src/content/docs/ko/api/billing-key-api/get-billing-keys-api.mdx @@ -143,7 +143,7 @@ code값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -152,7 +152,7 @@ code값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/billing-key-api/get-scheduled-payments-api.mdx b/src/content/docs/ko/api/billing-key-api/get-scheduled-payments-api.mdx index 1e17af63e..cbbde416d 100644 --- a/src/content/docs/ko/api/billing-key-api/get-scheduled-payments-api.mdx +++ b/src/content/docs/ko/api/billing-key-api/get-scheduled-payments-api.mdx @@ -176,7 +176,7 @@ code값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -185,7 +185,7 @@ code값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/billing-key-api/save-billing-key-api.mdx b/src/content/docs/ko/api/billing-key-api/save-billing-key-api.mdx index 8dba70ce0..41de2857a 100644 --- a/src/content/docs/ko/api/billing-key-api/save-billing-key-api.mdx +++ b/src/content/docs/ko/api/billing-key-api/save-billing-key-api.mdx @@ -208,7 +208,7 @@ code값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/cash-receipt-api/get-cash-receipt-api.mdx b/src/content/docs/ko/api/cash-receipt-api/get-cash-receipt-api.mdx index f88835675..2837e49de 100644 --- a/src/content/docs/ko/api/cash-receipt-api/get-cash-receipt-api.mdx +++ b/src/content/docs/ko/api/cash-receipt-api/get-cash-receipt-api.mdx @@ -101,7 +101,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -110,7 +110,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/cash-receipt-api/get-external-cash-receipt-api.mdx b/src/content/docs/ko/api/cash-receipt-api/get-external-cash-receipt-api.mdx index b6f69d918..597a00d0a 100644 --- a/src/content/docs/ko/api/cash-receipt-api/get-external-cash-receipt-api.mdx +++ b/src/content/docs/ko/api/cash-receipt-api/get-external-cash-receipt-api.mdx @@ -104,7 +104,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -113,7 +113,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/cash-receipt-api/issue-cash-receipt-api.mdx b/src/content/docs/ko/api/cash-receipt-api/issue-cash-receipt-api.mdx index e9ed1c6f0..fef9cbb8e 100644 --- a/src/content/docs/ko/api/cash-receipt-api/issue-cash-receipt-api.mdx +++ b/src/content/docs/ko/api/cash-receipt-api/issue-cash-receipt-api.mdx @@ -220,7 +220,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -229,7 +229,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -238,7 +238,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -247,7 +247,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/cash-receipt-api/issue-external-cash-receipt-api.mdx b/src/content/docs/ko/api/cash-receipt-api/issue-external-cash-receipt-api.mdx index 6edf1b7cb..6600f2721 100644 --- a/src/content/docs/ko/api/cash-receipt-api/issue-external-cash-receipt-api.mdx +++ b/src/content/docs/ko/api/cash-receipt-api/issue-external-cash-receipt-api.mdx @@ -221,7 +221,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -230,7 +230,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -239,7 +239,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -248,7 +248,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/cash-receipt-api/revoke-cash-receipt-api.mdx b/src/content/docs/ko/api/cash-receipt-api/revoke-cash-receipt-api.mdx index cb4ae6567..aad72a061 100644 --- a/src/content/docs/ko/api/cash-receipt-api/revoke-cash-receipt-api.mdx +++ b/src/content/docs/ko/api/cash-receipt-api/revoke-cash-receipt-api.mdx @@ -119,7 +119,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -128,7 +128,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -137,7 +137,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -146,7 +146,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/cash-receipt-api/revoke-external-cash-receipt-api.mdx b/src/content/docs/ko/api/cash-receipt-api/revoke-external-cash-receipt-api.mdx index 95367d9cf..4576a8905 100644 --- a/src/content/docs/ko/api/cash-receipt-api/revoke-external-cash-receipt-api.mdx +++ b/src/content/docs/ko/api/cash-receipt-api/revoke-external-cash-receipt-api.mdx @@ -118,7 +118,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -127,7 +127,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -136,7 +136,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -145,7 +145,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -154,7 +154,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/escrow-api/get-logis-api.mdx b/src/content/docs/ko/api/escrow-api/get-logis-api.mdx index 7d4b9604c..a7e3e026c 100644 --- a/src/content/docs/ko/api/escrow-api/get-logis-api.mdx +++ b/src/content/docs/ko/api/escrow-api/get-logis-api.mdx @@ -93,7 +93,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -102,7 +102,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -111,7 +111,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -120,7 +120,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/escrow-api/save-logis-api.mdx b/src/content/docs/ko/api/escrow-api/save-logis-api.mdx index 239c70c6d..521fe5499 100644 --- a/src/content/docs/ko/api/escrow-api/save-logis-api.mdx +++ b/src/content/docs/ko/api/escrow-api/save-logis-api.mdx @@ -140,7 +140,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -149,7 +149,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -158,7 +158,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -167,7 +167,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -176,7 +176,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -185,7 +185,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/escrow-api/update-logis-api.mdx b/src/content/docs/ko/api/escrow-api/update-logis-api.mdx index 9d063578e..18162c172 100644 --- a/src/content/docs/ko/api/escrow-api/update-logis-api.mdx +++ b/src/content/docs/ko/api/escrow-api/update-logis-api.mdx @@ -83,7 +83,7 @@ logis는 하위 필드가 모두 필수입니다. sender, receiver의 각 세부 ### Responses -```javascript +```ts { // Response } @@ -92,7 +92,7 @@ logis는 하위 필드가 모두 필수입니다. sender, receiver의 각 세부 -```javascript +```ts { // Response } @@ -101,7 +101,7 @@ logis는 하위 필드가 모두 필수입니다. sender, receiver의 각 세부 -```javascript +```ts { // Response } @@ -110,7 +110,7 @@ logis는 하위 필드가 모두 필수입니다. sender, receiver의 각 세부 -```javascript +```ts { // Response } @@ -119,7 +119,7 @@ logis는 하위 필드가 모두 필수입니다. sender, receiver의 각 세부 -```javascript +```ts { // Response } @@ -128,7 +128,7 @@ logis는 하위 필드가 모두 필수입니다. sender, receiver의 각 세부 -```javascript +```ts { // Response } @@ -137,7 +137,7 @@ logis는 하위 필드가 모두 필수입니다. sender, receiver의 각 세부 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/identity-verification-api/confirm-otp-api.mdx b/src/content/docs/ko/api/identity-verification-api/confirm-otp-api.mdx index 2bcb00ffa..1e31299eb 100644 --- a/src/content/docs/ko/api/identity-verification-api/confirm-otp-api.mdx +++ b/src/content/docs/ko/api/identity-verification-api/confirm-otp-api.mdx @@ -148,7 +148,7 @@ ISO8601 형식의 문자열. YYYY-MM-DD 10자리 **개인 고유구분 식별키 (`CI`)** -**`unique_in_site`** ****string** +**`unique_in_site` **string** **고객사 내 개인 고유구분 식별키 (`DI`)** @@ -174,7 +174,7 @@ ISO8601 형식의 문자열. YYYY-MM-DD 10자리 -```javascript +```ts { // Response } @@ -183,7 +183,7 @@ ISO8601 형식의 문자열. YYYY-MM-DD 10자리 -```javascript +```ts { // Response } @@ -192,7 +192,7 @@ ISO8601 형식의 문자열. YYYY-MM-DD 10자리 -```javascript +```ts { // Response } @@ -201,7 +201,7 @@ ISO8601 형식의 문자열. YYYY-MM-DD 10자리 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/identity-verification-api/delete-certification-api.mdx b/src/content/docs/ko/api/identity-verification-api/delete-certification-api.mdx index 7f043ce5d..c1327e4d3 100644 --- a/src/content/docs/ko/api/identity-verification-api/delete-certification-api.mdx +++ b/src/content/docs/ko/api/identity-verification-api/delete-certification-api.mdx @@ -132,7 +132,7 @@ ISO8601 형식의 문자열. YYYY-MM-DD 10자리 **개인 고유구분 식별키 (`CI`)** -**`unique_in_site`** ****string** +**`unique_in_site` **string** **고객사 내 개인 고유구분 식별키 (`DI`)** @@ -158,7 +158,7 @@ ISO8601 형식의 문자열. YYYY-MM-DD 10자리 -```javascript +```ts { // Response } @@ -167,7 +167,7 @@ ISO8601 형식의 문자열. YYYY-MM-DD 10자리 -```javascript +```ts { // Response } @@ -176,7 +176,7 @@ ISO8601 형식의 문자열. YYYY-MM-DD 10자리 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/identity-verification-api/get-certification-api.mdx b/src/content/docs/ko/api/identity-verification-api/get-certification-api.mdx index 3ad7e3df7..c37430dac 100644 --- a/src/content/docs/ko/api/identity-verification-api/get-certification-api.mdx +++ b/src/content/docs/ko/api/identity-verification-api/get-certification-api.mdx @@ -132,7 +132,7 @@ ISO8601 형식의 문자열. YYYY-MM-DD 10자리 **개인 고유구분 식별키 (`CI`)** -**`unique_in_site`** ****string** +**`unique_in_site` **string** **고객사 내 개인 고유구분 식별키 (`DI`)** @@ -158,7 +158,7 @@ ISO8601 형식의 문자열. YYYY-MM-DD 10자리 -```javascript +```ts { // Response } @@ -167,7 +167,7 @@ ISO8601 형식의 문자열. YYYY-MM-DD 10자리 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/identity-verification-api/request-otp-api.mdx b/src/content/docs/ko/api/identity-verification-api/request-otp-api.mdx index 8b6b883b0..ff0adcb14 100644 --- a/src/content/docs/ko/api/identity-verification-api/request-otp-api.mdx +++ b/src/content/docs/ko/api/identity-verification-api/request-otp-api.mdx @@ -125,7 +125,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -134,7 +134,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -143,7 +143,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/miscellaneous-api/benepia/get-benepia-point-api.mdx b/src/content/docs/ko/api/miscellaneous-api/benepia/get-benepia-point-api.mdx index 4357fd619..4f71797d8 100644 --- a/src/content/docs/ko/api/miscellaneous-api/benepia/get-benepia-point-api.mdx +++ b/src/content/docs/ko/api/miscellaneous-api/benepia/get-benepia-point-api.mdx @@ -81,7 +81,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -90,7 +90,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/miscellaneous-api/benepia/pay-benepia-point-api.mdx b/src/content/docs/ko/api/miscellaneous-api/benepia/pay-benepia-point-api.mdx index 236375e0f..500b11c1b 100644 --- a/src/content/docs/ko/api/miscellaneous-api/benepia/pay-benepia-point-api.mdx +++ b/src/content/docs/ko/api/miscellaneous-api/benepia/pay-benepia-point-api.mdx @@ -399,7 +399,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -408,7 +408,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/miscellaneous-api/codes/all-bank-codes-api.mdx b/src/content/docs/ko/api/miscellaneous-api/codes/all-bank-codes-api.mdx index 4967f1783..a252a186f 100644 --- a/src/content/docs/ko/api/miscellaneous-api/codes/all-bank-codes-api.mdx +++ b/src/content/docs/ko/api/miscellaneous-api/codes/all-bank-codes-api.mdx @@ -36,7 +36,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같은 오류 메세지를 포함합니다 -**`response`** **`(Array[StandardCodeAnnotation], optional)`**** ** +**`response`** **`(Array[StandardCodeAnnotation], optional)`** @@ -57,7 +57,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -66,7 +66,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/miscellaneous-api/codes/get-all-card-codes-api.mdx b/src/content/docs/ko/api/miscellaneous-api/codes/get-all-card-codes-api.mdx index a0f1f8ffb..8939e634d 100644 --- a/src/content/docs/ko/api/miscellaneous-api/codes/get-all-card-codes-api.mdx +++ b/src/content/docs/ko/api/miscellaneous-api/codes/get-all-card-codes-api.mdx @@ -37,7 +37,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같은 오류 메세지를 포함합니다 -**`response`** **`(Array[StandardCodeAnnotation], optional)`**** ** +**`response`** **`(Array[StandardCodeAnnotation], optional)`** @@ -58,7 +58,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -67,7 +67,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/miscellaneous-api/codes/get-bank-code-api.mdx b/src/content/docs/ko/api/miscellaneous-api/codes/get-bank-code-api.mdx index 96ba7fdb6..bfbe6e8bd 100644 --- a/src/content/docs/ko/api/miscellaneous-api/codes/get-bank-code-api.mdx +++ b/src/content/docs/ko/api/miscellaneous-api/codes/get-bank-code-api.mdx @@ -49,7 +49,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같은 오류 메세지를 포함합니다 -**`response`** **`(Array[StandardCodeAnnotation], optional)`**** ** +**`response`** **`(Array[StandardCodeAnnotation], optional)`** @@ -70,7 +70,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -79,7 +79,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/miscellaneous-api/codes/get-card-code-api.mdx b/src/content/docs/ko/api/miscellaneous-api/codes/get-card-code-api.mdx index fd665cc6c..370330d70 100644 --- a/src/content/docs/ko/api/miscellaneous-api/codes/get-card-code-api.mdx +++ b/src/content/docs/ko/api/miscellaneous-api/codes/get-card-code-api.mdx @@ -49,7 +49,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같은 오류 메세지를 포함합니다 -**`response`** **`(Array[StandardCodeAnnotation], optional)`**** ** +**`response`** **`(Array[StandardCodeAnnotation], optional)`** @@ -70,7 +70,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -79,7 +79,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/miscellaneous-api/cvs/issue-cvs-payment-api.mdx b/src/content/docs/ko/api/miscellaneous-api/cvs/issue-cvs-payment-api.mdx index ee3015b03..0e9227dab 100644 --- a/src/content/docs/ko/api/miscellaneous-api/cvs/issue-cvs-payment-api.mdx +++ b/src/content/docs/ko/api/miscellaneous-api/cvs/issue-cvs-payment-api.mdx @@ -385,7 +385,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/miscellaneous-api/cvs/revoke-cvs-payment-api.mdx b/src/content/docs/ko/api/miscellaneous-api/cvs/revoke-cvs-payment-api.mdx index dfbec56c3..5e1350220 100644 --- a/src/content/docs/ko/api/miscellaneous-api/cvs/revoke-cvs-payment-api.mdx +++ b/src/content/docs/ko/api/miscellaneous-api/cvs/revoke-cvs-payment-api.mdx @@ -320,7 +320,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/non-authenticated-payment-api/again-api.mdx b/src/content/docs/ko/api/non-authenticated-payment-api/again-api.mdx index b7d8c20a3..82bb9c0bc 100644 --- a/src/content/docs/ko/api/non-authenticated-payment-api/again-api.mdx +++ b/src/content/docs/ko/api/non-authenticated-payment-api/again-api.mdx @@ -422,7 +422,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/non-authenticated-payment-api/onetime-api.mdx b/src/content/docs/ko/api/non-authenticated-payment-api/onetime-api.mdx index b307c60c9..d3600a4c0 100644 --- a/src/content/docs/ko/api/non-authenticated-payment-api/onetime-api.mdx +++ b/src/content/docs/ko/api/non-authenticated-payment-api/onetime-api.mdx @@ -458,7 +458,7 @@ JSON string으로 전달 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/payment-api/all-api.mdx b/src/content/docs/ko/api/payment-api/all-api.mdx index 483207817..5ae28f406 100644 --- a/src/content/docs/ko/api/payment-api/all-api.mdx +++ b/src/content/docs/ko/api/payment-api/all-api.mdx @@ -374,7 +374,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -383,7 +383,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -392,7 +392,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/payment-api/balance-by-impuid-api.mdx b/src/content/docs/ko/api/payment-api/balance-by-impuid-api.mdx index 50f22035f..83f484f93 100644 --- a/src/content/docs/ko/api/payment-api/balance-by-impuid-api.mdx +++ b/src/content/docs/ko/api/payment-api/balance-by-impuid-api.mdx @@ -133,7 +133,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -142,7 +142,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/payment-api/customer-payments-api.mdx b/src/content/docs/ko/api/payment-api/customer-payments-api.mdx index bd669f0a3..5636aafe0 100644 --- a/src/content/docs/ko/api/payment-api/customer-payments-api.mdx +++ b/src/content/docs/ko/api/payment-api/customer-payments-api.mdx @@ -330,7 +330,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -339,7 +339,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/payment-api/edit-prepare-payment-api.mdx b/src/content/docs/ko/api/payment-api/edit-prepare-payment-api.mdx index af5db4651..0b0ac79bb 100644 --- a/src/content/docs/ko/api/payment-api/edit-prepare-payment-api.mdx +++ b/src/content/docs/ko/api/payment-api/edit-prepare-payment-api.mdx @@ -80,7 +80,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -89,7 +89,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/payment-api/get-payment-by-impuid-api.mdx b/src/content/docs/ko/api/payment-api/get-payment-by-impuid-api.mdx index 1a44fa15c..85b0cd39b 100644 --- a/src/content/docs/ko/api/payment-api/get-payment-by-impuid-api.mdx +++ b/src/content/docs/ko/api/payment-api/get-payment-by-impuid-api.mdx @@ -321,7 +321,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -330,7 +330,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/payment-api/get-payment-by-status-api.mdx b/src/content/docs/ko/api/payment-api/get-payment-by-status-api.mdx index 02b05e4a4..7e35e07ee 100644 --- a/src/content/docs/ko/api/payment-api/get-payment-by-status-api.mdx +++ b/src/content/docs/ko/api/payment-api/get-payment-by-status-api.mdx @@ -385,7 +385,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -394,7 +394,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/payment-api/get-payment-list-by-impuid-api.mdx b/src/content/docs/ko/api/payment-api/get-payment-list-by-impuid-api.mdx index 0f6bb94c7..0c44cbeea 100644 --- a/src/content/docs/ko/api/payment-api/get-payment-list-by-impuid-api.mdx +++ b/src/content/docs/ko/api/payment-api/get-payment-list-by-impuid-api.mdx @@ -326,7 +326,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -335,7 +335,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/payment-api/get-payment-prepare-by-merchantuid-api.mdx b/src/content/docs/ko/api/payment-api/get-payment-prepare-by-merchantuid-api.mdx index 17c1ce932..f7e9bc6ff 100644 --- a/src/content/docs/ko/api/payment-api/get-payment-prepare-by-merchantuid-api.mdx +++ b/src/content/docs/ko/api/payment-api/get-payment-prepare-by-merchantuid-api.mdx @@ -72,7 +72,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/payment-api/prepare-payment-api.mdx b/src/content/docs/ko/api/payment-api/prepare-payment-api.mdx index 9dbf7973a..343ec65d2 100644 --- a/src/content/docs/ko/api/payment-api/prepare-payment-api.mdx +++ b/src/content/docs/ko/api/payment-api/prepare-payment-api.mdx @@ -81,7 +81,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/payment-api/uq-api.mdx b/src/content/docs/ko/api/payment-api/uq-api.mdx index 88a4b5f03..ee9aa5119 100644 --- a/src/content/docs/ko/api/payment-api/uq-api.mdx +++ b/src/content/docs/ko/api/payment-api/uq-api.mdx @@ -343,7 +343,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -352,7 +352,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/pg-api/save-paymentwall-delivery-api.mdx b/src/content/docs/ko/api/pg-api/save-paymentwall-delivery-api.mdx index 705cfaf4d..7ed13c901 100644 --- a/src/content/docs/ko/api/pg-api/save-paymentwall-delivery-api.mdx +++ b/src/content/docs/ko/api/pg-api/save-paymentwall-delivery-api.mdx @@ -211,7 +211,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/rest-api-access-token.mdx b/src/content/docs/ko/api/rest-api-access-token.mdx index 37c793758..396cfa9e1 100644 --- a/src/content/docs/ko/api/rest-api-access-token.mdx +++ b/src/content/docs/ko/api/rest-api-access-token.mdx @@ -39,7 +39,7 @@ REST API([POST https://api.iamport.kr/users/getToken](https://api.iamport.kr/#!/ -```javascript title="server-side" +```ts title="server-side" // 인증 토큰 발급 받기 axios({ url: "https://api.iamport.kr/users/getToken", diff --git a/src/content/docs/ko/api/simple-payment-service-api/kakaopay/get-orders-api.mdx b/src/content/docs/ko/api/simple-payment-service-api/kakaopay/get-orders-api.mdx index 30ccee504..d2bc543c6 100644 --- a/src/content/docs/ko/api/simple-payment-service-api/kakaopay/get-orders-api.mdx +++ b/src/content/docs/ko/api/simple-payment-service-api/kakaopay/get-orders-api.mdx @@ -48,7 +48,7 @@ YYYYMMDD 형식의 조회 날짜를 지정하시면 됩니다. ### Responses -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/simple-payment-service-api/kcp-quick-pay/delete-member-api.mdx b/src/content/docs/ko/api/simple-payment-service-api/kcp-quick-pay/delete-member-api.mdx index 595be6e15..aa1e75c0d 100644 --- a/src/content/docs/ko/api/simple-payment-service-api/kcp-quick-pay/delete-member-api.mdx +++ b/src/content/docs/ko/api/simple-payment-service-api/kcp-quick-pay/delete-member-api.mdx @@ -103,7 +103,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -112,7 +112,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/simple-payment-service-api/naverco/approve-return-order-api.mdx b/src/content/docs/ko/api/simple-payment-service-api/naverco/approve-return-order-api.mdx index 7f5bf4972..3100f5157 100644 --- a/src/content/docs/ko/api/simple-payment-service-api/naverco/approve-return-order-api.mdx +++ b/src/content/docs/ko/api/simple-payment-service-api/naverco/approve-return-order-api.mdx @@ -343,7 +343,7 @@ Unix Timestamp -```javascript +```ts { // Response } @@ -352,7 +352,7 @@ Unix Timestamp -```javascript +```ts { // Response } @@ -361,7 +361,7 @@ Unix Timestamp -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/simple-payment-service-api/naverco/arrove-cancel-order-api.mdx b/src/content/docs/ko/api/simple-payment-service-api/naverco/arrove-cancel-order-api.mdx index efa128551..fb9fb9262 100644 --- a/src/content/docs/ko/api/simple-payment-service-api/naverco/arrove-cancel-order-api.mdx +++ b/src/content/docs/ko/api/simple-payment-service-api/naverco/arrove-cancel-order-api.mdx @@ -337,7 +337,7 @@ Unix Timestamp -```javascript +```ts { // Response } @@ -346,7 +346,7 @@ Unix Timestamp -```javascript +```ts { // Response } @@ -355,7 +355,7 @@ Unix Timestamp -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/simple-payment-service-api/naverco/cancel-order-api.mdx b/src/content/docs/ko/api/simple-payment-service-api/naverco/cancel-order-api.mdx index 2efa6da24..0b989a734 100644 --- a/src/content/docs/ko/api/simple-payment-service-api/naverco/cancel-order-api.mdx +++ b/src/content/docs/ko/api/simple-payment-service-api/naverco/cancel-order-api.mdx @@ -344,7 +344,7 @@ Unix Timestamp -```javascript +```ts { // Response } @@ -353,7 +353,7 @@ Unix Timestamp -```javascript +```ts { // Response } @@ -362,7 +362,7 @@ Unix Timestamp -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/simple-payment-service-api/naverco/collect-exchanged-order-api.mdx b/src/content/docs/ko/api/simple-payment-service-api/naverco/collect-exchanged-order-api.mdx index 6e61d1bdb..4e2d99cc6 100644 --- a/src/content/docs/ko/api/simple-payment-service-api/naverco/collect-exchanged-order-api.mdx +++ b/src/content/docs/ko/api/simple-payment-service-api/naverco/collect-exchanged-order-api.mdx @@ -336,7 +336,7 @@ Unix Timestamp -```javascript +```ts { // Response } @@ -345,7 +345,7 @@ Unix Timestamp -```javascript +```ts { // Response } @@ -354,7 +354,7 @@ Unix Timestamp -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/simple-payment-service-api/naverco/get-orders-api.mdx b/src/content/docs/ko/api/simple-payment-service-api/naverco/get-orders-api.mdx index 1ae6acaae..4b4be3d20 100644 --- a/src/content/docs/ko/api/simple-payment-service-api/naverco/get-orders-api.mdx +++ b/src/content/docs/ko/api/simple-payment-service-api/naverco/get-orders-api.mdx @@ -242,7 +242,7 @@ Unix Timestamp -```javascript +```ts { // Response } @@ -251,7 +251,7 @@ Unix Timestamp -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/simple-payment-service-api/naverco/get-reviews-api.mdx b/src/content/docs/ko/api/simple-payment-service-api/naverco/get-reviews-api.mdx index 981fc9fc4..239ea2793 100644 --- a/src/content/docs/ko/api/simple-payment-service-api/naverco/get-reviews-api.mdx +++ b/src/content/docs/ko/api/simple-payment-service-api/naverco/get-reviews-api.mdx @@ -129,7 +129,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -138,7 +138,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -147,7 +147,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/simple-payment-service-api/naverco/get-single-order-api.mdx b/src/content/docs/ko/api/simple-payment-service-api/naverco/get-single-order-api.mdx index f758d91cc..d3db868b0 100644 --- a/src/content/docs/ko/api/simple-payment-service-api/naverco/get-single-order-api.mdx +++ b/src/content/docs/ko/api/simple-payment-service-api/naverco/get-single-order-api.mdx @@ -238,7 +238,7 @@ Unix Timestamp -```javascript +```ts { // Response } @@ -247,7 +247,7 @@ Unix Timestamp -```javascript +```ts { // Response } @@ -256,7 +256,7 @@ Unix Timestamp -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/simple-payment-service-api/naverco/place-order-api.mdx b/src/content/docs/ko/api/simple-payment-service-api/naverco/place-order-api.mdx index 99c5bad94..5b0932891 100644 --- a/src/content/docs/ko/api/simple-payment-service-api/naverco/place-order-api.mdx +++ b/src/content/docs/ko/api/simple-payment-service-api/naverco/place-order-api.mdx @@ -336,7 +336,7 @@ Unix Timestamp -```javascript +```ts { // Response } @@ -345,7 +345,7 @@ Unix Timestamp -```javascript +```ts { // Response } @@ -354,7 +354,7 @@ Unix Timestamp -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/simple-payment-service-api/naverco/reject-return-order-api.mdx b/src/content/docs/ko/api/simple-payment-service-api/naverco/reject-return-order-api.mdx index a5bce71f9..db132ee3c 100644 --- a/src/content/docs/ko/api/simple-payment-service-api/naverco/reject-return-order-api.mdx +++ b/src/content/docs/ko/api/simple-payment-service-api/naverco/reject-return-order-api.mdx @@ -343,7 +343,7 @@ Unix Timestamp -```javascript +```ts { // Response } @@ -352,7 +352,7 @@ Unix Timestamp -```javascript +```ts { // Response } @@ -361,7 +361,7 @@ Unix Timestamp -```javascript +```ts { // Response } @@ -370,7 +370,7 @@ Unix Timestamp -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/simple-payment-service-api/naverco/request-return-order-api.mdx b/src/content/docs/ko/api/simple-payment-service-api/naverco/request-return-order-api.mdx index 2809e2ddb..8d92080d1 100644 --- a/src/content/docs/ko/api/simple-payment-service-api/naverco/request-return-order-api.mdx +++ b/src/content/docs/ko/api/simple-payment-service-api/naverco/request-return-order-api.mdx @@ -359,7 +359,7 @@ Unix Timestamp -```javascript +```ts { // Response } @@ -368,7 +368,7 @@ Unix Timestamp -```javascript +```ts { // Response } @@ -377,7 +377,7 @@ Unix Timestamp -```javascript +```ts { // Response } @@ -386,7 +386,7 @@ Unix Timestamp -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/simple-payment-service-api/naverco/resolve-return-order-api.mdx b/src/content/docs/ko/api/simple-payment-service-api/naverco/resolve-return-order-api.mdx index b30409568..3358721d3 100644 --- a/src/content/docs/ko/api/simple-payment-service-api/naverco/resolve-return-order-api.mdx +++ b/src/content/docs/ko/api/simple-payment-service-api/naverco/resolve-return-order-api.mdx @@ -332,7 +332,7 @@ Unix Timestamp -```javascript +```ts { // Response } @@ -341,7 +341,7 @@ Unix Timestamp -```javascript +```ts { // Response } @@ -350,7 +350,7 @@ Unix Timestamp -```javascript +```ts { // Response } @@ -359,7 +359,7 @@ Unix Timestamp -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/simple-payment-service-api/naverco/ship-exchanged-order-api.mdx b/src/content/docs/ko/api/simple-payment-service-api/naverco/ship-exchanged-order-api.mdx index 4e820bbb1..d1dea7800 100644 --- a/src/content/docs/ko/api/simple-payment-service-api/naverco/ship-exchanged-order-api.mdx +++ b/src/content/docs/ko/api/simple-payment-service-api/naverco/ship-exchanged-order-api.mdx @@ -364,7 +364,7 @@ Unix Timestamp -```javascript +```ts { // Response } @@ -373,7 +373,7 @@ Unix Timestamp -```javascript +```ts { // Response } @@ -382,7 +382,7 @@ Unix Timestamp -```javascript +```ts { // Response } @@ -391,7 +391,7 @@ Unix Timestamp -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/simple-payment-service-api/naverco/ship-order-api.mdx b/src/content/docs/ko/api/simple-payment-service-api/naverco/ship-order-api.mdx index d3cee69d0..3e554958c 100644 --- a/src/content/docs/ko/api/simple-payment-service-api/naverco/ship-order-api.mdx +++ b/src/content/docs/ko/api/simple-payment-service-api/naverco/ship-order-api.mdx @@ -373,7 +373,7 @@ Unix Timestamp -```javascript +```ts { // Response } @@ -382,7 +382,7 @@ Unix Timestamp -```javascript +```ts { // Response } @@ -391,7 +391,7 @@ Unix Timestamp -```javascript +```ts { // Response } @@ -400,7 +400,7 @@ Unix Timestamp -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/simple-payment-service-api/naverco/withhold-return-order-api.mdx b/src/content/docs/ko/api/simple-payment-service-api/naverco/withhold-return-order-api.mdx index f2dbc01f5..6c2b669c4 100644 --- a/src/content/docs/ko/api/simple-payment-service-api/naverco/withhold-return-order-api.mdx +++ b/src/content/docs/ko/api/simple-payment-service-api/naverco/withhold-return-order-api.mdx @@ -352,7 +352,7 @@ Unix Timestamp -```javascript +```ts { // Response } @@ -361,7 +361,7 @@ Unix Timestamp -```javascript +```ts { // Response } @@ -370,7 +370,7 @@ Unix Timestamp -```javascript +```ts { // Response } @@ -379,7 +379,7 @@ Unix Timestamp -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/simple-payment-service-api/naverpay/accrue-points-api.mdx b/src/content/docs/ko/api/simple-payment-service-api/naverpay/accrue-points-api.mdx index 082aa4b8d..6533d9657 100644 --- a/src/content/docs/ko/api/simple-payment-service-api/naverpay/accrue-points-api.mdx +++ b/src/content/docs/ko/api/simple-payment-service-api/naverpay/accrue-points-api.mdx @@ -55,7 +55,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -64,7 +64,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -73,7 +73,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/simple-payment-service-api/naverpay/confirm-escrow-order-api.mdx b/src/content/docs/ko/api/simple-payment-service-api/naverpay/confirm-escrow-order-api.mdx index 9c6979314..ac4a4973d 100644 --- a/src/content/docs/ko/api/simple-payment-service-api/naverpay/confirm-escrow-order-api.mdx +++ b/src/content/docs/ko/api/simple-payment-service-api/naverpay/confirm-escrow-order-api.mdx @@ -56,7 +56,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -65,7 +65,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -74,7 +74,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/simple-payment-service-api/naverpay/get-cash-receipt-amount-api.mdx b/src/content/docs/ko/api/simple-payment-service-api/naverpay/get-cash-receipt-amount-api.mdx index e0351af23..da03979f1 100644 --- a/src/content/docs/ko/api/simple-payment-service-api/naverpay/get-cash-receipt-amount-api.mdx +++ b/src/content/docs/ko/api/simple-payment-service-api/naverpay/get-cash-receipt-amount-api.mdx @@ -82,7 +82,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -91,7 +91,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -100,7 +100,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/simple-payment-service-api/payco/change-order-status-api.mdx b/src/content/docs/ko/api/simple-payment-service-api/payco/change-order-status-api.mdx index 5c6f65e5e..699a4ae1d 100644 --- a/src/content/docs/ko/api/simple-payment-service-api/payco/change-order-status-api.mdx +++ b/src/content/docs/ko/api/simple-payment-service-api/payco/change-order-status-api.mdx @@ -81,7 +81,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/subscription-payment-api/cancel-scheduled-payment-api.mdx b/src/content/docs/ko/api/subscription-payment-api/cancel-scheduled-payment-api.mdx index b04aebc8b..b6ca6d309 100644 --- a/src/content/docs/ko/api/subscription-payment-api/cancel-scheduled-payment-api.mdx +++ b/src/content/docs/ko/api/subscription-payment-api/cancel-scheduled-payment-api.mdx @@ -169,7 +169,7 @@ e.g.) KRW, USD, VND, ... Default: KRW -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/subscription-payment-api/get-scheduled-payment-api.mdx b/src/content/docs/ko/api/subscription-payment-api/get-scheduled-payment-api.mdx index c1ac32629..b062c271a 100644 --- a/src/content/docs/ko/api/subscription-payment-api/get-scheduled-payment-api.mdx +++ b/src/content/docs/ko/api/subscription-payment-api/get-scheduled-payment-api.mdx @@ -160,7 +160,7 @@ e.g.) KRW, USD, VND, ... Default: KRW -```javascript +```ts { // Response } @@ -169,7 +169,7 @@ e.g.) KRW, USD, VND, ... Default: KRW -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/subscription-payment-api/get-scheduled-payments-api.mdx b/src/content/docs/ko/api/subscription-payment-api/get-scheduled-payments-api.mdx index 10ecca153..6968f7997 100644 --- a/src/content/docs/ko/api/subscription-payment-api/get-scheduled-payments-api.mdx +++ b/src/content/docs/ko/api/subscription-payment-api/get-scheduled-payments-api.mdx @@ -202,7 +202,7 @@ e.g.) KRW, USD, VND, ... Default: KRW -```javascript +```ts { // Response } @@ -211,7 +211,7 @@ e.g.) KRW, USD, VND, ... Default: KRW -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/subscription-payment-api/get-scheduled-payments-by-billing-key-api.mdx b/src/content/docs/ko/api/subscription-payment-api/get-scheduled-payments-by-billing-key-api.mdx index 897d91607..3700a574d 100644 --- a/src/content/docs/ko/api/subscription-payment-api/get-scheduled-payments-by-billing-key-api.mdx +++ b/src/content/docs/ko/api/subscription-payment-api/get-scheduled-payments-by-billing-key-api.mdx @@ -197,7 +197,7 @@ e.g.) KRW, USD, VND, ... Default: KRW -```javascript +```ts { // Response } @@ -206,7 +206,7 @@ e.g.) KRW, USD, VND, ... Default: KRW -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/subscription-payment-api/schedule-payment-api.mdx b/src/content/docs/ko/api/subscription-payment-api/schedule-payment-api.mdx index 96a5b3422..8a8e6f82e 100644 --- a/src/content/docs/ko/api/subscription-payment-api/schedule-payment-api.mdx +++ b/src/content/docs/ko/api/subscription-payment-api/schedule-payment-api.mdx @@ -193,7 +193,7 @@ code값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/tier-api/add-tier-api.mdx b/src/content/docs/ko/api/tier-api/add-tier-api.mdx index f6e2a85f7..dbe3fb902 100644 --- a/src/content/docs/ko/api/tier-api/add-tier-api.mdx +++ b/src/content/docs/ko/api/tier-api/add-tier-api.mdx @@ -98,7 +98,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -107,7 +107,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -116,7 +116,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/tier-api/delete-tier-api.mdx b/src/content/docs/ko/api/tier-api/delete-tier-api.mdx index 1b419c2dd..c7619ba3a 100644 --- a/src/content/docs/ko/api/tier-api/delete-tier-api.mdx +++ b/src/content/docs/ko/api/tier-api/delete-tier-api.mdx @@ -87,7 +87,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -96,7 +96,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -105,7 +105,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/tier-api/get-tier-api.mdx b/src/content/docs/ko/api/tier-api/get-tier-api.mdx index faf0a5b1c..7feea4e6b 100644 --- a/src/content/docs/ko/api/tier-api/get-tier-api.mdx +++ b/src/content/docs/ko/api/tier-api/get-tier-api.mdx @@ -87,7 +87,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -96,7 +96,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/tier-api/update-tier-api.mdx b/src/content/docs/ko/api/tier-api/update-tier-api.mdx index b859ee447..a63ebd4d3 100644 --- a/src/content/docs/ko/api/tier-api/update-tier-api.mdx +++ b/src/content/docs/ko/api/tier-api/update-tier-api.mdx @@ -98,7 +98,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -107,7 +107,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -116,7 +116,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/virtual-account-api/get-account-holder-api.mdx b/src/content/docs/ko/api/virtual-account-api/get-account-holder-api.mdx index 8fd7163e7..4d890fc4a 100644 --- a/src/content/docs/ko/api/virtual-account-api/get-account-holder-api.mdx +++ b/src/content/docs/ko/api/virtual-account-api/get-account-holder-api.mdx @@ -119,7 +119,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -128,7 +128,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -137,7 +137,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/virtual-account-api/request-virtual-account-api.mdx b/src/content/docs/ko/api/virtual-account-api/request-virtual-account-api.mdx index feb9b8b99..a6bcaea48 100644 --- a/src/content/docs/ko/api/virtual-account-api/request-virtual-account-api.mdx +++ b/src/content/docs/ko/api/virtual-account-api/request-virtual-account-api.mdx @@ -454,7 +454,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/virtual-account-api/revoke-virtual-account-api.mdx b/src/content/docs/ko/api/virtual-account-api/revoke-virtual-account-api.mdx index f02831b95..c38ee9715 100644 --- a/src/content/docs/ko/api/virtual-account-api/revoke-virtual-account-api.mdx +++ b/src/content/docs/ko/api/virtual-account-api/revoke-virtual-account-api.mdx @@ -354,7 +354,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -363,7 +363,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -372,7 +372,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/api/virtual-account-api/update-virtual-account-api.mdx b/src/content/docs/ko/api/virtual-account-api/update-virtual-account-api.mdx index 2122ea8d0..ef8954f95 100644 --- a/src/content/docs/ko/api/virtual-account-api/update-virtual-account-api.mdx +++ b/src/content/docs/ko/api/virtual-account-api/update-virtual-account-api.mdx @@ -345,7 +345,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -354,7 +354,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } @@ -363,7 +363,7 @@ code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같 -```javascript +```ts { // Response } diff --git a/src/content/docs/ko/auth/guide-1/bill/pg.mdx b/src/content/docs/ko/auth/guide-1/bill/pg.mdx index a44821b9c..ba896f38e 100644 --- a/src/content/docs/ko/auth/guide-1/bill/pg.mdx +++ b/src/content/docs/ko/auth/guide-1/bill/pg.mdx @@ -13,10 +13,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; - **장점**: 카드정보가 서버 또는 포트원의 서버를 거치지 않고 직접 PG사로 전달되기 때문에 데이터 및 통신구간 암호화 등의 **추가 보안 프로세스가 없다**. - **단점**: PG사의 일반결제창을 통해 카드정보를 입력받기 때문에 웹브라우저를 통해서만 빌링키 발급이 이루어지며, **카드정보 입력란을 커스터마이징 할 수 없다.**(고객사 사이트 친화적인 UI/UX 구성불가) -
+
### **STEP 01.** 발급 요청하기 @@ -26,7 +23,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; -```javascript title="client-side" +```ts title="client-side" IMP.request_pay({ customer_uid: "gildong_0001_1234", // 카드(빌링키)와 1:1로 대응하는 값 /* ...생략... */ @@ -59,7 +56,7 @@ PG사가 발급한 빌링키와 1:1로 맵핑되는 고객사가 지정한 고 -```javascript title="client-side" +```ts title="client-side" IMP.request_pay({ /* ...중략... */ }, function (rsp) { // callback @@ -82,7 +79,7 @@ PG사가 발급한 빌링키와 1:1로 맵핑되는 고객사가 지정한 고 빌링키가 성공적으로 발급되면 고객사 서버로 **customer_uid** 를 전달합니다. 서버에서는 클라이언트로부터 **customer_uid**를 전달받는 API endpoint를 생성합니다. 서버에서 해당 **customer_uid** 를 사용하여 차후에 결제를 요청할 수 있습니다. -```javascript title="server-side" +```ts title="server-side" app.post("/billings", async (req, res) => { try { const { customer_uid } = req.body; // req body에서 customer_uid 추출 @@ -109,7 +106,7 @@ PG사가 발급한 빌링키와 1:1로 맵핑되는 고객사가 지정한 고 -```javascript title="server-side" +```ts title="server-side" app.post("/billings", async (req, res) => { try { const { customer_uid } = req.body; // req의 body에서 customer_uid 추출 diff --git a/src/content/docs/ko/auth/guide-1/bill/readme.mdx b/src/content/docs/ko/auth/guide-1/bill/readme.mdx index d59c0bea4..8530413d7 100644 --- a/src/content/docs/ko/auth/guide-1/bill/readme.mdx +++ b/src/content/docs/ko/auth/guide-1/bill/readme.mdx @@ -3,80 +3,80 @@ title: 빌링키 결제 요청하기 description: 카드정보를 이용하여 비 인증 결제를 요청하는 방법을 안내합니다. --- -import ContentRef from "~/components/gitbook/ContentRef.astro"; import Figure from "~/components/Figure.astro"; -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import ContentRef from "~/components/gitbook/ContentRef.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; ## 빌링키(Billing key)를 이용한 비 인증 결제 -**빌링키란?** - -구독형 정기결제, 종량제 과금결제 등 원하는 시점에 재 결제를 진행할 수 있는 결제용 암호화 키 입니다. 고객사가 고객의 카드정보를 소유할 수 없기 때문에 카드사로부터 해당 카드에 대응하는 빌링키 발급 받아 저장하고 원하는 시점에 해당 빌링키로 결제를 청구할 수 있습니다. + **빌링키란?** + 구독형 정기결제, 종량제 과금결제 등 구현 시 원하는 시점에 재 결제를 진행할 수 있는 결제용 암호화 키 입니다. + 고객사가 고객의 카드정보를 소유할 수 없기 때문에 카드사로부터 해당 카드에 대응하는 빌링키를 + 발급 받아 저장하고, 이후 원하는 시점에 해당 빌링키로 결제를 청구하기 위해 사용합니다. 빌링키는 PG사에 따라 다음 두 가지 방식을 활용하여 발급 받을 수 있습니다. - -**포트원 REST API를 이용하여 빌링키를 획득할 수 있습니다.** - -- `(구) 나이스페이먼츠` -- `(신) 나이스페이먼츠` -- `KCP` -- `KSNET` -- `(신) 토스페이먼츠` -- `세틀뱅크` -- `이니시스` -- `키움페이(구 다우, 페이조아)` -- `웰컴페이먼츠` - - - - -**PG 결제창을 이용하여 빌링키를 획득할 수 있습니다.** - -- `이니시스` -- `다날(신용카드,휴대폰)` -- `모빌리언스` -- `페이코` -- `KICC` -- `KCP` -- `카카오페이` -- `네이버페이` -- `(신) 토스페이먼츠` -- `웰컴페이먼츠` -- `(신) 스마트로` -- `(신) 페이팔` -- `페이먼트월` -- `세틀뱅크 내통장결제` -- `(신) 토스페이` - - + + **포트원 REST API를 이용하여 빌링키를 획득할 수 있습니다.** + + - `(구) 나이스페이먼츠` + - `(신) 나이스페이먼츠` + - `KCP` + - `KSNET` + - `(신) 토스페이먼츠` + - `세틀뱅크` + - `이니시스` + - `키움페이(구 다우, 페이조아)` + - `웰컴페이먼츠` + + + + **PG 결제창을 이용하여 빌링키를 획득할 수 있습니다.** + + - `이니시스` + - `다날(신용카드,휴대폰)` + - `모빌리언스` + - `페이코` + - `KICC` + - `KCP` + - `카카오페이` + - `네이버페이` + - `(신) 토스페이먼츠` + - `웰컴페이먼츠` + - `(신) 스마트로` + - `(신) 페이팔` + - `페이먼트월` + - `세틀뱅크 내통장결제` + - `(신) 토스페이` + -## 2. 카드정보를 이용한 결제(키인결제) +## 2. 카드정보를 이용한 결제(키인결제) -PG사와 협의가 된 경우 카드정보를 이용하여 빌링키 없이 매번 1회성으로 결제요청이 가능합니다. 해당방식은 매번 카드정보를 기입하여 결제를 요청하는 방식으로 주로 ARS를 통해 고객분께 카드 정보를 획득하여 결제를 요청하는 콜센타 또는 인증결제의 번거로움을 회피하기 위해 일부 고객사에서 사용하는 방식입니다. 최근에는 인증결제가 간편결제방식으로 전환되면서 매번 카드정보를 기입해야 하는 번거로움 때문에 많이 사용되지 않은 방식입니다. +PG사와 협의가 된 경우 카드정보를 이용하여 빌링키 없이 매번 1회성으로 결제요청이 가능합니다. +해당방식은 매번 카드정보를 기입하여 결제를 요청하는 방식으로 +주로 ARS를 통해 고객분께 카드 정보를 획득하여 결제를 요청하는 콜센타 +또는 인증결제의 번거로움을 회피하기 위해 일부 고객사에서 사용하는 방식입니다. +최근에는 인증결제가 간편결제방식으로 전환되면서 +매번 카드정보를 기입해야 하는 번거로움 때문에 많이 사용되지 않은 방식입니다. -
+
-**키인결제를 이용하기 위해서는 PG사와 협의가 필요합니다.** - + **키인결제를 이용하기 위해서는 PG사와 협의가 필요합니다.** -#### 키인결제 지원 PG사 +### 키인결제 지원 PG사 - NHN KCP - 나이스페이 diff --git a/src/content/docs/ko/auth/guide-1/bill/rest-api.mdx b/src/content/docs/ko/auth/guide-1/bill/rest-api.mdx index 08198ff49..db138285f 100644 --- a/src/content/docs/ko/auth/guide-1/bill/rest-api.mdx +++ b/src/content/docs/ko/auth/guide-1/bill/rest-api.mdx @@ -77,7 +77,7 @@ PG사가 발급한 빌링키와 1:1로 맵핑되는 고객사가 지정한 고 -```jsx title="client-side" +```tsx title="client-side" // React.js class CardForm extends React.Components { constructor(props) { @@ -156,7 +156,7 @@ PG사가 발급한 빌링키와 1:1로 맵핑되는 고객사가 지정한 고 -```javascript title="server-side" +```ts title="server-side" // "/subscription/issue-billing"에 대한 POST 요청을 처리 app.post("/subscriptions/issue-billing", async (req, res) => { try { @@ -183,7 +183,7 @@ PG사가 발급한 빌링키와 1:1로 맵핑되는 고객사가 지정한 고 -```javascript title="server-side" +```ts title="server-side" // "/subscription/issue-billing"에 대한 POST 요청을 처리 app.post("/subscriptions/issue-billing", async (req, res) => { try { diff --git a/src/content/docs/ko/auth/guide-1/page-1.mdx b/src/content/docs/ko/auth/guide-1/page-1.mdx index 8547f8e76..8d8d3b67a 100644 --- a/src/content/docs/ko/auth/guide-1/page-1.mdx +++ b/src/content/docs/ko/auth/guide-1/page-1.mdx @@ -3,32 +3,32 @@ title: 카드정보를 이용한 키인결제 description: 구매자 인증 없이 카드번호 입력만으로 결제가 가능합니다. --- -import Details from "~/components/gitbook/Details.astro"; import Figure from "~/components/Figure.astro"; +import Details from "~/components/gitbook/Details.astro"; import Hint from "~/components/Hint.astro"; -PG사와 협의가 된 경우 카드정보를 이용하여 1회성 결제요청이 가능합니다. 해당방식은 매번 카드정보를 기입하여 결제를 요청하는 방식으로 주로 ARS를 통해 고객분께 카드 정보를 획득하여 결제를 요청하는 콜센타 또는 인증결제의 번거로움을 회피하기 위해 일부 고객사에서 사용하는 방식입니다. 최근에는 인증결제가 간편결제방식으로 전환되면서 매번 카드정보를 기입해야 하는 번거로움 때문에 많이 사용되지 않은 방식입니다. +PG사와 협의가 된 경우 카드정보를 이용하여 1회성 결제요청이 가능합니다. +해당방식은 매번 카드정보를 기입하여 결제를 요청하는 방식으로 +주로 ARS를 통해 고객분께 카드 정보를 획득하여 결제를 요청하는 콜센타 또는 +인증결제의 번거로움을 회피하기 위해 일부 고객사에서 사용하는 방식입니다. +최근에는 인증결제가 간편결제방식으로 전환되면서 +매번 카드정보를 기입해야 하는 번거로움 때문에 많이 사용되지 않은 방식입니다. -
+
-**키인결제를 이용하기 위해서는 PG사와 협의가 필요합니다.** - + **키인결제를 이용하기 위해서는 PG사와 협의가 필요합니다.**
-

키인결제 지원 PG사 확인하기

- -- 나이스페이 -- NHN KCP -- 세틀뱅크 -- 키움페이(구 다우, 페이조아) -- KSNET -- 토스페이먼츠 (신 모듈) - +

키인결제 지원 PG사 확인하기

+ + - 나이스페이 + - NHN KCP + - 세틀뱅크 + - 키움페이(구 다우, 페이조아) + - KSNET + - 토스페이먼츠 (신 모듈)
키인결제는 [**비인증 결제(1회성) API**](../../api/api-4/api-1) 또는 PG창을 이용하여 결제를 요청할 수 있습니다. diff --git a/src/content/docs/ko/auth/guide-1/undefined.mdx b/src/content/docs/ko/auth/guide-1/undefined.mdx index 976971db0..e16dd5954 100644 --- a/src/content/docs/ko/auth/guide-1/undefined.mdx +++ b/src/content/docs/ko/auth/guide-1/undefined.mdx @@ -15,7 +15,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; -```javascript title="Node.js" +```ts title="Node.js" // 결제 예약 axios({ url: `https://api.iamport.kr/subscribe/payments/schedule`, @@ -56,7 +56,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; -```javascript title="server-side" +```ts title="server-side" // "/iamport-callback/schedule"에 대한 POST 요청을 처리 app.post("/iamport-callback/schedule", async (req, res) => { try { @@ -104,7 +104,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; -```javascript title="server-side" +```ts title="server-side" // "/iamport-callback/schedule"에 대한 POST 요청을 처리 app.post("/iamport-callback/schedule", async (req, res) => { try { diff --git a/src/content/docs/ko/auth/guide-2/readme.mdx b/src/content/docs/ko/auth/guide-2/readme.mdx index 79a95ecb1..48c55d348 100644 --- a/src/content/docs/ko/auth/guide-2/readme.mdx +++ b/src/content/docs/ko/auth/guide-2/readme.mdx @@ -50,7 +50,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; -```jsx title="client-side" +```tsx title="client-side" class CancelPay extends React.Component { cancelPay = () => { axios({ @@ -83,7 +83,7 @@ class CancelPay extends React.Component { 아래와 같이 결제정보를 저장하는 **`Payments`**라는 테이블을 생성했다고 가정합니다. -```javascript title="server-side" +```ts title="server-side" /* ... model/payments.js ... */ var mongoose = require('mongoose'); var Schema = mongoose.Schema; @@ -102,7 +102,7 @@ class CancelPay extends React.Component { 클라이언트에서 받은 주문번호(**`merchant_uid`**)를 사용해서 해당 주문의 결제정보를 **`Payments`** 테이블에서 조회합니다. -```javascript title="server-side" +```ts title="server-side" /* ... 중략 ... */ var Payments = require('./models/payments'); app.post('/payments/cancel', async (req, res, next) => { @@ -170,7 +170,7 @@ class CancelPay extends React.Component { #### 아래는 환불 요청을 하는 예제입니다. -```javascript title="Node.js" +```ts title="Node.js" /* ... 중략 ... */ app.post('/payments/cancel', async (req, res, next) => { try { @@ -220,7 +220,7 @@ class CancelPay extends React.Component { #### 결제 취소가 완료되면 그 결과를 데이터베이스에 다음과 같이 저장합니다. -```javascript title="Node.js" +```ts title="Node.js" /* ... 중략 ... */ app.post("/payments/cancel", async (req, res, next) => { try { @@ -288,7 +288,7 @@ REST API[**(POST https://api.iamport.kr/payments/cancel)**](../../api/api-1/api) -```jsx title="client-side" +```tsx title="client-side" class CancelPay extends React.Component { cancelPay = () => { axios({ diff --git a/src/content/docs/ko/auth/guide-2/refund.mdx b/src/content/docs/ko/auth/guide-2/refund.mdx index 9c1d8baf1..a2658748d 100644 --- a/src/content/docs/ko/auth/guide-2/refund.mdx +++ b/src/content/docs/ko/auth/guide-2/refund.mdx @@ -35,7 +35,7 @@ PG사는 이런 과정에서 발생할 수 있는 혼란을 미연에 방지하 #### 아래는 가상계좌 환불을 요청하는 예제입니다. -```javascript title="Node.js" +```ts title="Node.js" /* ... 중략 ... */ app.post('/payments/cancel', async (req, res, next) => { try { @@ -86,7 +86,4 @@ PG사는 이런 과정에서 발생할 수 있는 혼란을 미연에 방지하 다음과 같이 가상계좌 환불을 요청하여 성공하면 PG사 담당자가 다음날 해당 계좌로 환불 금액을 입금합니다. 이는 통상적으로 영엽일 기준 하루 정도 소요됩니다. -
+
diff --git a/src/content/docs/ko/auth/guide/2.mdx b/src/content/docs/ko/auth/guide/2.mdx index acc56973e..a339d67e1 100644 --- a/src/content/docs/ko/auth/guide/2.mdx +++ b/src/content/docs/ko/auth/guide/2.mdx @@ -3,32 +3,30 @@ title: 2. 객체 초기화 하기 description: 고객사 식별코드를 이용하여 결제창 연동을 준비합니다. --- -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; -#### 주문 페이지에서 고객사 식별코드를 이용하여 IMP 객체를 초기화 합니다. +주문 페이지에서 고객사 식별코드를 이용하여 IMP 객체를 초기화 합니다. -아래 초기화 함수를 **2회 이상** 중복되게 호출하지 않도록 주의해주세요. + 아래 초기화 함수를 **2회 이상** 중복되게 호출하지 않도록 주의해주세요. - -```javascript title="client-side" -IMP.init('고객사 식별코드') // 예: 'imp00000000a' -``` - + + ```ts title="client-side" + IMP.init("고객사 식별코드"); // 예: 'imp00000000a' + ``` + -  - -#### 하위상점 결제창 호출 방법 +## 하위상점 결제창 호출 방법 하위 상점인 경우 `IMP.init()` 대신, `IMP.agency('고객사 식별코드', '하위 고객사 티어코드')`를 호출해야 합니다. -```javascript +```ts // IMP.init() 대신 아래 함수를 사용해야함 -IMP.agency('고객사 식별코드', '티어코드') // 예: 'imp00000000a', '123' +IMP.agency("고객사 식별코드", "티어코드"); // 예: 'imp00000000a', '123' ``` diff --git a/src/content/docs/ko/auth/guide/3.mdx b/src/content/docs/ko/auth/guide/3.mdx index d02c5a027..0ca95bb0b 100644 --- a/src/content/docs/ko/auth/guide/3.mdx +++ b/src/content/docs/ko/auth/guide/3.mdx @@ -3,10 +3,10 @@ title: 3. 결제 요청하기 description: 파라미터값을 조합하여 결제창을 호출 할 수 있습니다. --- -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Youtube from "~/components/gitbook/Youtube.astro"; +import Hint from "~/components/Hint.astro"; [**IMP 객체 초기화**](2)가 완료 되었으면 이제 결제창을 호출할 차례입니다. @@ -14,29 +14,33 @@ import Youtube from "~/components/gitbook/Youtube.astro"; -```javascript - function requestPay() { - IMP.request_pay({ +```ts +function requestPay() { + IMP.request_pay( + { pg: "kcp.{상점ID}", pay_method: "card", - merchant_uid: "ORD20180131-0000011", // 주문번호 + merchant_uid: "ORD20180131-0000011", // 주문번호 name: "노르웨이 회전 의자", - amount: 64900, // 숫자 타입 + amount: 64900, // 숫자 타입 buyer_email: "gildong@gmail.com", buyer_name: "홍길동", buyer_tel: "010-4242-4242", buyer_addr: "서울특별시 강남구 신사동", - buyer_postcode: "01181" - }, function (rsp) { // callback + buyer_postcode: "01181", + }, + function (rsp) { + // callback //rsp.imp_uid 값으로 결제 단건조회 API를 호출하여 결제결과를 판단합니다. - }); - } + }, + ); +} ``` -```jsx +```tsx class RequestPay extends React.Component { requestPay = () => { IMP.request_pay({ // param @@ -67,7 +71,7 @@ class RequestPay extends React.Component { -```javascript +```ts - - -``` - - + + ```html title="client-side" + + + + + ``` + -**jQuery 1.0 이상이 설치**되어 있어야 합니다. - + **jQuery 1.0 이상이 설치**되어 있어야 합니다. ### 본인인증 페이지에 [`고객사 식별코드`](../../ready/readme#4-포트원-연동정보-확인하기)를 이용하여 `IMP` 객체를 초기화합니다. - -```javascript title="client-side" -var IMP = window.IMP; // 생략 가능 -IMP.init("{고객사 식별코드}"); // 예: imp00000000 -``` - - - - -```javascript title="client-side" -const IMP = window.IMP; // 생략 가능 -IMP.init({ 고객사_식별코드 }); // 예: "imp00000000" -``` - - + + ```ts title="client-side" + const IMP = window.IMP; // 생략 가능 + IMP.init("{고객사 식별코드}"); // 예: imp00000000 + ``` + + + + ```ts title="client-side" + const IMP = window.IMP; // 생략 가능 + IMP.init({ 고객사_식별코드 }); // 예: "imp00000000" + ``` + diff --git a/src/content/docs/ko/etc/credit-auth/2.mdx b/src/content/docs/ko/etc/credit-auth/2.mdx index 9e08c6d07..a78eb0595 100644 --- a/src/content/docs/ko/etc/credit-auth/2.mdx +++ b/src/content/docs/ko/etc/credit-auth/2.mdx @@ -25,7 +25,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; -```javascript title="client-side" +```ts title="client-side" // IMP.certification(param, callback) 호출 IMP.certification({ // param merchant_uid: "ORD20180131-0000011", // 주문 번호 @@ -48,7 +48,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; -```javascript title="client-side" +```ts title="client-side" // IMP.certification(param, callback) 호출 IMP.certification({ // param merchant_uid: "ORD20180131-0000011", // 주문 번호 diff --git a/src/content/docs/ko/etc/credit-auth/3.mdx b/src/content/docs/ko/etc/credit-auth/3.mdx index 638cb4f86..ccbff2514 100644 --- a/src/content/docs/ko/etc/credit-auth/3.mdx +++ b/src/content/docs/ko/etc/credit-auth/3.mdx @@ -12,7 +12,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; -```javascript title="client-side" +```ts title="client-side" IMP.certification({ /* ...중략... */ }, function (rsp) { // callback @@ -33,7 +33,7 @@ IMP.certification({ -```javascript title="client-side" +```ts title="client-side" IMP.certification({ /* ...중략... */ }, rsp => { // callback diff --git a/src/content/docs/ko/etc/credit-auth/4.mdx b/src/content/docs/ko/etc/credit-auth/4.mdx index ba33fe5fe..357d65f31 100644 --- a/src/content/docs/ko/etc/credit-auth/4.mdx +++ b/src/content/docs/ko/etc/credit-auth/4.mdx @@ -15,7 +15,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; -```javascript title="server-side" +```ts title="server-side" app.use(bodyParser.json()); ... // "/certifications"에 대한 POST 요청을 처리하는 controller @@ -28,7 +28,7 @@ app.use(bodyParser.json()); -```javascript title="server-side" +```ts title="server-side" app.use(bodyParser.json()); ... // "/certifications/redirect"에 대한 GET 요청을 처리하는 controller @@ -44,7 +44,7 @@ app.use(bodyParser.json()); 포트원 서버에서 인증 정보를 조회하기 위해서 먼저 [**REST API access token**](../../api/rest-api-access-token)을 발급받습니다. 발급받은 액세스 토큰(`access_token`)과 인증번호(`imp_uid`)로 **본인인증 결과조회 REST API** 를 호출하여 인증 정보를 조회하는 예제입니다. -```javascript title="server-side" +```ts title="server-side" app.use(bodyParser.json()); ... // "/certifications"에 대한 POST 요청을 처리하는 controller @@ -99,7 +99,7 @@ app.use(bodyParser.json()); -```javascript title="Node.js" +```ts title="Node.js" // "/certifications"에 대한 POST 요청을 처리하는 controller app.post("/certifications", async (request, response) => { const { imp_uid } = request.body; // request의 body에서 imp_uid 추출 diff --git a/src/content/docs/ko/etc/phone/1.mdx b/src/content/docs/ko/etc/phone/1.mdx index e1230c4bc..f1e33a8ad 100644 --- a/src/content/docs/ko/etc/phone/1.mdx +++ b/src/content/docs/ko/etc/phone/1.mdx @@ -9,19 +9,16 @@ import Tabs from "~/components/gitbook/tabs/Tabs.astro"; [**`고객사 식별코드`**](../../ready/readme#4-포트원-연동정보-확인하기)를 이용하여 `IMP` 객체를 초기화합니다. - -```javascript title="client-side" -var IMP = window.IMP; // 생략 가능 -IMP.init("{고객사 식별코드}"); // 예: imp00000000 -``` + + ```ts title="client-side" + IMP.init("{고객사 식별코드}"); // 예: imp00000000 + ``` + - - - -```javascript title="client-side" -const IMP = window.IMP; // 생략 가능 -IMP.init("{고객사_식별코드}"); // 예: imp00000000 -``` - - + + ```javascript title="client-side" + const IMP = window.IMP; // 생략 가능 + IMP.init("{고객사_식별코드}"); // 예: imp00000000 + ``` + diff --git a/src/content/docs/ko/etc/phone/2.mdx b/src/content/docs/ko/etc/phone/2.mdx index 76d96087d..7f0e2a746 100644 --- a/src/content/docs/ko/etc/phone/2.mdx +++ b/src/content/docs/ko/etc/phone/2.mdx @@ -32,7 +32,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; -```javascript title="client-side" +```ts title="client-side" // IMP.certification(param, callback) 호출 IMP.certification({ // param // 주문 번호 @@ -60,7 +60,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; -```javascript title="client-side" +```ts title="client-side" // IMP.certification(param, callback) 호출 IMP.certification({ // param // 주문 번호 diff --git a/src/content/docs/ko/etc/phone/3.mdx b/src/content/docs/ko/etc/phone/3.mdx index c6a304437..7ce0fa637 100644 --- a/src/content/docs/ko/etc/phone/3.mdx +++ b/src/content/docs/ko/etc/phone/3.mdx @@ -12,7 +12,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; -```javascript title="client-side" +```ts title="client-side" IMP.certification({ /* ...중략... */ }, function (rsp) { // callback @@ -33,7 +33,7 @@ IMP.certification({ -```javascript title="client-side" +```ts title="client-side" IMP.certification({ /* ...중략... */ }, rsp => { // callback diff --git a/src/content/docs/ko/etc/phone/4.mdx b/src/content/docs/ko/etc/phone/4.mdx index 6a7390e21..9589c0467 100644 --- a/src/content/docs/ko/etc/phone/4.mdx +++ b/src/content/docs/ko/etc/phone/4.mdx @@ -15,7 +15,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; -```javascript title="server-side" +```ts title="server-side" app.use(bodyParser.json()); ... // "/certifications"에 대한 POST 요청을 처리하는 controller @@ -28,7 +28,7 @@ app.use(bodyParser.json()); -```javascript title="server-side" +```ts title="server-side" app.use(bodyParser.json()); ... // "/certifications/redirect"에 대한 GET 요청을 처리하는 controller @@ -44,7 +44,7 @@ app.use(bodyParser.json()); 포트원 서버에서 인증 정보를 조회하기 위해서 먼저 [**REST API access token**](../../api/rest-api-access-token)을 발급받습니다. 발급받은 액세스 토큰(`access_token`)과 인증번호(`imp_uid`)로 **본인인증 결과조회 REST API** 를 호출하여 인증 정보를 조회하는 예제입니다. -```javascript title="server-side" +```ts title="server-side" app.use(bodyParser.json()); ... // "/certifications"에 대한 POST 요청을 처리하는 controller @@ -112,7 +112,7 @@ app.use(bodyParser.json()); -```javascript title="Node.js" +```ts title="Node.js" // "/certifications"에 대한 POST 요청을 처리하는 controller app.post("/certifications", async (request, response) => { const { imp_uid } = request.body; // request의 body에서 imp_uid 추출 diff --git a/src/content/docs/ko/etc/url.mdx b/src/content/docs/ko/etc/url.mdx index a7e5b75ae..ab31f0e94 100644 --- a/src/content/docs/ko/etc/url.mdx +++ b/src/content/docs/ko/etc/url.mdx @@ -206,10 +206,7 @@ pg사 구분코드 **결제 URL API 요청이 성공한경우 응답 URL 렌더링 화면 예시입니다.** -
+
@@ -225,7 +222,7 @@ pg사 구분코드 **응답**(**shortenedUrl**) **URL 마지막 String 을 결제 URI API 주소 뒤에 삽입하여 호출** -> \*\*HTTP Method : \*\***PUT** +> **HTTP Method :** **PUT** **API 응답이 아래와 같은경우** diff --git a/src/content/docs/ko/pg/payment-gateway/blue.mdx b/src/content/docs/ko/pg/payment-gateway/blue.mdx index 325f266f9..751b1aa88 100644 --- a/src/content/docs/ko/pg/payment-gateway/blue.mdx +++ b/src/content/docs/ko/pg/payment-gateway/blue.mdx @@ -23,7 +23,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; -```javascript title="Javascript SDK" +```ts title="Javascript SDK" IMP.request_pay({ pg: "bluewalnut.{상점 ID}", pay_method: "card", diff --git a/src/content/docs/ko/pg/payment-gateway/danal.mdx b/src/content/docs/ko/pg/payment-gateway/danal.mdx index 316379636..cdfc54f0e 100644 --- a/src/content/docs/ko/pg/payment-gateway/danal.mdx +++ b/src/content/docs/ko/pg/payment-gateway/danal.mdx @@ -22,7 +22,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; [JavaScript SDK](../../sdk/javascript-sdk-old/readme) `IMP.request_pay(param, callback)`을 호출하여 다날 Tpay 결제창을 호출할 수 있습니다. **결제결과**는 PC/모바일 환경 모두 경우 IMP.request\_pay(param, callback) 호출 후 **callback** 으로 수신됩니다. -```javascript title="Javascript SDK" showLineNumbers +```ts title="Javascript SDK" showLineNumbers IMP.request_pay( { pg: "danal_tpay.{CPID}", @@ -105,7 +105,7 @@ IMP.request_pay( -```javascript +```ts IMP.request_pay( { pg: "danal_tpay.{CPID}", @@ -178,7 +178,7 @@ curl -H "Content-Type: application/json" \ -```js title="특정 통신사만 노출" +```ts title="특정 통신사만 노출" { phone: { detail: [ @@ -195,7 +195,7 @@ curl -H "Content-Type: application/json" \ } ``` -```js title="2개 이상 통신사 노출" +```ts title="2개 이상 통신사 노출" { phone: { detail: [ @@ -221,7 +221,7 @@ curl -H "Content-Type: application/json" \ KCT, SKL 을 제외한 나머지 통신사는 비활성화 됩니다. ``` -```js title="특정 통신사만 비노출" +```ts title="특정 통신사만 비노출" phone: { detail: [ { @@ -240,7 +240,7 @@ phone: { -```javascript title="javascript" +```ts title="javascript" prefill: { phoneNumber: "휴대폰번호" // 휴대폰번호 입력(하이픈 제거) } @@ -252,7 +252,7 @@ prefill: { -```javascript title="javascript" +```ts title="javascript" display: { card_quota: [6] // 할부개월 6개월까지만 활성화 } @@ -276,7 +276,7 @@ display: { -```javascript title="javascript" +```ts title="javascript" card: { direct: { code: "367", @@ -299,7 +299,7 @@ card: { -```javascript title="javascript" +```ts title="javascript" card: { detail: [ { card_code: "*", enabled: false }, //모든 카드사 비활성화 diff --git a/src/content/docs/ko/pg/payment-gateway/daou/readme.mdx b/src/content/docs/ko/pg/payment-gateway/daou/readme.mdx index 1ae4bcc76..6ea72e035 100644 --- a/src/content/docs/ko/pg/payment-gateway/daou/readme.mdx +++ b/src/content/docs/ko/pg/payment-gateway/daou/readme.mdx @@ -27,7 +27,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; -```javascript title="Javascript SDK" +```ts title="Javascript SDK" IMP.request_pay( { pg: "daou.{상점 ID}", @@ -177,7 +177,7 @@ curl -H "Content-Type: application/json" \ -```javascript title="javascript" +```ts title="javascript" display: { card_quota: [6] // 할부개월 6개월까지만 활성화 } @@ -198,7 +198,7 @@ display: { -```javascript title="javascript" +```ts title="javascript" card: { direct: { code: "367", diff --git a/src/content/docs/ko/pg/payment-gateway/daou/undefined.mdx b/src/content/docs/ko/pg/payment-gateway/daou/undefined.mdx index 216471aee..25cfd2d6e 100644 --- a/src/content/docs/ko/pg/payment-gateway/daou/undefined.mdx +++ b/src/content/docs/ko/pg/payment-gateway/daou/undefined.mdx @@ -14,7 +14,7 @@ PC와 모바일에서 결제창이 각기 다른 방식으로 호출되기 때 - \[PC결제] iframe → 콜백 함수 호출 → 콜백 함수로 전달되는 response 객체에 `success` 키 값으로 전달 - ```jsx + ```tsx IMP.request_pay( { // 중략 diff --git a/src/content/docs/ko/pg/payment-gateway/eximbay.mdx b/src/content/docs/ko/pg/payment-gateway/eximbay.mdx index b416706c9..f0a9dd4f2 100644 --- a/src/content/docs/ko/pg/payment-gateway/eximbay.mdx +++ b/src/content/docs/ko/pg/payment-gateway/eximbay.mdx @@ -23,7 +23,7 @@ style="color:red;">**callback** 으로 전달됩니다. -```javascript title="Javascript SDK" +```ts title="Javascript SDK" IMP.request_pay({ pg: "eximbay.{상점 ID}", pay_method: "card", diff --git a/src/content/docs/ko/pg/payment-gateway/inicis.mdx b/src/content/docs/ko/pg/payment-gateway/inicis.mdx index c21fd8eab..4f113289c 100644 --- a/src/content/docs/ko/pg/payment-gateway/inicis.mdx +++ b/src/content/docs/ko/pg/payment-gateway/inicis.mdx @@ -22,7 +22,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; -```javascript title="Javascript SDK" +```ts title="Javascript SDK" IMP.request_pay({ pg : 'html5_inicis.{PG상점아이디}', //테스트 시 html5_inicis.INIpayTest 기재 pay_method : 'card', @@ -125,7 +125,7 @@ to - 비 인증 결제창에서 빌링키를 발급받은 후 해당 빌링키로 결제를 요청합니다. - amount 파라미터에 금액을 설정하여도 실제 승인은 이루어지지 않습니다. -```javascript title="Javascript SDK" +```ts title="Javascript SDK" IMP.request_pay( { pg: "html5_inicis.{PG상점아이디}", // 실제 계약 후에는 실제 상점아이디로 변경 @@ -157,7 +157,7 @@ IMP.request_pay( **PG사 구분코드** -\*\*`html5_inicis`\*\*로 설정 +**`html5_inicis`**로 설정 > KG이니시스에서 발급받은 상점아이디가 여러개(각각 일반 및 정기)인 경우에는 html5_inicis.\{상점아이디} 또는 inicis.\{상점아이디}(for ActiveX)로 지정합니다. @@ -242,7 +242,7 @@ curl -H "Content-Type: application/json" \ -```javascript title="javascript" +```ts title="javascript" display: { card_quota: [6] // 할부개월 6개월만 활성화 } @@ -263,7 +263,7 @@ display: { -```javascript title="javascript" +```ts title="javascript" card: { direct: { code: "367", @@ -277,16 +277,12 @@ card: { - **code** : 카드사 금융결제원 표준 코드. [**링크**](https://faq.portone.io/6503bcb4-4a61-4cf3-afd8-5d913b1385a6) 참조 (**string**) - **quota** : 할부 개월 수. 일시불일 시 0 으로 지정. (**integer**) - + -```javascript title="javascript" +```ts title="javascript" card: { detail: [ { card_code: "*", enabled: false }, //모든 카드사 비활성화 @@ -303,7 +299,7 @@ card: { -```javascript +```ts // 영세율의 경우 amount: 1000, tax_free: 0, @@ -332,7 +328,7 @@ vat_amount: 0 이니시스 설정이 완료되었으면 아래와 같이 파라미터 설정하시면 됩니다. -```javascript +```ts card: { interest_free: 7, //모든 카드 7개월까지 상점분담무이자 } diff --git a/src/content/docs/ko/pg/payment-gateway/jtnet.mdx b/src/content/docs/ko/pg/payment-gateway/jtnet.mdx index b61340c0d..686733600 100644 --- a/src/content/docs/ko/pg/payment-gateway/jtnet.mdx +++ b/src/content/docs/ko/pg/payment-gateway/jtnet.mdx @@ -25,7 +25,7 @@ JTNET 결제창을 호출할 수 있습니다. **결제결과**는 PC의 경우 -```javascript title="Javascript SDK" +```ts title="Javascript SDK" IMP.request_pay({ pg: "jtnet.{상점 ID}", pay_method: "card", @@ -87,7 +87,7 @@ IMP.request_pay({ -```javascript title="Javascript SDK" +```ts title="Javascript SDK" IMP.request_pay( { pg: "jtnet.{상점 ID}", @@ -199,7 +199,7 @@ curl -H "Content-Type: application/json" \ -```javascript title="javascript" +```ts title="javascript" card: { detail: [ { card_code: "*", enabled: false }, // 모든 카드사 비활성화 diff --git a/src/content/docs/ko/pg/payment-gateway/kg.mdx b/src/content/docs/ko/pg/payment-gateway/kg.mdx index 24e695c91..624186030 100644 --- a/src/content/docs/ko/pg/payment-gateway/kg.mdx +++ b/src/content/docs/ko/pg/payment-gateway/kg.mdx @@ -17,7 +17,7 @@ import Hint from "~/components/Hint.astro"; [JavaScript SDK](../../sdk/javascript-sdk/readme) `IMP.request_pay(param, callback)`을 호출하여 KG 모빌리언스 결제창을 호출할 수 있습니다. **결제 결과**는 PC의 경우 `IMP.request_pay(param, callback)` 호출 후 **callback** 으로 수신되고 모바일의 경우 **m_redirect_url**로 리디렉션됩니다. -```javascript title="Javascript SDK" +```ts title="Javascript SDK" IMP.request_pay( { pg: "mobilians.{상점 ID}", @@ -71,7 +71,7 @@ IMP.request_pay( 인증결제창 호출 파라미터에서 **customer_uid** 값을 추가하면 비 인증 결제창을 호출할 수 있습니다. 비 인증 결제창에서 빌링키를 발급받은 후 해당 빌링키로 결제를 요청합니다. -```javascript title="Javascript SDK" +```ts title="Javascript SDK" IMP.request_pay( { pg: "mobilians", diff --git a/src/content/docs/ko/pg/payment-gateway/kicc.mdx b/src/content/docs/ko/pg/payment-gateway/kicc.mdx index a4fd0d490..cbe16beef 100644 --- a/src/content/docs/ko/pg/payment-gateway/kicc.mdx +++ b/src/content/docs/ko/pg/payment-gateway/kicc.mdx @@ -21,7 +21,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; [JavaScript SDK](../../sdk/javascript-sdk-old/readme) `IMP.request_pay(param, callback)`을 호출하여 KICC 결제창을 호출할 수 있습니다. **결제결과**는 PC의 경우 `IMP.request_pay(param, callback)` 호출 후 **callback**으로 수신되고 모바일의 경우 **m_redirect_url**로 리디렉션됩니다. -```javascript title="Javascript SDK" +```ts title="Javascript SDK" IMP.request_pay( { pg: "kicc.{상점 ID}", @@ -89,7 +89,7 @@ IMP.request_pay( 인증결제창 호출 파라미터에서 **`customer_uid`** 값을 추가하면 비 인증 결제창을 호출할 수 있습니다. 비 인증 결제창에서 빌링키를 발급받은 후 해당 빌링키로 결제를 요청합니다. -```javascript title="Javascript SDK" +```ts title="Javascript SDK" IMP.request_pay( { pg: "kicc", @@ -185,7 +185,7 @@ KICC는 **현금성 결제수단** (실시간 계좌이체, 가상계좌)에 한 - `quantity` : 수량 - `amount` : 상품 가격 -```javascript title="JavaScript SDK" +```ts title="JavaScript SDK" escrow: true, // 에스크로 결제인 경우 필요 kiccProducts: [ { @@ -207,7 +207,7 @@ kiccProducts: [ -```javascript title="javascript" +```ts title="javascript" card: { direct: { code: "367", @@ -232,7 +232,7 @@ card: { -```javascript title="javascript" +```ts title="javascript" card: { detail: [ { card_code: "*", enabled: false }, //모든 카드사 비활성화 @@ -246,11 +246,7 @@ card: { - **`card_code` :** 금융결제원 카드사 코드. [**링크**](https://faq.portone.io/6503bcb4-4a61-4cf3-afd8-5d913b1385a6) 참조 (**string)** - **`enabled` :** 해당카드 활성화 여부 (**boolean)** - + diff --git a/src/content/docs/ko/pg/payment-gateway/ksnet/readme.mdx b/src/content/docs/ko/pg/payment-gateway/ksnet/readme.mdx index c9a64b125..1239da146 100644 --- a/src/content/docs/ko/pg/payment-gateway/ksnet/readme.mdx +++ b/src/content/docs/ko/pg/payment-gateway/ksnet/readme.mdx @@ -26,7 +26,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; KSNET 결제는 최신 SDK에서만 지원되는 기능입니다. -```javascript title="JS SDK" +```ts title="JS SDK" ``` @@ -69,7 +69,7 @@ KSNET 연동시에 사용되는 신규 JS SDK는 기존 모듈에서 제공했 -```javascript title="JavaScript SDK" +```ts title="JavaScript SDK" IMP.request_pay( { pg: "ksnet.{PG 상점 아이디}", // 테스트인 경우 ksnet.2999199999 @@ -255,7 +255,7 @@ curl -H "Content-Type: application/json" \ ## 4. 부가기능 -```javascript title="javascript" +```ts title="javascript" display: { card_quota: [6]; // 할부개월 6개월까지만 활성화 } @@ -272,8 +272,4 @@ display: { - + diff --git a/src/content/docs/ko/pg/payment-gateway/newtoss/readme.mdx b/src/content/docs/ko/pg/payment-gateway/newtoss/readme.mdx index e860a2d04..b3cf49eee 100644 --- a/src/content/docs/ko/pg/payment-gateway/newtoss/readme.mdx +++ b/src/content/docs/ko/pg/payment-gateway/newtoss/readme.mdx @@ -5,9 +5,10 @@ description: 토스페이먼츠 (신모듈 / 2022-07-27 버전) 연동 방법을 import Figure from "~/components/Figure.astro"; import Details from "~/components/gitbook/Details.astro"; -import Hint from "~/components/Hint.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; +import Hint from "~/components/Hint.astro"; + import image1 from "../_assets/tosspayments/tosspayments1.webp"; import image2 from "../_assets/tosspayments/tosspayments2.png"; import image3 from "../_assets/tosspayments/tosspayments3.png"; @@ -24,12 +25,11 @@ import image4 from "../_assets/tosspayments/tosspayments4.png"; 토스페이먼츠 신모듈 결제는 최신 SDK에서만 지원되는 기능입니다. ```html title="JS SDK" - + ``` -**토스페이먼츠 신모듈을 연동하기 위해서는 위에 안내된 JS SDK를 이용하셔야 합니다** - + **토스페이먼츠 신모듈을 연동하기 위해서는 위에 안내된 JS SDK를 이용하셔야 합니다** [JavaScript SDK](../../../sdk/javascript-sdk/readme)문서를 통해 최신 SDK를 설치해주세요. @@ -43,336 +43,326 @@ import image4 from "../_assets/tosspayments/tosspayments4.png"; 토스페이먼츠 신 모듈을 기준으로 작성한 예시 코드는 아래와 같습니다. - - -```javascript showLineNumbers -const userCode = "고객사 식별코드"; -IMP.init(userCode); // 고객사 식별 코드를 넣어 모듈을 초기화해주세요. - -IMP.request_pay( - { - pg: "tosspayments", // 반드시 "tosspayments"임을 명시해주세요. - merchant_uid: "order_id_1667634130160", - name: "나이키 와플 트레이너 2 SD", - pay_method: "card", - escrow: false, - amount: "109000", - tax_free: 3000, - buyer_name: "홍길동", - buyer_email: "buyer@example.com", - buyer_tel: "02-1670-5176", - buyer_addr: "성수이로 20길 16", - buyer_postcode: "04783", - m_redirect_url: "https://helloworld.com/payments/result", // 모바일 환경에서 필수 입력 - notice_url: "https://helloworld.com/api/v1/payments/notice", - confirm_url: "https://helloworld.com/api/v1/payments/confirm", - currency: "KRW", - locale: "ko", - custom_data: { userId: 30930 }, - display: { card_quota: [0, 6] }, - appCard: false, - useCardPoint: true, - bypass: { - tosspayments: { - useInternationalCardOnly: true, // 영어 결제창 활성화 + + ```ts showLineNumbers + const userCode = "고객사 식별코드"; + IMP.init(userCode); // 고객사 식별 코드를 넣어 모듈을 초기화해주세요. + + IMP.request_pay( + { + pg: "tosspayments", // 반드시 "tosspayments"임을 명시해주세요. + merchant_uid: "order_id_1667634130160", + name: "나이키 와플 트레이너 2 SD", + pay_method: "card", + escrow: false, + amount: "109000", + tax_free: 3000, + buyer_name: "홍길동", + buyer_email: "buyer@example.com", + buyer_tel: "02-1670-5176", + buyer_addr: "성수이로 20길 16", + buyer_postcode: "04783", + m_redirect_url: "https://helloworld.com/payments/result", // 모바일 환경에서 필수 입력 + notice_url: "https://helloworld.com/api/v1/payments/notice", + confirm_url: "https://helloworld.com/api/v1/payments/confirm", + currency: "KRW", + locale: "ko", + custom_data: { userId: 30930 }, + display: { card_quota: [0, 6] }, + appCard: false, + useCardPoint: true, + bypass: { + tosspayments: { + useInternationalCardOnly: true, // 영어 결제창 활성화 + }, + }, }, - }, - }, - (response) => { - // PC 환경에서 결제 프로세스 완료 후 실행 될 로직 - } -); -``` - -
-

주요 파라미터 설명

- -**`pg` \*****string** - -**PG사 구분코드** + (response) => { + // PC 환경에서 결제 프로세스 완료 후 실행 될 로직 + }, + ); + ``` -_tosspayments_ 로 지정하면 됩니다. +
+

주요 파라미터 설명

-**`pay_method`** **string** + **`pg` \*****string** -- 카드 (card) -- 계좌이체(trans) -- 가상계좌(vbank) -- 휴대폰 소액결제(phone) -- 도서문화상품권(booknlife) -- 스마트문상(smartculture) -- 컬쳐랜드(cultureland) -- 카카오페이 (kakaopay) -- 네이버페이 (naverpay) -- 엘페이 (lpay) -- 삼성페이(samsung) -- SSGpay (ssgpay) -- 애플페이 (applepay) -- 페이코 (payco) -- 토스간편결제 (tosspay) + **PG사 구분코드** -**`merchant_uid`** **\*** **string** + _tosspayments_ 로 지정하면 됩니다. -**주문번호** + **`pay_method`** **string** -매번 고유하게 채번되어야 합니다. + - 카드 (card) + - 계좌이체(trans) + - 가상계좌(vbank) + - 휴대폰 소액결제(phone) + - 도서문화상품권(booknlife) + - 스마트문상(smartculture) + - 컬쳐랜드(cultureland) + - 카카오페이 (kakaopay) + - 네이버페이 (naverpay) + - 엘페이 (lpay) + - 삼성페이(samsung) + - SSGpay (ssgpay) + - 애플페이 (applepay) + - 페이코 (payco) + - 토스간편결제 (tosspay) -**`amount` \*****number** + **`merchant_uid`** **\*** **string** -**결제금액** + **주문번호** -**string** 이 아닌점에 유의하세요 + 매번 고유하게 채번되어야 합니다. -**`buyer_name`** **\*** **`string`** + **`amount` \*****number** -**`구매자 이름`** + **결제금액** -**`buyer_email`** **`string`** + **string** 이 아닌점에 유의하세요 -**`구매자 email 주소`** + **`buyer_name`** **\*** **`string`** -**`currency`** **`string`** + **`구매자 이름`** -**`통화구분코드`** + **`buyer_email`** **`string`** -**`appCard`** **`boolean`** + **`구매자 email 주소`** -카드 결제시, 카드 결제창에 앱카드만 선택 가능하도록 할지 여부 (기본값: **false**) + **`currency`** **`string`** -**`useCardPoint`** **`boolean`** + **`통화구분코드`** -카드 결제시, 카드 포인트 사용 허용할지 여부 + **`appCard`** **`boolean`** -
+ 카드 결제시, 카드 결제창에 앱카드만 선택 가능하도록 할지 여부 (기본값: **false**) -
-

기타 파라미터 설명

+ **`useCardPoint`** **`boolean`** -**`bypass`** **object** + 카드 결제시, 카드 포인트 사용 허용할지 여부 +
-**`isCulturalExpense`** **boolean** +
+

기타 파라미터 설명

-문화비 지출여부 + **`bypass`** **object** -**`useInternationalCardOnly`** **boolean** + **`isCulturalExpense`** **boolean** -해외카드(Visa, MasterCard, UnionPay) 결제 여부입니다. 값이 `true`면 해외카드 결제가 가능한 영문 결제창이 열립니다. + 문화비 지출여부 -**`cashReceiptType`** **string** + **`useInternationalCardOnly`** **boolean** -현금성 결제(계좌이체, 가상계좌)창에서 선택할 수 있는 현금영수증 발급 유형 (기본값: 결제창에서 선택 가능) + 해외카드(Visa, MasterCard, UnionPay) 결제 여부입니다. 값이 `true`면 해외카드 결제가 가능한 영문 결제창이 열립니다. -- anonymous (미발행, 자진발급) -- personal (소득공제) -- corporate (지출증빙) + **`cashReceiptType`** **string** -```javascript -{ - pay_method: 'trans', - bypass: { - isCulturalExpense: true, - cashReceiptType: 'personal' - } -} -``` + 현금성 결제(계좌이체, 가상계좌)창에서 선택할 수 있는 현금영수증 발급 유형 (기본값: 결제창에서 선택 가능) -
- - - - -인증결제창 호출 파라미터에서 **customer\_uid** 값을 추가하면 비 인증 결제창을 호출할 수 있습니다. 비 인증 결제창에서 빌링키를 발급받은 후 해당 빌링키로 결제를 요청합니다. - -```javascript title="Javascript SDK" -IMP.request_pay( - { - pg: "tosspayments.{MID}", - pay_method: "card", // 'card'만 지원됩니다. - merchant_uid: "order_monthly_0001", // 상점에서 관리하는 주문 번호 - name: "최초인증결제", - amount: 0, // 실제 승인은 발생되지 않고 오직 빌링키만 발급됩니다. - customer_uid: "your-customer-unique-id", // 필수 입력. - buyer_email: "test@portone.io", - buyer_name: "포트원", - buyer_tel: "02-1234-1234", - m_redirect_url: "{모바일에서 결제 완료 후 리디렉션 될 URL}", - customer_id: "matthew", //고객사가 회원에게 부여한 고유 ID - }, - function (rsp) { - // callback 로직 - } -); -``` + - anonymous (미발행, 자진발급) + - personal (소득공제) + - corporate (지출증빙) - -- 비인증 결제를 위해서는 **토스페이먼츠로 부터 발급받은 MID정보**를 포트원 관리자콘솔에 설정하셔야 비 인증 결제창을 활성화 시킬수 있습니다. -- 빌링키 발급시 **실 결제는 발생되지 않습니다**.(금액을 지정해도 결제가 발생되지 않음) + ```json + { + "pay_method": "trans", + "bypass": { + "isCulturalExpense": true, + "cashReceiptType": "personal" + } + } + ``` +
+
- + + 인증결제창 호출 파라미터에서 **customer\_uid** 값을 추가하면 비 인증 결제창을 호출할 수 있습니다. 비 인증 결제창에서 빌링키를 발급받은 후 해당 빌링키로 결제를 요청합니다. -**주요 파라미터 설명** + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "tosspayments.{MID}", + pay_method: "card", // 'card'만 지원됩니다. + merchant_uid: "order_monthly_0001", // 상점에서 관리하는 주문 번호 + name: "최초인증결제", + amount: 0, // 실제 승인은 발생되지 않고 오직 빌링키만 발급됩니다. + customer_uid: "your-customer-unique-id", // 필수 입력. + buyer_email: "test@portone.io", + buyer_name: "포트원", + buyer_tel: "02-1234-1234", + m_redirect_url: "{모바일에서 결제 완료 후 리디렉션 될 URL}", + customer_id: "matthew", //고객사가 회원에게 부여한 고유 ID + }, + function (rsp) { + // callback 로직 + }, + ); + ``` -**`pg` \*****string** + + - 비인증 결제를 위해서는 **토스페이먼츠로 부터 발급받은 MID정보**를 포트원 관리자콘솔에 설정하셔야 비 인증 결제창을 활성화 시킬수 있습니다. + - 빌링키 발급시 **실 결제는 발생되지 않습니다**.(금액을 지정해도 결제가 발생되지 않음) + -**PG사 구분코드** + **주요 파라미터 설명** -**`tosspayments`** 로 지정하면 됩니다. + **`pg` \*****string** -**`customer_uid` \*****string** + **PG사 구분코드** -**카드 빌링키** + **`tosspayments`** 로 지정하면 됩니다. -비 인증 결제창에서 고객이 입력한 카드정보와 1:1로 매칭될 빌링키를 지정합니다. + **`customer_uid` \*****string** -**`amount` \*****number** + **카드 빌링키** -**결제금액** + 비 인증 결제창에서 고객이 입력한 카드정보와 1:1로 매칭될 빌링키를 지정합니다. -결제창에 표시될 금액으로 실제 승인은 이루어지지 않습니다.(실 결제를 발생시키기 위해서는 **customer_uid** 로 **REST API 를 이용하여 결제요청**을 해주셔야 합니다.) + **`amount` \*****number** -**`customer_id`** **`string`** + **결제금액** -**`구매자 식별자`** + 결제창에 표시될 금액으로 실제 승인은 이루어지지 않습니다.(실 결제를 발생시키기 위해서는 **customer\_uid** 로 **REST API 를 이용하여 결제요청**을 해주셔야 합니다.) -빌링키를 발급한 고객의 고유 ID 를 지정합니다.(회원ID) 해당 값 설정시 빌링키와 고객을 맵핑할 수 있습니다. 누락시 포트원에서 임의의 값을 설정합니다. + **`customer_id`** **`string`** -**빌링키(customer_uid)로 결제 요청하기** + **`구매자 식별자`** -빌링키 발급이 성공하면 실 빌링키는 customer_uid 와 1:1 매칭되어 **포트원 서버에 저장**됩니다. customer_uid를 고객사 내부서버에 저장하시고 [**비 인증 결제요청 REST API**](../../../api/api-4/api)를 호출하시면 결제를 발생시킬 수 있습니다. + 빌링키를 발급한 고객의 고유 ID 를 지정합니다.(회원ID) 해당 값 설정시 빌링키와 고객을 맵핑할 수 있습니다. 누락시 포트원에서 임의의 값을 설정합니다. -```sh title="server-side" -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 -``` + **빌링키(customer\_uid)로 결제 요청하기** - + 빌링키 발급이 성공하면 실 빌링키는 customer\_uid 와 1:1 매칭되어 **포트원 서버에 저장**됩니다. customer\_uid를 고객사 내부서버에 저장하시고 [**비 인증 결제요청 REST API**](../../../api/api-4/api)를 호출하시면 결제를 발생시킬 수 있습니다. - -**API 방식으로 빌링키 발급,결제요청,예약결제를 구현할수 있습니다.** - - -**MID 발급시 주의사항** + ```sh title="server-side" + 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 + ``` + -토스페이먼츠로 부터 MID 발급시 **API version** 은 반드시 **1.4** 이어야 합니다. + + **API 방식으로 빌링키 발급,결제요청,예약결제를 구현할수 있습니다.** - + + **MID 발급시 주의사항** -**일회성 결제 요청하기** + 토스페이먼츠로 부터 MID 발급시 **API version** 은 반드시 **1.4** 이어야 합니다. + -REST[ **API POST /subscribe/payments/onetime**](../../../api/api-4/api-1)을 호출하여 일회성 결제를 요청합니다. 요청 시 전달된 카드는 포트원에 등록되지 않습니다. + **일회성 결제 요청하기** -```sh -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**](../../../api/api-4/api-1)을 호출하여 일회성 결제를 요청합니다. 요청 시 전달된 카드는 포트원에 등록되지 않습니다. -**빌링키 발급 요청하기** + ```sh + 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/customers/\{customer_uid}**](../../../api/api-2/api-1)를 호출하여 빌링키 발급을 요청합니다. + **빌링키 발급 요청하기** -```sh -curl -H "Content-Type: application/json" \ - -X POST -d '{"card_number":"1234-1234-1234-1234", "expiry":"2025-12", "birth":"820213", "pwd_2digit":"00"}' \ - https://api.iamport.kr/subscribe/customers/your-customer-unique-id -``` + REST [**API POST /subscribe/customers/\{customer\_uid}**](../../../api/api-2/api-1)를 호출하여 빌링키 발급을 요청합니다. -**빌링키 발급 및 최초 결제 요청하기** + ```sh + curl -H "Content-Type: application/json" \ + -X POST -d '{"card_number":"1234-1234-1234-1234", "expiry":"2025-12", "birth":"820213", "pwd_2digit":"00"}' \ + https://api.iamport.kr/subscribe/customers/your-customer-unique-id + ``` -REST [**API POST /subscribe/payments/onetime**](../../../api/api-4/api-1)을 호출하여 빌링키 발급과 최초 결제를 요청합니다. + **빌링키 발급 및 최초 결제 요청하기** -- **`customer_uid`** : 빌링키 등록을 위해서 지정해야 합니다. + REST [**API POST /subscribe/payments/onetime**](../../../api/api-4/api-1)을 호출하여 빌링키 발급과 최초 결제를 요청합니다. -```sh -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`** : 빌링키 등록을 위해서 지정해야 합니다. -**빌링키로 결제 요청하기** + ```sh + 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**](../../../api/api-4/api)) REST API를 다음과 같이 호출합니다. + **빌링키로 결제 요청하기** -```sh -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 -``` + 빌링키 발급과 최초 결제가 성공하면 빌링키는 전달된 `customer_uid` 와 1:1 매칭되어 포트원에 저장됩니다. 보안상의 이유로 서버는 빌링키에 직접 접근할 수 없기 때문에 `customer_uid`를 이용해서 재결제([**POST /subscribe/payments/again**](../../../api/api-4/api)) REST API를 다음과 같이 호출합니다. - + ```sh + 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 + ``` +
## 4. 부가기능 - - -```javascript title="javascript" -display: { - card_quota: [6], // 할부개월 6개월만 활성화 - only_installment: true // 일시불 항목은 제외 -} -``` - -**파라미터 설명** - -- **card_quota :** - -\- 지정한 숫자에 해당하는 할부개월수만 표기 - -\- `[]`: 일시불만 결제 가능 + + ```json title="javascript" + { + "display": { + "card_quota": [6], // 할부개월 6개월만 활성화 + "only_installment": true // 일시불 항목은 제외 + } + } + ``` -\- `2,3,4,5,6`: 일시불을 포함한 2, 3, 4, 5, 6개월까지 할부개월 선택 가능\\ + **파라미터 설명** -- **`only_installment` : `true`** 인 경우 `card_quota` 에 설정한 할부개월수만 표시 + - **card\_quota :** - -할부결제는 **5만원 이상 결제 요청시**에만 이용 가능합니다. - - + \- 지정한 숫자에 해당하는 할부개월수만 표기 - + \- `[]`: 일시불만 결제 가능 - -```javascript title="javascript" -card: { - direct: { - code: "367", - quota: 3 - } -} -``` + \- `2,3,4,5,6`: 일시불을 포함한 2, 3, 4, 5, 6개월까지 할부개월 선택 가능\\ -**파라미터 설명** + - **`only_installment` : `true`** 인 경우 `card_quota` 에 설정한 할부개월수만 표시 -- **`code`** : 카드사 금융결제원 표준 코드. [**링크**](https://faq.portone.io/6503bcb4-4a61-4cf3-afd8-5d913b1385a6) 참조 (**string**) -- **`quota`** : 할부 개월 수. 일시불일 시 0 으로 지정. (**number**) + + 할부결제는 **5만원 이상 결제 요청시**에만 이용 가능합니다. + + - + + ```json title="javascript" + { + "card": { + "direct": { + "code": "367", + "quota": 3 + } + } + } + ``` - + **파라미터 설명** -토스페이먼츠 고정식 가상계좌 발급 서비스를 이용하기 위해서는 **토스페이먼츠 측과 협의**를 통해 결제에 이용하는 MID에 고정식 가상계좌 설정이 반드시 선행되어야 합니다. + - **`code`** : 카드사 금융결제원 표준 코드. [**링크**](https://faq.portone.io/6503bcb4-4a61-4cf3-afd8-5d913b1385a6) 참조 (**string**) + - **`quota`** : 할부 개월 수. 일시불일 시 0 으로 지정. (**number**) + -해당 설정이 완료되면 두가지 방식으로 고정식 가상계좌를 발급할 수 있습니다. + + 토스페이먼츠 고정식 가상계좌 발급 서비스를 이용하기 위해서는 **토스페이먼츠 측과 협의**를 통해 결제에 이용하는 MID에 고정식 가상계좌 설정이 반드시 선행되어야 합니다. -- [API 방식](../../../api/api-9/api) -- 결제창 방식 + 해당 설정이 완료되면 두가지 방식으로 고정식 가상계좌를 발급할 수 있습니다. -두 방식 모두 **고유식별번호**가 유입되어야 하며 해당 값은 각 고객을 특정할수 있는 고유값이어야 합니다. + - [API 방식](../../../api/api-9/api) + - 결제창 방식 -결제창 방식을 이용하기 위해서 고객에게 사전에 해당 고유식별번호가 안내되어야 하며 가상계좌 발급단계에서 아래 첨부이미지처럼 고유식별번호 란에 해당 값이 유입되어야 합니다. + 두 방식 모두 **고유식별번호**가 유입되어야 하며 해당 값은 각 고객을 특정할수 있는 고유값이어야 합니다. -
+ 결제창 방식을 이용하기 위해서 고객에게 사전에 해당 고유식별번호가 안내되어야 하며 가상계좌 발급단계에서 아래 첨부이미지처럼 고유식별번호 란에 해당 값이 유입되어야 합니다. -API 방식 또한 `vbank_key` 파라미터가 고유식별번호에 대응되는 값으로 API방식은 고객사에서 직접 해당 값을 기재해서 호출할수 있기 때문에 고객 편의차원에서 훨씬 간편한 고정식 가상계좌 서비스를 제공할수 있습니다. +
-고정식 가상계좌 발급이 정상적으로 이루어지면 아래와 같이 고객휴대폰 번호로 SMS가 발송되며 고객은 해당 정보를 보고 입금을 할수 있습니다.(비용: 무료) + API 방식 또한 `vbank_key` 파라미터가 고유식별번호에 대응되는 값으로 API방식은 고객사에서 직접 해당 값을 기재해서 호출할수 있기 때문에 고객 편의차원에서 훨씬 간편한 고정식 가상계좌 서비스를 제공할수 있습니다. -
+ 고정식 가상계좌 발급이 정상적으로 이루어지면 아래와 같이 고객휴대폰 번호로 SMS가 발송되며 고객은 해당 정보를 보고 입금을 할수 있습니다.(비용: 무료) - +
+ ## 5. 사용가능 기능 @@ -385,45 +375,41 @@ API 방식 또한 `vbank_key` 파라미터가 고유식별번호에 대응되는 - [현금영수증 발급(외부) API](../../../api/api-8/api-5) + **기존에 deprecated된 응답들은 모두 제거됐습니다. ⚠️** -**기존에 deprecated된 응답들은 모두 제거됐습니다. ⚠️** - -신 토스페이먼츠 모듈 연동시에 사용되는 신규 JS SDK는 기존 모듈에서 제공했던 CallBack 파라미터가 대부분 삭제되었습니다.(특히 deprecated 로 명시된 파라미터는 모두 삭제되었습니다.) - -해당 JS SDK 사용시 Callback 으로 내려받을수 있는 데이터는 오직 아래 두가지 입니다. + 신 토스페이먼츠 모듈 연동시에 사용되는 신규 JS SDK는 기존 모듈에서 제공했던 CallBack 파라미터가 대부분 삭제되었습니다.(특히 deprecated 로 명시된 파라미터는 모두 삭제되었습니다.) -**`imp_uid`, `merchant_uid`** + 해당 JS SDK 사용시 Callback 으로 내려받을수 있는 데이터는 오직 아래 두가지 입니다. -따라서 해당 SDK를 사용하실때는 `IMP.request_pay()`로부터 응답된 객체(또는 쿼리 파라미터)에서 `imp_uid`를 가지고 **아임포트 REST API(GET `/payments/imp_uid`)로 결제 상세 내역(승인 상태, 승인 결과 등등)을 조회**하여 응답 파라미터 중 status 파라미터로 결제 상태를 파악하셔야 합니다. + **`imp_uid`, `merchant_uid`** + 따라서 해당 SDK를 사용하실때는 `IMP.request_pay()`로부터 응답된 객체(또는 쿼리 파라미터)에서 `imp_uid`를 가지고 **아임포트 REST API(GET `/payments/imp_uid`)로 결제 상세 내역(승인 상태, 승인 결과 등등)을 조회**하여 응답 파라미터 중 status 파라미터로 결제 상태를 파악하셔야 합니다. + ```html + + ``` -```html - -``` - -위 JS SDK 를 이용하여 토스페이먼츠,케이에스넷 연동시 callback Data는 -아래와 같이 두가지 형태로만 내려갑니다. - -- `imp_uid` -- `merchant_uid` + 위 JS SDK 를 이용하여 토스페이먼츠,케이에스넷 연동시 callback Data는 + 아래와 같이 두가지 형태로만 내려갑니다. -위 PG사를 제외한 다른 PG사는 `imp_success` 파라미터가 기존처럼 내려가지만 -해당 파리미터는 deprecated 된 값이기 때문에 해당 값에 의존성을 가진 프로그램 로직은 모두 삭제하시는 -방향성을 잡아가셔야 하는점 유념하시기 바랍니다. + - `imp_uid` + - `merchant_uid` + 위 PG사를 제외한 다른 PG사는 `imp_success` 파라미터가 기존처럼 내려가지만 + 해당 파리미터는 deprecated 된 값이기 때문에 해당 값에 의존성을 가진 프로그램 로직은 모두 삭제하시는 + 방향성을 잡아가셔야 하는점 유념하시기 바랍니다. -**토스페이먼츠 API 버전 설정** + **토스페이먼츠 API 버전 설정** -- [토스페이먼츠 개발자센터](https://app.tosspayments.com/signin?redirectUrl=https%3A%2F%2Fdevelopers.tosspayments.com%2Fmy%2Fapi-keys) 로그인 -- 왼쪽 네비게이션 메뉴 API 키 선택 → API 버전을 **2022-07-27**로 선택 + - [토스페이먼츠 개발자센터](https://app.tosspayments.com/signin?redirectUrl=https%3A%2F%2Fdevelopers.tosspayments.com%2Fmy%2Fapi-keys) 로그인 - API 버전을 다르게 설정하면 결제 승인 / 실패 시 실제 응답과 다른 응답을 받아볼 수 있으니 **반드시 API 버전을 2022-07-27로** 맞춰주시기 바랍니다 + - 왼쪽 네비게이션 메뉴 API 키 선택 → API 버전을 **2022-07-27**로 선택 -
+ API 버전을 다르게 설정하면 결제 승인 / 실패 시 실제 응답과 다른 응답을 받아볼 수 있으니 **반드시 API 버전을 2022-07-27로** 맞춰주시기 바랍니다 +
diff --git a/src/content/docs/ko/pg/payment-gateway/newtoss/warning.mdx b/src/content/docs/ko/pg/payment-gateway/newtoss/warning.mdx index 2d90947e6..2aef4569b 100644 --- a/src/content/docs/ko/pg/payment-gateway/newtoss/warning.mdx +++ b/src/content/docs/ko/pg/payment-gateway/newtoss/warning.mdx @@ -40,7 +40,7 @@ display.card_quota 파라미터로 결제창에 렌더링 될 할부 개월수 - 예1. 일시불만 허용 - ```jsx + ```tsx display: { card_quota: [0]; } @@ -48,7 +48,7 @@ display.card_quota 파라미터로 결제창에 렌더링 될 할부 개월수 - 예2. 5개월만 허용 - ```jsx + ```tsx display: { card_quota: [5]; } @@ -56,7 +56,7 @@ display.card_quota 파라미터로 결제창에 렌더링 될 할부 개월수 - 예3. \[토스페이먼츠] 일시불 \~ 5개월까지 허용 - ```jsx + ```tsx display: { card_quota: [3, 5]; // 3과 5 중에 최대값이 5이기 때문에 일시불 ~ 5개월까지 모두 렌더링 된다 } @@ -64,7 +64,7 @@ display.card_quota 파라미터로 결제창에 렌더링 될 할부 개월수 - 예3. \[타 PG사] 일시불 \~ 5개월까지 허용 - ```jsx + ```tsx display: { card_quota: [0, 1, 2, 3, 4, 5]; } @@ -139,7 +139,7 @@ display.card_quota 파라미터로 결제창에 렌더링 될 할부 개월수 - 예1. 현대카드 다이렉트 호출 → 무조건 일시불로 결제 됨 - ```jsx + ```tsx card: { direct: { code: "367"; @@ -149,7 +149,7 @@ display.card_quota 파라미터로 결제창에 렌더링 될 할부 개월수 - 예2. 삼성카드 다이렉트 호출 + 5개월 고정 할부 개월수 지정 → 5개월 할부 적용 - ```jsx + ```tsx { card: { direct: { @@ -176,7 +176,7 @@ display.card_quota 파라미터로 결제창에 렌더링 될 할부 개월수
-```javascript +```ts card: { direct: { code: '361', @@ -240,7 +240,7 @@ card: { - 예. 네이버페이 - 5개월 고정 할부 설정시, 일시불과 5개월 할부 모두 선택 가능 - ```jsx + ```tsx { pay_method: 'naverpay', display: { diff --git a/src/content/docs/ko/pg/payment-gateway/nhn-kcp.mdx b/src/content/docs/ko/pg/payment-gateway/nhn-kcp.mdx index 35f6d4263..3b5ec2e7f 100644 --- a/src/content/docs/ko/pg/payment-gateway/nhn-kcp.mdx +++ b/src/content/docs/ko/pg/payment-gateway/nhn-kcp.mdx @@ -25,7 +25,7 @@ KCP 결제창을 호출할 수 있습니다. **결제결과**는 PC의 경우 `I -```javascript +```ts IMP.request_pay({ pg : 'kcp.{사이트코드}', //테스트인경우 kcp.T0000 pay_method : 'card', @@ -102,7 +102,7 @@ IMP.request_pay({ 인증결제창 호출 파라미터에서 **customer\_uid** 값을 추가하면 비 인증 결제창을 호출할 수 있습니다. 비인증 결제창에서 빌링키를 발급받은 후 해당 빌링키로 결제를 요청합니다. -```javascript title="Javascript SDK" showLineNumbers +```ts title="Javascript SDK" showLineNumbers IMP.request_pay( { pg: "kcp_billing.{사이트코드}", @@ -222,7 +222,7 @@ curl -H "Content-Type: application/json" \ -```javascript title="javascript" +```ts title="javascript" display: { card_quota: [6] // 할부개월 6개월까지만 활성화 } @@ -246,7 +246,7 @@ display: { -```javascript title="javascript" +```ts title="javascript" { card: { direct: { @@ -379,7 +379,7 @@ display: { -```javascript +```ts { card: { detail: [ @@ -404,7 +404,7 @@ display: { 인증결제시 각 카드사 앱카드 결제 화면만 노출하고 싶은 경우 아래 파라미터를 설정하시면 됩니다. -```javascript title="request_pay()" +```ts title="request_pay()" { appCard: true; //true 설정시 각 카드사 앱카드 결제만 활성화 } @@ -419,7 +419,7 @@ display: { **상품권 결제수단**을 사용하기 위해서는 고객사에서 관리하는 회원ID를 아래와 같은 방법으로 파라미터 설정이 필요합니다. -```javascript title="javascript SDK" +```ts title="javascript SDK" { bypass: { shop_user_id: "ABCD123"; // 고객사 회원ID (20byte) @@ -434,7 +434,7 @@ display: { **컬처랜드 문화 상품권을 호출하는 경우** -```javascript +```ts IMP.request_pay({ pg: "kcp.{문화상품권 대상 사이트코드}", pay_method: "cultureland", //문화상품권 @@ -456,7 +456,7 @@ IMP.request_pay({ 에스크로 결제를 위해서는 **`escrow`** 파라미터를 추가하고 **true** 값으로 설정되어야 합니다. 에스크로 결제요청 시 **장바구니 상품을 묶어서 결제하는 경우** 해당 품목에 대한 정보를 전달하기 위해 해당 상품관련 정보를 추가 파라미터(**`kcpProducts`**)로 전달해야 합니다.\ -\*\*`kcpProducts`\*\*는 다음 4개의 필수 속성으로 구성된 객체배열입니다. +**`kcpProducts`**는 다음 4개의 필수 속성으로 구성된 객체배열입니다. **`amount`** 값은 결제 금액(`param.amount`) 값과 관계가 없으며 비교검증되지 않습니다. @@ -465,7 +465,7 @@ IMP.request_pay({ - quantity : 수량 - amount : 상품 가격 -```javascript title="JavaScript SDK" +```ts title="JavaScript SDK" IMP.request_pay({ pg: "kcp", escrow: true, // 에스크로 결제인 경우 필요 @@ -490,7 +490,7 @@ IMP.request_pay({ -```javascript title="request_pay()" +```ts title="request_pay()" { prefill: { phoneNumber: "고정할 휴대폰번호" @@ -503,7 +503,7 @@ IMP.request_pay({ -```javascript +```ts IMP.request_pay({ ... bypass: { @@ -519,7 +519,7 @@ IMP.request_pay({ -```javascript +```ts IMP.request_pay({ ... bypass : { diff --git a/src/content/docs/ko/pg/payment-gateway/nice-v2/billing-api-caution.mdx b/src/content/docs/ko/pg/payment-gateway/nice-v2/billing-api-caution.mdx index 195b527d1..95fb706e9 100644 --- a/src/content/docs/ko/pg/payment-gateway/nice-v2/billing-api-caution.mdx +++ b/src/content/docs/ko/pg/payment-gateway/nice-v2/billing-api-caution.mdx @@ -98,7 +98,7 @@ API로 현금영수증 발급(`POST /receipts/{imp_uid}`)시 발급 받을 현

[가능] 사업자 등록번호로 지출증빙용 현금영수증 발급

-```javascript +```ts // POST /receipts/{imp_uid} { @@ -114,7 +114,7 @@ API로 현금영수증 발급(`POST /receipts/{imp_uid}`)시 발급 받을 현

[가능] 휴대폰 번호로 소득공제용 현금영수증 발급

-```javascript +```ts // POST /receipts/{imp_uid} { @@ -130,7 +130,7 @@ API로 현금영수증 발급(`POST /receipts/{imp_uid}`)시 발급 받을 현

[가능] 주민등록번호로 소득공제용 현금영수증 발급

-```javascript +```ts // POST /receipts/{imp_uid} { @@ -146,7 +146,7 @@ API로 현금영수증 발급(`POST /receipts/{imp_uid}`)시 발급 받을 현

[불가능] 현금영수증 카드번호로 소득공제용 현금영수증 발급

-```javascript +```ts // POST /receipts/{imp_uid} { diff --git a/src/content/docs/ko/pg/payment-gateway/nice-v2/payment-caution.mdx b/src/content/docs/ko/pg/payment-gateway/nice-v2/payment-caution.mdx index d2eae66c7..689fff2c3 100644 --- a/src/content/docs/ko/pg/payment-gateway/nice-v2/payment-caution.mdx +++ b/src/content/docs/ko/pg/payment-gateway/nice-v2/payment-caution.mdx @@ -32,7 +32,7 @@ import Figure from "~/components/Figure.astro";

BC 카드 다이렉트 호출 + 5개월 고정 할부

-```javascript +```ts IMP.request_pay( { // ...중략 @@ -55,7 +55,7 @@ IMP.request_pay(

삼성 카드 다이렉트 호출 + 일시불

-```javascript +```ts IMP.request_pay( { // ...중략 @@ -84,7 +84,7 @@ IMP.request_pay(

모바일 환경에서 리스트 할부 개월수만 전달 → 전달한 파라미터가 무시되고 모든 할부 개월수 렌더링

-```javascript +```ts IMP.request_pay( { // ...중략 @@ -105,7 +105,7 @@ import screenshot1 from "./_assets/caution/only-list-installment-on-mobile.png";

모바일 환경에서 3개월 고정 할부 개월수만 전달 → 전달한 파라미터가 무시되고 모든 할부 개월수 렌더링

-```javascript +```ts // ...중략 IMP.request_pay( { @@ -157,7 +157,7 @@ IMP.request_pay(

자세히 보기

-```javascript +```ts IMP.request_pay( { // ...중략 @@ -206,7 +206,7 @@ import screenshot2 from "./_assets/caution/escrow-trans.png";

결제내역 조회 API 호출 결과

-```javascript +```ts // GET /payments/{imp_uid} { // ...중략 @@ -301,7 +301,7 @@ SSGPAY 은행 계좌 거래는 현금성 결제로 현금영수증 발급이 가

파라미터 예시

-```javascript +```ts IMP.request_pay({ // ...중략 pg: "nice_v2", @@ -322,7 +322,7 @@ SSGPAY 은행 계좌 결제 시 현금영수증 발급 정보를 입력하여

결제내역 조회 API 호출 결과

-```javascript +```ts // GET /payments/{imp_uid} { @@ -340,7 +340,7 @@ SSGPAY 은행 계좌 결제 시 현금영수증 발급 정보를 입력하여

현금영수증 발급 내역 조회 API 호출 결과

-```javascript +```ts // GET /receipts/{imp_uid} { @@ -375,7 +375,7 @@ import screenshot3 from "./_assets/caution/receipts-list-on-v1-console.png";

파라미터 예시

-```javascript +```ts IMP.request_pay( { // ...중략 diff --git a/src/content/docs/ko/pg/payment-gateway/nice-v2/readme.mdx b/src/content/docs/ko/pg/payment-gateway/nice-v2/readme.mdx index 7db06ad08..281e27bfa 100644 --- a/src/content/docs/ko/pg/payment-gateway/nice-v2/readme.mdx +++ b/src/content/docs/ko/pg/payment-gateway/nice-v2/readme.mdx @@ -3,14 +3,13 @@ title: 나이스페이먼츠 (신모듈) description: 나이스페이먼츠 연동 방법을 안내합니다. --- -import * as prose from "~/components/prose"; import Details from "~/components/gitbook/Details.astro"; import Hint from "~/components/Hint.astro"; +import * as prose from "~/components/prose"; export const components = prose; -import Figure from "~/components/Figure.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; ## 1. 나이스페이먼츠(신모듈) 채널 설정하기 @@ -20,14 +19,23 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; 그렇지 않은 상태에서 해당 기능 이용시 PG창 호출에 실패하거나, 승인에 실패하거나, 승인에 성공하더라도 의도한 바와는 다른 응답을 얻게 될 수 있으니 주의 해주시기 바랍니다. - 모든 결제 수단(간편결제 포함) + - 면세 / 복합과세 사용 + - 부가세 지정 금액 방식 사용(영세율 포함) + - 부분 취소 + - 할부 사용 + - 상점 부담 무이자 할부 사용 + - 카드사 포인트 사용 + - 에스크로 사용 + - 해외 결제 사용 + - 일부 bypass 파라미터 - UserCI - MallUserID @@ -48,19 +56,18 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; -#### **기존에 deprecated된 콜백 응답은 모두 제거**됐습니다. - -신규 JS SDK는 기존 모듈에서 제공했던 CallBack 응답 파라미터가 대부분 삭제되었습니다. -(특히 deprecated 로 명시된 파라미터는 모두 삭제되었습니다.) + ## **기존에 deprecated된 콜백 응답은 모두 제거**됐습니다. -해당 JS SDK 사용시 Callback 으로 내려받을수 있는 데이터는 오직 아래 두가지 입니다. + 신규 JS SDK는 기존 모듈에서 제공했던 CallBack 응답 파라미터가 대부분 삭제되었습니다. + (특히 deprecated 로 명시된 파라미터는 모두 삭제되었습니다.) -**`imp_uid`, `merchant_uid`** + 해당 JS SDK 사용시 Callback 으로 내려받을수 있는 데이터는 오직 아래 두가지 입니다. -따라서 해당 SDK를 사용하실때는 `IMP.request_pay`로부터 응답된 객체(또는 쿼리 파라미터)에서 -`imp_uid`를 가지고 **아임포트 REST API(GET `/payments/imp_uid`)로 결제 상세 내역(승인 상태, 승인 결과 등등)을 조회**하여 -응답 파라미터 중 `status` 파라미터로 결제 상태를 파악하셔야 합니다. + **`imp_uid`, `merchant_uid`** + 따라서 해당 SDK를 사용하실때는 `IMP.request_pay`로부터 응답된 객체(또는 쿼리 파라미터)에서 + `imp_uid`를 가지고 **아임포트 REST API(GET `/payments/imp_uid`)로 결제 상세 내역(승인 상태, 승인 결과 등등)을 조회**하여 + 응답 파라미터 중 `status` 파라미터로 결제 상태를 파악하셔야 합니다. [JavaScript SDK](../../../sdk/javascript-sdk/readme) 문서를 통해 최신 SDK를 설치해주세요. @@ -70,131 +77,126 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; [JavaScript SDK](../../../sdk/javascript-sdk/readme) `IMP.request_pay(param, callback)`을 호출하여 (신) 나이스페이먼츠 결제창을 호출할 수 있습니다. **결제 결과**는 PC의 경우 `IMP.request_pay(param, callback)` 호출 후 **callback**으로 수신되고 모바일의 경우 -**m_redirect_url** 로 리디렉션됩니다. +**m\_redirect\_url** 로 리디렉션됩니다. - -```javascript title="Javascript SDK" -IMP.request_pay( - { - pg: "nice_v2.{상점 ID}", - pay_method: "card", - merchant_uid: "orderNo0001", - name: "주문명:결제테스트", - amount: 1004, - buyer_email: "test@portone.io", - buyer_name: "구매자이름", - buyer_tel: "010-1234-5678", - buyer_addr: "서울특별시 강남구 삼성동", - buyer_postcode: "123-456", - m_redirect_url: "{모바일에서 결제 완료 후 리디렉션 될 URL}", - }, - function (rsp) { - // callback 로직 - } -); -``` - -
-

주요 파라미터 설명

- -**`pg` \*****string** + + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "nice_v2.{상점 ID}", + pay_method: "card", + merchant_uid: "orderNo0001", + name: "주문명:결제테스트", + amount: 1004, + buyer_email: "test@portone.io", + buyer_name: "구매자이름", + buyer_tel: "010-1234-5678", + buyer_addr: "서울특별시 강남구 삼성동", + buyer_postcode: "123-456", + m_redirect_url: "{모바일에서 결제 완료 후 리디렉션 될 URL}", + }, + function (rsp) { + // callback 로직 + }, + ); + ``` -**PG사 구분코드** +
+

주요 파라미터 설명

-`nice_v2` 로 지정하면 됩니다. + **`pg` \*****string** -**`pay_method`** **\*** **string** + **PG사 구분코드** -**결제수단 구분코드** + `nice_v2` 로 지정하면 됩니다. -- card (신용카드) -- trans (실시간 계좌이체) -- vbank (가상계좌) -- phone (휴대폰소액결제) -- cultureland (컬쳐랜드) -- naverpay_card (네이버페이 - 카드) -- naverpay_point (네이버페이 - 포인트) -- kakaopay (카카오페이) -- payco (페이코) -- samsungpay (삼성페이) -- skpay (11Pay (구.SKPay)) -- ssgpay (SSGPAY) -- ssgpay_bank (SSGPAY 은행계좌) -- lpay (LPAY) -- applepay (애플페이) + **`pay_method`** **\*** **string** -**`merchant_uid`** **\*** **string** + **결제수단 구분코드** -**주문번호** + - card (신용카드) + - trans (실시간 계좌이체) + - vbank (가상계좌) + - phone (휴대폰소액결제) + - cultureland (컬쳐랜드) + - naverpay\_card (네이버페이 - 카드) + - naverpay\_point (네이버페이 - 포인트) + - kakaopay (카카오페이) + - payco (페이코) + - samsungpay (삼성페이) + - skpay (11Pay (구.SKPay)) + - ssgpay (SSGPAY) + - ssgpay\_bank (SSGPAY 은행계좌) + - lpay (LPAY) + - applepay (애플페이) -매번 고유하게 채번되어야 합니다. + **`merchant_uid`** **\*** **string** -**`amount`** **\*** **`integer`** + **주문번호** -**결제금액** + 매번 고유하게 채번되어야 합니다. -소수점 두번째 자리까지 허용합니다. + **`amount`** **\*** **`integer`** -**`buyer_tel`** **\*** **string** + **결제금액** -**구매자 전화번호** + 소수점 두번째 자리까지 허용합니다. -**`vbank_due`** **\*** **string** + **`buyer_tel`** **\*** **string** -**가상계좌 입금기한 (YYYY-MM-DD)** + **구매자 전화번호** -(신) 나이스페이먼츠의 경우 필수 입력이며 날짜는 무조건 23:59:59로 설정 됨 + **`vbank_due`** **\*** **string** -**`escrow`** **\*** **boolean** + **가상계좌 입금기한 (YYYY-MM-DD)** -**에스크로 결제 여부** + (신) 나이스페이먼츠의 경우 필수 입력이며 날짜는 무조건 23:59:59로 설정 됨 -**`period`** **\*** **array** + **`escrow`** **\*** **boolean** -**서비스 제공 기간** + **에스크로 결제 여부** -날짜만 입력이 가능하며(시간은 무시) 시작 날짜와 종료 날짜를 모두 입력해야 합니다. + **`period`** **\*** **array** -**`from`** **`: YYYYMMDD`** - -**`to`** **`: YYYYMMDD`** - -
+ **서비스 제공 기간** -
-

- 결제 가능 결제수단 -

+ 날짜만 입력이 가능하며(시간은 무시) 시작 날짜와 종료 날짜를 모두 입력해야 합니다. -- card + 에스크로, 다이렉트 -- vbank + 에스크로 -- trans + 에스크로, 다이렉트(은행 지정 X) -- phone + 다이렉트(통신사 지정 X) -- cultureland -- naverpay_card -- naverpay_point -- kakaopay -- payco -- samsungpay -- skpay -- ssgpay -- ssgpay_bank -- lpay -- applepay + **`from`** **`: YYYYMMDD`** -
+ **`to`** **`: YYYYMMDD`** +
-
+
+

+ 결제 가능 결제수단 +

+ - card + 에스크로, 다이렉트 + - vbank + 에스크로 + - trans + 에스크로, 다이렉트(은행 지정 X) + - phone + 다이렉트(통신사 지정 X) + - cultureland + - naverpay\_card + - naverpay\_point + - kakaopay + - payco + - samsungpay + - skpay + - ssgpay + - ssgpay\_bank + - lpay + - applepay +
+
-

- 가능한 결제 환경 -

- -- PC (iframe) -- 모바일 (리디렉션) +

+ 가능한 결제 환경 +

+ - PC (iframe) + - 모바일 (리디렉션)
diff --git a/src/content/docs/ko/pg/payment-gateway/nice.mdx b/src/content/docs/ko/pg/payment-gateway/nice.mdx index 02757a61a..ca35c818e 100644 --- a/src/content/docs/ko/pg/payment-gateway/nice.mdx +++ b/src/content/docs/ko/pg/payment-gateway/nice.mdx @@ -29,7 +29,7 @@ import Hint from "~/components/Hint.astro"; -```javascript title="Javascript SDK" +```ts title="Javascript SDK" IMP.request_pay( { pg: "nice.{상점 ID}", @@ -174,7 +174,7 @@ curl -H "Content-Type: application/json" \ -```javascript title="javascript" +```ts title="javascript" display: { card_quota: [6], // 할부개월 6개월까지만 활성화 } @@ -192,16 +192,12 @@ display: { - + -```javascript title="javascript" +```ts title="javascript" card: { direct: { code: "367", @@ -223,17 +219,13 @@ card: { - + -```javascript title="javascript" +```ts title="javascript" card: { detail: [ { card_code: "*", enabled: false }, //모든 카드사 비활성화 @@ -247,17 +239,13 @@ card: { - **`card_code` :** 금융결제원 카드사 코드. [**링크**](https://faq.portone.io/6503bcb4-4a61-4cf3-afd8-5d913b1385a6) 참조 (**string)** - **`enabled` :** 해당 카드 활성화 여부 (**boolean)** - + -```javascript +```ts // 영세율 결제 경우 amount: 1000, tax_free: 0, diff --git a/src/content/docs/ko/pg/payment-gateway/paymentwall.mdx b/src/content/docs/ko/pg/payment-gateway/paymentwall.mdx index 02f0d6d4b..cafbde516 100644 --- a/src/content/docs/ko/pg/payment-gateway/paymentwall.mdx +++ b/src/content/docs/ko/pg/payment-gateway/paymentwall.mdx @@ -23,7 +23,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; -```javascript title="Javascript SDK" +```ts title="Javascript SDK" IMP.request_pay({ pg: "paymentwall.{project_key}", pay_method: "card", // 페이먼트월은 국가IP에 따라 결제수단이 활성화 됩니다.(생략가능) @@ -110,7 +110,7 @@ LIVE 프로젝트에서 테스트 결제수단을 활성화 하는 경우 사용 만약 LIVE 프로젝트가 아니라면(페이먼트월 심사 완료 전 단계), `use_test_method` 파라미터 설정과 동시에 bypass의 `ps` 파라미터를 `test`로 설정해야 테스트 결제수단 사용이 가능합니다. -```javascript title="Javascript SDK" +```ts title="Javascript SDK" IMP.request_pay({ use_test_method: true, bypass: { @@ -133,7 +133,7 @@ IMP.request_pay({ 인증결제창 호출 파라미터에서 `customer_uid` 값을 추가하면 비 인증 결제창을 호출할 수 있습니다. 비 인증 결제창에서 빌링키를 발급받은 후 해당 빌링키로 결제를 요청합니다. -```javascript title="Javascript SDK" +```ts title="Javascript SDK" IMP.request_pay( { pg: "paymentwall.{project_key}", diff --git a/src/content/docs/ko/pg/payment-gateway/paypal.mdx b/src/content/docs/ko/pg/payment-gateway/paypal.mdx index 629998d7b..dd52beff9 100644 --- a/src/content/docs/ko/pg/payment-gateway/paypal.mdx +++ b/src/content/docs/ko/pg/payment-gateway/paypal.mdx @@ -29,7 +29,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; -```javascript title="Javascript SDK" +```ts title="Javascript SDK" IMP.request_pay({ pg: "paypal.{API 사용자 이름}", pay_method: "card", @@ -97,7 +97,7 @@ Paypal에서는 고위험업종(게임, 디지털 콘텐츠) 고객사의 경우 고위험거래를 안전하게 요청하기 위해서는 거래를 증명할 추가적인 정보(STC API로 전달할 정보)가 필요하며, 아래 예제와 같이 `request_pay`에 파라미터를 추가하여 고위험거래를 요청할 수 있습니다. -```javascript +```ts IMP.request_pay({ /* 요청 객체 */ // Paypal 전용 파라미터로 결제요청 파라미터 문서에 존재하지 않습니다. diff --git a/src/content/docs/ko/pg/payment-gateway/rt.mdx b/src/content/docs/ko/pg/payment-gateway/rt.mdx index 07e126c14..3d168c62c 100644 --- a/src/content/docs/ko/pg/payment-gateway/rt.mdx +++ b/src/content/docs/ko/pg/payment-gateway/rt.mdx @@ -309,7 +309,7 @@ STC 기능을 사용하시기 위해 다음 정보를 확인하셔야 합니다.

빌링키 발급시 STC 적용하기

- ```javascript + ```ts IMP.loadUI('paypal-rt', { ...중략 pg: 'paypal_v2', @@ -352,7 +352,7 @@ STC 기능을 사용하시기 위해 다음 정보를 확인하셔야 합니다.

발급 된 빌링키로 단건 결제(again API 호출)시 STC 적용하기

- ```javascript + ```ts await fetch( 'https://api.iamport.kr/subscribe/payments/again', { diff --git a/src/content/docs/ko/pg/payment-gateway/rt/warning.mdx b/src/content/docs/ko/pg/payment-gateway/rt/warning.mdx index 5dda7d8eb..2a92dc9c5 100644 --- a/src/content/docs/ko/pg/payment-gateway/rt/warning.mdx +++ b/src/content/docs/ko/pg/payment-gateway/rt/warning.mdx @@ -11,7 +11,7 @@ import Figure from "~/components/Figure.astro"; 페이팔을 통해 다양한 수단으로 빌링키 발급이 가능하지만, 페이팔이 승인 된 빌링키 발급 수단 및 정보를 알려주지 않습니다. 따라서 페이팔 빌링키 발급 건의 결제 수단(pay_method)은 모두 paypal로 일괄 저장되며 [발급 된 빌링키 정보 조회](../../../api/api-2/api-2)시 카드 정보는 모두 null로 내려갑니다. -```javascript +```ts GET /subscribe/customers/{customer_uid} { @@ -149,7 +149,7 @@ withAdditionalData:@{}]; 배송 정보 중 **`line1`, `city` 그리고 `country_code`는 필수 입력**입니다. 전달하지 않을 경우 에러가 리턴되며 빌링키 발급 창이 호출되지 않습니다. -```javascript +```ts bypass: { paypal_v2: { ...중략 diff --git a/src/content/docs/ko/pg/payment-gateway/settle/mybank.mdx b/src/content/docs/ko/pg/payment-gateway/settle/mybank.mdx index 0e35c4e1b..166927ea1 100644 --- a/src/content/docs/ko/pg/payment-gateway/settle/mybank.mdx +++ b/src/content/docs/ko/pg/payment-gateway/settle/mybank.mdx @@ -23,7 +23,7 @@ callback) 호출 후 **callback** 으로 수신 -```javascript title="Javascript SDK" +```ts title="Javascript SDK" IMP.request_pay({ // param pg: "settle_acc.MID", // 발급받은 고객사아이디 pay_method: "trans", @@ -100,7 +100,7 @@ criPsblYn: "N", // 현금영수증 발행가능 여부 ( Y or N or ""빈문자 인증결제창 호출 파라미터에서 **customer\_uid** 값을 추가하면 비 인증 결제창을 호출할 수 있습니다. 비인증 결제창에서 빌링키를 발급받은 후 해당 빌링키로 결제를 요청합니다. -```javascript title="Javascript SDK" +```ts title="Javascript SDK" IMP.request_pay( { pg: "settle_acc.MID", //발급받은 고객사아이디 diff --git a/src/content/docs/ko/pg/payment-gateway/settle/readme.mdx b/src/content/docs/ko/pg/payment-gateway/settle/readme.mdx index edb57ee60..ad50cd6e7 100644 --- a/src/content/docs/ko/pg/payment-gateway/settle/readme.mdx +++ b/src/content/docs/ko/pg/payment-gateway/settle/readme.mdx @@ -25,7 +25,7 @@ callback)` 호출 후 **`callback`**으로 수 -```javascript title="Javascript SDK" +```ts title="Javascript SDK" IMP.request_pay({ pg: "settle.{상점 ID}", pay_method: "card", diff --git a/src/content/docs/ko/pg/payment-gateway/smartro-v2/caution.mdx b/src/content/docs/ko/pg/payment-gateway/smartro-v2/caution.mdx index 5b59bbffe..38d54b1a3 100644 --- a/src/content/docs/ko/pg/payment-gateway/smartro-v2/caution.mdx +++ b/src/content/docs/ko/pg/payment-gateway/smartro-v2/caution.mdx @@ -67,7 +67,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro";

파라미터 예제 코드

-```javascript +```ts // 예. BC카드 5개월 할부 ...중략 pg: 'smartro_v2', @@ -181,7 +181,7 @@ import screenshot1 from "./_assets/caution/screenshot-1.png";

V1 에스크로 + 카드사 다이렉트 호출

-```jsx {5-11} +```tsx {5-11} IMP.request_pay({ pg: "smartro_v2", pay_method: "card", @@ -200,7 +200,7 @@ IMP.request_pay({

V2 에스크로 + 카드사 다이렉트 호출

-```jsx {5-13} +```tsx {5-13} PortOne.requestPayment({ pgProvider: "SMARTRO_V2", payMethod: "CARD", @@ -221,7 +221,7 @@ PortOne.requestPayment({

V2 에스크로 + 가상계좌 다이렉트 호출

-```jsx {5-8} +```tsx {5-8} PortOne.requestPayment({ pgProvider: "SMARTRO_V2", payMethod: "VIRTUAL_ACCOUNT", @@ -243,7 +243,7 @@ PortOne.requestPayment({

V1 에스크로 + 계좌이체 + 현금영수증 정보 전달

-```jsx {4-10} +```tsx {4-10} IMP.request_pay({ pg: "smartro_v2", amount: 50000, @@ -262,7 +262,7 @@ IMP.request_pay({

V2 에스크로 + 계좌이체 + 현금영수증 정보 전달

-```jsx {4-10} +```tsx {4-10} PortOne.requestPayment({ pgProvider: "SMARTRO_V2", totalAmount: 50000, diff --git a/src/content/docs/ko/pg/payment-gateway/smartro-v2/readme.mdx b/src/content/docs/ko/pg/payment-gateway/smartro-v2/readme.mdx index dbb264898..3439d17ad 100644 --- a/src/content/docs/ko/pg/payment-gateway/smartro-v2/readme.mdx +++ b/src/content/docs/ko/pg/payment-gateway/smartro-v2/readme.mdx @@ -3,14 +3,14 @@ title: 스마트로(신모듈) description: 스마트로 연동 방법을 안내합니다. --- -import * as prose from "~/components/prose"; import Details from "~/components/gitbook/Details.astro"; import Hint from "~/components/Hint.astro"; +import * as prose from "~/components/prose"; export const components = prose; import Figure from "~/components/Figure.astro"; -import Tabs from "~/components/gitbook/tabs/Tabs.astro"; import Tab from "~/components/gitbook/tabs/Tab.astro"; +import Tabs from "~/components/gitbook/tabs/Tabs.astro"; ## 1. 스마트로 채널 설정하기 @@ -37,193 +37,194 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; [JavaScript SDK](../../../sdk/javascript-sdk/readme) `IMP.request_pay(param, callback)`을 호출하여 스마트로 결제창을 호출할 수 있습니다. **결제결과**는 PC의 경우 `IMP.request_pay(param, callback)` 호출 후 **callback**으로 수신되고 -모바일의 경우 **m_redirect_url** 로 리디렉션됩니다. +모바일의 경우 **m\_redirect\_url** 로 리디렉션됩니다. - -```javascript title="Javascript SDK" -IMP.request_pay({ - pg: 'smartro_v2.{상점 ID}', - pay_method: 'card', - merchant_uid: "orderNo0001", // 상점에서 생성한 고유 주문번호 주의: 스마트로 일반결제시 주문 번호에 특수문자 사용 불가 - name: '주문명:결제테스트', - amount: 1004, - buyer_email: 'test@portone.io', - buyer_name: '구매자이름', - buyer_tel: '010-1234-5678', - buyer_addr: '서울특별시 강남구 삼성동', - buyer_postcode: '123-456', - m_redirect_url: '{모바일에서 결제 완료 후 리디렉션 될 URL}', - period: { - from: "20230512", //YYYYMMDD - to: "20230515", //YYYYMMDD - }, -}, function(rsp) { // callback 로직 - /* ...중략... */ -}); -``` - -
-

주요 파라미터 설명

- -**`pg` \*****string** - -**PG사 구분코드** - -`smartro_v2` 로 지정하면 됩니다. - -**`pay_method`** **\*** **string** - -**결제수단 구분코드** - -- card (신용카드) -- trans (실시간 계좌이체) -- vbank(가상계좌) -- phone (휴대폰소액결제) -- lpay (LPAY) -- kakaopay (카카오페이) -- naverpay (네이버페이) -- payco (페이코) -- pinpay (핀페이) + + ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "smartro_v2.{상점 ID}", + pay_method: "card", + merchant_uid: "orderNo0001", // 상점에서 생성한 고유 주문번호 주의: 스마트로 일반결제시 주문 번호에 특수문자 사용 불가 + name: "주문명:결제테스트", + amount: 1004, + buyer_email: "test@portone.io", + buyer_name: "구매자이름", + buyer_tel: "010-1234-5678", + buyer_addr: "서울특별시 강남구 삼성동", + buyer_postcode: "123-456", + m_redirect_url: "{모바일에서 결제 완료 후 리디렉션 될 URL}", + period: { + from: "20230512", //YYYYMMDD + to: "20230515", //YYYYMMDD + }, + }, + function (rsp) { + // callback 로직 + /* ...중략... */ + }, + ); + ``` -**`merchant_uid`** **\*** **string** +
+

주요 파라미터 설명

+ + **`pg` \*****string** + + **PG사 구분코드** + + `smartro_v2` 로 지정하면 됩니다. + + **`pay_method`** **\*** **string** + + **결제수단 구분코드** + + - card (신용카드) + - trans (실시간 계좌이체) + - vbank(가상계좌) + - phone (휴대폰소액결제) + - lpay (LPAY) + - kakaopay (카카오페이) + - naverpay (네이버페이) + - payco (페이코) + - pinpay (핀페이) -**주문번호** + **`merchant_uid`** **\*** **string** -매번 고유하게 채번되어야 합니다. -주의: 스마트로 일반결제시 주문 번호에 특수문자 사용 불가 + **주문번호** -**`amount`** **\*** **`integer`** + 매번 고유하게 채번되어야 합니다. + 주의: 스마트로 일반결제시 주문 번호에 특수문자 사용 불가 -**결제금액** + **`amount`** **\*** **`integer`** -**string** 이 아닌점에 유의하세요 + **결제금액** -소수점 두번째 자리까지 허용합니다. + **string** 이 아닌점에 유의하세요 -**`buyer_tel`** **\*** **string** + 소수점 두번째 자리까지 허용합니다. -**구매자 전화번호** + **`buyer_tel`** **\*** **string** -주의: 스마트로 일반 결제시 필수 입력 + **구매자 전화번호** -**`vbank_due`** **\*** **string** + 주의: 스마트로 일반 결제시 필수 입력 -**가상계좌 입금기한 (YYYY-MM-DD)** + **`vbank_due`** **\*** **string** -스마트로의 경우 필수 입력이며 날짜는 무조건 23:59:59로 설정 됨 + **가상계좌 입금기한 (YYYY-MM-DD)** -**`escrow`** **\*** **boolean** + 스마트로의 경우 필수 입력이며 날짜는 무조건 23:59:59로 설정 됨 -**에스크로 결제 여부** + **`escrow`** **\*** **boolean** -**`period`** **\*** **array** + **에스크로 결제 여부** -**서비스 제공 기간** + **`period`** **\*** **array** -날짜만 입력이 가능하며(시간은 무시) 시작 날짜와 종료 날짜를 모두 입력해야 합니다. + **서비스 제공 기간** -**`from`** **`: YYYYMMDD`** + 날짜만 입력이 가능하며(시간은 무시) 시작 날짜와 종료 날짜를 모두 입력해야 합니다. -**`to`** **`: YYYYMMDD`** + **`from`** **`: YYYYMMDD`** -
+ **`to`** **`: YYYYMMDD`** +
-
-

- 결제 가능 결제수단 -

+
+

+ 결제 가능 결제수단 +

-- card + 에스크로, 다이렉트 -- vbank + 에스크로 -- trans + 에스크로 -- phone -- lpay -- naverpay -- kakaopay -- pinpay -- payco + - card + 에스크로, 다이렉트 + - vbank + 에스크로 + - trans + 에스크로 + - phone + - lpay + - naverpay + - kakaopay + - pinpay + - payco +
+ -
- -
- - - 인증결제창 호출 파라미터에서 **customer\_uid**, **customer\_id**값을 추가하면 비 인증 결제창을 호출할 수 있습니다. - 비 인증 결제창에서 빌링키를 발급받은 후 해당 빌링키로 결제를 요청합니다. - ```javascript title="Javascript SDK" - IMP.request_pay({ - pg: "smartro_v2.{MID}", - pay_method: "card", // 'card'만 지원됩니다. - merchant_uid: "orderMonthly0001", // 상점에서 관리하는 주문 번호 주의: 스마트로 일반결제시 주문 번호에 특수문자 사용 불가 - name: "최초인증결제", - amount: 1000, // 실제 승인은 발생되지 않고 오직 빌링키만 발급됩니다. - customer_uid: "your-customer-unique-id", // 필수 입력. - buyer_email: "test@portone.io", - buyer_name: "포트원", - buyer_tel: "02-1234-1234", - m_redirect_url: "{모바일에서 결제 완료 후 리디렉션 될 URL}", - customer_id: "matthew", //고객사가 회원에게 부여한 고유 ID로 필수 입력. - }, function (rsp) { - // callback 로직 - }); - ``` + + 인증결제창 호출 파라미터에서 **customer\_uid**, **customer\_id**값을 추가하면 비 인증 결제창을 호출할 수 있습니다. + 비 인증 결제창에서 빌링키를 발급받은 후 해당 빌링키로 결제를 요청합니다. -
-

주요 파라미터 설명

+ ```ts title="Javascript SDK" + IMP.request_pay( + { + pg: "smartro_v2.{MID}", + pay_method: "card", // 'card'만 지원됩니다. + merchant_uid: "orderMonthly0001", // 상점에서 관리하는 주문 번호 주의: 스마트로 일반결제시 주문 번호에 특수문자 사용 불가 + name: "최초인증결제", + amount: 1000, // 실제 승인은 발생되지 않고 오직 빌링키만 발급됩니다. + customer_uid: "your-customer-unique-id", // 필수 입력. + buyer_email: "test@portone.io", + buyer_name: "포트원", + buyer_tel: "02-1234-1234", + m_redirect_url: "{모바일에서 결제 완료 후 리디렉션 될 URL}", + customer_id: "matthew", //고객사가 회원에게 부여한 고유 ID로 필수 입력. + }, + function (rsp) { + // callback 로직 + }, + ); + ``` -**`pg` \*****string** +
+

주요 파라미터 설명

-**PG사 구분코드** + **`pg` \*****string** -`smartro_v2` 로 지정하면 됩니다. + **PG사 구분코드** -**`pay_method`** **\*** **string** + `smartro_v2` 로 지정하면 됩니다. -**결제수단 구분코드** + **`pay_method`** **\*** **string** -- card (신용카드) + **결제수단 구분코드** -**`merchant_uid`** **\*** **string** + - card (신용카드) -**주문번호** + **`merchant_uid`** **\*** **string** -매번 고유하게 채번되어야 합니다. + **주문번호** -주의: 스마트로 일반결제시 주문 번호에 특수문자 사용 불가 + 매번 고유하게 채번되어야 합니다. -**`customer_uid`** **\*** **string** + 주의: 스마트로 일반결제시 주문 번호에 특수문자 사용 불가 -**`빌링키 발급을 위한 결제 수단을 특정하는 고유 번호`** + **`customer_uid`** **\*** **string** -빌링키 발급시 필수 입력 + **`빌링키 발급을 위한 결제 수단을 특정하는 고유 번호`** -**`customer_id`** **\*** **string** + 빌링키 발급시 필수 입력 -**`구매자 식별자`** + **`customer_id`** **\*** **string** -주의: 스마트로 빌링키 발급시 필수 입력으로 입력 길이는 **20자**로 제한됩니다. + **`구매자 식별자`** -**`m_redirect_url`** **\*** **string** + 주의: 스마트로 빌링키 발급시 필수 입력으로 입력 길이는 **20자**로 제한됩니다. -**`리다이렉트 URL`** + **`m_redirect_url`** **\*** **string** -리디렉션 방식으로 진행할 경우, 트랜잭션 종료 이후 302 리디렉션 될 고객사 URL + **`리다이렉트 URL`** -스마트로의 경우 모바일 환경에서 **리디렉션 방식으로 빌링키 발급창이 렌더링 되기 때문에 필수입력입니다.** - -
- - + 리디렉션 방식으로 진행할 경우, 트랜잭션 종료 이후 302 리디렉션 될 고객사 URL + 스마트로의 경우 모바일 환경에서 **리디렉션 방식으로 빌링키 발급창이 렌더링 되기 때문에 필수입력입니다.** +
+
-

- 가능한 결제 환경 -

- -- PC (iframe) -- 모바일 (리디렉션) +

+ 가능한 결제 환경 +

+ - PC (iframe) + - 모바일 (리디렉션)
diff --git a/src/content/docs/ko/pg/payment-gateway/smartro.mdx b/src/content/docs/ko/pg/payment-gateway/smartro.mdx index a02747652..e74a53f84 100644 --- a/src/content/docs/ko/pg/payment-gateway/smartro.mdx +++ b/src/content/docs/ko/pg/payment-gateway/smartro.mdx @@ -31,7 +31,7 @@ import Tab from "~/components/gitbook/tabs/Tab.astro"; -```javascript title="Javascript SDK" +```ts title="Javascript SDK" IMP.request_pay({ pg: "smartro.{상점 ID}", pay_method: "card", diff --git a/src/content/docs/ko/pg/payment-gateway/spb.mdx b/src/content/docs/ko/pg/payment-gateway/spb.mdx index 38f0880a6..7b7a50c67 100644 --- a/src/content/docs/ko/pg/payment-gateway/spb.mdx +++ b/src/content/docs/ko/pg/payment-gateway/spb.mdx @@ -41,10 +41,7 @@ import Hint from "~/components/Hint.astro"; 따라서 다른 PG사와 결제 플로우가 상이하기 때문에 고객사는 **체크아웃 페이지가 렌더링 되는 시점에** `IMP.request_pay` 함수 대신 **`IMP.loadUI`라는 별도의 함수를 호출해 페이팔 일반결제 버튼을 렌더링 해야**합니다. -
+
```html