@tosspayments/tosspayments-sdk 2.3.5 → 2.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.3.6](https://github.com/tosspayments/browser-sdk/compare/@tosspayments/tosspayments-sdk@2.3.5...@tosspayments/tosspayments-sdk@2.3.6) (2025-08-13)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **tosspayments-sdk:** @tosspayments/standard-public-interfaces 버전업 ([#132](https://github.com/tosspayments/browser-sdk/issues/132)) ([282947a](https://github.com/tosspayments/browser-sdk/commit/282947a03ecdd1e969e2c7a42e432285c2126c5e))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [2.3.5](https://github.com/tosspayments/browser-sdk/compare/@tosspayments/tosspayments-sdk@2.3.4...@tosspayments/tosspayments-sdk@2.3.5) (2025-05-16)
7
18
 
8
19
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tosspayments/tosspayments-sdk",
3
3
  "description": "TossPayments.js Tosspayments SDK.",
4
- "version": "2.3.5",
4
+ "version": "2.3.6",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
7
7
  "types": "types/index.d.ts",
@@ -21,7 +21,7 @@
21
21
  "@rollup/plugin-commonjs": "^21.0.1",
22
22
  "@rollup/plugin-typescript": "^8.3.0",
23
23
  "@tosspayments/sdk-loader": "2.0.1",
24
- "@tosspayments/standard-public-interfaces": "2.0.51",
24
+ "@tosspayments/standard-public-interfaces": "2.1.4",
25
25
  "happy-dom": "^14.12.3",
26
26
  "prettier": "^2.0.2",
27
27
  "rollup": "^2.60.0",
@@ -38,5 +38,5 @@
38
38
  "publishConfig": {
39
39
  "access": "public"
40
40
  },
41
- "gitHead": "eb5f441be087a2116a2be35b2ec322ffe956e9ac"
41
+ "gitHead": "e1bef43ea888b8474f865a318177cf74087a6d83"
42
42
  }
package/types/index.d.ts CHANGED
@@ -209,6 +209,10 @@ interface WidgetPaymentRequest {
209
209
  */
210
210
  quantity?: number | null;
211
211
  }> | null;
212
+ /**
213
+ * 문화비(도서, 공연 티켓, 박물관·미술관 입장권 등) 지출 여부입니다.
214
+ */
215
+ isCulturalExpenses?: boolean | null;
212
216
  } | null;
213
217
  /**
214
218
  * 구매자가 가상계좌를 선택하면 결제에 적용되는 옵션입니다.
@@ -253,6 +257,10 @@ interface WidgetPaymentRequest {
253
257
  */
254
258
  type: '소득공제' | '지출증빙' | '미발행';
255
259
  } | null;
260
+ /**
261
+ * 문화비(도서, 공연 티켓, 박물관·미술관 입장권 등) 지출 여부입니다.
262
+ */
263
+ isCulturalExpenses?: boolean | null;
256
264
  } | null;
257
265
  /**
258
266
  * 구매자가 해외간편결제를 선택하면 결제에 적용되는 옵션입니다.
@@ -801,6 +809,21 @@ type IsOneTouchPayEnabled = () => Promise<{
801
809
  isEnabled: boolean;
802
810
  }>;
803
811
 
812
+ /**
813
+ * 자동결제(빌링) 약관 동의와 비밀번호 인증을 수행합니다
814
+ *
815
+ * @example
816
+ * ```javascript
817
+ * brandpay.requestBillingAuth();
818
+ * ```
819
+ *
820
+ * @throws {@link PublicError.Brandpay.UserCancelError} 사용자가 자동결제 인증창을 닫은 경우
821
+ * @throws {@link PublicError.Brandpay.NotRegisteredRedirectUrlError} redirectUrl이 등록되지 않은 경우
822
+ * @throws {@link PublicError.Brandpay.InvalidMethodTransactionError} 이미 다른 명령을 수행 중인 경우
823
+ * @throws {@link PublicError.Brandpay.UnknownError} 알 수 없는 오류가 발생한 경우
824
+ */
825
+ type RequestBillingAuth$1 = () => Promise<void>;
826
+
804
827
  interface TossPaymentsBrandpay {
805
828
  /**
806
829
  * 브랜드페이 결제창을 띄웁니다. [자세히 >](#brandpayrequestpayment)
@@ -826,6 +849,17 @@ interface TossPaymentsBrandpay {
826
849
  * 원터치결제 활성화 여부를 확인합니다. [자세히 >](#brandpayisonetouchpayenabled)
827
850
  */
828
851
  isOneTouchPayEnabled: IsOneTouchPayEnabled;
852
+ /**
853
+ * 자동결제(빌링) 약관 동의와 비밀번호 인증을 수행합니다 [자세히 >](#brandpayrequestbillingauth)
854
+ */
855
+ /**
856
+ * @ignore
857
+ */
858
+ /**
859
+ * 브랜드페이 빌링은 sales 가맹점 중 rm 검토된 곳에만 제한적으로 제공되기 때문에 docs에서 노출하지 않습니다.
860
+ * @link https://tossteam.slack.com/archives/C06ENN7PJK1/p1752207105929219
861
+ */
862
+ requestBillingAuth: RequestBillingAuth$1;
829
863
  }
830
864
 
831
865
  interface PaymentRequest {
@@ -922,21 +956,21 @@ interface CardPaymentRequest extends PaymentRequest {
922
956
  /**
923
957
  * 신용카드 결제에 적용되는 할부 개월 수입니다.
924
958
  * 예를 들어, `6`으로 설정하면 할부 개월 수가 6개월로 고정돼요. 자체창에서는 구매자가 할부 개월 수를 볼 수 없으니 사전에 충분히 안내를 해주세요.
925
- * 0(일시불), 2~12 값으로 설정할 수 있고 `maxCardInstallmentPlan` 파라미터와 함께 사용할 수 없어요. 카드사 별로 할부결제가 가능한 [최소 금액](https://pgweb.tosspayments.com/tosspayments/MainPopUp.do)을 확인하세요.
959
+ * 0(일시불), 2~12 값으로 설정할 수 있고 `maxCardInstallmentPlan` 파라미터와 함께 사용할 수 없어요. 카드사 별로 할부결제가 가능한 [최소 금액](https://consumer.tosspayments.com/notice/free-installment)을 확인하세요.
926
960
  */
927
961
  cardInstallmentPlan?: number | null;
928
962
  /**
929
963
  * 신용카드 결제에 적용할 수 있는 최대 할부 개월 수입니다.
930
- * 예를 들어, `6`으로 설정하면 구매자는 일시불부터 6개월 할부를 선택할 수 있어요. 0(일시불), 2~12 값으로 설정할 수 있고 `cardInstallmentPlan` 파라미터와 함께 사용할 수 없어요. 카드사 별로 할부결제가 가능한 [최소 금액](https://pgweb.tosspayments.com/tosspayments/MainPopUp.do)을 확인하세요.
964
+ * 예를 들어, `6`으로 설정하면 구매자는 일시불부터 6개월 할부를 선택할 수 있어요. 0(일시불), 2~12 값으로 설정할 수 있고 `cardInstallmentPlan` 파라미터와 함께 사용할 수 없어요. 카드사 별로 할부결제가 가능한 [최소 금액](https://consumer.tosspayments.com/notice/free-installment)을 확인하세요.
931
965
  */
932
966
  maxCardInstallmentPlan?: number | null;
933
967
  /**
934
968
  * 신용카드 결제에 적용할 수 있는 **상점 부담 무이자** 할부 정보입니다.
935
- * 구매자가 선택한 카드, 할부 개월 수가 배열에 등록한 정보와 같다면 무이자가 할부가 자동으로 적용돼요. 카드사 별로 할부결제가 가능한 [최소 금액](https://pgweb.tosspayments.com/tosspayments/MainPopUp.do)을 확인하세요.
969
+ * 구매자가 선택한 카드, 할부 개월 수가 배열에 등록한 정보와 같다면 무이자가 할부가 자동으로 적용돼요. 카드사 별로 할부결제가 가능한 [최소 금액](https://consumer.tosspayments.com/notice/free-installment)을 확인하세요.
936
970
  */
937
971
  freeInstallmentPlans?: Array<{
938
972
  /**
939
- * 상점 부담 무이자를 적용할 카드사 코드](/codes/org-codes#카드사-코드)입니다.
973
+ * 상점 부담 무이자를 적용할 [카드사 코드](/codes/org-codes#카드사-코드)입니다.
940
974
  */
941
975
  company: string;
942
976
  /**
@@ -998,6 +1032,15 @@ interface CardPaymentRequest extends PaymentRequest {
998
1032
  * 페이북/ISP 앱에서 상점 앱으로 돌아올 때 사용됩니다. 상점의 앱 스킴을 지정하면 됩니다. 예를 들면 testapp://같은 형태입니다.
999
1033
  */
1000
1034
  appScheme?: string | null;
1035
+ /**
1036
+ * 키인 결제정보입니다.
1037
+ */
1038
+ keyin?: {
1039
+ /**
1040
+ * 결제화면에 노출할 카드 타입입니다. `PERSONAL`(개인카드), `CORPORATE`(법인카드), `FOREIGN`(해외카드) 값을 배열 형태로 전달할 수 있습니다. 입력한 순서대로 화면에 노출되며, 첫 번째로 입력한 카드 타입이 기본 선택됩니다.
1041
+ */
1042
+ selectableCardTypes?: Array<'PERSONAL' | 'CORPORATE' | 'FOREIGN'> | null;
1043
+ } | null;
1001
1044
  } | null;
1002
1045
  }
1003
1046
 
@@ -1063,6 +1106,10 @@ interface VirtualAccountPaymentRequest extends PaymentRequest {
1063
1106
  * 기한이 지나고 시도하는 결제는 실패해요. 예를 들어 `2025-01-01T00:00:00`으로 설정하면, 2024년 12월 31일 23:59까지 결제할 수 있어요.
1064
1107
  */
1065
1108
  dueDate?: string | null;
1109
+ /**
1110
+ * 문화비(도서, 공연 티켓, 박물관·미술관 입장권 등) 지출 여부입니다.
1111
+ */
1112
+ isCulturalExpenses?: boolean | null;
1066
1113
  } | null;
1067
1114
  }
1068
1115
 
@@ -1080,11 +1127,11 @@ interface TransferPaymentRequest extends PaymentRequest {
1080
1127
  */
1081
1128
  taxExemptionAmount?: number | null;
1082
1129
  /**
1083
- * @ignore
1130
+ * 현금영수증 정보입니다.
1084
1131
  */
1085
1132
  cashReceipt?: {
1086
1133
  /**
1087
- * @ignore
1134
+ * type을 '미발행' 으로 보내면 현금영수증을 발행하지 않습니다.
1088
1135
  */
1089
1136
  type: '소득공제' | '지출증빙' | '미발행';
1090
1137
  } | null;
@@ -1129,6 +1176,10 @@ interface TransferPaymentRequest extends PaymentRequest {
1129
1176
  * 기한이 지나고 시도하는 결제는 실패해요. 예를 들어 `2025-01-01T00:00:00`으로 설정하면, 2024년 12월 31일 23:59까지 결제할 수 있어요.
1130
1177
  */
1131
1178
  dueDate?: string | null;
1179
+ /**
1180
+ * 문화비(도서, 공연 티켓, 박물관·미술관 입장권 등) 지출 여부입니다.
1181
+ */
1182
+ isCulturalExpenses?: boolean | null;
1132
1183
  } | null;
1133
1184
  }
1134
1185
 
@@ -1265,9 +1316,8 @@ interface RequestPaymentResult {
1265
1316
  interface BillingAuthRequest {
1266
1317
  /**
1267
1318
  * 자동결제(빌링)에 등록할 결제수단입니다. 토스페이먼츠 자동결제는 현재 신용·체크카드만 지원해요.
1268
- *
1269
1319
  */
1270
- method: 'CARD';
1320
+ method: 'CARD' | 'TRANSFER';
1271
1321
  /**
1272
1322
  * 카드 등록이 성공하면 리다이렉트되는 URL입니다. 리다이렉트되면 URL의 쿼리 파라미터로 `authKey`, `customerKey`가 추가돼요. 값을 검증하고 [빌링키 발급 API](/reference#authkey로-카드-빌링키-발급)를 호출하세요.
1273
1323
  * 반드시 오리진을 포함해야 합니다.
@@ -1298,6 +1348,10 @@ interface BillingAuthRequest {
1298
1348
  * @default 'iframe'
1299
1349
  */
1300
1350
  windowTarget?: 'iframe' | 'self' | null;
1351
+ /**
1352
+ * 결제화면에 노출할 카드 타입입니다. `PERSONAL`(개인카드), `CORPORATE`(법인카드), `FOREIGN`(해외카드) 값을 배열 형태로 전달할 수 있습니다. 입력한 순서대로 화면에 노출되며, 첫 번째로 입력한 카드 타입이 기본 선택됩니다.
1353
+ */
1354
+ selectableCardTypes?: Array<'PERSONAL' | 'CORPORATE'> | null;
1301
1355
  }
1302
1356
 
1303
1357
  /**