@wix/payments 1.0.25 → 1.0.27

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.
@@ -1,1808 +0,0 @@
1
- interface OnboardingAvailability$1 {
2
- /**
3
- * ID of this entity
4
- * @readonly
5
- */
6
- id?: string;
7
- /** Information about CBD specific flow. Will have DECLINED status if user is not in United States */
8
- cbdFlow?: CbdFlow$1;
9
- /** Information about all restricted goods user might sell. */
10
- restrictedGoodsFlow?: RestrictedGoodsFlow$1;
11
- /** Information about services Wix Partner sells. */
12
- partnerFlow?: PartnerFlow$1;
13
- /**
14
- * True, only if Wix Payments available to user due to the way account was created. False otherwise.
15
- * @readonly
16
- */
17
- wixPaymentsAvailable?: boolean;
18
- }
19
- interface CbdFlow$1 {
20
- /**
21
- * Current status of CBD flow.
22
- * DECLINED - User does not sell CBD (or at least we do not know about it). Any payment service provider can be connected.
23
- * POSSIBLE - User possibly sells CBD and we should ask for confirmation. User still can connect Wix Payments.
24
- * CONFIRMED - User confirmed to sell CBD and now we should ask to complete attestation form. Only CBD providers can be connected. User can't connect Wix Payments.
25
- */
26
- status?: Status$3;
27
- /** Information about completion of attestation form. Include date of signing. */
28
- attestationInfo?: AttestationInfo$1;
29
- }
30
- declare enum Status$3 {
31
- UNDEFINED = "UNDEFINED",
32
- DECLINED = "DECLINED",
33
- POSSIBLE = "POSSIBLE",
34
- CONFIRMED = "CONFIRMED"
35
- }
36
- interface AttestationInfo$1 {
37
- /**
38
- * Date of signing attestation form (only if status is CONFIRMED)
39
- * @readonly
40
- */
41
- attestationFormSignedDate?: Date | null;
42
- /** True, if attestation form was signed. False otherwise. */
43
- formSigned?: boolean | null;
44
- }
45
- interface RestrictedGoodsFlow$1 {
46
- /**
47
- * Current status of Restricted Goods flow.
48
- * DECLINED - User confirmed that they don't sell any restricted goods. User may connect Wix Payments.
49
- * CONFIRMED - User confirmed that they do sell restricted goods. User can't connect Wix Payments.
50
- */
51
- status?: RestrictedGoodsFlowStatus$1;
52
- /** Contains detailed list of which restricted categories user sell. */
53
- categories?: RestrictedGoodsCategory$1[];
54
- }
55
- declare enum RestrictedGoodsFlowStatus$1 {
56
- UNDEFINED = "UNDEFINED",
57
- DECLINED = "DECLINED",
58
- CONFIRMED = "CONFIRMED"
59
- }
60
- declare enum RestrictedGoodsCategory$1 {
61
- UNDEFINED = "UNDEFINED",
62
- TOBACCO_ALCOHOL = "TOBACCO_ALCOHOL",
63
- FIREARMS_WEAPONS = "FIREARMS_WEAPONS",
64
- ADULT = "ADULT",
65
- MEDICAL = "MEDICAL",
66
- FINANCIAL = "FINANCIAL",
67
- TRAVEL_AGENCIES = "TRAVEL_AGENCIES",
68
- GAMBLING_LOTTERIES_SKILL_GAMES = "GAMBLING_LOTTERIES_SKILL_GAMES",
69
- BINARY_OPTIONS_CRYPTOCURRENCIES = "BINARY_OPTIONS_CRYPTOCURRENCIES",
70
- MARKETPLACES = "MARKETPLACES",
71
- OTHER = "OTHER",
72
- CBD = "CBD",
73
- TOBACCO_E_CIGARETTES = "TOBACCO_E_CIGARETTES",
74
- ALCOHOL = "ALCOHOL",
75
- NUTRACEUTICALS = "NUTRACEUTICALS"
76
- }
77
- interface PartnerFlow$1 {
78
- /**
79
- * Current status of Partner flow.
80
- * DECLINED - User sells only approved services and may connect Wix Payments.
81
- * CONFIRMED - User sells not approved services and can't connect Wix Payments.
82
- */
83
- status?: PartnerFlowStatus$1;
84
- }
85
- declare enum PartnerFlowStatus$1 {
86
- UNDEFINED = "UNDEFINED",
87
- DECLINED = "DECLINED",
88
- CONFIRMED = "CONFIRMED"
89
- }
90
- interface GetOnboardingAvailabilityRequest$1 {
91
- }
92
- interface GetOnboardingAvailabilityResponse$1 {
93
- /** Current state of onboarding availability for the merchant. */
94
- onboardingAvailability?: OnboardingAvailability$1;
95
- }
96
- interface UpdateCbdFlowRequest$1 {
97
- /** New state of CBD flow for merchant. */
98
- cbdFlow?: CbdFlow$1;
99
- }
100
- interface UpdateCbdFlowResponse$1 {
101
- /** Current state of onboarding availability for the merchant. */
102
- onboardingAvailability?: OnboardingAvailability$1;
103
- }
104
- interface UpdateRestrictedGoodsFlowRequest$1 {
105
- /** New state of restricted goods flow for merchant. */
106
- restrictedGoods?: RestrictedGoodsFlow$1;
107
- }
108
- interface UpdateRestrictedGoodsFlowResponse$1 {
109
- /** Current state of onboarding availability for the merchant. */
110
- onboardingAvailability?: OnboardingAvailability$1;
111
- }
112
- interface UpdatePartnerFlowRequest$1 {
113
- /** New state of partner flow for merchant. */
114
- partnerFlow?: PartnerFlow$1;
115
- }
116
- interface UpdatePartnerFlowResponse$1 {
117
- /** Current state of onboarding availability for the merchant. */
118
- onboardingAvailability?: OnboardingAvailability$1;
119
- }
120
- interface CbdFlowNonNullableFields$1 {
121
- status: Status$3;
122
- }
123
- interface RestrictedGoodsFlowNonNullableFields$1 {
124
- status: RestrictedGoodsFlowStatus$1;
125
- categories: RestrictedGoodsCategory$1[];
126
- }
127
- interface PartnerFlowNonNullableFields$1 {
128
- status: PartnerFlowStatus$1;
129
- }
130
- interface OnboardingAvailabilityNonNullableFields$1 {
131
- id: string;
132
- cbdFlow?: CbdFlowNonNullableFields$1;
133
- restrictedGoodsFlow?: RestrictedGoodsFlowNonNullableFields$1;
134
- partnerFlow?: PartnerFlowNonNullableFields$1;
135
- wixPaymentsAvailable: boolean;
136
- }
137
- interface GetOnboardingAvailabilityResponseNonNullableFields$1 {
138
- onboardingAvailability?: OnboardingAvailabilityNonNullableFields$1;
139
- }
140
- interface UpdateCbdFlowResponseNonNullableFields$1 {
141
- onboardingAvailability?: OnboardingAvailabilityNonNullableFields$1;
142
- }
143
- interface UpdateRestrictedGoodsFlowResponseNonNullableFields$1 {
144
- onboardingAvailability?: OnboardingAvailabilityNonNullableFields$1;
145
- }
146
- interface UpdatePartnerFlowResponseNonNullableFields$1 {
147
- onboardingAvailability?: OnboardingAvailabilityNonNullableFields$1;
148
- }
149
-
150
- interface OnboardingAvailability {
151
- /**
152
- * ID of this entity
153
- * @readonly
154
- */
155
- _id?: string;
156
- /** Information about CBD specific flow. Will have DECLINED status if user is not in United States */
157
- cbdFlow?: CbdFlow;
158
- /** Information about all restricted goods user might sell. */
159
- restrictedGoodsFlow?: RestrictedGoodsFlow;
160
- /** Information about services Wix Partner sells. */
161
- partnerFlow?: PartnerFlow;
162
- /**
163
- * True, only if Wix Payments available to user due to the way account was created. False otherwise.
164
- * @readonly
165
- */
166
- wixPaymentsAvailable?: boolean;
167
- }
168
- interface CbdFlow {
169
- /**
170
- * Current status of CBD flow.
171
- * DECLINED - User does not sell CBD (or at least we do not know about it). Any payment service provider can be connected.
172
- * POSSIBLE - User possibly sells CBD and we should ask for confirmation. User still can connect Wix Payments.
173
- * CONFIRMED - User confirmed to sell CBD and now we should ask to complete attestation form. Only CBD providers can be connected. User can't connect Wix Payments.
174
- */
175
- status?: Status$2;
176
- /** Information about completion of attestation form. Include date of signing. */
177
- attestationInfo?: AttestationInfo;
178
- }
179
- declare enum Status$2 {
180
- UNDEFINED = "UNDEFINED",
181
- DECLINED = "DECLINED",
182
- POSSIBLE = "POSSIBLE",
183
- CONFIRMED = "CONFIRMED"
184
- }
185
- interface AttestationInfo {
186
- /**
187
- * Date of signing attestation form (only if status is CONFIRMED)
188
- * @readonly
189
- */
190
- attestationFormSignedDate?: Date | null;
191
- /** True, if attestation form was signed. False otherwise. */
192
- formSigned?: boolean | null;
193
- }
194
- interface RestrictedGoodsFlow {
195
- /**
196
- * Current status of Restricted Goods flow.
197
- * DECLINED - User confirmed that they don't sell any restricted goods. User may connect Wix Payments.
198
- * CONFIRMED - User confirmed that they do sell restricted goods. User can't connect Wix Payments.
199
- */
200
- status?: RestrictedGoodsFlowStatus;
201
- /** Contains detailed list of which restricted categories user sell. */
202
- categories?: RestrictedGoodsCategory[];
203
- }
204
- declare enum RestrictedGoodsFlowStatus {
205
- UNDEFINED = "UNDEFINED",
206
- DECLINED = "DECLINED",
207
- CONFIRMED = "CONFIRMED"
208
- }
209
- declare enum RestrictedGoodsCategory {
210
- UNDEFINED = "UNDEFINED",
211
- TOBACCO_ALCOHOL = "TOBACCO_ALCOHOL",
212
- FIREARMS_WEAPONS = "FIREARMS_WEAPONS",
213
- ADULT = "ADULT",
214
- MEDICAL = "MEDICAL",
215
- FINANCIAL = "FINANCIAL",
216
- TRAVEL_AGENCIES = "TRAVEL_AGENCIES",
217
- GAMBLING_LOTTERIES_SKILL_GAMES = "GAMBLING_LOTTERIES_SKILL_GAMES",
218
- BINARY_OPTIONS_CRYPTOCURRENCIES = "BINARY_OPTIONS_CRYPTOCURRENCIES",
219
- MARKETPLACES = "MARKETPLACES",
220
- OTHER = "OTHER",
221
- CBD = "CBD",
222
- TOBACCO_E_CIGARETTES = "TOBACCO_E_CIGARETTES",
223
- ALCOHOL = "ALCOHOL",
224
- NUTRACEUTICALS = "NUTRACEUTICALS"
225
- }
226
- interface PartnerFlow {
227
- /**
228
- * Current status of Partner flow.
229
- * DECLINED - User sells only approved services and may connect Wix Payments.
230
- * CONFIRMED - User sells not approved services and can't connect Wix Payments.
231
- */
232
- status?: PartnerFlowStatus;
233
- }
234
- declare enum PartnerFlowStatus {
235
- UNDEFINED = "UNDEFINED",
236
- DECLINED = "DECLINED",
237
- CONFIRMED = "CONFIRMED"
238
- }
239
- interface GetOnboardingAvailabilityRequest {
240
- }
241
- interface GetOnboardingAvailabilityResponse {
242
- /** Current state of onboarding availability for the merchant. */
243
- onboardingAvailability?: OnboardingAvailability;
244
- }
245
- interface UpdateCbdFlowRequest {
246
- /** New state of CBD flow for merchant. */
247
- cbdFlow?: CbdFlow;
248
- }
249
- interface UpdateCbdFlowResponse {
250
- /** Current state of onboarding availability for the merchant. */
251
- onboardingAvailability?: OnboardingAvailability;
252
- }
253
- interface UpdateRestrictedGoodsFlowRequest {
254
- /** New state of restricted goods flow for merchant. */
255
- restrictedGoods?: RestrictedGoodsFlow;
256
- }
257
- interface UpdateRestrictedGoodsFlowResponse {
258
- /** Current state of onboarding availability for the merchant. */
259
- onboardingAvailability?: OnboardingAvailability;
260
- }
261
- interface UpdatePartnerFlowRequest {
262
- /** New state of partner flow for merchant. */
263
- partnerFlow?: PartnerFlow;
264
- }
265
- interface UpdatePartnerFlowResponse {
266
- /** Current state of onboarding availability for the merchant. */
267
- onboardingAvailability?: OnboardingAvailability;
268
- }
269
- interface CbdFlowNonNullableFields {
270
- status: Status$2;
271
- }
272
- interface RestrictedGoodsFlowNonNullableFields {
273
- status: RestrictedGoodsFlowStatus;
274
- categories: RestrictedGoodsCategory[];
275
- }
276
- interface PartnerFlowNonNullableFields {
277
- status: PartnerFlowStatus;
278
- }
279
- interface OnboardingAvailabilityNonNullableFields {
280
- _id: string;
281
- cbdFlow?: CbdFlowNonNullableFields;
282
- restrictedGoodsFlow?: RestrictedGoodsFlowNonNullableFields;
283
- partnerFlow?: PartnerFlowNonNullableFields;
284
- wixPaymentsAvailable: boolean;
285
- }
286
- interface GetOnboardingAvailabilityResponseNonNullableFields {
287
- onboardingAvailability?: OnboardingAvailabilityNonNullableFields;
288
- }
289
- interface UpdateCbdFlowResponseNonNullableFields {
290
- onboardingAvailability?: OnboardingAvailabilityNonNullableFields;
291
- }
292
- interface UpdateRestrictedGoodsFlowResponseNonNullableFields {
293
- onboardingAvailability?: OnboardingAvailabilityNonNullableFields;
294
- }
295
- interface UpdatePartnerFlowResponseNonNullableFields {
296
- onboardingAvailability?: OnboardingAvailabilityNonNullableFields;
297
- }
298
-
299
- type __PublicMethodMetaInfo$3<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
300
- getUrl: (context: any) => string;
301
- httpMethod: K;
302
- path: string;
303
- pathParams: M;
304
- __requestType: T;
305
- __originalRequestType: S;
306
- __responseType: Q;
307
- __originalResponseType: R;
308
- };
309
- declare function getOnboardingAvailability(): __PublicMethodMetaInfo$3<'GET', {}, GetOnboardingAvailabilityRequest, GetOnboardingAvailabilityRequest$1, GetOnboardingAvailabilityResponse & GetOnboardingAvailabilityResponseNonNullableFields, GetOnboardingAvailabilityResponse$1 & GetOnboardingAvailabilityResponseNonNullableFields$1>;
310
- declare function updateCbdFlow(): __PublicMethodMetaInfo$3<'PATCH', {}, UpdateCbdFlowRequest, UpdateCbdFlowRequest$1, UpdateCbdFlowResponse & UpdateCbdFlowResponseNonNullableFields, UpdateCbdFlowResponse$1 & UpdateCbdFlowResponseNonNullableFields$1>;
311
- declare function updateRestrictedGoodsFlow(): __PublicMethodMetaInfo$3<'PATCH', {}, UpdateRestrictedGoodsFlowRequest, UpdateRestrictedGoodsFlowRequest$1, UpdateRestrictedGoodsFlowResponse & UpdateRestrictedGoodsFlowResponseNonNullableFields, UpdateRestrictedGoodsFlowResponse$1 & UpdateRestrictedGoodsFlowResponseNonNullableFields$1>;
312
- declare function updatePartnerFlow(): __PublicMethodMetaInfo$3<'PATCH', {}, UpdatePartnerFlowRequest, UpdatePartnerFlowRequest$1, UpdatePartnerFlowResponse & UpdatePartnerFlowResponseNonNullableFields, UpdatePartnerFlowResponse$1 & UpdatePartnerFlowResponseNonNullableFields$1>;
313
-
314
- declare const meta$3_getOnboardingAvailability: typeof getOnboardingAvailability;
315
- declare const meta$3_updateCbdFlow: typeof updateCbdFlow;
316
- declare const meta$3_updatePartnerFlow: typeof updatePartnerFlow;
317
- declare const meta$3_updateRestrictedGoodsFlow: typeof updateRestrictedGoodsFlow;
318
- declare namespace meta$3 {
319
- export { type __PublicMethodMetaInfo$3 as __PublicMethodMetaInfo, meta$3_getOnboardingAvailability as getOnboardingAvailability, meta$3_updateCbdFlow as updateCbdFlow, meta$3_updatePartnerFlow as updatePartnerFlow, meta$3_updateRestrictedGoodsFlow as updateRestrictedGoodsFlow };
320
- }
321
-
322
- /** Provider platform event */
323
- interface ProviderPlatformEvent$1 extends ProviderPlatformEventResourceOneOf$1 {
324
- /** Refund event data. */
325
- refund?: RefundEvent$1;
326
- /** Transaction event data. */
327
- transaction?: TransactionEvent$1;
328
- /**
329
- * This field is ignored, do not send it.
330
- * @deprecated
331
- */
332
- pluginId?: string;
333
- }
334
- /** @oneof */
335
- interface ProviderPlatformEventResourceOneOf$1 {
336
- /** Refund event data. */
337
- refund?: RefundEvent$1;
338
- /** Transaction event data. */
339
- transaction?: TransactionEvent$1;
340
- }
341
- interface RefundEvent$1 {
342
- /** Wix transaction ID. */
343
- wixTransactionId?: string;
344
- /** PSP refund ID. */
345
- pluginRefundId?: string;
346
- /** Wix [reason code](https://dev.wix.com/api/rest/all-apis/provider-platform/reason-codes#all-apis_provider-platform_reason-codes_refund-declined) indicating a failed request. */
347
- reasonCode?: number;
348
- /** Refunded amount. */
349
- amount?: string;
350
- /** Wix refund ID. This field is only required when a merchant initiates a refund from the Wix dashboard. */
351
- wixRefundId?: string | null;
352
- /** PSP-specific error code. */
353
- errorCode?: string | null;
354
- /** PSP-specific error message. */
355
- errorMessage?: string | null;
356
- }
357
- interface TransactionEvent$1 {
358
- /** Wix transaction ID. */
359
- wixTransactionId?: string;
360
- /** PSP transaction ID. */
361
- pluginTransactionId?: string;
362
- /** Wix [reason code](https://dev.wix.com/api/rest/all-apis/provider-platform/reason-codes) indicating a failed or pending request. */
363
- reasonCode?: number;
364
- /** PSP-specific error code. */
365
- errorCode?: string | null;
366
- /** PSP-specific error message. */
367
- errorMessage?: string | null;
368
- /** Token data for stored payment method. */
369
- credentialsOnFile?: CredentialsOnFile$1;
370
- /** Details of actual customer's card, obtained from a Funding PAN as opposed to a Device PAN. */
371
- cardDetails?: CardDetails$1;
372
- }
373
- interface CredentialsOnFile$1 extends CredentialsOnFileInfoOneOf$1 {
374
- /** Network token data. */
375
- cardReference?: CardReference$1;
376
- /** Provider generated token data. */
377
- paymentMethodReference?: PaymentMethodReference$1;
378
- }
379
- /** @oneof */
380
- interface CredentialsOnFileInfoOneOf$1 {
381
- /** Network token data. */
382
- cardReference?: CardReference$1;
383
- /** Provider generated token data. */
384
- paymentMethodReference?: PaymentMethodReference$1;
385
- }
386
- interface CardReference$1 {
387
- /** Network token. */
388
- networkTransactionId?: string;
389
- /** Directory Server transaction ID */
390
- dsTransactionId?: string | null;
391
- }
392
- interface PaymentMethodReference$1 {
393
- /** Payment method token created by the PSP. */
394
- token?: string;
395
- }
396
- interface CardDetails$1 {
397
- /** Issuer (business) identification number. First 6 or 8 digits of the card's number. */
398
- bin?: string | null;
399
- /** Last 4 digits of the card's number. */
400
- lastFour?: string | null;
401
- }
402
- /** Submit event request */
403
- interface SubmitEventRequest$1 {
404
- /** Event data. */
405
- event: ProviderPlatformEvent$1;
406
- }
407
- /** Submit event response */
408
- interface SubmitEventResponse$1 {
409
- }
410
-
411
- /** Provider platform event */
412
- interface ProviderPlatformEvent extends ProviderPlatformEventResourceOneOf {
413
- /** Refund event data. */
414
- refund?: RefundEvent;
415
- /** Transaction event data. */
416
- transaction?: TransactionEvent;
417
- /**
418
- * This field is ignored, do not send it.
419
- * @deprecated
420
- */
421
- pluginId?: string;
422
- }
423
- /** @oneof */
424
- interface ProviderPlatformEventResourceOneOf {
425
- /** Refund event data. */
426
- refund?: RefundEvent;
427
- /** Transaction event data. */
428
- transaction?: TransactionEvent;
429
- }
430
- interface RefundEvent {
431
- /** Wix transaction ID. */
432
- wixTransactionId?: string;
433
- /** PSP refund ID. */
434
- pluginRefundId?: string;
435
- /** Wix [reason code](https://dev.wix.com/api/rest/all-apis/provider-platform/reason-codes#all-apis_provider-platform_reason-codes_refund-declined) indicating a failed request. */
436
- reasonCode?: number;
437
- /** Refunded amount. */
438
- amount?: string;
439
- /** Wix refund ID. This field is only required when a merchant initiates a refund from the Wix dashboard. */
440
- wixRefundId?: string | null;
441
- /** PSP-specific error code. */
442
- errorCode?: string | null;
443
- /** PSP-specific error message. */
444
- errorMessage?: string | null;
445
- }
446
- interface TransactionEvent {
447
- /** Wix transaction ID. */
448
- wixTransactionId?: string;
449
- /** PSP transaction ID. */
450
- pluginTransactionId?: string;
451
- /** Wix [reason code](https://dev.wix.com/api/rest/all-apis/provider-platform/reason-codes) indicating a failed or pending request. */
452
- reasonCode?: number;
453
- /** PSP-specific error code. */
454
- errorCode?: string | null;
455
- /** PSP-specific error message. */
456
- errorMessage?: string | null;
457
- /** Token data for stored payment method. */
458
- credentialsOnFile?: CredentialsOnFile;
459
- /** Details of actual customer's card, obtained from a Funding PAN as opposed to a Device PAN. */
460
- cardDetails?: CardDetails;
461
- }
462
- interface CredentialsOnFile extends CredentialsOnFileInfoOneOf {
463
- /** Network token data. */
464
- cardReference?: CardReference;
465
- /** Provider generated token data. */
466
- paymentMethodReference?: PaymentMethodReference;
467
- }
468
- /** @oneof */
469
- interface CredentialsOnFileInfoOneOf {
470
- /** Network token data. */
471
- cardReference?: CardReference;
472
- /** Provider generated token data. */
473
- paymentMethodReference?: PaymentMethodReference;
474
- }
475
- interface CardReference {
476
- /** Network token. */
477
- networkTransactionId?: string;
478
- /** Directory Server transaction ID */
479
- dsTransactionId?: string | null;
480
- }
481
- interface PaymentMethodReference {
482
- /** Payment method token created by the PSP. */
483
- token?: string;
484
- }
485
- interface CardDetails {
486
- /** Issuer (business) identification number. First 6 or 8 digits of the card's number. */
487
- bin?: string | null;
488
- /** Last 4 digits of the card's number. */
489
- lastFour?: string | null;
490
- }
491
- /** Submit event request */
492
- interface SubmitEventRequest {
493
- /** Event data. */
494
- event: ProviderPlatformEvent;
495
- }
496
- /** Submit event response */
497
- interface SubmitEventResponse {
498
- }
499
-
500
- type __PublicMethodMetaInfo$2<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
501
- getUrl: (context: any) => string;
502
- httpMethod: K;
503
- path: string;
504
- pathParams: M;
505
- __requestType: T;
506
- __originalRequestType: S;
507
- __responseType: Q;
508
- __originalResponseType: R;
509
- };
510
- declare function submitEvent(): __PublicMethodMetaInfo$2<'POST', {}, SubmitEventRequest, SubmitEventRequest$1, SubmitEventResponse, SubmitEventResponse$1>;
511
-
512
- declare const meta$2_submitEvent: typeof submitEvent;
513
- declare namespace meta$2 {
514
- export { type __PublicMethodMetaInfo$2 as __PublicMethodMetaInfo, meta$2_submitEvent as submitEvent };
515
- }
516
-
517
- /**
518
- * A refund a record of an attempt of
519
- * returning funds for a charge from a merchant to a buyer who has made a purchase.
520
- * Read more about refunds in this [article](<https://dev.wix.com/docs/rest/business-management/payments/refunds/introduction>).
521
- */
522
- interface Refund$1 {
523
- /**
524
- * Refund ID.
525
- * @readonly
526
- */
527
- id?: string | null;
528
- /**
529
- * Revision number, which increments by 1 each time the refund is updated.
530
- *
531
- * Ignored when creating a refund.
532
- * @readonly
533
- */
534
- revision?: string | null;
535
- /**
536
- * Date and time the refund was created.
537
- * @readonly
538
- */
539
- createdDate?: Date | null;
540
- /**
541
- * Date and time the refund was last updated.
542
- * @readonly
543
- */
544
- updatedDate?: Date | null;
545
- /** Data Extensions */
546
- extendedFields?: ExtendedFields$3;
547
- /** ID of charge for which the funds are returned by this refund. */
548
- chargeId?: string | null;
549
- /** Currency of refund, should be the same as currency of charge. */
550
- currency?: string | null;
551
- /**
552
- * Amount of refund in base units, what's returned to the buyer.
553
- * E.g. "12.95".
554
- */
555
- amount?: string | null;
556
- /**
557
- * Application fee returned to merchant from Wix.
558
- * In base units, e.g. "12.95".
559
- * Not present when no application fee was returned.
560
- * @readonly
561
- */
562
- returnedApplicationFee?: string | null;
563
- /**
564
- * Processing fee returned to merchant from provider.
565
- * In base units, e.g. "12.95".
566
- * Applicable only to Wix Payments provider.
567
- * Not present when no processing fee was returned.
568
- * @readonly
569
- */
570
- returnedProcessingFee?: string | null;
571
- /**
572
- * True when refund returns all funds for a charge.
573
- * @readonly
574
- */
575
- full?: boolean | null;
576
- /**
577
- * Status of the refund.
578
- * Read more about statuses in this [article](<https://dev.wix.com/docs/rest/business-management/payments/refunds/introduction#lifecycle-of-a-refund>).
579
- * @readonly
580
- */
581
- status?: Status$1;
582
- /**
583
- * ID of the refund on the PSP side.
584
- * @readonly
585
- */
586
- providerRefundId?: string | null;
587
- /** Reason why this refund was issued. */
588
- reason?: string | null;
589
- /**
590
- * Details about refund status.
591
- * Mostly used with statuses `FAILED` and `REVERSED`.
592
- * @readonly
593
- */
594
- statusInfo?: StatusInfo$1;
595
- /**
596
- * Acquirer Reference Number.
597
- * @readonly
598
- */
599
- acquirerReferenceNumber?: string | null;
600
- /** Optional free-text note about this refund. */
601
- note?: string | null;
602
- }
603
- interface ExtendedFields$3 {
604
- /**
605
- * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
606
- * The value of each key is structured according to the schema defined when the extended fields were configured.
607
- *
608
- * You can only access fields for which you have the appropriate permissions.
609
- *
610
- * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
611
- */
612
- namespaces?: Record<string, Record<string, any>>;
613
- }
614
- declare enum Status$1 {
615
- UNKNOWN_STATUS = "UNKNOWN_STATUS",
616
- /**
617
- * Initial status for all refunds.
618
- * Provisional, refund should be in this status for less than a minute.
619
- */
620
- STARTING = "STARTING",
621
- /** Status right after STARTED for asynchronous refunds. */
622
- PENDING = "PENDING",
623
- /**
624
- * Refund was successful.
625
- * Can transition to REVERSED in corner cases.
626
- */
627
- SUCCEEDED = "SUCCEEDED",
628
- /** Regular error, terminal status. */
629
- FAILED = "FAILED",
630
- /**
631
- * Either refund reversal
632
- * or any other error that comes after success, terminal status.
633
- */
634
- REVERSED = "REVERSED"
635
- }
636
- declare enum Initiator$1 {
637
- UNKNOWN_INITIATOR = "UNKNOWN_INITIATOR",
638
- WIX = "WIX",
639
- API = "API",
640
- PROVIDER = "PROVIDER"
641
- }
642
- interface StatusInfo$1 {
643
- /**
644
- * Reason code.
645
- * [Read more about reason codes.](https://dev.wix.com/docs/rest/api-reference/payment-provider-spi/reason-codes)
646
- */
647
- code?: string;
648
- /** Free-text description. */
649
- description?: string | null;
650
- }
651
- interface CreateRefundRequest$1 {
652
- /** Refund to be created. */
653
- refund: Refund$1;
654
- /**
655
- * Optional parameter used to prevent unintended refunds.
656
- * Used to check previously refunded amount according to the client
657
- * against the amount from server perspective.
658
- * If they don't match, error with code `PREVIOUSLY_REFUNDED_AMOUNT_MISMATCH` is returned.
659
- *
660
- * Read more about preventing unintended refunds in this
661
- * [article](<https://dev.wix.com/docs/rest/business-management/payments/refunds/introduction#preventing-unintended-refunds>).
662
- */
663
- previouslyRefundedAmount?: string | null;
664
- }
665
- interface CreateRefundResponse$1 {
666
- /** The created refund. */
667
- refund?: Refund$1;
668
- }
669
- interface GetRefundRequest$1 {
670
- /** ID of the refund to retrieve. */
671
- refundId: string;
672
- }
673
- interface GetRefundResponse$1 {
674
- /** The requested refund. */
675
- refund?: Refund$1;
676
- }
677
- interface QueryRefundsRequest$1 {
678
- /** WQL expression. */
679
- query?: CursorQuery$1;
680
- }
681
- interface CursorQuery$1 extends CursorQueryPagingMethodOneOf$1 {
682
- /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
683
- cursorPaging?: CursorPaging$3;
684
- /**
685
- * Filter object in the following format:
686
- * `"filter" : {
687
- * "fieldName1": "value1",
688
- * "fieldName2":{"$operator":"value2"}
689
- * }`
690
- * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
691
- */
692
- filter?: Record<string, any> | null;
693
- /**
694
- * Sort object in the following format:
695
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
696
- */
697
- sort?: Sorting$1[];
698
- }
699
- /** @oneof */
700
- interface CursorQueryPagingMethodOneOf$1 {
701
- /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
702
- cursorPaging?: CursorPaging$3;
703
- }
704
- interface Sorting$1 {
705
- /** Name of the field to sort by. */
706
- fieldName?: string;
707
- /** Sort order. */
708
- order?: SortOrder$1;
709
- }
710
- declare enum SortOrder$1 {
711
- ASC = "ASC",
712
- DESC = "DESC"
713
- }
714
- interface CursorPaging$3 {
715
- /** Number of items to load. */
716
- limit?: number | null;
717
- /**
718
- * Pointer to the next or previous page in the list of results.
719
- *
720
- * You can get the relevant cursor token
721
- * from the `pagingMetadata` object in the previous call's response.
722
- * Not relevant for the first request.
723
- */
724
- cursor?: string | null;
725
- }
726
- interface QueryRefundsResponse$1 {
727
- /** List of refunds. */
728
- refunds?: Refund$1[];
729
- /** Paging metadata */
730
- pagingMetadata?: CursorPagingMetadata$3;
731
- }
732
- interface CursorPagingMetadata$3 {
733
- /** Number of items returned in the response. */
734
- count?: number | null;
735
- /** Offset that was requested. */
736
- cursors?: Cursors$3;
737
- /**
738
- * Indicates if there are more results after the current page.
739
- * If `true`, another page of results can be retrieved.
740
- * If `false`, this is the last page.
741
- */
742
- hasNext?: boolean | null;
743
- }
744
- interface Cursors$3 {
745
- /** Cursor pointing to next page in the list of results. */
746
- next?: string | null;
747
- /** Cursor pointing to previous page in the list of results. */
748
- prev?: string | null;
749
- }
750
- interface UpdateExtendedFieldsRequest$1 {
751
- /** ID of the entity to update. */
752
- id: string;
753
- /** Identifier for the app whose extended fields are being updated. */
754
- namespace: string;
755
- /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */
756
- namespaceData: Record<string, any> | null;
757
- }
758
- interface UpdateExtendedFieldsResponse$1 {
759
- /** Updated refund. */
760
- refund?: Refund$1;
761
- }
762
- interface GetRefundabilityRequest$1 {
763
- /** ID of the charge for which refundability will be calculated. */
764
- chargeId: string;
765
- }
766
- interface GetRefundabilityResponse$1 {
767
- /** Refundability for the charge. */
768
- refundability?: Refundability$1;
769
- }
770
- /**
771
- * Internal notes:
772
- *
773
- * Instead of separate Refundability and PartialRefundability, we provide min and max refund amount.
774
- * If only full refund is possible, min_refund_amount = max_refund_amount = charge amount.
775
- */
776
- interface Refundability$1 extends RefundabilityDetailsOneOf$1 {
777
- /** When charge is refundable, specifies what amounts are allowed for refund. */
778
- refundOptions?: RefundOptions$1;
779
- /** When charge is not refundable, specifies why refund is not allowed. */
780
- rejection?: Rejection$1;
781
- /** Whether the caller is allowed to refund the charge. */
782
- refundable?: boolean;
783
- /** Currency of the charge. */
784
- currency?: string | null;
785
- /**
786
- * Sum of amounts of `SUCCEEDED` refunds for this charge in base units, e.g. "6.47".
787
- * Used to prevent unintended refunds, read more in this
788
- * [article](<https://dev.wix.com/docs/rest/business-management/payments/refunds/introduction#preventing-unintended-refunds>).
789
- */
790
- previouslyRefundedAmount?: string | null;
791
- }
792
- /** @oneof */
793
- interface RefundabilityDetailsOneOf$1 {
794
- /** When charge is refundable, specifies what amounts are allowed for refund. */
795
- refundOptions?: RefundOptions$1;
796
- /** When charge is not refundable, specifies why refund is not allowed. */
797
- rejection?: Rejection$1;
798
- }
799
- interface RefundOptions$1 {
800
- /** Minimum amount allowed to be refunded in base units, e.g. "0.50". */
801
- minRefundAmount?: string | null;
802
- /** Maximum amount allowed to be refunded in base units, e.g. "12.95". */
803
- maxRefundAmount?: string | null;
804
- }
805
- interface Rejection$1 {
806
- /**
807
- * Following reasons are possible:
808
- * - `CHARGE_REFUNDED` — charge is already fully refunded.
809
- * - `CHARGE_REFUND_IN_PROGRESS` — another refund was initiated for this charge
810
- * and is waiting for confirmation from the provider.
811
- * - `CHARGE_DISPUTED` — charge was disputed.
812
- * - `CHARGE_REFUND_PERIOD_ENDED` — charge is too old to be refunded.
813
- * - `CHARGE_UNPAID` — charge is unpaid.
814
- * - `PROVIDER_DOWN` — PSP is temporarily down.
815
- * - `PROVIDER_NOT_SUPPORTED` — provider doesn't support refunds at the moment,
816
- * charge is in the wrong state,
817
- * or we don't have required information for this transaction.
818
- * - `PAYMENT_METHOD_NOT_SUPPORTED` — payment method of a charge doesn't support refunds.
819
- * - `MERCHANT_ACCOUNT_NOT_SUPPORTED` — merchant account doesn't support refunds at the moment.
820
- * - `MERCHANT_BALANCE_INSUFFICIENT` — merchant doesn't have enough balance to issue a refund for this charge.
821
- * - `NOT_AUTHORIZED` — logged in merchant has no permission to refund this charge.
822
- */
823
- reason?: RejectionReason$1;
824
- }
825
- declare enum RejectionReason$1 {
826
- UNKNOWN_REJECTION_REASON = "UNKNOWN_REJECTION_REASON",
827
- /** Charge is already fully refunded. */
828
- CHARGE_REFUNDED = "CHARGE_REFUNDED",
829
- /** Another refund was initiated for this charge and is waiting for confirmation from the provider. */
830
- CHARGE_REFUND_IN_PROGRESS = "CHARGE_REFUND_IN_PROGRESS",
831
- /** Charge was disputed. */
832
- CHARGE_DISPUTED = "CHARGE_DISPUTED",
833
- /** Charge is too old to be refunded. */
834
- CHARGE_REFUND_PERIOD_ENDED = "CHARGE_REFUND_PERIOD_ENDED",
835
- /** Charge is unpaid. */
836
- CHARGE_UNPAID = "CHARGE_UNPAID",
837
- /** PSP is temporarily down. */
838
- PROVIDER_DOWN = "PROVIDER_DOWN",
839
- /**
840
- * Provider doesn't support refunds at the moment, transaction in a wrong state or we don't
841
- * have required information for this transaction.
842
- */
843
- PROVIDER_NOT_SUPPORTED = "PROVIDER_NOT_SUPPORTED",
844
- /** Payment method of a charge doesn't support refunds. */
845
- PAYMENT_METHOD_NOT_SUPPORTED = "PAYMENT_METHOD_NOT_SUPPORTED",
846
- /** Merchant account doesn't support refunds at the moment. */
847
- MERCHANT_ACCOUNT_NOT_SUPPORTED = "MERCHANT_ACCOUNT_NOT_SUPPORTED",
848
- /** Merchant doesn't have enough balance to issue a refund for this charge. */
849
- MERCHANT_BALANCE_INSUFFICIENT = "MERCHANT_BALANCE_INSUFFICIENT",
850
- /** Logged in merchant has no permission to refund this charge. */
851
- NOT_AUTHORIZED = "NOT_AUTHORIZED"
852
- }
853
- interface StatusInfoNonNullableFields$1 {
854
- code: string;
855
- }
856
- interface RefundNonNullableFields$1 {
857
- status: Status$1;
858
- initiator: Initiator$1;
859
- statusInfo?: StatusInfoNonNullableFields$1;
860
- }
861
- interface CreateRefundResponseNonNullableFields$1 {
862
- refund?: RefundNonNullableFields$1;
863
- }
864
- interface GetRefundResponseNonNullableFields$1 {
865
- refund?: RefundNonNullableFields$1;
866
- }
867
- interface QueryRefundsResponseNonNullableFields$1 {
868
- refunds: RefundNonNullableFields$1[];
869
- }
870
- interface UpdateExtendedFieldsResponseNonNullableFields$1 {
871
- refund?: RefundNonNullableFields$1;
872
- }
873
- interface RejectionNonNullableFields$1 {
874
- reason: RejectionReason$1;
875
- }
876
- interface RefundabilityNonNullableFields$1 {
877
- rejection?: RejectionNonNullableFields$1;
878
- refundable: boolean;
879
- }
880
- interface GetRefundabilityResponseNonNullableFields$1 {
881
- refundability?: RefundabilityNonNullableFields$1;
882
- }
883
-
884
- /**
885
- * A refund a record of an attempt of
886
- * returning funds for a charge from a merchant to a buyer who has made a purchase.
887
- * Read more about refunds in this [article](<https://dev.wix.com/docs/rest/business-management/payments/refunds/introduction>).
888
- */
889
- interface Refund {
890
- /**
891
- * Refund ID.
892
- * @readonly
893
- */
894
- _id?: string | null;
895
- /**
896
- * Revision number, which increments by 1 each time the refund is updated.
897
- *
898
- * Ignored when creating a refund.
899
- * @readonly
900
- */
901
- revision?: string | null;
902
- /**
903
- * Date and time the refund was created.
904
- * @readonly
905
- */
906
- _createdDate?: Date | null;
907
- /**
908
- * Date and time the refund was last updated.
909
- * @readonly
910
- */
911
- _updatedDate?: Date | null;
912
- /** Data Extensions */
913
- extendedFields?: ExtendedFields$2;
914
- /** ID of charge for which the funds are returned by this refund. */
915
- chargeId?: string | null;
916
- /** Currency of refund, should be the same as currency of charge. */
917
- currency?: string | null;
918
- /**
919
- * Amount of refund in base units, what's returned to the buyer.
920
- * E.g. "12.95".
921
- */
922
- amount?: string | null;
923
- /**
924
- * Application fee returned to merchant from Wix.
925
- * In base units, e.g. "12.95".
926
- * Not present when no application fee was returned.
927
- * @readonly
928
- */
929
- returnedApplicationFee?: string | null;
930
- /**
931
- * Processing fee returned to merchant from provider.
932
- * In base units, e.g. "12.95".
933
- * Applicable only to Wix Payments provider.
934
- * Not present when no processing fee was returned.
935
- * @readonly
936
- */
937
- returnedProcessingFee?: string | null;
938
- /**
939
- * True when refund returns all funds for a charge.
940
- * @readonly
941
- */
942
- full?: boolean | null;
943
- /**
944
- * Status of the refund.
945
- * Read more about statuses in this [article](<https://dev.wix.com/docs/rest/business-management/payments/refunds/introduction#lifecycle-of-a-refund>).
946
- * @readonly
947
- */
948
- status?: Status;
949
- /**
950
- * ID of the refund on the PSP side.
951
- * @readonly
952
- */
953
- providerRefundId?: string | null;
954
- /** Reason why this refund was issued. */
955
- reason?: string | null;
956
- /**
957
- * Details about refund status.
958
- * Mostly used with statuses `FAILED` and `REVERSED`.
959
- * @readonly
960
- */
961
- statusInfo?: StatusInfo;
962
- /**
963
- * Acquirer Reference Number.
964
- * @readonly
965
- */
966
- acquirerReferenceNumber?: string | null;
967
- /** Optional free-text note about this refund. */
968
- note?: string | null;
969
- }
970
- interface ExtendedFields$2 {
971
- /**
972
- * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
973
- * The value of each key is structured according to the schema defined when the extended fields were configured.
974
- *
975
- * You can only access fields for which you have the appropriate permissions.
976
- *
977
- * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
978
- */
979
- namespaces?: Record<string, Record<string, any>>;
980
- }
981
- declare enum Status {
982
- UNKNOWN_STATUS = "UNKNOWN_STATUS",
983
- /**
984
- * Initial status for all refunds.
985
- * Provisional, refund should be in this status for less than a minute.
986
- */
987
- STARTING = "STARTING",
988
- /** Status right after STARTED for asynchronous refunds. */
989
- PENDING = "PENDING",
990
- /**
991
- * Refund was successful.
992
- * Can transition to REVERSED in corner cases.
993
- */
994
- SUCCEEDED = "SUCCEEDED",
995
- /** Regular error, terminal status. */
996
- FAILED = "FAILED",
997
- /**
998
- * Either refund reversal
999
- * or any other error that comes after success, terminal status.
1000
- */
1001
- REVERSED = "REVERSED"
1002
- }
1003
- declare enum Initiator {
1004
- UNKNOWN_INITIATOR = "UNKNOWN_INITIATOR",
1005
- WIX = "WIX",
1006
- API = "API",
1007
- PROVIDER = "PROVIDER"
1008
- }
1009
- interface StatusInfo {
1010
- /**
1011
- * Reason code.
1012
- * [Read more about reason codes.](https://dev.wix.com/docs/rest/api-reference/payment-provider-spi/reason-codes)
1013
- */
1014
- code?: string;
1015
- /** Free-text description. */
1016
- description?: string | null;
1017
- }
1018
- interface CreateRefundRequest {
1019
- /** Refund to be created. */
1020
- refund: Refund;
1021
- /**
1022
- * Optional parameter used to prevent unintended refunds.
1023
- * Used to check previously refunded amount according to the client
1024
- * against the amount from server perspective.
1025
- * If they don't match, error with code `PREVIOUSLY_REFUNDED_AMOUNT_MISMATCH` is returned.
1026
- *
1027
- * Read more about preventing unintended refunds in this
1028
- * [article](<https://dev.wix.com/docs/rest/business-management/payments/refunds/introduction#preventing-unintended-refunds>).
1029
- */
1030
- previouslyRefundedAmount?: string | null;
1031
- }
1032
- interface CreateRefundResponse {
1033
- /** The created refund. */
1034
- refund?: Refund;
1035
- }
1036
- interface GetRefundRequest {
1037
- /** ID of the refund to retrieve. */
1038
- refundId: string;
1039
- }
1040
- interface GetRefundResponse {
1041
- /** The requested refund. */
1042
- refund?: Refund;
1043
- }
1044
- interface QueryRefundsRequest {
1045
- /** WQL expression. */
1046
- query?: CursorQuery;
1047
- }
1048
- interface CursorQuery extends CursorQueryPagingMethodOneOf {
1049
- /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
1050
- cursorPaging?: CursorPaging$2;
1051
- /**
1052
- * Filter object in the following format:
1053
- * `"filter" : {
1054
- * "fieldName1": "value1",
1055
- * "fieldName2":{"$operator":"value2"}
1056
- * }`
1057
- * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
1058
- */
1059
- filter?: Record<string, any> | null;
1060
- /**
1061
- * Sort object in the following format:
1062
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
1063
- */
1064
- sort?: Sorting[];
1065
- }
1066
- /** @oneof */
1067
- interface CursorQueryPagingMethodOneOf {
1068
- /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
1069
- cursorPaging?: CursorPaging$2;
1070
- }
1071
- interface Sorting {
1072
- /** Name of the field to sort by. */
1073
- fieldName?: string;
1074
- /** Sort order. */
1075
- order?: SortOrder;
1076
- }
1077
- declare enum SortOrder {
1078
- ASC = "ASC",
1079
- DESC = "DESC"
1080
- }
1081
- interface CursorPaging$2 {
1082
- /** Number of items to load. */
1083
- limit?: number | null;
1084
- /**
1085
- * Pointer to the next or previous page in the list of results.
1086
- *
1087
- * You can get the relevant cursor token
1088
- * from the `pagingMetadata` object in the previous call's response.
1089
- * Not relevant for the first request.
1090
- */
1091
- cursor?: string | null;
1092
- }
1093
- interface QueryRefundsResponse {
1094
- /** List of refunds. */
1095
- refunds?: Refund[];
1096
- /** Paging metadata */
1097
- pagingMetadata?: CursorPagingMetadata$2;
1098
- }
1099
- interface CursorPagingMetadata$2 {
1100
- /** Number of items returned in the response. */
1101
- count?: number | null;
1102
- /** Offset that was requested. */
1103
- cursors?: Cursors$2;
1104
- /**
1105
- * Indicates if there are more results after the current page.
1106
- * If `true`, another page of results can be retrieved.
1107
- * If `false`, this is the last page.
1108
- */
1109
- hasNext?: boolean | null;
1110
- }
1111
- interface Cursors$2 {
1112
- /** Cursor pointing to next page in the list of results. */
1113
- next?: string | null;
1114
- /** Cursor pointing to previous page in the list of results. */
1115
- prev?: string | null;
1116
- }
1117
- interface UpdateExtendedFieldsRequest {
1118
- /** ID of the entity to update. */
1119
- _id: string;
1120
- /** Identifier for the app whose extended fields are being updated. */
1121
- namespace: string;
1122
- /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */
1123
- namespaceData: Record<string, any> | null;
1124
- }
1125
- interface UpdateExtendedFieldsResponse {
1126
- /** Updated refund. */
1127
- refund?: Refund;
1128
- }
1129
- interface GetRefundabilityRequest {
1130
- /** ID of the charge for which refundability will be calculated. */
1131
- chargeId: string;
1132
- }
1133
- interface GetRefundabilityResponse {
1134
- /** Refundability for the charge. */
1135
- refundability?: Refundability;
1136
- }
1137
- /**
1138
- * Internal notes:
1139
- *
1140
- * Instead of separate Refundability and PartialRefundability, we provide min and max refund amount.
1141
- * If only full refund is possible, min_refund_amount = max_refund_amount = charge amount.
1142
- */
1143
- interface Refundability extends RefundabilityDetailsOneOf {
1144
- /** When charge is refundable, specifies what amounts are allowed for refund. */
1145
- refundOptions?: RefundOptions;
1146
- /** When charge is not refundable, specifies why refund is not allowed. */
1147
- rejection?: Rejection;
1148
- /** Whether the caller is allowed to refund the charge. */
1149
- refundable?: boolean;
1150
- /** Currency of the charge. */
1151
- currency?: string | null;
1152
- /**
1153
- * Sum of amounts of `SUCCEEDED` refunds for this charge in base units, e.g. "6.47".
1154
- * Used to prevent unintended refunds, read more in this
1155
- * [article](<https://dev.wix.com/docs/rest/business-management/payments/refunds/introduction#preventing-unintended-refunds>).
1156
- */
1157
- previouslyRefundedAmount?: string | null;
1158
- }
1159
- /** @oneof */
1160
- interface RefundabilityDetailsOneOf {
1161
- /** When charge is refundable, specifies what amounts are allowed for refund. */
1162
- refundOptions?: RefundOptions;
1163
- /** When charge is not refundable, specifies why refund is not allowed. */
1164
- rejection?: Rejection;
1165
- }
1166
- interface RefundOptions {
1167
- /** Minimum amount allowed to be refunded in base units, e.g. "0.50". */
1168
- minRefundAmount?: string | null;
1169
- /** Maximum amount allowed to be refunded in base units, e.g. "12.95". */
1170
- maxRefundAmount?: string | null;
1171
- }
1172
- interface Rejection {
1173
- /**
1174
- * Following reasons are possible:
1175
- * - `CHARGE_REFUNDED` — charge is already fully refunded.
1176
- * - `CHARGE_REFUND_IN_PROGRESS` — another refund was initiated for this charge
1177
- * and is waiting for confirmation from the provider.
1178
- * - `CHARGE_DISPUTED` — charge was disputed.
1179
- * - `CHARGE_REFUND_PERIOD_ENDED` — charge is too old to be refunded.
1180
- * - `CHARGE_UNPAID` — charge is unpaid.
1181
- * - `PROVIDER_DOWN` — PSP is temporarily down.
1182
- * - `PROVIDER_NOT_SUPPORTED` — provider doesn't support refunds at the moment,
1183
- * charge is in the wrong state,
1184
- * or we don't have required information for this transaction.
1185
- * - `PAYMENT_METHOD_NOT_SUPPORTED` — payment method of a charge doesn't support refunds.
1186
- * - `MERCHANT_ACCOUNT_NOT_SUPPORTED` — merchant account doesn't support refunds at the moment.
1187
- * - `MERCHANT_BALANCE_INSUFFICIENT` — merchant doesn't have enough balance to issue a refund for this charge.
1188
- * - `NOT_AUTHORIZED` — logged in merchant has no permission to refund this charge.
1189
- */
1190
- reason?: RejectionReason;
1191
- }
1192
- declare enum RejectionReason {
1193
- UNKNOWN_REJECTION_REASON = "UNKNOWN_REJECTION_REASON",
1194
- /** Charge is already fully refunded. */
1195
- CHARGE_REFUNDED = "CHARGE_REFUNDED",
1196
- /** Another refund was initiated for this charge and is waiting for confirmation from the provider. */
1197
- CHARGE_REFUND_IN_PROGRESS = "CHARGE_REFUND_IN_PROGRESS",
1198
- /** Charge was disputed. */
1199
- CHARGE_DISPUTED = "CHARGE_DISPUTED",
1200
- /** Charge is too old to be refunded. */
1201
- CHARGE_REFUND_PERIOD_ENDED = "CHARGE_REFUND_PERIOD_ENDED",
1202
- /** Charge is unpaid. */
1203
- CHARGE_UNPAID = "CHARGE_UNPAID",
1204
- /** PSP is temporarily down. */
1205
- PROVIDER_DOWN = "PROVIDER_DOWN",
1206
- /**
1207
- * Provider doesn't support refunds at the moment, transaction in a wrong state or we don't
1208
- * have required information for this transaction.
1209
- */
1210
- PROVIDER_NOT_SUPPORTED = "PROVIDER_NOT_SUPPORTED",
1211
- /** Payment method of a charge doesn't support refunds. */
1212
- PAYMENT_METHOD_NOT_SUPPORTED = "PAYMENT_METHOD_NOT_SUPPORTED",
1213
- /** Merchant account doesn't support refunds at the moment. */
1214
- MERCHANT_ACCOUNT_NOT_SUPPORTED = "MERCHANT_ACCOUNT_NOT_SUPPORTED",
1215
- /** Merchant doesn't have enough balance to issue a refund for this charge. */
1216
- MERCHANT_BALANCE_INSUFFICIENT = "MERCHANT_BALANCE_INSUFFICIENT",
1217
- /** Logged in merchant has no permission to refund this charge. */
1218
- NOT_AUTHORIZED = "NOT_AUTHORIZED"
1219
- }
1220
- interface StatusInfoNonNullableFields {
1221
- code: string;
1222
- }
1223
- interface RefundNonNullableFields {
1224
- status: Status;
1225
- initiator: Initiator;
1226
- statusInfo?: StatusInfoNonNullableFields;
1227
- }
1228
- interface CreateRefundResponseNonNullableFields {
1229
- refund?: RefundNonNullableFields;
1230
- }
1231
- interface GetRefundResponseNonNullableFields {
1232
- refund?: RefundNonNullableFields;
1233
- }
1234
- interface QueryRefundsResponseNonNullableFields {
1235
- refunds: RefundNonNullableFields[];
1236
- }
1237
- interface UpdateExtendedFieldsResponseNonNullableFields {
1238
- refund?: RefundNonNullableFields;
1239
- }
1240
- interface RejectionNonNullableFields {
1241
- reason: RejectionReason;
1242
- }
1243
- interface RefundabilityNonNullableFields {
1244
- rejection?: RejectionNonNullableFields;
1245
- refundable: boolean;
1246
- }
1247
- interface GetRefundabilityResponseNonNullableFields {
1248
- refundability?: RefundabilityNonNullableFields;
1249
- }
1250
-
1251
- type __PublicMethodMetaInfo$1<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
1252
- getUrl: (context: any) => string;
1253
- httpMethod: K;
1254
- path: string;
1255
- pathParams: M;
1256
- __requestType: T;
1257
- __originalRequestType: S;
1258
- __responseType: Q;
1259
- __originalResponseType: R;
1260
- };
1261
- declare function createRefund(): __PublicMethodMetaInfo$1<'POST', {}, CreateRefundRequest, CreateRefundRequest$1, CreateRefundResponse & CreateRefundResponseNonNullableFields, CreateRefundResponse$1 & CreateRefundResponseNonNullableFields$1>;
1262
- declare function getRefund(): __PublicMethodMetaInfo$1<'GET', {
1263
- refundId: string;
1264
- }, GetRefundRequest, GetRefundRequest$1, GetRefundResponse & GetRefundResponseNonNullableFields, GetRefundResponse$1 & GetRefundResponseNonNullableFields$1>;
1265
- declare function queryRefunds(): __PublicMethodMetaInfo$1<'POST', {}, QueryRefundsRequest, QueryRefundsRequest$1, QueryRefundsResponse & QueryRefundsResponseNonNullableFields, QueryRefundsResponse$1 & QueryRefundsResponseNonNullableFields$1>;
1266
- declare function updateExtendedFields(): __PublicMethodMetaInfo$1<'POST', {
1267
- id: string;
1268
- }, UpdateExtendedFieldsRequest, UpdateExtendedFieldsRequest$1, UpdateExtendedFieldsResponse & UpdateExtendedFieldsResponseNonNullableFields, UpdateExtendedFieldsResponse$1 & UpdateExtendedFieldsResponseNonNullableFields$1>;
1269
- declare function getRefundability(): __PublicMethodMetaInfo$1<'GET', {
1270
- chargeId: string;
1271
- }, GetRefundabilityRequest, GetRefundabilityRequest$1, GetRefundabilityResponse & GetRefundabilityResponseNonNullableFields, GetRefundabilityResponse$1 & GetRefundabilityResponseNonNullableFields$1>;
1272
-
1273
- declare const meta$1_createRefund: typeof createRefund;
1274
- declare const meta$1_getRefund: typeof getRefund;
1275
- declare const meta$1_getRefundability: typeof getRefundability;
1276
- declare const meta$1_queryRefunds: typeof queryRefunds;
1277
- declare const meta$1_updateExtendedFields: typeof updateExtendedFields;
1278
- declare namespace meta$1 {
1279
- export { type __PublicMethodMetaInfo$1 as __PublicMethodMetaInfo, meta$1_createRefund as createRefund, meta$1_getRefund as getRefund, meta$1_getRefundability as getRefundability, meta$1_queryRefunds as queryRefunds, meta$1_updateExtendedFields as updateExtendedFields };
1280
- }
1281
-
1282
- interface SavedPaymentMethod$1 {
1283
- /**
1284
- * Unique identifier of a saved payment method.
1285
- * @readonly
1286
- */
1287
- id?: string | null;
1288
- /**
1289
- * Represents the current state of a saved payment method. Each time saved payment method is modified, its `revision` changes. For an update operation to succeed, you MUST pass the latest revision.
1290
- * @readonly
1291
- */
1292
- revision?: string | null;
1293
- /**
1294
- * SavedPaymentMethod creation time.
1295
- * @readonly
1296
- */
1297
- createdDate?: Date | null;
1298
- /**
1299
- * SavedPaymentMethod last update time.
1300
- * @readonly
1301
- */
1302
- updatedDate?: Date | null;
1303
- /** Saved payment method owner's member ID. */
1304
- siteMemberId?: string | null;
1305
- /**
1306
- * Defines whether this payment method is primary for the member. Member can only have at most one primary saved payment method.
1307
- * @readonly
1308
- */
1309
- primary?: boolean;
1310
- /** Payment method details. */
1311
- paymentMethod?: PaymentMethod$1;
1312
- /**
1313
- * Defines whether this payment method can be used by the merchant for making unscheduled payments.
1314
- * Even if it's set to `false` payment method still can be used for scheduled payments e.g. subscription renewal without the buyer being present.
1315
- */
1316
- merchantUseAllowed?: boolean | null;
1317
- /**
1318
- * Saved payment method sensitive information.
1319
- * @readonly
1320
- */
1321
- sensitiveInfo?: SensitiveInfo$1;
1322
- /** Data Extensions */
1323
- extendedFields?: ExtendedFields$1;
1324
- }
1325
- interface CardInfo$1 {
1326
- /**
1327
- * Credit card's last 4 digits.
1328
- * @readonly
1329
- */
1330
- lastFourDigits?: string | null;
1331
- /**
1332
- * Credit card's BIN (Bank Identification Number). It's first 4-6 digits of card's number.
1333
- * @readonly
1334
- */
1335
- bin?: string | null;
1336
- /** Credit card's expiration month. */
1337
- expirationMonth?: number | null;
1338
- /** Credit card's expiration year. */
1339
- expirationYear?: number | null;
1340
- /** Card holder's full name specified on the card. */
1341
- cardholderName?: string | null;
1342
- }
1343
- declare enum CardBrand$1 {
1344
- UNKNOWN_CARD_BRAND = "UNKNOWN_CARD_BRAND",
1345
- AMEX = "AMEX",
1346
- DANKORT = "DANKORT",
1347
- DINERS = "DINERS",
1348
- DISCOVER = "DISCOVER",
1349
- ISRACARD = "ISRACARD",
1350
- JCB = "JCB",
1351
- MAESTRO = "MAESTRO",
1352
- MASTERCARD = "MASTERCARD",
1353
- UNIONPAY = "UNIONPAY",
1354
- VISA = "VISA",
1355
- RUPAY = "RUPAY"
1356
- }
1357
- interface PaymentMethod$1 {
1358
- /** Legacy payment method type ID. Supported values are `creditCard`, `payPal`. */
1359
- typeId?: string;
1360
- /**
1361
- * Payment method type ID.
1362
- * @readonly
1363
- */
1364
- paymentMethodTypeId?: string;
1365
- /**
1366
- * Payment method brand ID.
1367
- * @readonly
1368
- */
1369
- paymentMethodBrandId?: string | null;
1370
- /** Details of credit card. */
1371
- cardInfo?: CardInfo$1;
1372
- }
1373
- interface SensitiveInfo$1 {
1374
- /** Sensitive details of credit card like card token. */
1375
- cardSensitiveInfo?: CardSensitiveInfo$1;
1376
- }
1377
- interface CardSensitiveInfo$1 {
1378
- /** Persistent token of credit card tokenized by Wix. */
1379
- persistentToken?: string | null;
1380
- }
1381
- interface ExtendedFields$1 {
1382
- /**
1383
- * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
1384
- * The value of each key is structured according to the schema defined when the extended fields were configured.
1385
- *
1386
- * You can only access fields for which you have the appropriate permissions.
1387
- *
1388
- * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
1389
- */
1390
- namespaces?: Record<string, Record<string, any>>;
1391
- }
1392
- interface UpsertSavedPaymentMethodRequest$1 {
1393
- /** Saved payment method. */
1394
- savedPaymentMethod: SavedPaymentMethod$1;
1395
- /** Temporary token of credit card tokenized by Wix. This token is used to create a persistent token */
1396
- temporaryCardToken: string | null;
1397
- }
1398
- interface UpsertSavedPaymentMethodResponse$1 {
1399
- /** Saved payment method. */
1400
- savedPaymentMethod?: SavedPaymentMethod$1;
1401
- }
1402
- interface GetSavedPaymentMethodRequest$1 {
1403
- /** Unique identifier of a saved payment method. */
1404
- savedPaymentMethodId: string;
1405
- /**
1406
- * List of heeded fields that will be returned.
1407
- * You should have additional permission in order to get them as described in HidedFields documentation.
1408
- */
1409
- fields?: RequestedFields$1[];
1410
- }
1411
- declare enum RequestedFields$1 {
1412
- /** Default value. This value is unused. */
1413
- UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
1414
- SENSITIVE_INFO = "SENSITIVE_INFO"
1415
- }
1416
- interface GetSavedPaymentMethodResponse$1 {
1417
- /** Saved payment method. */
1418
- savedPaymentMethod?: SavedPaymentMethod$1;
1419
- }
1420
- interface DeleteSavedPaymentMethodRequest$1 {
1421
- /** Unique identifier of a saved payment method. */
1422
- savedPaymentMethodId: string;
1423
- }
1424
- interface DeleteSavedPaymentMethodResponse$1 {
1425
- }
1426
- interface ListSavedPaymentMethodsRequest$1 {
1427
- /**
1428
- * Site member that owns saved payment methods.
1429
- * Pass `me` to list saved payment method of the current site member.
1430
- */
1431
- siteMemberId?: string | null;
1432
- /** Payment method type id. Supported values are `creditCard`, `payPal`. */
1433
- paymentMethodTypeId?: string | null;
1434
- /**
1435
- * Defines whether this payment method can be used by the merchant for making unscheduled payments.
1436
- * Even if it's set to `false` payment method still can be used for scheduled payments e.g. subscription renewal without the buyer being present.
1437
- */
1438
- merchantUseAllowed?: boolean | null;
1439
- /**
1440
- * List of requested fields that will be returned.
1441
- * Supported values:
1442
- * SENSITIVE_INFO - Sensitive information of a SavedPaymentMethod like credit card tokens that's needed to process payments with it.
1443
- * In order to receive it you should have `PAYMENTS.SAVED_PAYMENT_METHOD_READ_SENSITIVE_INFO` permission
1444
- */
1445
- fields?: RequestedFields$1[];
1446
- /**
1447
- * Paging for limit the response size.
1448
- * If no paging provider default response limit 100 will be used.
1449
- */
1450
- paging?: CursorPaging$1;
1451
- }
1452
- interface CursorPaging$1 {
1453
- /** Maximum number of items to return in the results. */
1454
- limit?: number | null;
1455
- /**
1456
- * Pointer to the next or previous page in the list of results.
1457
- *
1458
- * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
1459
- * Not relevant for the first request.
1460
- */
1461
- cursor?: string | null;
1462
- }
1463
- interface ListSavedPaymentMethodsResponse$1 {
1464
- /** List of saved payment methods. */
1465
- savedPaymentMethods?: SavedPaymentMethod$1[];
1466
- /** Paging metadata. */
1467
- pagingMetadata?: CursorPagingMetadata$1;
1468
- }
1469
- interface CursorPagingMetadata$1 {
1470
- /** Number of items returned in the response. */
1471
- count?: number | null;
1472
- /** Cursor strings that point to the next page, previous page, or both. */
1473
- cursors?: Cursors$1;
1474
- /**
1475
- * Whether there are more pages to retrieve following the current page.
1476
- *
1477
- * + `true`: Another page of results can be retrieved.
1478
- * + `false`: This is the last page.
1479
- */
1480
- hasNext?: boolean | null;
1481
- }
1482
- interface Cursors$1 {
1483
- /** Cursor string pointing to the next page in the list of results. */
1484
- next?: string | null;
1485
- /** Cursor pointing to the previous page in the list of results. */
1486
- prev?: string | null;
1487
- }
1488
- interface UpdateSavedPaymentMethodRequest$1 {
1489
- /** Saved payment method to update. */
1490
- savedPaymentMethod?: SavedPaymentMethod$1;
1491
- }
1492
- interface UpdateSavedPaymentMethodResponse$1 {
1493
- /** Updated saved payment method. */
1494
- savedPaymentMethod?: SavedPaymentMethod$1;
1495
- }
1496
- interface MarkSavedPaymentMethodPrimaryRequest$1 {
1497
- /** Unique identifier of a saved payment method. */
1498
- savedPaymentMethodId: string;
1499
- }
1500
- interface MarkSavedPaymentMethodPrimaryResponse$1 {
1501
- }
1502
- interface CardInfoNonNullableFields$1 {
1503
- brand: CardBrand$1;
1504
- }
1505
- interface PaymentMethodNonNullableFields$1 {
1506
- typeId: string;
1507
- paymentMethodTypeId: string;
1508
- cardInfo?: CardInfoNonNullableFields$1;
1509
- }
1510
- interface SavedPaymentMethodNonNullableFields$1 {
1511
- primary: boolean;
1512
- paymentMethod?: PaymentMethodNonNullableFields$1;
1513
- }
1514
- interface UpsertSavedPaymentMethodResponseNonNullableFields$1 {
1515
- savedPaymentMethod?: SavedPaymentMethodNonNullableFields$1;
1516
- }
1517
- interface GetSavedPaymentMethodResponseNonNullableFields$1 {
1518
- savedPaymentMethod?: SavedPaymentMethodNonNullableFields$1;
1519
- }
1520
- interface ListSavedPaymentMethodsResponseNonNullableFields$1 {
1521
- savedPaymentMethods: SavedPaymentMethodNonNullableFields$1[];
1522
- }
1523
- interface UpdateSavedPaymentMethodResponseNonNullableFields$1 {
1524
- savedPaymentMethod?: SavedPaymentMethodNonNullableFields$1;
1525
- }
1526
-
1527
- interface SavedPaymentMethod {
1528
- /**
1529
- * Unique identifier of a saved payment method.
1530
- * @readonly
1531
- */
1532
- _id?: string | null;
1533
- /**
1534
- * Represents the current state of a saved payment method. Each time saved payment method is modified, its `revision` changes. For an update operation to succeed, you MUST pass the latest revision.
1535
- * @readonly
1536
- */
1537
- revision?: string | null;
1538
- /**
1539
- * SavedPaymentMethod creation time.
1540
- * @readonly
1541
- */
1542
- _createdDate?: Date | null;
1543
- /**
1544
- * SavedPaymentMethod last update time.
1545
- * @readonly
1546
- */
1547
- _updatedDate?: Date | null;
1548
- /** Saved payment method owner's member ID. */
1549
- siteMemberId?: string | null;
1550
- /**
1551
- * Defines whether this payment method is primary for the member. Member can only have at most one primary saved payment method.
1552
- * @readonly
1553
- */
1554
- primary?: boolean;
1555
- /** Payment method details. */
1556
- paymentMethod?: PaymentMethod;
1557
- /**
1558
- * Defines whether this payment method can be used by the merchant for making unscheduled payments.
1559
- * Even if it's set to `false` payment method still can be used for scheduled payments e.g. subscription renewal without the buyer being present.
1560
- */
1561
- merchantUseAllowed?: boolean | null;
1562
- /**
1563
- * Saved payment method sensitive information.
1564
- * @readonly
1565
- */
1566
- sensitiveInfo?: SensitiveInfo;
1567
- /** Data Extensions */
1568
- extendedFields?: ExtendedFields;
1569
- }
1570
- interface CardInfo {
1571
- /**
1572
- * Credit card's last 4 digits.
1573
- * @readonly
1574
- */
1575
- lastFourDigits?: string | null;
1576
- /**
1577
- * Credit card's BIN (Bank Identification Number). It's first 4-6 digits of card's number.
1578
- * @readonly
1579
- */
1580
- bin?: string | null;
1581
- /** Credit card's expiration month. */
1582
- expirationMonth?: number | null;
1583
- /** Credit card's expiration year. */
1584
- expirationYear?: number | null;
1585
- /** Card holder's full name specified on the card. */
1586
- cardholderName?: string | null;
1587
- }
1588
- declare enum CardBrand {
1589
- UNKNOWN_CARD_BRAND = "UNKNOWN_CARD_BRAND",
1590
- AMEX = "AMEX",
1591
- DANKORT = "DANKORT",
1592
- DINERS = "DINERS",
1593
- DISCOVER = "DISCOVER",
1594
- ISRACARD = "ISRACARD",
1595
- JCB = "JCB",
1596
- MAESTRO = "MAESTRO",
1597
- MASTERCARD = "MASTERCARD",
1598
- UNIONPAY = "UNIONPAY",
1599
- VISA = "VISA",
1600
- RUPAY = "RUPAY"
1601
- }
1602
- interface PaymentMethod {
1603
- /** Legacy payment method type ID. Supported values are `creditCard`, `payPal`. */
1604
- typeId?: string;
1605
- /**
1606
- * Payment method type ID.
1607
- * @readonly
1608
- */
1609
- paymentMethodTypeId?: string;
1610
- /**
1611
- * Payment method brand ID.
1612
- * @readonly
1613
- */
1614
- paymentMethodBrandId?: string | null;
1615
- /** Details of credit card. */
1616
- cardInfo?: CardInfo;
1617
- }
1618
- interface SensitiveInfo {
1619
- /** Sensitive details of credit card like card token. */
1620
- cardSensitiveInfo?: CardSensitiveInfo;
1621
- }
1622
- interface CardSensitiveInfo {
1623
- /** Persistent token of credit card tokenized by Wix. */
1624
- persistentToken?: string | null;
1625
- }
1626
- interface ExtendedFields {
1627
- /**
1628
- * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
1629
- * The value of each key is structured according to the schema defined when the extended fields were configured.
1630
- *
1631
- * You can only access fields for which you have the appropriate permissions.
1632
- *
1633
- * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
1634
- */
1635
- namespaces?: Record<string, Record<string, any>>;
1636
- }
1637
- interface UpsertSavedPaymentMethodRequest {
1638
- /** Saved payment method. */
1639
- savedPaymentMethod: SavedPaymentMethod;
1640
- /** Temporary token of credit card tokenized by Wix. This token is used to create a persistent token */
1641
- temporaryCardToken: string | null;
1642
- }
1643
- interface UpsertSavedPaymentMethodResponse {
1644
- /** Saved payment method. */
1645
- savedPaymentMethod?: SavedPaymentMethod;
1646
- }
1647
- interface GetSavedPaymentMethodRequest {
1648
- /** Unique identifier of a saved payment method. */
1649
- savedPaymentMethodId: string;
1650
- /**
1651
- * List of heeded fields that will be returned.
1652
- * You should have additional permission in order to get them as described in HidedFields documentation.
1653
- */
1654
- fields?: RequestedFields[];
1655
- }
1656
- declare enum RequestedFields {
1657
- /** Default value. This value is unused. */
1658
- UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
1659
- SENSITIVE_INFO = "SENSITIVE_INFO"
1660
- }
1661
- interface GetSavedPaymentMethodResponse {
1662
- /** Saved payment method. */
1663
- savedPaymentMethod?: SavedPaymentMethod;
1664
- }
1665
- interface DeleteSavedPaymentMethodRequest {
1666
- /** Unique identifier of a saved payment method. */
1667
- savedPaymentMethodId: string;
1668
- }
1669
- interface DeleteSavedPaymentMethodResponse {
1670
- }
1671
- interface ListSavedPaymentMethodsRequest {
1672
- /**
1673
- * Site member that owns saved payment methods.
1674
- * Pass `me` to list saved payment method of the current site member.
1675
- */
1676
- siteMemberId?: string | null;
1677
- /** Payment method type id. Supported values are `creditCard`, `payPal`. */
1678
- paymentMethodTypeId?: string | null;
1679
- /**
1680
- * Defines whether this payment method can be used by the merchant for making unscheduled payments.
1681
- * Even if it's set to `false` payment method still can be used for scheduled payments e.g. subscription renewal without the buyer being present.
1682
- */
1683
- merchantUseAllowed?: boolean | null;
1684
- /**
1685
- * List of requested fields that will be returned.
1686
- * Supported values:
1687
- * SENSITIVE_INFO - Sensitive information of a SavedPaymentMethod like credit card tokens that's needed to process payments with it.
1688
- * In order to receive it you should have `PAYMENTS.SAVED_PAYMENT_METHOD_READ_SENSITIVE_INFO` permission
1689
- */
1690
- fields?: RequestedFields[];
1691
- /**
1692
- * Paging for limit the response size.
1693
- * If no paging provider default response limit 100 will be used.
1694
- */
1695
- paging?: CursorPaging;
1696
- }
1697
- interface CursorPaging {
1698
- /** Maximum number of items to return in the results. */
1699
- limit?: number | null;
1700
- /**
1701
- * Pointer to the next or previous page in the list of results.
1702
- *
1703
- * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
1704
- * Not relevant for the first request.
1705
- */
1706
- cursor?: string | null;
1707
- }
1708
- interface ListSavedPaymentMethodsResponse {
1709
- /** List of saved payment methods. */
1710
- savedPaymentMethods?: SavedPaymentMethod[];
1711
- /** Paging metadata. */
1712
- pagingMetadata?: CursorPagingMetadata;
1713
- }
1714
- interface CursorPagingMetadata {
1715
- /** Number of items returned in the response. */
1716
- count?: number | null;
1717
- /** Cursor strings that point to the next page, previous page, or both. */
1718
- cursors?: Cursors;
1719
- /**
1720
- * Whether there are more pages to retrieve following the current page.
1721
- *
1722
- * + `true`: Another page of results can be retrieved.
1723
- * + `false`: This is the last page.
1724
- */
1725
- hasNext?: boolean | null;
1726
- }
1727
- interface Cursors {
1728
- /** Cursor string pointing to the next page in the list of results. */
1729
- next?: string | null;
1730
- /** Cursor pointing to the previous page in the list of results. */
1731
- prev?: string | null;
1732
- }
1733
- interface UpdateSavedPaymentMethodRequest {
1734
- /** Saved payment method to update. */
1735
- savedPaymentMethod?: SavedPaymentMethod;
1736
- }
1737
- interface UpdateSavedPaymentMethodResponse {
1738
- /** Updated saved payment method. */
1739
- savedPaymentMethod?: SavedPaymentMethod;
1740
- }
1741
- interface MarkSavedPaymentMethodPrimaryRequest {
1742
- /** Unique identifier of a saved payment method. */
1743
- savedPaymentMethodId: string;
1744
- }
1745
- interface MarkSavedPaymentMethodPrimaryResponse {
1746
- }
1747
- interface CardInfoNonNullableFields {
1748
- brand: CardBrand;
1749
- }
1750
- interface PaymentMethodNonNullableFields {
1751
- typeId: string;
1752
- paymentMethodTypeId: string;
1753
- cardInfo?: CardInfoNonNullableFields;
1754
- }
1755
- interface SavedPaymentMethodNonNullableFields {
1756
- primary: boolean;
1757
- paymentMethod?: PaymentMethodNonNullableFields;
1758
- }
1759
- interface UpsertSavedPaymentMethodResponseNonNullableFields {
1760
- savedPaymentMethod?: SavedPaymentMethodNonNullableFields;
1761
- }
1762
- interface GetSavedPaymentMethodResponseNonNullableFields {
1763
- savedPaymentMethod?: SavedPaymentMethodNonNullableFields;
1764
- }
1765
- interface ListSavedPaymentMethodsResponseNonNullableFields {
1766
- savedPaymentMethods: SavedPaymentMethodNonNullableFields[];
1767
- }
1768
- interface UpdateSavedPaymentMethodResponseNonNullableFields {
1769
- savedPaymentMethod?: SavedPaymentMethodNonNullableFields;
1770
- }
1771
-
1772
- type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
1773
- getUrl: (context: any) => string;
1774
- httpMethod: K;
1775
- path: string;
1776
- pathParams: M;
1777
- __requestType: T;
1778
- __originalRequestType: S;
1779
- __responseType: Q;
1780
- __originalResponseType: R;
1781
- };
1782
- declare function upsertSavedPaymentMethod(): __PublicMethodMetaInfo<'POST', {}, UpsertSavedPaymentMethodRequest, UpsertSavedPaymentMethodRequest$1, UpsertSavedPaymentMethodResponse & UpsertSavedPaymentMethodResponseNonNullableFields, UpsertSavedPaymentMethodResponse$1 & UpsertSavedPaymentMethodResponseNonNullableFields$1>;
1783
- declare function getSavedPaymentMethod(): __PublicMethodMetaInfo<'GET', {
1784
- savedPaymentMethodId: string;
1785
- }, GetSavedPaymentMethodRequest, GetSavedPaymentMethodRequest$1, GetSavedPaymentMethodResponse & GetSavedPaymentMethodResponseNonNullableFields, GetSavedPaymentMethodResponse$1 & GetSavedPaymentMethodResponseNonNullableFields$1>;
1786
- declare function deleteSavedPaymentMethod(): __PublicMethodMetaInfo<'DELETE', {
1787
- savedPaymentMethodId: string;
1788
- }, DeleteSavedPaymentMethodRequest, DeleteSavedPaymentMethodRequest$1, DeleteSavedPaymentMethodResponse, DeleteSavedPaymentMethodResponse$1>;
1789
- declare function listSavedPaymentMethods(): __PublicMethodMetaInfo<'GET', {}, ListSavedPaymentMethodsRequest, ListSavedPaymentMethodsRequest$1, ListSavedPaymentMethodsResponse & ListSavedPaymentMethodsResponseNonNullableFields, ListSavedPaymentMethodsResponse$1 & ListSavedPaymentMethodsResponseNonNullableFields$1>;
1790
- declare function updateSavedPaymentMethod(): __PublicMethodMetaInfo<'PATCH', {
1791
- savedPaymentMethodId: string;
1792
- }, UpdateSavedPaymentMethodRequest, UpdateSavedPaymentMethodRequest$1, UpdateSavedPaymentMethodResponse & UpdateSavedPaymentMethodResponseNonNullableFields, UpdateSavedPaymentMethodResponse$1 & UpdateSavedPaymentMethodResponseNonNullableFields$1>;
1793
- declare function markSavedPaymentMethodPrimary(): __PublicMethodMetaInfo<'GET', {
1794
- savedPaymentMethodId: string;
1795
- }, MarkSavedPaymentMethodPrimaryRequest, MarkSavedPaymentMethodPrimaryRequest$1, MarkSavedPaymentMethodPrimaryResponse, MarkSavedPaymentMethodPrimaryResponse$1>;
1796
-
1797
- type meta___PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = __PublicMethodMetaInfo<K, M, T, S, Q, R>;
1798
- declare const meta_deleteSavedPaymentMethod: typeof deleteSavedPaymentMethod;
1799
- declare const meta_getSavedPaymentMethod: typeof getSavedPaymentMethod;
1800
- declare const meta_listSavedPaymentMethods: typeof listSavedPaymentMethods;
1801
- declare const meta_markSavedPaymentMethodPrimary: typeof markSavedPaymentMethodPrimary;
1802
- declare const meta_updateSavedPaymentMethod: typeof updateSavedPaymentMethod;
1803
- declare const meta_upsertSavedPaymentMethod: typeof upsertSavedPaymentMethod;
1804
- declare namespace meta {
1805
- export { type meta___PublicMethodMetaInfo as __PublicMethodMetaInfo, meta_deleteSavedPaymentMethod as deleteSavedPaymentMethod, meta_getSavedPaymentMethod as getSavedPaymentMethod, meta_listSavedPaymentMethods as listSavedPaymentMethods, meta_markSavedPaymentMethodPrimary as markSavedPaymentMethodPrimary, meta_updateSavedPaymentMethod as updateSavedPaymentMethod, meta_upsertSavedPaymentMethod as upsertSavedPaymentMethod };
1806
- }
1807
-
1808
- export { meta$3 as onboardingAvailability, meta$2 as pspCallbacks, meta$1 as refunds, meta as savedPaymentMethods };