@tosspayments/tosspayments-sdk 2.3.6 → 2.4.0

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,28 @@
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.4.0](https://github.com/tosspayments/browser-sdk/compare/@tosspayments/tosspayments-sdk@2.3.7...@tosspayments/tosspayments-sdk@2.4.0) (2025-09-10)
7
+
8
+
9
+ ### Features
10
+
11
+ * standard-public-interfaces 버전업 ([#134](https://github.com/tosspayments/browser-sdk/issues/134)) ([3dbead5](https://github.com/tosspayments/browser-sdk/commit/3dbead5e1aabc8bf7e4a26cbc558c5a81cdc1f41))
12
+
13
+
14
+
15
+
16
+
17
+ ## [2.3.7](https://github.com/tosspayments/browser-sdk/compare/@tosspayments/tosspayments-sdk@2.3.6...@tosspayments/tosspayments-sdk@2.3.7) (2025-08-22)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **tosspayments-sdk:** @tosspayments/standard-public-interfaces 버전업 ([#133](https://github.com/tosspayments/browser-sdk/issues/133)) ([1d2a4a6](https://github.com/tosspayments/browser-sdk/commit/1d2a4a6d55192f323f74b1672628b1bf44d1b810))
23
+
24
+
25
+
26
+
27
+
6
28
  ## [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
29
 
8
30
 
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.6",
4
+ "version": "2.4.0",
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.1.4",
24
+ "@tosspayments/standard-public-interfaces": "2.4.2",
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": "e1bef43ea888b8474f865a318177cf74087a6d83"
41
+ "gitHead": "42ca041f917ae5834d48e8a2aca203c23bbfe064"
42
42
  }
package/types/index.d.ts CHANGED
@@ -148,7 +148,7 @@ interface WidgetPaymentRequest {
148
148
  */
149
149
  pendingUrl?: string | null;
150
150
  /**
151
- * 결제 관련 정보를 추가할 수 있는 객체입니다. 최대 5개의 키-값(key-value) 쌍을 자유롭게 추가해주세요. 키는 `[` , `]` 를 사용하지 않는 최대 40자의 문자열, 값은 최대 500자의 문자열입니다.
151
+ * 결제 관련 정보를 추가할 수 있는 객체입니다. 최대 5개의 키-값(key-value) 쌍을 자유롭게 추가해주세요. 키는 `[` , `]` 를 사용하지 않는 최대 40자의 문자열, 값은 최대 2000자의 문자열입니다.
152
152
  */
153
153
  metadata?: Record<string | symbol | number, unknown> | null;
154
154
  /**
@@ -352,6 +352,30 @@ interface WidgetPaymentRequest {
352
352
  } | null;
353
353
  } | null;
354
354
  } | null;
355
+ /**
356
+ * @ignore
357
+ */
358
+ subMerchantSetting?: {
359
+ normalClientKey?: string | null;
360
+ keyinClientKey?: string | null;
361
+ foreignEasyPayClientKey?: string | null;
362
+ brandpayClientKey?: string | null;
363
+ brandpayRedirectUrl?: string | null;
364
+ } | null;
365
+ /**
366
+ * @ignore
367
+ */
368
+ subOrders?: Array<{
369
+ merchantBusinessNumber: string;
370
+ merchantName: string;
371
+ merchantAddress: {
372
+ country: string;
373
+ postalCode: string;
374
+ address: string;
375
+ detailAddress?: string | null;
376
+ };
377
+ orderName: string;
378
+ }> | null;
355
379
  }
356
380
 
357
381
  interface Amount {
@@ -616,10 +640,72 @@ interface BrandpayPaymentRequest {
616
640
  */
617
641
  methodId?: string | null;
618
642
  /**
619
- * 결제 관련 정보를 추가할 수 있는 객체입니다. 최대 5개의 키-값(key-value) 쌍을 자유롭게 추가해주세요. 키는 `[` , `]` 를 사용하지 않는 최대 40자의 문자열, 값은 최대 500자의 문자열입니다.
643
+ * 결제 관련 정보를 추가할 수 있는 객체입니다. 최대 5개의 키-값(key-value) 쌍을 자유롭게 추가해주세요. 키는 `[` , `]` 를 사용하지 않는 최대 40자의 문자열, 값은 최대 2000자의 문자열입니다.
620
644
  */
621
645
  metadata?: Record<string | symbol | number, unknown> | null;
646
+ /**
647
+ * 구매자가 카드를 선택하면 결제에 적용되는 옵션입니다.
648
+ */
649
+ card?: {
650
+ /**
651
+ * 신용 카드의 할부 개월 수입니다. 값을 넣으면 해당 할부 개월 수로 결제가 진행됩니다.
652
+ * 2부터 12사이의 값을 사용할 수 있고, 0이 들어가면 할부가 아닌 일시불로 결제됩니다.
653
+ * 결제 금액(amount)이 5만원 이상일 때만 할부가 적용됩니다.
654
+ */
655
+ cardInstallmentPlan?: number | null;
656
+ /**
657
+ * 카드사 포인트 사용 여부입니다.
658
+ * 값을 주지 않거나 값이 false라면 사용자가 카드사 포인트 사용 여부를 결정할 수 있습니다. 이 값을 true로 주면 카드사 포인트 사용이 체크된 상태로 결제창이 열립니다.
659
+ *
660
+ * \* 추가 계약이 필요한 파라미터입니다. 토스페이먼츠 고객센터(1544-7772, support@tosspayments.com)로 문의해주세요.
661
+ */
662
+ useCardPoint?: boolean | null;
663
+ /**
664
+ * 카드 즉시 할인 코드입니다. methodId 파라미터가 있을 경우 적용됩니다.
665
+ * [카드 프로모션 조회 API](https://docs.tosspayments.com/reference/brandpay#%EC%B9%B4%EB%93%9C-%ED%94%84%EB%A1%9C%EB%AA%A8%EC%85%98-%EC%A1%B0%ED%9A%8C)로 적용할 수 있는 할인 코드의 목록을 조회할 수 있습니다.
666
+ */
667
+ discountCode?: string | null;
668
+ } | null;
669
+ /**
670
+ * 구매자가 계좌를 선택하면 결제에 적용되는 옵션입니다.
671
+ */
672
+ transfer?: {
673
+ /**
674
+ * 현금영수증 발급 정보를 담는 객체입니다.
675
+ */
676
+ cashReceipt?: CashReceipt | null;
677
+ /**
678
+ * 문화비(도서, 공연 티켓, 박물관·미술관 입장권 등) 지출 여부입니다.
679
+ */
680
+ isCulturalExpenses?: boolean | null;
681
+ /**
682
+ * 계좌 즉시 할인 코드입니다. methodId 파라미터가 있을 경우 적용됩니다.
683
+ * [계좌 프로모션 조회 API](https://docs.tosspayments.com/reference/brandpay#%EA%B3%84%EC%A2%8C-%ED%94%84%EB%A1%9C%EB%AA%A8%EC%85%98-%EC%A1%B0%ED%9A%8C)로 적용할 수 있는 할인 코드의 목록을 조회할 수 있습니다.
684
+ */
685
+ discountCode?: string | null;
686
+ } | null;
687
+ }
688
+ interface BasicCashReceipt {
689
+ type: '소득공제' | '지출증빙' | '미발행';
690
+ registrationNumber?: string;
691
+ registrationNumberType?: 'CASH_RECEIPT_CARD' | 'BUSINESS_REGISTRATION' | 'MOBILE';
692
+ }
693
+ interface 소득공제_현금영수증 extends BasicCashReceipt {
694
+ type: '소득공제';
695
+ registrationNumberType: 'MOBILE' | 'CASH_RECEIPT_CARD';
696
+ registrationNumber: string;
622
697
  }
698
+ interface 지출증빙_현금영수증 extends BasicCashReceipt {
699
+ type: '지출증빙';
700
+ registrationNumberType: 'BUSINESS_REGISTRATION' | 'CASH_RECEIPT_CARD';
701
+ registrationNumber: string;
702
+ }
703
+ interface 미발행 extends BasicCashReceipt {
704
+ type: '미발행';
705
+ registrationNumberType?: never;
706
+ registrationNumber?: never;
707
+ }
708
+ type CashReceipt = 소득공제_현금영수증 | 지출증빙_현금영수증 | 미발행;
623
709
 
624
710
  interface BrandpayRequestPaymentResult {
625
711
  /**
@@ -855,10 +941,6 @@ interface TossPaymentsBrandpay {
855
941
  /**
856
942
  * @ignore
857
943
  */
858
- /**
859
- * 브랜드페이 빌링은 sales 가맹점 중 rm 검토된 곳에만 제한적으로 제공되기 때문에 docs에서 노출하지 않습니다.
860
- * @link https://tossteam.slack.com/archives/C06ENN7PJK1/p1752207105929219
861
- */
862
944
  requestBillingAuth: RequestBillingAuth$1;
863
945
  }
864
946
 
@@ -904,7 +986,7 @@ interface PaymentRequest {
904
986
  */
905
987
  pendingUrl?: string | null;
906
988
  /**
907
- * 결제 관련 정보를 추가할 수 있는 객체입니다. 최대 5개의 키-값(key-value) 쌍을 자유롭게 추가해주세요. 키는 `[` , `]` 를 사용하지 않는 최대 40자의 문자열, 값은 최대 500자의 문자열입니다.
989
+ * 결제 관련 정보를 추가할 수 있는 객체입니다. 최대 5개의 키-값(key-value) 쌍을 자유롭게 추가해주세요. 키는 `[` , `]` 를 사용하지 않는 최대 40자의 문자열, 값은 최대 2000자의 문자열입니다.
908
990
  */
909
991
  metadata?: Record<string | symbol | number, unknown> | null;
910
992
  /**
@@ -916,6 +998,20 @@ interface PaymentRequest {
916
998
  */
917
999
  paymentResult: 'SUCCESS' | 'FAIL';
918
1000
  };
1001
+ /**
1002
+ * @ignore
1003
+ */
1004
+ subOrders?: Array<{
1005
+ merchantBusinessNumber: string;
1006
+ merchantName: string;
1007
+ merchantAddress: {
1008
+ country: string;
1009
+ postalCode: string;
1010
+ address: string;
1011
+ detailAddress?: string | null;
1012
+ };
1013
+ orderName: string;
1014
+ }> | null;
919
1015
  }
920
1016
 
921
1017
  interface CardPaymentRequest extends PaymentRequest {
@@ -1349,7 +1445,7 @@ interface BillingAuthRequest {
1349
1445
  */
1350
1446
  windowTarget?: 'iframe' | 'self' | null;
1351
1447
  /**
1352
- * 결제화면에 노출할 카드 타입입니다. `PERSONAL`(개인카드), `CORPORATE`(법인카드), `FOREIGN`(해외카드) 값을 배열 형태로 전달할 수 있습니다. 입력한 순서대로 화면에 노출되며, 첫 번째로 입력한 카드 타입이 기본 선택됩니다.
1448
+ * 결제화면에 노출할 카드 타입입니다. `PERSONAL`(개인카드), `CORPORATE`(법인카드) 값을 배열 형태로 전달할 수 있습니다. 입력한 순서대로 화면에 노출되며, 첫 번째로 입력한 카드 타입이 기본 선택됩니다.
1353
1449
  */
1354
1450
  selectableCardTypes?: Array<'PERSONAL' | 'CORPORATE'> | null;
1355
1451
  }