@tosspayments/tosspayments-sdk 2.3.2 → 2.3.4
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 +22 -0
- package/package.json +3 -3
- package/types/index.d.ts +155 -160
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.3.4](https://github.com/tosspayments/browser-sdk/compare/@tosspayments/tosspayments-sdk@2.3.3...@tosspayments/tosspayments-sdk@2.3.4) (2024-12-12)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **tosspayments-sdk:** @tosspayments/standard-public-interfaces 버전업 ([#130](https://github.com/tosspayments/browser-sdk/issues/130)) ([62069d3](https://github.com/tosspayments/browser-sdk/commit/62069d34a798ef8324fe032f59c59933d5dba0d1))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [2.3.3](https://github.com/tosspayments/browser-sdk/compare/@tosspayments/tosspayments-sdk@2.3.2...@tosspayments/tosspayments-sdk@2.3.3) (2024-12-09)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **tosspayments-sdk:** @tosspayments/standard-public-interfaces 버전업 ([#129](https://github.com/tosspayments/browser-sdk/issues/129)) ([4f7ec3b](https://github.com/tosspayments/browser-sdk/commit/4f7ec3becddc35187a8584c6454d4fe64828f888))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
## [2.3.2](https://github.com/tosspayments/browser-sdk/compare/@tosspayments/tosspayments-sdk@2.3.1...@tosspayments/tosspayments-sdk@2.3.2) (2024-09-23)
|
|
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.
|
|
4
|
+
"version": "2.3.4",
|
|
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.
|
|
24
|
+
"@tosspayments/standard-public-interfaces": "2.0.45",
|
|
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": "793c235208215386fb73996cbd93250201974f78"
|
|
42
42
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -118,23 +118,31 @@ interface WidgetPaymentRequest {
|
|
|
118
118
|
/**
|
|
119
119
|
* 구매자 이메일입니다. 결제 상태가 바뀌면 이메일 주소로 결제내역이 전송됩니다. 최대 길이는 100자입니다.
|
|
120
120
|
*/
|
|
121
|
-
customerEmail?: string;
|
|
121
|
+
customerEmail?: string | null;
|
|
122
122
|
/**
|
|
123
123
|
* 구매자명입니다. 최대 길이는 100자입니다.
|
|
124
124
|
*/
|
|
125
|
-
customerName?: string;
|
|
125
|
+
customerName?: string | null;
|
|
126
126
|
/**
|
|
127
|
-
* 구매자의 휴대폰 번호입니다. 가상계좌 안내, 퀵계좌이체 휴대폰 번호 자동 완성에 사용되고 있어요.
|
|
127
|
+
* 구매자의 휴대폰 번호입니다. 가상계좌 안내, 퀵계좌이체 휴대폰 번호 자동 완성에 사용되고 있어요. `-` 없이 숫자로만 구성된 최소 8자, 최대 15자의 문자열입니다.
|
|
128
128
|
*/
|
|
129
|
-
customerMobilePhone?: string;
|
|
129
|
+
customerMobilePhone?: string | null;
|
|
130
130
|
/**
|
|
131
131
|
* 결제 금액 중 면세 금액입니다. 면세 상점 혹은 복합 과세 상점으로 계약된 상점만 사용하세요. 자세한 내용은 세금 처리 가이드에서 확인하세요.
|
|
132
132
|
*/
|
|
133
|
-
taxFreeAmount?: number;
|
|
133
|
+
taxFreeAmount?: number | null;
|
|
134
134
|
/**
|
|
135
|
-
*
|
|
135
|
+
* 브라우저에서 결제창이 열리는 프레임입니다. `self`, `iframe` 중 하나입니다.
|
|
136
|
+
*
|
|
137
|
+
* \- `self`는 현재 브라우저를 결제창으로 이동시켜요. 모바일 환경에서 기본 값입니다.
|
|
138
|
+
*
|
|
139
|
+
* \- `iframe`은 iframe에서 결제창이 열려요. PC 환경에서 기본 값입니다. **모바일 환경에서는 `iframe`을 사용할 수 없습니다.**
|
|
136
140
|
*/
|
|
137
|
-
|
|
141
|
+
windowTarget?: 'iframe' | 'self' | null;
|
|
142
|
+
/**
|
|
143
|
+
* @ignore
|
|
144
|
+
*/
|
|
145
|
+
pendingUrl?: string | null;
|
|
138
146
|
/**
|
|
139
147
|
* 결제 관련 정보를 추가할 수 있는 객체입니다. 최대 5개의 키-값(key-value) 쌍을 자유롭게 추가해주세요. 키는 `[` , `]` 를 사용하지 않는 최대 40자의 문자열, 값은 최대 500자의 문자열입니다.
|
|
140
148
|
*/
|
|
@@ -147,8 +155,12 @@ interface WidgetPaymentRequest {
|
|
|
147
155
|
* 과세를 제외한 결제 금액(컵 보증금 등)입니다. 값을 넣지 않으면 기본값인 0으로 설정됩니다.
|
|
148
156
|
* 과세 제외 금액이 있는 카드 결제는 부분 취소가 안 됩니다.
|
|
149
157
|
*/
|
|
150
|
-
taxExemptionAmount?: number;
|
|
151
|
-
|
|
158
|
+
taxExemptionAmount?: number | null;
|
|
159
|
+
/**
|
|
160
|
+
* 페이북/ISP 앱에서 상점 앱으로 돌아올 때 사용됩니다. 상점의 앱 스킴을 지정하면 됩니다. 예를 들면 testapp://같은 형태입니다.
|
|
161
|
+
*/
|
|
162
|
+
appScheme?: string | null;
|
|
163
|
+
} | null;
|
|
152
164
|
/**
|
|
153
165
|
* 구매자가 계좌이체를 선택하면 결제에 적용되는 옵션입니다.
|
|
154
166
|
*/
|
|
@@ -157,7 +169,7 @@ interface WidgetPaymentRequest {
|
|
|
157
169
|
* 에스크로 적용 여부입니다. `true`로 설정하면 구매자가 반드시 에스크로 적용에 동의해야 결제가 완료돼요.
|
|
158
170
|
* `false`로 설정하거나 파라미터를 설정하지 않으면 에스크로 적용을 구매자 선택에 맡겨요.
|
|
159
171
|
*/
|
|
160
|
-
useEscrow?: boolean;
|
|
172
|
+
useEscrow?: boolean | null;
|
|
161
173
|
/**
|
|
162
174
|
* 각 상품의 상세 정보 객체를 담는 배열입니다. 에스크로를 사용하는 상점이라면 필수 파라미터입니다.
|
|
163
175
|
* 예를 들어 사용자가 세 가지 종류의 상품을 구매했다면 길이가 3인 배열이어야 합니다.
|
|
@@ -166,25 +178,25 @@ interface WidgetPaymentRequest {
|
|
|
166
178
|
/**
|
|
167
179
|
* 각 상품의 고유 ID입니다.
|
|
168
180
|
*/
|
|
169
|
-
id?: string;
|
|
181
|
+
id?: string | null;
|
|
170
182
|
/**
|
|
171
183
|
* 상품명입니다.
|
|
172
184
|
*/
|
|
173
|
-
name?: string;
|
|
185
|
+
name?: string | null;
|
|
174
186
|
/**
|
|
175
187
|
* 내 상점에서 사용하는 상품 관리 코드입니다.
|
|
176
188
|
*/
|
|
177
|
-
code?: string;
|
|
189
|
+
code?: string | null;
|
|
178
190
|
/**
|
|
179
191
|
* 상품의 1개의 개별 가격입니다.
|
|
180
192
|
*/
|
|
181
|
-
unitPrice?: number;
|
|
193
|
+
unitPrice?: number | null;
|
|
182
194
|
/**
|
|
183
195
|
* 상품 구매 수량입니다.
|
|
184
196
|
*/
|
|
185
|
-
quantity?: number;
|
|
186
|
-
}
|
|
187
|
-
};
|
|
197
|
+
quantity?: number | null;
|
|
198
|
+
}> | null;
|
|
199
|
+
} | null;
|
|
188
200
|
/**
|
|
189
201
|
* 구매자가 가상계좌를 선택하면 결제에 적용되는 옵션입니다.
|
|
190
202
|
*/
|
|
@@ -192,7 +204,7 @@ interface WidgetPaymentRequest {
|
|
|
192
204
|
/**
|
|
193
205
|
* 에스크로 사용 여부입니다. 값을 주지 않으면 결제창에서 고객이 직접 에스크로 결제 여부를 선택합니다.
|
|
194
206
|
*/
|
|
195
|
-
useEscrow?: boolean;
|
|
207
|
+
useEscrow?: boolean | null;
|
|
196
208
|
/**
|
|
197
209
|
* 각 상품의 상세 정보 객체를 담는 배열입니다. 에스크로를 사용하는 상점이라면 필수 파라미터입니다.
|
|
198
210
|
* 예를 들어 사용자가 세 가지 종류의 상품을 구매했다면 길이가 3인 배열이어야 합니다.
|
|
@@ -201,25 +213,34 @@ interface WidgetPaymentRequest {
|
|
|
201
213
|
/**
|
|
202
214
|
* 각 상품의 고유 ID입니다.
|
|
203
215
|
*/
|
|
204
|
-
id?: string;
|
|
216
|
+
id?: string | null;
|
|
205
217
|
/**
|
|
206
218
|
* 상품명입니다.
|
|
207
219
|
*/
|
|
208
|
-
name?: string;
|
|
220
|
+
name?: string | null;
|
|
209
221
|
/**
|
|
210
222
|
* 내 상점에서 사용하는 상품 관리 코드입니다.
|
|
211
223
|
*/
|
|
212
|
-
code?: string;
|
|
224
|
+
code?: string | null;
|
|
213
225
|
/**
|
|
214
226
|
* 상품의 1개의 개별 가격입니다.
|
|
215
227
|
*/
|
|
216
|
-
unitPrice?: number;
|
|
228
|
+
unitPrice?: number | null;
|
|
217
229
|
/**
|
|
218
230
|
* 상품 구매 수량입니다.
|
|
219
231
|
*/
|
|
220
|
-
quantity?: number;
|
|
221
|
-
}
|
|
222
|
-
|
|
232
|
+
quantity?: number | null;
|
|
233
|
+
}> | null;
|
|
234
|
+
/**
|
|
235
|
+
* 현금영수증 정보입니다.
|
|
236
|
+
*/
|
|
237
|
+
cashReceipt?: {
|
|
238
|
+
/**
|
|
239
|
+
* 현금영수증 발급 용도입니다. '소득공제', '지출증빙', '미발행' 중 하나입니다.
|
|
240
|
+
*/
|
|
241
|
+
type: '소득공제' | '지출증빙' | '미발행';
|
|
242
|
+
} | null;
|
|
243
|
+
} | null;
|
|
223
244
|
/**
|
|
224
245
|
* 구매자가 해외간편결제를 선택하면 결제에 적용되는 옵션입니다.
|
|
225
246
|
*/
|
|
@@ -254,7 +275,7 @@ interface WidgetPaymentRequest {
|
|
|
254
275
|
* 상품 설명입니다.
|
|
255
276
|
*/
|
|
256
277
|
description: string;
|
|
257
|
-
}
|
|
278
|
+
}> | null;
|
|
258
279
|
/**
|
|
259
280
|
* 배송 정보입니다.
|
|
260
281
|
*/
|
|
@@ -262,27 +283,27 @@ interface WidgetPaymentRequest {
|
|
|
262
283
|
/**
|
|
263
284
|
* 수령인입니다.
|
|
264
285
|
*/
|
|
265
|
-
fullName?: string;
|
|
286
|
+
fullName?: string | null;
|
|
266
287
|
/**
|
|
267
288
|
* 배송 주소입니다.
|
|
268
289
|
*/
|
|
269
290
|
address?: {
|
|
270
291
|
/**
|
|
271
|
-
* 국가입니다.
|
|
292
|
+
* 구매자가 위치한 국가입니다. ISO-3166의 두 자리 국가 코드를 입력하세요.
|
|
272
293
|
*/
|
|
273
294
|
country: string;
|
|
274
295
|
/**
|
|
275
296
|
* 주소입니다. 도로명 및 건물(Street, Apt), 번지 정보입니다.
|
|
276
297
|
*/
|
|
277
|
-
line1?: string;
|
|
298
|
+
line1?: string | null;
|
|
278
299
|
/**
|
|
279
300
|
* 상세 주소입니다. 번지 및 동호수 정보를 입력하세요.
|
|
280
301
|
*/
|
|
281
|
-
line2?: string;
|
|
302
|
+
line2?: string | null;
|
|
282
303
|
/**
|
|
283
304
|
* 주(State, Province, Region) 정보입니다. 국가의 도시 체계에 따라 없는 경우가 있습니다.
|
|
284
305
|
*/
|
|
285
|
-
area1?: string;
|
|
306
|
+
area1?: string | null;
|
|
286
307
|
/**
|
|
287
308
|
* 도시입니다.
|
|
288
309
|
*/
|
|
@@ -290,9 +311,9 @@ interface WidgetPaymentRequest {
|
|
|
290
311
|
/**
|
|
291
312
|
* 배송지 우편번호입니다. 중국, 일본, 프랑스, 독일 등 [일부 국가](https://developer.paypal.com/api/rest/reference/orders/v2/country-address-requirements/#link-countryandregionaddressrequirements)에서는 필수 파라미터입니다
|
|
292
313
|
*/
|
|
293
|
-
postalCode?: string;
|
|
294
|
-
};
|
|
295
|
-
};
|
|
314
|
+
postalCode?: string | null;
|
|
315
|
+
} | null;
|
|
316
|
+
} | null;
|
|
296
317
|
/**
|
|
297
318
|
* 특정 해외간편결제 수단에만 필요한 정보입니다.
|
|
298
319
|
*/
|
|
@@ -307,9 +328,9 @@ interface WidgetPaymentRequest {
|
|
|
307
328
|
* 문서의 표에 있는 ‘Data Field Name’ 컬럼 값을 객체의 ‘key’로, ‘Description’에 맞는 값을 객체의 ‘value’로 넣어주시면 됩니다.
|
|
308
329
|
*/
|
|
309
330
|
setTransactionContext?: unknown;
|
|
310
|
-
};
|
|
311
|
-
};
|
|
312
|
-
};
|
|
331
|
+
} | null;
|
|
332
|
+
} | null;
|
|
333
|
+
} | null;
|
|
313
334
|
}
|
|
314
335
|
|
|
315
336
|
interface Amount {
|
|
@@ -328,12 +349,12 @@ type WithRedirection<T> = T & {
|
|
|
328
349
|
* 결제 요청이 성공하면 리다이렉트되는 URL입니다. `https://www.example.com/success`와 같이 오리진을 포함한 형태로 설정해주세요.
|
|
329
350
|
* 리다이렉트되면 URL의 쿼리 파라미터로 `amount`, `orderId`, `paymentKey`가 추가돼요.
|
|
330
351
|
*/
|
|
331
|
-
successUrl?: string;
|
|
352
|
+
successUrl?: string | null;
|
|
332
353
|
/**
|
|
333
354
|
* 결제 요청이 실패하면 리다이렉트되는 URL입니다. `https://www.example.com/fail`와 같이 오리진을 포함한 형태로 설정해주세요.
|
|
334
355
|
* 리다이렉트되면 URL의 쿼리 파라미터로 에러 코드와 메시지를 확인할 수 있어요.
|
|
335
356
|
*/
|
|
336
|
-
failUrl?: string;
|
|
357
|
+
failUrl?: string | null;
|
|
337
358
|
};
|
|
338
359
|
|
|
339
360
|
type WidgetPaymentResult = {
|
|
@@ -464,7 +485,6 @@ type RequestPayment$2 = RequestPaymentWithPromise$1 & RequestPaymentWithRedirect
|
|
|
464
485
|
orderName: "토스 티셔츠 외 2건",
|
|
465
486
|
customerEmail: "customer123@gmail.com",
|
|
466
487
|
customerName: "김토스",
|
|
467
|
-
customerMobilePhone: "01012341234",
|
|
468
488
|
});
|
|
469
489
|
* ```
|
|
470
490
|
|
|
@@ -494,7 +514,6 @@ type RequestPaymentWithPromise$1 = (paymentRequest: WidgetPaymentRequest) => Pro
|
|
|
494
514
|
failUrl: window.location.origin + "/fail.html",
|
|
495
515
|
customerEmail: "customer123@gmail.com",
|
|
496
516
|
customerName: "김토스",
|
|
497
|
-
customerMobilePhone: "01012341234",
|
|
498
517
|
});
|
|
499
518
|
* ```
|
|
500
519
|
*/
|
|
@@ -562,15 +581,15 @@ interface BrandpayPaymentRequest {
|
|
|
562
581
|
/**
|
|
563
582
|
* 구매자 이메일입니다. 결제 상태가 바뀌면 이메일 주소로 결제내역이 전송됩니다. 최대 길이는 100자입니다.
|
|
564
583
|
*/
|
|
565
|
-
customerEmail?: string;
|
|
584
|
+
customerEmail?: string | null;
|
|
566
585
|
/**
|
|
567
586
|
* 구매자명입니다. 최대 길이는 100자입니다.
|
|
568
587
|
*/
|
|
569
|
-
customerName?: string;
|
|
588
|
+
customerName?: string | null;
|
|
570
589
|
/**
|
|
571
590
|
* 결제 금액 중 면세 금액입니다. 면세 상점 혹은 복합 과세 상점으로 계약된 상점만 사용하세요. 자세한 내용은 세금 처리 가이드에서 확인하세요.
|
|
572
591
|
*/
|
|
573
|
-
taxFreeAmount?: number;
|
|
592
|
+
taxFreeAmount?: number | null;
|
|
574
593
|
/**
|
|
575
594
|
* 결제 관련 정보를 추가할 수 있는 객체입니다. 최대 5개의 키-값(key-value) 쌍을 자유롭게 추가해주세요. 키는 `[` , `]` 를 사용하지 않는 최대 40자의 문자열, 값은 최대 500자의 문자열입니다.
|
|
576
595
|
*/
|
|
@@ -639,7 +658,6 @@ type RequestPayment$1 = RequestPaymentWithPromise & RequestPaymentWithRedirectio
|
|
|
639
658
|
* failUrl: window.location.origin + '/fail.html',
|
|
640
659
|
* customerEmail: 'customer123@gmail.com',
|
|
641
660
|
* customerName: '김토스',
|
|
642
|
-
* customerMobilePhone: '01012341234',
|
|
643
661
|
* });
|
|
644
662
|
* ```
|
|
645
663
|
*/
|
|
@@ -660,7 +678,6 @@ type RequestPaymentWithRedirection = (paymentRequest: WithRedirection<BrandpayPa
|
|
|
660
678
|
* orderName: '토스 티셔츠 외 2건',
|
|
661
679
|
* customerEmail: 'customer123@gmail.com',
|
|
662
680
|
* customerName: '김토스',
|
|
663
|
-
* customerMobilePhone: '01012341234',
|
|
664
681
|
* });
|
|
665
682
|
* ```
|
|
666
683
|
*/
|
|
@@ -810,29 +827,31 @@ interface PaymentRequest {
|
|
|
810
827
|
/**
|
|
811
828
|
* 구매자명입니다. 최대 길이는 100자입니다.
|
|
812
829
|
*/
|
|
813
|
-
customerName?: string;
|
|
830
|
+
customerName?: string | null;
|
|
814
831
|
/**
|
|
815
832
|
* 구매자 이메일입니다. 결제 상태가 바뀌면 이메일 주소로 결제내역이 전송됩니다. 최대 길이는 100자입니다.
|
|
816
833
|
*/
|
|
817
|
-
customerEmail?: string;
|
|
834
|
+
customerEmail?: string | null;
|
|
818
835
|
/**
|
|
819
|
-
* 구매자의 휴대폰 번호입니다. 가상계좌 안내, 퀵계좌이체 휴대폰 번호 자동 완성에 사용되고 있어요.
|
|
836
|
+
* 구매자의 휴대폰 번호입니다. 가상계좌 안내, 퀵계좌이체 휴대폰 번호 자동 완성에 사용되고 있어요. `-` 없이 숫자로만 구성된 최소 8자, 최대 15자의 문자열입니다.
|
|
820
837
|
*/
|
|
821
|
-
customerMobilePhone?: string;
|
|
838
|
+
customerMobilePhone?: string | null;
|
|
822
839
|
/**
|
|
823
840
|
* 결제 금액 중 면세 금액입니다. 면세 상점 혹은 복합 과세 상점으로 계약된 상점만 사용하세요. 자세한 내용은 세금 처리 가이드에서 확인하세요.
|
|
824
841
|
*/
|
|
825
|
-
taxFreeAmount?: number;
|
|
842
|
+
taxFreeAmount?: number | null;
|
|
826
843
|
/**
|
|
827
844
|
* 브라우저에서 결제창이 열리는 프레임입니다. `self`, `iframe` 중 하나입니다.
|
|
845
|
+
*
|
|
828
846
|
* \- `self`는 현재 브라우저를 결제창으로 이동시켜요. 모바일 환경에서 기본 값입니다.
|
|
847
|
+
*
|
|
829
848
|
* \- `iframe`은 iframe에서 결제창이 열려요. PC 환경에서 기본 값입니다. **모바일 환경에서는 `iframe`을 사용할 수 없습니다.**
|
|
830
849
|
*/
|
|
831
|
-
windowTarget?: 'iframe' | 'self';
|
|
850
|
+
windowTarget?: 'iframe' | 'self' | null;
|
|
832
851
|
/**
|
|
833
|
-
*
|
|
852
|
+
* @ignore
|
|
834
853
|
*/
|
|
835
|
-
pendingUrl?: string;
|
|
854
|
+
pendingUrl?: string | null;
|
|
836
855
|
/**
|
|
837
856
|
* 결제 관련 정보를 추가할 수 있는 객체입니다. 최대 5개의 키-값(key-value) 쌍을 자유롭게 추가해주세요. 키는 `[` , `]` 를 사용하지 않는 최대 40자의 문자열, 값은 최대 500자의 문자열입니다.
|
|
838
857
|
*/
|
|
@@ -851,105 +870,109 @@ interface CardPaymentRequest extends PaymentRequest {
|
|
|
851
870
|
/**
|
|
852
871
|
* 에스크로 적용 여부입니다. `true`로 설정하면 구매자가 반드시 에스크로 적용에 동의해야 결제가 완료돼요. `false`로 설정하거나 파라미터를 설정하지 않으면 에스크로 적용을 구매자 선택에 맡겨요.
|
|
853
872
|
*/
|
|
854
|
-
useEscrow?: boolean;
|
|
873
|
+
useEscrow?: boolean | null;
|
|
855
874
|
/**
|
|
856
875
|
* 과세를 제외한 결제 금액(컵 보증금 등)입니다.
|
|
857
876
|
* 과세 제외 금액이 있는 카드 결제는 부분 취소가 안 됩니다.
|
|
858
877
|
*/
|
|
859
|
-
taxExemptionAmount?: number;
|
|
878
|
+
taxExemptionAmount?: number | null;
|
|
860
879
|
/**
|
|
861
880
|
* 결제창을 여는 방법입니다. `DEFAULT`는 카드/간편결제 통합결제창을 열고, `DIRECT`는 카드 또는 간편결제의 자체창을 열어요.
|
|
862
881
|
* 기본 값은 `DEFAULT`입니다.
|
|
863
882
|
*/
|
|
864
|
-
flowMode?: 'DIRECT' | 'DEFAULT';
|
|
883
|
+
flowMode?: 'DIRECT' | 'DEFAULT' | null;
|
|
865
884
|
/**
|
|
866
|
-
* 카드사
|
|
885
|
+
* [카드사 코드](/codes/org-codes#카드사-코드)입니다. `flowMode` 값에 따라 아래와 같이 다르게 동작해요.
|
|
867
886
|
* `flowMode`가 `DIRECT`일 때는 입력한 코드의 카드사 앱이 열려요.
|
|
868
887
|
* `flowMode`가 `DEFAULT`일 때는 통합결제창에 입력한 코드의 카드사만 보여요.
|
|
869
888
|
*/
|
|
870
|
-
cardCompany?: string;
|
|
889
|
+
cardCompany?: string | null;
|
|
871
890
|
/**
|
|
872
|
-
* 간편결제
|
|
891
|
+
* [간편결제 코드](/codes/org-codes#간편결제사-코드)입니다. `flowMode` 값에 따라 아래와 같이 다르게 동작해요.
|
|
873
892
|
* `flowMode`가 `DIRECT`일 때는 입력한 코드의 간편결제 앱이 열려요.
|
|
874
|
-
* `flowMode`가 `DEFAULT`일 때는
|
|
893
|
+
* `flowMode`가 `DEFAULT`일 때는 해당 파라미터와 상관 없이 기본 통합결제창이 열려요.
|
|
875
894
|
*/
|
|
876
|
-
easyPay?: string;
|
|
895
|
+
easyPay?: string | null;
|
|
877
896
|
/**
|
|
878
897
|
* 신용카드 결제에 적용되는 할부 개월 수입니다.
|
|
879
898
|
* 예를 들어, `6`으로 설정하면 할부 개월 수가 6개월로 고정돼요. 자체창에서는 구매자가 할부 개월 수를 볼 수 없으니 사전에 충분히 안내를 해주세요.
|
|
880
899
|
* 0(일시불), 2~12 값으로 설정할 수 있고 `maxCardInstallmentPlan` 파라미터와 함께 사용할 수 없어요. 카드사 별로 할부결제가 가능한 [최소 금액](https://pgweb.tosspayments.com/tosspayments/MainPopUp.do)을 확인하세요.
|
|
881
900
|
*/
|
|
882
|
-
cardInstallmentPlan?: number;
|
|
901
|
+
cardInstallmentPlan?: number | null;
|
|
883
902
|
/**
|
|
884
903
|
* 신용카드 결제에 적용할 수 있는 최대 할부 개월 수입니다.
|
|
885
904
|
* 예를 들어, `6`으로 설정하면 구매자는 일시불부터 6개월 할부를 선택할 수 있어요. 0(일시불), 2~12 값으로 설정할 수 있고 `cardInstallmentPlan` 파라미터와 함께 사용할 수 없어요. 카드사 별로 할부결제가 가능한 [최소 금액](https://pgweb.tosspayments.com/tosspayments/MainPopUp.do)을 확인하세요.
|
|
886
905
|
*/
|
|
887
|
-
maxCardInstallmentPlan?: number;
|
|
906
|
+
maxCardInstallmentPlan?: number | null;
|
|
888
907
|
/**
|
|
889
908
|
* 신용카드 결제에 적용할 수 있는 **상점 부담 무이자** 할부 정보입니다.
|
|
890
909
|
* 구매자가 선택한 카드, 할부 개월 수가 배열에 등록한 정보와 같다면 무이자가 할부가 자동으로 적용돼요. 카드사 별로 할부결제가 가능한 [최소 금액](https://pgweb.tosspayments.com/tosspayments/MainPopUp.do)을 확인하세요.
|
|
891
910
|
*/
|
|
892
911
|
freeInstallmentPlans?: Array<{
|
|
893
912
|
/**
|
|
894
|
-
* 상점 부담 무이자를 적용할 카드사
|
|
913
|
+
* 상점 부담 무이자를 적용할 카드사 코드](/codes/org-codes#카드사-코드)입니다.
|
|
895
914
|
*/
|
|
896
915
|
company: string;
|
|
897
916
|
/**
|
|
898
917
|
* 상점 부담 무이자를 적용할 할부 개월입니다.
|
|
899
918
|
*/
|
|
900
919
|
months: number[];
|
|
901
|
-
}
|
|
920
|
+
}> | null;
|
|
902
921
|
/**
|
|
903
922
|
* 카드사 포인트 사용 여부입니다. `true`로 설정하면 카드사 포인트 사용이 체크된 상태로 결제창이 열려요. `false`로 설정하거나 값을 넣지 않으면 구매자가 직접 카드사 포인트 사용 여부를 선택할 수 있어요.
|
|
904
923
|
*
|
|
905
924
|
* \* 추가 계약이 필요한 파라미터입니다. 토스페이먼츠 고객센터(1544-7772, support@tosspayments.com)로 문의해주세요.
|
|
906
925
|
*/
|
|
907
|
-
useCardPoint?: boolean;
|
|
926
|
+
useCardPoint?: boolean | null;
|
|
908
927
|
/**
|
|
909
928
|
* 앱카드 단독 사용 여부입니다. `true`로 설정하면 카드사의 앱카드만 열려요. 국민, 농협, 롯데, 삼성, 신한, 우리, 현대 카드 결제에 적용할 수 있어요.
|
|
910
929
|
*/
|
|
911
|
-
useAppCardOnly?: boolean;
|
|
930
|
+
useAppCardOnly?: boolean | null;
|
|
912
931
|
/**
|
|
913
932
|
* 카드사의 프로모션 코드입니다. 프로모션은 `flowMode`가 `DIRECT`로 설정된 자체창 결제에만 사용할 수 있어요. 프로모션 조회 API로 적용할 수 있는 프로모션 코드를 확인하세요.
|
|
914
933
|
*/
|
|
915
|
-
discountCode?: string;
|
|
934
|
+
discountCode?: string | null;
|
|
916
935
|
/**
|
|
917
936
|
* 시간으로 설정하는 결제 기한입니다. 설정할 수 있는 최대 값은 2160시간(90일)입니다.
|
|
918
937
|
* 기한이 지나고 시도하는 결제는 실패해요. 예를 들어 `24`로 설정하면, 결제 요청 시점으로부터 24시간 동안 결제할 수 있어요.
|
|
919
938
|
*/
|
|
920
|
-
validHours?: number;
|
|
939
|
+
validHours?: number | null;
|
|
921
940
|
/**
|
|
922
941
|
* 특정 날짜로 설정하는 결제 기한입니다. `yyyy-MM-dd'T'HH:mm:ss` ISO 8601 형식입니다.
|
|
923
942
|
* 기한이 지나고 시도하는 결제는 실패해요. 예를 들어 `2025-01-01T00:00:00`으로 설정하면, 2024년 12월 31일 23:59까지 결제할 수 있어요.
|
|
924
943
|
*/
|
|
925
|
-
dueDate?: string;
|
|
944
|
+
dueDate?: string | null;
|
|
926
945
|
escrowProducts?: Array<{
|
|
927
946
|
/**
|
|
928
947
|
* 각 상품의 고유 ID입니다.
|
|
929
948
|
*/
|
|
930
|
-
id?: string;
|
|
949
|
+
id?: string | null;
|
|
931
950
|
/**
|
|
932
951
|
* 상품명입니다.
|
|
933
952
|
*/
|
|
934
|
-
name?: string;
|
|
953
|
+
name?: string | null;
|
|
935
954
|
/**
|
|
936
955
|
* 내 상점에서 사용하는 상품 관리 코드입니다.
|
|
937
956
|
*/
|
|
938
|
-
code?: string;
|
|
957
|
+
code?: string | null;
|
|
939
958
|
/**
|
|
940
959
|
* 상품의 1개의 개별 가격입니다.
|
|
941
960
|
*/
|
|
942
|
-
unitPrice?: number;
|
|
961
|
+
unitPrice?: number | null;
|
|
943
962
|
/**
|
|
944
963
|
* 상품 구매 수량입니다.
|
|
945
964
|
*/
|
|
946
|
-
quantity?: number;
|
|
947
|
-
}
|
|
965
|
+
quantity?: number | null;
|
|
966
|
+
}> | null;
|
|
948
967
|
/**
|
|
949
968
|
* 해외카드(Visa, MasterCard, JCB, UnionPay 등) 결제 여부입니다. `true`로 설정하면 해외카드 결제가 가능한 [다국어 결제창](/resources/glossary/payment-window#다국어-결제창)이 열립니다.
|
|
950
969
|
*/
|
|
951
|
-
useInternationalCardOnly?: boolean;
|
|
952
|
-
|
|
970
|
+
useInternationalCardOnly?: boolean | null;
|
|
971
|
+
/**
|
|
972
|
+
* 페이북/ISP 앱에서 상점 앱으로 돌아올 때 사용됩니다. 상점의 앱 스킴을 지정하면 됩니다. 예를 들면 testapp://같은 형태입니다.
|
|
973
|
+
*/
|
|
974
|
+
appScheme?: string | null;
|
|
975
|
+
} | null;
|
|
953
976
|
}
|
|
954
977
|
|
|
955
978
|
interface VirtualAccountPaymentRequest extends PaymentRequest {
|
|
@@ -964,50 +987,57 @@ interface VirtualAccountPaymentRequest extends PaymentRequest {
|
|
|
964
987
|
/**
|
|
965
988
|
* 과세를 제외한 결제 금액(컵 보증금 등)입니다.
|
|
966
989
|
*/
|
|
967
|
-
taxExemptionAmount?: number;
|
|
990
|
+
taxExemptionAmount?: number | null;
|
|
968
991
|
/**
|
|
969
|
-
* 현금영수증
|
|
992
|
+
* 현금영수증 정보입니다.
|
|
970
993
|
*/
|
|
971
994
|
cashReceipt?: {
|
|
995
|
+
/**
|
|
996
|
+
* 현금영수증 발급 용도입니다. '소득공제', '지출증빙', '미발행' 중 하나입니다.
|
|
997
|
+
*/
|
|
972
998
|
type: '소득공제' | '지출증빙' | '미발행';
|
|
973
|
-
};
|
|
999
|
+
} | null;
|
|
974
1000
|
/**
|
|
975
1001
|
* 에스크로 적용 여부입니다.
|
|
976
1002
|
*/
|
|
977
|
-
useEscrow?: boolean;
|
|
1003
|
+
useEscrow?: boolean | null;
|
|
1004
|
+
/**
|
|
1005
|
+
* 에스크로 상품 정보입니다.
|
|
1006
|
+
* 여러 가지의 상품을 결제했다면 각 상품의 정보를 입력하세요. 예를 들어, 구매자가 세 가지 종류의 상품을 구매했다면 배열의 길이는 3이어야 합니다.
|
|
1007
|
+
*/
|
|
978
1008
|
escrowProducts?: Array<{
|
|
979
1009
|
/**
|
|
980
1010
|
* 각 상품의 고유 ID입니다.
|
|
981
1011
|
*/
|
|
982
|
-
id?: string;
|
|
1012
|
+
id?: string | null;
|
|
983
1013
|
/**
|
|
984
1014
|
* 상품명입니다.
|
|
985
1015
|
*/
|
|
986
|
-
name?: string;
|
|
1016
|
+
name?: string | null;
|
|
987
1017
|
/**
|
|
988
1018
|
* 내 상점에서 사용하는 상품 관리 코드입니다.
|
|
989
1019
|
*/
|
|
990
|
-
code?: string;
|
|
1020
|
+
code?: string | null;
|
|
991
1021
|
/**
|
|
992
1022
|
* 상품의 1개의 개별 가격입니다.
|
|
993
1023
|
*/
|
|
994
|
-
unitPrice?: number;
|
|
1024
|
+
unitPrice?: number | null;
|
|
995
1025
|
/**
|
|
996
1026
|
* 상품 구매 수량입니다.
|
|
997
1027
|
*/
|
|
998
|
-
quantity?: number;
|
|
999
|
-
}
|
|
1028
|
+
quantity?: number | null;
|
|
1029
|
+
}> | null;
|
|
1000
1030
|
/**
|
|
1001
1031
|
* 시간으로 설정하는 결제 기한입니다. 설정할 수 있는 최대 값은 2160시간(90일)입니다.
|
|
1002
1032
|
* 기한이 지나고 시도하는 결제는 실패해요. 예를 들어 `24`로 설정하면, 결제 요청 시점으로부터 24시간 동안 결제할 수 있어요.
|
|
1003
1033
|
*/
|
|
1004
|
-
validHours?: number;
|
|
1034
|
+
validHours?: number | null;
|
|
1005
1035
|
/**
|
|
1006
1036
|
* 특정 날짜로 설정하는 결제 기한입니다. `yyyy-MM-dd'T'HH:mm:ss` ISO 8601 형식입니다.
|
|
1007
1037
|
* 기한이 지나고 시도하는 결제는 실패해요. 예를 들어 `2025-01-01T00:00:00`으로 설정하면, 2024년 12월 31일 23:59까지 결제할 수 있어요.
|
|
1008
1038
|
*/
|
|
1009
|
-
dueDate?: string;
|
|
1010
|
-
};
|
|
1039
|
+
dueDate?: string | null;
|
|
1040
|
+
} | null;
|
|
1011
1041
|
}
|
|
1012
1042
|
|
|
1013
1043
|
interface TransferPaymentRequest extends PaymentRequest {
|
|
@@ -1022,21 +1052,21 @@ interface TransferPaymentRequest extends PaymentRequest {
|
|
|
1022
1052
|
/**
|
|
1023
1053
|
* 과세를 제외한 결제 금액(컵 보증금 등)입니다.
|
|
1024
1054
|
*/
|
|
1025
|
-
taxExemptionAmount?: number;
|
|
1055
|
+
taxExemptionAmount?: number | null;
|
|
1026
1056
|
/**
|
|
1027
|
-
*
|
|
1057
|
+
* @ignore
|
|
1028
1058
|
*/
|
|
1029
1059
|
cashReceipt?: {
|
|
1030
1060
|
/**
|
|
1031
|
-
*
|
|
1061
|
+
* @ignore
|
|
1032
1062
|
*/
|
|
1033
1063
|
type: '소득공제' | '지출증빙' | '미발행';
|
|
1034
|
-
};
|
|
1064
|
+
} | null;
|
|
1035
1065
|
/**
|
|
1036
1066
|
* 에스크로 적용 여부입니다. `true`로 설정하면 구매자가 반드시 에스크로 적용에 동의해야 결제가 완료돼요.
|
|
1037
1067
|
* `false`로 설정하거나 파라미터를 설정하지 않으면 에스크로 적용을 구매자 선택에 맡겨요.
|
|
1038
1068
|
*/
|
|
1039
|
-
useEscrow?: boolean;
|
|
1069
|
+
useEscrow?: boolean | null;
|
|
1040
1070
|
/**
|
|
1041
1071
|
* 에스크로 상품 정보입니다.
|
|
1042
1072
|
* 여러 가지의 상품을 결제했다면 각 상품의 정보를 입력하세요. 예를 들어, 구매자가 세 가지 종류의 상품을 구매했다면 배열의 길이는 3이어야 합니다.
|
|
@@ -1045,35 +1075,35 @@ interface TransferPaymentRequest extends PaymentRequest {
|
|
|
1045
1075
|
/**
|
|
1046
1076
|
* 각 상품의 고유 ID입니다.
|
|
1047
1077
|
*/
|
|
1048
|
-
id?: string;
|
|
1078
|
+
id?: string | null;
|
|
1049
1079
|
/**
|
|
1050
1080
|
* 상품명입니다.
|
|
1051
1081
|
*/
|
|
1052
|
-
name?: string;
|
|
1082
|
+
name?: string | null;
|
|
1053
1083
|
/**
|
|
1054
1084
|
* 내 상점에서 사용하는 상품 관리 코드입니다.
|
|
1055
1085
|
*/
|
|
1056
|
-
code?: string;
|
|
1086
|
+
code?: string | null;
|
|
1057
1087
|
/**
|
|
1058
1088
|
* 상품의 1개의 개별 가격입니다.
|
|
1059
1089
|
*/
|
|
1060
|
-
unitPrice?: number;
|
|
1090
|
+
unitPrice?: number | null;
|
|
1061
1091
|
/**
|
|
1062
1092
|
* 상품 구매 수량입니다.
|
|
1063
1093
|
*/
|
|
1064
|
-
quantity?: number;
|
|
1065
|
-
}
|
|
1094
|
+
quantity?: number | null;
|
|
1095
|
+
}> | null;
|
|
1066
1096
|
/**
|
|
1067
1097
|
* 시간으로 설정하는 결제 기한입니다. 설정할 수 있는 최대 값은 2160시간(90일)입니다.
|
|
1068
1098
|
* 기한이 지나고 시도하는 결제는 실패해요. 예를 들어 `24`로 설정하면, 결제 요청 시점으로부터 24시간 동안 결제할 수 있어요.
|
|
1069
1099
|
*/
|
|
1070
|
-
validHours?: number;
|
|
1100
|
+
validHours?: number | null;
|
|
1071
1101
|
/**
|
|
1072
1102
|
* 특정 날짜로 설정하는 결제 기한입니다. `yyyy-MM-dd'T'HH:mm:ss` ISO 8601 형식입니다.
|
|
1073
1103
|
* 기한이 지나고 시도하는 결제는 실패해요. 예를 들어 `2025-01-01T00:00:00`으로 설정하면, 2024년 12월 31일 23:59까지 결제할 수 있어요.
|
|
1074
1104
|
*/
|
|
1075
|
-
dueDate?: string;
|
|
1076
|
-
};
|
|
1105
|
+
dueDate?: string | null;
|
|
1106
|
+
} | null;
|
|
1077
1107
|
}
|
|
1078
1108
|
|
|
1079
1109
|
interface MobilePhonePaymentRequest extends PaymentRequest {
|
|
@@ -1102,7 +1132,7 @@ interface ForeignEasyPayPaymentRequest extends PaymentRequest {
|
|
|
1102
1132
|
/**
|
|
1103
1133
|
* 해외간편결제 코드입니다. 현재는 `PAYPAL`만 지원하고 있어요.
|
|
1104
1134
|
*/
|
|
1105
|
-
provider:
|
|
1135
|
+
provider: 'PAYPAL' | 'GCASH' | 'TOUCHNGO' | 'BOOST' | 'BPI' | 'BILLEASE' | 'DANA' | 'ALIPAYHK' | 'TRUEMONEY' | 'RABBIT_LINE_PAY' | 'ALIPAY';
|
|
1106
1136
|
/**
|
|
1107
1137
|
* 구매자가 위치한 국가입니다. ISO-3166의 두 자리 국가 코드를 입력하세요.
|
|
1108
1138
|
*/
|
|
@@ -1133,7 +1163,7 @@ interface ForeignEasyPayPaymentRequest extends PaymentRequest {
|
|
|
1133
1163
|
* 상품 설명입니다.
|
|
1134
1164
|
*/
|
|
1135
1165
|
description: string;
|
|
1136
|
-
}
|
|
1166
|
+
}> | null;
|
|
1137
1167
|
/**
|
|
1138
1168
|
* 배송 정보입니다.
|
|
1139
1169
|
*/
|
|
@@ -1141,27 +1171,27 @@ interface ForeignEasyPayPaymentRequest extends PaymentRequest {
|
|
|
1141
1171
|
/**
|
|
1142
1172
|
* 수령인입니다.
|
|
1143
1173
|
*/
|
|
1144
|
-
fullName?: string;
|
|
1174
|
+
fullName?: string | null;
|
|
1145
1175
|
/**
|
|
1146
1176
|
* 배송 주소입니다.
|
|
1147
1177
|
*/
|
|
1148
1178
|
address?: {
|
|
1149
1179
|
/**
|
|
1150
|
-
* 국가입니다.
|
|
1180
|
+
* 구매자가 위치한 국가입니다. ISO-3166의 두 자리 국가 코드를 입력하세요.
|
|
1151
1181
|
*/
|
|
1152
1182
|
country: string;
|
|
1153
1183
|
/**
|
|
1154
1184
|
* 주소입니다. 도로명 및 건물(Street, Apt), 번지 정보입니다.
|
|
1155
1185
|
*/
|
|
1156
|
-
line1?: string;
|
|
1186
|
+
line1?: string | null;
|
|
1157
1187
|
/**
|
|
1158
1188
|
* 상세 주소입니다. 번지 및 동호수 정보를 입력하세요.
|
|
1159
1189
|
*/
|
|
1160
|
-
line2?: string;
|
|
1190
|
+
line2?: string | null;
|
|
1161
1191
|
/**
|
|
1162
1192
|
* 주(State, Province, Region) 정보입니다. 국가의 도시 체계에 따라 없는 경우가 있습니다.
|
|
1163
1193
|
*/
|
|
1164
|
-
area1?: string;
|
|
1194
|
+
area1?: string | null;
|
|
1165
1195
|
/**
|
|
1166
1196
|
* 도시입니다.
|
|
1167
1197
|
*/
|
|
@@ -1169,9 +1199,9 @@ interface ForeignEasyPayPaymentRequest extends PaymentRequest {
|
|
|
1169
1199
|
/**
|
|
1170
1200
|
* 배송지 우편번호입니다. 중국, 일본, 프랑스, 독일 등 [일부 국가](https://developer.paypal.com/api/rest/reference/orders/v2/country-address-requirements/#link-countryandregionaddressrequirements)에서는 필수 파라미터입니다
|
|
1171
1201
|
*/
|
|
1172
|
-
postalCode?: string;
|
|
1173
|
-
};
|
|
1174
|
-
};
|
|
1202
|
+
postalCode?: string | null;
|
|
1203
|
+
} | null;
|
|
1204
|
+
} | null;
|
|
1175
1205
|
/**
|
|
1176
1206
|
* 특정 해외간편결제 수단에만 필요한 정보입니다.
|
|
1177
1207
|
*/
|
|
@@ -1186,8 +1216,8 @@ interface ForeignEasyPayPaymentRequest extends PaymentRequest {
|
|
|
1186
1216
|
* 문서의 표에 있는 ‘Data Field Name’ 컬럼 값을 객체의 ‘key’로, ‘Description’에 맞는 값을 객체의 ‘value’로 넣어주시면 됩니다.
|
|
1187
1217
|
*/
|
|
1188
1218
|
setTransactionContext?: unknown;
|
|
1189
|
-
};
|
|
1190
|
-
};
|
|
1219
|
+
} | null;
|
|
1220
|
+
} | null;
|
|
1191
1221
|
};
|
|
1192
1222
|
}
|
|
1193
1223
|
|
|
@@ -1211,7 +1241,7 @@ interface BillingAuthRequest {
|
|
|
1211
1241
|
* 자동결제(빌링)에 등록할 결제수단입니다. 토스페이먼츠 자동결제는 현재 신용·체크카드만 지원해요.
|
|
1212
1242
|
*
|
|
1213
1243
|
*/
|
|
1214
|
-
method: 'CARD';
|
|
1244
|
+
method: 'CARD' | 'TRANSFER';
|
|
1215
1245
|
/**
|
|
1216
1246
|
* 카드 등록이 성공하면 리다이렉트되는 URL입니다. 리다이렉트되면 URL의 쿼리 파라미터로 `authKey`, `customerKey`가 추가돼요. 값을 검증하고 [빌링키 발급 API](/reference#authkey로-카드-빌링키-발급)를 호출하세요.
|
|
1217
1247
|
* 반드시 오리진을 포함해야 합니다.
|
|
@@ -1227,19 +1257,21 @@ interface BillingAuthRequest {
|
|
|
1227
1257
|
/**
|
|
1228
1258
|
* 구매자명입니다. 상점관리자 및 결제내역 이메일에 사용됩니다. 최대 길이는 100자입니다.
|
|
1229
1259
|
*/
|
|
1230
|
-
customerName?: string;
|
|
1260
|
+
customerName?: string | null;
|
|
1231
1261
|
/**
|
|
1232
1262
|
* 구매자의 이메일 주소입니다. 결제 상태가 바뀌면 이메일 주소로 결제내역이 전송됩니다. 최대 길이는 100자입니다.
|
|
1233
1263
|
*/
|
|
1234
|
-
customerEmail?: string;
|
|
1264
|
+
customerEmail?: string | null;
|
|
1235
1265
|
/**
|
|
1236
1266
|
* 브라우저에서 결제창이 열리는 프레임입니다. `self`, `iframe` 중 하나입니다.
|
|
1267
|
+
*
|
|
1237
1268
|
* \- `self`는 현재 브라우저를 결제창으로 이동시켜요. 모바일 환경에서 기본 값입니다.
|
|
1269
|
+
*
|
|
1238
1270
|
* \- `iframe`은 iframe에서 결제창이 열려요. PC 환경에서 기본 값입니다. **모바일 환경에서는 `iframe`을 사용할 수 없습니다.**
|
|
1239
1271
|
*
|
|
1240
1272
|
* @default 'iframe'
|
|
1241
1273
|
*/
|
|
1242
|
-
windowTarget?: 'iframe' | 'self';
|
|
1274
|
+
windowTarget?: 'iframe' | 'self' | null;
|
|
1243
1275
|
}
|
|
1244
1276
|
|
|
1245
1277
|
/**
|
|
@@ -1258,7 +1290,7 @@ interface BillingAuthRequest {
|
|
|
1258
1290
|
* @throws {@link PublicError.Payment.InvalidParametersError} 파라미터가 올바르지 않은 경우
|
|
1259
1291
|
* @throws {@link PublicError.Payment.UnknownError} 알 수 없는 오류가 발생한 경우
|
|
1260
1292
|
*/
|
|
1261
|
-
type RequestPayment = RequestCardPaymentWithRedirection & RequestCardPaymentWithPromise & RequestVirtualAccountPaymentWithRedirection & RequestVirtualAccountPaymentWithPromise & RequestTransferPaymentWithRedirection & RequestTransferPaymentWithPromise & RequestMobilePhonePaymentWithRedirection & RequestMobilePhonePaymentWithPromise & RequestGiftCertificatePaymentWithRedirection & RequestGiftCertificatePaymentWithPromise & RequestForeignEasyPayPaymentWithRedirection
|
|
1293
|
+
type RequestPayment = RequestCardPaymentWithRedirection & RequestCardPaymentWithPromise & RequestVirtualAccountPaymentWithRedirection & RequestVirtualAccountPaymentWithPromise & RequestTransferPaymentWithRedirection & RequestTransferPaymentWithPromise & RequestMobilePhonePaymentWithRedirection & RequestMobilePhonePaymentWithPromise & RequestGiftCertificatePaymentWithRedirection & RequestGiftCertificatePaymentWithPromise & RequestForeignEasyPayPaymentWithRedirection;
|
|
1262
1294
|
/**
|
|
1263
1295
|
* @docsAlias 카드(Promise 방식)
|
|
1264
1296
|
* @returns `WidgetPaymentResult` 객체가 응답됩니다. 객체 필드를 확인하고 [결제 승인 API](/reference#결제-승인)를 호출해야 결제가 최종적으로 완료돼요.
|
|
@@ -1276,7 +1308,6 @@ type RequestPayment = RequestCardPaymentWithRedirection & RequestCardPaymentWith
|
|
|
1276
1308
|
orderName: "토스 티셔츠 외 2건",
|
|
1277
1309
|
customerEmail: "customer123@gmail.com",
|
|
1278
1310
|
customerName: "김토스",
|
|
1279
|
-
customerMobilePhone: "01012341234",
|
|
1280
1311
|
windowTarget: "iframe",
|
|
1281
1312
|
card: {
|
|
1282
1313
|
useEscrow: false,
|
|
@@ -1316,7 +1347,6 @@ type RequestCardPaymentWithPromise = (paymentRequest: CardPaymentRequest) => Pro
|
|
|
1316
1347
|
failUrl: window.location.origin + "/fail.html",
|
|
1317
1348
|
customerEmail: "customer123@gmail.com",
|
|
1318
1349
|
customerName: "김토스",
|
|
1319
|
-
customerMobilePhone: "01012341234",
|
|
1320
1350
|
card: {
|
|
1321
1351
|
useEscrow: false,
|
|
1322
1352
|
flowMode: "DEFAULT",
|
|
@@ -1344,7 +1374,6 @@ type RequestCardPaymentWithRedirection = (paymentRequest: WithRedirection<CardPa
|
|
|
1344
1374
|
orderName: "토스 티셔츠 외 2건",
|
|
1345
1375
|
customerEmail: "customer123@gmail.com",
|
|
1346
1376
|
customerName: "김토스",
|
|
1347
|
-
customerMobilePhone: "01012341234",
|
|
1348
1377
|
windowTarget: "iframe",
|
|
1349
1378
|
virtualAccount: {
|
|
1350
1379
|
cashReceipt: {
|
|
@@ -1385,7 +1414,6 @@ type RequestVirtualAccountPaymentWithPromise = (paymentRequest: VirtualAccountPa
|
|
|
1385
1414
|
failUrl: window.location.origin + "/fail.html",
|
|
1386
1415
|
customerEmail: "customer123@gmail.com",
|
|
1387
1416
|
customerName: "김토스",
|
|
1388
|
-
customerMobilePhone: "01012341234",
|
|
1389
1417
|
virtualAccount: {
|
|
1390
1418
|
cashReceipt: {
|
|
1391
1419
|
type: "소득공제",
|
|
@@ -1414,7 +1442,6 @@ type RequestVirtualAccountPaymentWithRedirection = (paymentRequest: WithRedirect
|
|
|
1414
1442
|
orderName: "토스 티셔츠 외 2건",
|
|
1415
1443
|
customerEmail: "customer123@gmail.com",
|
|
1416
1444
|
customerName: "김토스",
|
|
1417
|
-
customerMobilePhone: "01012341234",
|
|
1418
1445
|
transfer: {
|
|
1419
1446
|
cashReceipt: {
|
|
1420
1447
|
type: "소득공제",
|
|
@@ -1453,7 +1480,6 @@ type RequestTransferPaymentWithPromise = (paymentRequest: TransferPaymentRequest
|
|
|
1453
1480
|
failUrl: window.location.origin + "/fail.html",
|
|
1454
1481
|
customerEmail: "customer123@gmail.com",
|
|
1455
1482
|
customerName: "김토스",
|
|
1456
|
-
customerMobilePhone: "01012341234",
|
|
1457
1483
|
transfer: {
|
|
1458
1484
|
cashReceipt: {
|
|
1459
1485
|
type: "소득공제",
|
|
@@ -1481,7 +1507,6 @@ type RequestTransferPaymentWithRedirection = (paymentRequest: WithRedirection<Tr
|
|
|
1481
1507
|
orderName: "토스 티셔츠 외 2건",
|
|
1482
1508
|
customerEmail: "customer123@gmail.com",
|
|
1483
1509
|
customerName: "김토스",
|
|
1484
|
-
customerMobilePhone: "01012341234",
|
|
1485
1510
|
});
|
|
1486
1511
|
* ```
|
|
1487
1512
|
*/
|
|
@@ -1514,7 +1539,6 @@ type RequestMobilePhonePaymentWithPromise = (paymentRequest: MobilePhonePaymentR
|
|
|
1514
1539
|
failUrl: window.location.origin + "/fail.html",
|
|
1515
1540
|
customerEmail: "customer123@gmail.com",
|
|
1516
1541
|
customerName: "김토스",
|
|
1517
|
-
customerMobilePhone: "01012341234",
|
|
1518
1542
|
});
|
|
1519
1543
|
* ```
|
|
1520
1544
|
*/
|
|
@@ -1536,7 +1560,6 @@ type RequestMobilePhonePaymentWithRedirection = (paymentRequest: WithRedirection
|
|
|
1536
1560
|
orderName: "토스 티셔츠 외 2건",
|
|
1537
1561
|
customerEmail: "customer123@gmail.com",
|
|
1538
1562
|
customerName: "김토스",
|
|
1539
|
-
customerMobilePhone: "01012341234",
|
|
1540
1563
|
});
|
|
1541
1564
|
* ```
|
|
1542
1565
|
*/
|
|
@@ -1569,37 +1592,10 @@ type RequestGiftCertificatePaymentWithPromise = (paymentRequest: GiftCertificate
|
|
|
1569
1592
|
failUrl: window.location.origin + "/fail.html",
|
|
1570
1593
|
customerEmail: "customer123@gmail.com",
|
|
1571
1594
|
customerName: "김토스",
|
|
1572
|
-
customerMobilePhone: "01012341234",
|
|
1573
1595
|
});
|
|
1574
1596
|
* ```
|
|
1575
1597
|
*/
|
|
1576
1598
|
type RequestGiftCertificatePaymentWithRedirection = (paymentRequest: WithRedirection<GiftCertificatePaymentRequest>) => Promise<void>;
|
|
1577
|
-
/**
|
|
1578
|
-
* @docsAlias 해외 간편결제(Promise 방식)
|
|
1579
|
-
* @returns `WidgetPaymentResult` 객체가 응답됩니다. 객체 필드를 확인하고 [결제 승인 API](/reference#결제-승인)를 호출해야 결제가 최종적으로 완료돼요.
|
|
1580
|
-
* @param {RequestForeignEasyPayPaymentWithPromise} paymentRequest 결제 요청 정보입니다.
|
|
1581
|
-
*
|
|
1582
|
-
* @example
|
|
1583
|
-
* ```javascript
|
|
1584
|
-
* payment.requestPayment({
|
|
1585
|
-
method: "FOREIGN_EASY_PAY",
|
|
1586
|
-
amount: {
|
|
1587
|
-
currency: "USD",
|
|
1588
|
-
value: 5000,
|
|
1589
|
-
},
|
|
1590
|
-
orderId: "<UniqueId name='orderId.paypal' />",
|
|
1591
|
-
orderName: "토스 티셔츠 외 2건",
|
|
1592
|
-
customerEmail: "customer123@gmail.com",
|
|
1593
|
-
customerName: "김토스",
|
|
1594
|
-
customerMobilePhone: "01012341234",
|
|
1595
|
-
foreignEasyPay: {
|
|
1596
|
-
provider: "PAYPAL",
|
|
1597
|
-
country: "KR",
|
|
1598
|
-
},
|
|
1599
|
-
});
|
|
1600
|
-
* ```
|
|
1601
|
-
*/
|
|
1602
|
-
type RequestForeignEasyPayPaymentWithPromise = (paymentRequest: ForeignEasyPayPaymentRequest) => Promise<RequestPaymentResult>;
|
|
1603
1599
|
/**
|
|
1604
1600
|
* @docsAlias 해외 간편결제(Redirect 방식)
|
|
1605
1601
|
* @returns 결제 요청이 성공하면 파라미터로 설정한 `successUrl`로 이동해요. 쿼리 파라미터의 `amount` 값이 메서드 파라미터로 설정한 `amount`와 같은지 반드시 확인하고 [결제 승인 API](/reference#결제-승인)를 호출해서 결제를 완료하세요.
|
|
@@ -1628,7 +1624,6 @@ type RequestForeignEasyPayPaymentWithPromise = (paymentRequest: ForeignEasyPayPa
|
|
|
1628
1624
|
failUrl: window.location.origin + "/fail.html",
|
|
1629
1625
|
customerEmail: "customer123@gmail.com",
|
|
1630
1626
|
customerName: "김토스",
|
|
1631
|
-
customerMobilePhone: "01012341234",
|
|
1632
1627
|
foreignEasyPay: {
|
|
1633
1628
|
provider: "PAYPAL",
|
|
1634
1629
|
country: "KR",
|