@tosspayments/tosspayments-sdk 2.3.7 → 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 +11 -0
- package/package.json +3 -3
- package/types/index.d.ts +62 -0
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.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
|
+
|
|
6
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)
|
|
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.
|
|
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.
|
|
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": "
|
|
41
|
+
"gitHead": "42ca041f917ae5834d48e8a2aca203c23bbfe064"
|
|
42
42
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -643,7 +643,69 @@ interface BrandpayPaymentRequest {
|
|
|
643
643
|
* 결제 관련 정보를 추가할 수 있는 객체입니다. 최대 5개의 키-값(key-value) 쌍을 자유롭게 추가해주세요. 키는 `[` , `]` 를 사용하지 않는 최대 40자의 문자열, 값은 최대 2000자의 문자열입니다.
|
|
644
644
|
*/
|
|
645
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;
|
|
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;
|
|
646
707
|
}
|
|
708
|
+
type CashReceipt = 소득공제_현금영수증 | 지출증빙_현금영수증 | 미발행;
|
|
647
709
|
|
|
648
710
|
interface BrandpayRequestPaymentResult {
|
|
649
711
|
/**
|