@wix/auto_sdk_ecom_order-payment-requests 1.0.59 → 1.0.61
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/build/cjs/index.d.ts +52 -18
- package/build/cjs/index.js +164 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +269 -69
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +49 -37
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.js +125 -127
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +52 -18
- package/build/es/index.mjs +158 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +269 -69
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +49 -37
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.mjs +125 -127
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +54 -20
- package/build/internal/cjs/index.js +164 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +278 -80
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +49 -37
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.js +125 -127
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +54 -20
- package/build/internal/es/index.mjs +158 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +278 -80
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +49 -37
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.mjs +125 -127
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -9,12 +9,12 @@ interface OrderPaymentRequest {
|
|
|
9
9
|
*/
|
|
10
10
|
_id?: string | null;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Details about the source that created the order payment request.
|
|
13
13
|
* @immutable
|
|
14
14
|
*/
|
|
15
15
|
source?: Source;
|
|
16
16
|
/**
|
|
17
|
-
* status.
|
|
17
|
+
* Payment request status. Set by the system. A new order payment request starts as `UNPAID`, unless `expirationDate` is already in the past at creation time, in which case it is created as `EXPIRED`. The system sets the status to `PAID` once payment is collected, `EXPIRED` when the expiration date passes, or `VOIDED` when the request is voided.
|
|
18
18
|
* @readonly
|
|
19
19
|
*/
|
|
20
20
|
status?: StatusWithLiterals;
|
|
@@ -31,49 +31,52 @@ interface OrderPaymentRequest {
|
|
|
31
31
|
*/
|
|
32
32
|
orderNumber?: string | null;
|
|
33
33
|
/**
|
|
34
|
-
* Amount to collect.
|
|
35
|
-
* > **Note:** The amount can only be set once.
|
|
34
|
+
* Amount to collect. Set when the order payment request is created and can't be changed afterward.
|
|
36
35
|
* @immutable
|
|
37
36
|
*/
|
|
38
37
|
amount?: Price;
|
|
39
38
|
/**
|
|
40
|
-
*
|
|
39
|
+
* Three-letter currency code in [ISO-4217 alphabetic format](http://en.wikipedia.org/wiki/ISO_4217). Always matches the order's currency.
|
|
41
40
|
* @format CURRENCY
|
|
42
41
|
* @readonly
|
|
43
42
|
*/
|
|
44
43
|
currency?: string;
|
|
45
44
|
/**
|
|
46
|
-
* Payment gateway order
|
|
45
|
+
* Payment gateway order ID associated with this payment request.
|
|
47
46
|
* @readonly
|
|
48
47
|
* @minLength 1
|
|
49
48
|
* @maxLength 100
|
|
50
49
|
*/
|
|
51
50
|
paymentGatewayOrderId?: string | null;
|
|
52
51
|
/**
|
|
53
|
-
* Title
|
|
52
|
+
* Title displayed to the customer on the payment page.
|
|
54
53
|
* @minLength 1
|
|
55
54
|
* @maxLength 200
|
|
56
55
|
*/
|
|
57
56
|
title?: string;
|
|
58
57
|
/**
|
|
59
|
-
* Description
|
|
58
|
+
* Description displayed to the customer on the payment page.
|
|
60
59
|
* @maxLength 300
|
|
61
60
|
*/
|
|
62
61
|
description?: string | null;
|
|
63
62
|
/**
|
|
64
|
-
*
|
|
63
|
+
* Date and time the order payment request expires. If not provided, the order payment request doesn't expire.
|
|
65
64
|
* @immutable
|
|
66
65
|
*/
|
|
67
66
|
expirationDate?: Date | null;
|
|
68
|
-
/**
|
|
67
|
+
/**
|
|
68
|
+
* Custom field data for this order payment request.
|
|
69
|
+
*
|
|
70
|
+
* [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.
|
|
71
|
+
*/
|
|
69
72
|
extendedFields?: ExtendedFields;
|
|
70
73
|
/**
|
|
71
|
-
* Date and time the
|
|
74
|
+
* Date and time the order payment request was created.
|
|
72
75
|
* @readonly
|
|
73
76
|
*/
|
|
74
77
|
_createdDate?: Date | null;
|
|
75
78
|
/**
|
|
76
|
-
* Date and time the
|
|
79
|
+
* Date and time the order payment request was last updated.
|
|
77
80
|
* @readonly
|
|
78
81
|
*/
|
|
79
82
|
_updatedDate?: Date | null;
|
|
@@ -87,7 +90,7 @@ interface OrderPaymentRequest {
|
|
|
87
90
|
}
|
|
88
91
|
interface Source {
|
|
89
92
|
/**
|
|
90
|
-
*
|
|
93
|
+
* ID of the app that created the order payment request.
|
|
91
94
|
* @format GUID
|
|
92
95
|
* @minLength 1
|
|
93
96
|
* @maxLength 100
|
|
@@ -95,7 +98,7 @@ interface Source {
|
|
|
95
98
|
*/
|
|
96
99
|
appId?: string | null;
|
|
97
100
|
/**
|
|
98
|
-
* Reference to
|
|
101
|
+
* Reference to a record in the source system. For example, if the payment request was created from a paylink or invoice, use this field to store the paylink ID or invoice ID.
|
|
99
102
|
* @minLength 1
|
|
100
103
|
* @maxLength 100
|
|
101
104
|
* @immutable
|
|
@@ -103,8 +106,11 @@ interface Source {
|
|
|
103
106
|
externalId?: string;
|
|
104
107
|
}
|
|
105
108
|
declare enum Status {
|
|
109
|
+
/** Payment is owed but hasn't been collected yet. */
|
|
106
110
|
UNPAID = "UNPAID",
|
|
111
|
+
/** Payment has been collected. */
|
|
107
112
|
PAID = "PAID",
|
|
113
|
+
/** The order payment request has passed its `expirationDate` without being paid. */
|
|
108
114
|
EXPIRED = "EXPIRED"
|
|
109
115
|
}
|
|
110
116
|
/** @enumType */
|
|
@@ -140,11 +146,13 @@ declare enum PaymentMethod {
|
|
|
140
146
|
type PaymentMethodWithLiterals = PaymentMethod | 'MANUAL';
|
|
141
147
|
interface ActionLinks {
|
|
142
148
|
/**
|
|
143
|
-
*
|
|
149
|
+
* Navigation action links rendered as anchors on the payment page.
|
|
150
|
+
*
|
|
151
|
+
* Currently supports a single action link.
|
|
144
152
|
* @maxSize 1
|
|
145
153
|
*/
|
|
146
154
|
general?: ActionLink[];
|
|
147
|
-
/**
|
|
155
|
+
/** Action link rendered as a button in error messages on the payment page. */
|
|
148
156
|
error?: ActionLink;
|
|
149
157
|
}
|
|
150
158
|
interface ActionLink {
|
|
@@ -168,7 +176,7 @@ interface SubscriptionInfo {
|
|
|
168
176
|
*/
|
|
169
177
|
title?: string;
|
|
170
178
|
/**
|
|
171
|
-
* Description of the charges
|
|
179
|
+
* Description of the charges applied for the subscription.
|
|
172
180
|
* @maxLength 1000
|
|
173
181
|
*/
|
|
174
182
|
chargeDescription?: string | null;
|
|
@@ -180,30 +188,30 @@ interface SubscriptionInfo {
|
|
|
180
188
|
/** Whether the subscription renews automatically. */
|
|
181
189
|
autoRenewal?: boolean;
|
|
182
190
|
}
|
|
183
|
-
/** Triggered when
|
|
191
|
+
/** Triggered when an order payment request's `status` changes to `PAID`. */
|
|
184
192
|
interface OrderPaymentRequestPaid {
|
|
185
|
-
/** Order payment request */
|
|
193
|
+
/** Order payment request that was paid. */
|
|
186
194
|
orderPaymentRequest?: OrderPaymentRequest;
|
|
187
195
|
}
|
|
188
|
-
/** Triggered when
|
|
196
|
+
/** Triggered when an order payment request's `status` changes to `EXPIRED`. */
|
|
189
197
|
interface OrderPaymentRequestExpired {
|
|
190
|
-
/** Order payment request */
|
|
198
|
+
/** Order payment request that expired. */
|
|
191
199
|
orderPaymentRequest?: OrderPaymentRequest;
|
|
192
200
|
}
|
|
193
|
-
/** Triggered when
|
|
201
|
+
/** Triggered when an order payment request's `status` changes to `VOIDED`. */
|
|
194
202
|
interface OrderPaymentRequestVoided {
|
|
195
|
-
/** Order payment request */
|
|
203
|
+
/** Order payment request that was voided. */
|
|
196
204
|
orderPaymentRequest?: OrderPaymentRequest;
|
|
197
205
|
}
|
|
198
206
|
interface CreateOrderPaymentRequestRequest {
|
|
199
|
-
/**
|
|
207
|
+
/** Order payment request to create. */
|
|
200
208
|
orderPaymentRequest?: OrderPaymentRequest;
|
|
201
209
|
}
|
|
202
210
|
interface CreateOrderPaymentRequestResponse {
|
|
203
|
-
/**
|
|
211
|
+
/** Created order payment request. */
|
|
204
212
|
orderPaymentRequest?: OrderPaymentRequest;
|
|
205
213
|
/**
|
|
206
|
-
*
|
|
214
|
+
* Payment page URL for the order payment request. Share this URL with the customer so they can complete the payment.
|
|
207
215
|
* @minLength 1
|
|
208
216
|
* @maxLength 100
|
|
209
217
|
*/
|
|
@@ -211,26 +219,26 @@ interface CreateOrderPaymentRequestResponse {
|
|
|
211
219
|
}
|
|
212
220
|
interface GetOrderPaymentRequestRequest {
|
|
213
221
|
/**
|
|
214
|
-
* ID of the
|
|
222
|
+
* ID of the order payment request to retrieve.
|
|
215
223
|
* @format GUID
|
|
216
224
|
*/
|
|
217
225
|
orderPaymentRequestId: string;
|
|
218
226
|
}
|
|
219
227
|
interface GetOrderPaymentRequestResponse {
|
|
220
|
-
/**
|
|
228
|
+
/** Retrieved order payment request. */
|
|
221
229
|
orderPaymentRequest?: OrderPaymentRequest;
|
|
222
230
|
}
|
|
223
231
|
interface UpdateOrderPaymentRequestRequest {
|
|
224
|
-
/**
|
|
232
|
+
/** Order payment request to update. */
|
|
225
233
|
orderPaymentRequest: OrderPaymentRequest;
|
|
226
234
|
}
|
|
227
235
|
interface UpdateOrderPaymentRequestResponse {
|
|
228
|
-
/** Updated
|
|
236
|
+
/** Updated order payment request. */
|
|
229
237
|
orderPaymentRequest?: OrderPaymentRequest;
|
|
230
238
|
}
|
|
231
239
|
interface DeleteOrderPaymentRequestRequest {
|
|
232
240
|
/**
|
|
233
|
-
*
|
|
241
|
+
* ID of the order payment request to delete.
|
|
234
242
|
* @format GUID
|
|
235
243
|
*/
|
|
236
244
|
orderPaymentRequestId: string;
|
|
@@ -297,11 +305,11 @@ interface CursorPaging {
|
|
|
297
305
|
}
|
|
298
306
|
interface QueryOrderPaymentRequestsResponse {
|
|
299
307
|
/**
|
|
300
|
-
* List of payment requests.
|
|
308
|
+
* List of order payment requests.
|
|
301
309
|
* @maxSize 1000
|
|
302
310
|
*/
|
|
303
311
|
orderPaymentRequests?: OrderPaymentRequest[];
|
|
304
|
-
/** Paging metadata */
|
|
312
|
+
/** Paging metadata. */
|
|
305
313
|
pagingMetadata?: CursorPagingMetadata;
|
|
306
314
|
}
|
|
307
315
|
interface CursorPagingMetadata {
|
|
@@ -331,14 +339,14 @@ interface Cursors {
|
|
|
331
339
|
}
|
|
332
340
|
interface GetOrderPaymentRequestURLRequest {
|
|
333
341
|
/**
|
|
334
|
-
*
|
|
342
|
+
* ID of the order payment request.
|
|
335
343
|
* @format GUID
|
|
336
344
|
*/
|
|
337
345
|
orderPaymentRequestId: string;
|
|
338
346
|
}
|
|
339
347
|
interface GetOrderPaymentRequestURLResponse {
|
|
340
348
|
/**
|
|
341
|
-
*
|
|
349
|
+
* Payment page URL for the order payment request.
|
|
342
350
|
* @minLength 1
|
|
343
351
|
* @maxLength 100
|
|
344
352
|
*/
|
|
@@ -353,7 +361,7 @@ interface UpdateExtendedFieldsRequest {
|
|
|
353
361
|
namespaceData: Record<string, any> | null;
|
|
354
362
|
}
|
|
355
363
|
interface UpdateExtendedFieldsResponse {
|
|
356
|
-
/** Updated
|
|
364
|
+
/** Updated order payment request. */
|
|
357
365
|
orderPaymentRequest?: OrderPaymentRequest;
|
|
358
366
|
}
|
|
359
367
|
interface VoidOrderPaymentRequestRequest {
|
|
@@ -533,6 +541,10 @@ type CreateOrderPaymentRequestApplicationErrors = {
|
|
|
533
541
|
code?: 'INVALID_ORDER_STATUS_FOR_SUBSCRIPTION';
|
|
534
542
|
description?: string;
|
|
535
543
|
data?: Record<string, any>;
|
|
544
|
+
} | {
|
|
545
|
+
code?: 'ORDER_PAYMENT_REQUEST_PAGE_NOT_FOUND';
|
|
546
|
+
description?: string;
|
|
547
|
+
data?: Record<string, any>;
|
|
536
548
|
};
|
|
537
549
|
/** @docsIgnore */
|
|
538
550
|
type GetOrderPaymentRequestApplicationErrors = {
|
|
@@ -554,7 +566,7 @@ type UpdateOrderPaymentRequestApplicationErrors = {
|
|
|
554
566
|
description?: string;
|
|
555
567
|
data?: Record<string, any>;
|
|
556
568
|
} | {
|
|
557
|
-
code?: '
|
|
569
|
+
code?: 'CANNOT_UPDATE_ORDER_PAYMENT_REQUEST_AMOUNT';
|
|
558
570
|
description?: string;
|
|
559
571
|
data?: Record<string, any>;
|
|
560
572
|
};
|
|
@@ -588,8 +600,193 @@ type VoidOrderPaymentRequestApplicationErrors = {
|
|
|
588
600
|
description?: string;
|
|
589
601
|
data?: Record<string, any>;
|
|
590
602
|
};
|
|
603
|
+
interface BaseEventMetadata {
|
|
604
|
+
/**
|
|
605
|
+
* App instance ID.
|
|
606
|
+
* @format GUID
|
|
607
|
+
*/
|
|
608
|
+
instanceId?: string | null;
|
|
609
|
+
/**
|
|
610
|
+
* Event type.
|
|
611
|
+
* @maxLength 150
|
|
612
|
+
*/
|
|
613
|
+
eventType?: string;
|
|
614
|
+
/** The identification type and identity data. */
|
|
615
|
+
identity?: IdentificationData;
|
|
616
|
+
/** Details related to the account */
|
|
617
|
+
accountInfo?: AccountInfo;
|
|
618
|
+
}
|
|
619
|
+
interface EventMetadata extends BaseEventMetadata {
|
|
620
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
621
|
+
_id?: string;
|
|
622
|
+
/**
|
|
623
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
624
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
625
|
+
*/
|
|
626
|
+
entityFqdn?: string;
|
|
627
|
+
/**
|
|
628
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
629
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
630
|
+
*/
|
|
631
|
+
slug?: string;
|
|
632
|
+
/** ID of the entity associated with the event. */
|
|
633
|
+
entityId?: string;
|
|
634
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
635
|
+
eventTime?: Date | null;
|
|
636
|
+
/**
|
|
637
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
638
|
+
* (for example, GDPR).
|
|
639
|
+
*/
|
|
640
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
641
|
+
/** If present, indicates the action that triggered the event. */
|
|
642
|
+
originatedFrom?: string | null;
|
|
643
|
+
/**
|
|
644
|
+
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.
|
|
645
|
+
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
646
|
+
*/
|
|
647
|
+
entityEventSequence?: string | null;
|
|
648
|
+
accountInfo?: AccountInfoMetadata;
|
|
649
|
+
}
|
|
650
|
+
interface AccountInfoMetadata {
|
|
651
|
+
/** ID of the Wix account associated with the event */
|
|
652
|
+
accountId: string;
|
|
653
|
+
/** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */
|
|
654
|
+
siteId?: string;
|
|
655
|
+
/** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */
|
|
656
|
+
parentAccountId?: string;
|
|
657
|
+
}
|
|
658
|
+
interface OrderPaymentRequestCreatedEnvelope {
|
|
659
|
+
entity: OrderPaymentRequest;
|
|
660
|
+
metadata: EventMetadata;
|
|
661
|
+
}
|
|
662
|
+
/**
|
|
663
|
+
* Triggered when an order payment request is created.
|
|
664
|
+
* @permissionScope Manage Stores - all permissions
|
|
665
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
666
|
+
* @permissionScope Manage Stores
|
|
667
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
668
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
669
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
670
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
671
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
672
|
+
* @permissionId ECOM.ORDER_PAYMENT_REQUEST_READ
|
|
673
|
+
* @webhook
|
|
674
|
+
* @eventType wix.ecom.v1.order_payment_request_created
|
|
675
|
+
* @slug created
|
|
676
|
+
* @documentationMaturity preview
|
|
677
|
+
*/
|
|
678
|
+
declare function onOrderPaymentRequestCreated(handler: (event: OrderPaymentRequestCreatedEnvelope) => void | Promise<void>): void;
|
|
679
|
+
interface OrderPaymentRequestDeletedEnvelope {
|
|
680
|
+
entity: OrderPaymentRequest;
|
|
681
|
+
metadata: EventMetadata;
|
|
682
|
+
}
|
|
683
|
+
/**
|
|
684
|
+
* Triggered when an order payment request is deleted.
|
|
685
|
+
* @permissionScope Manage Stores - all permissions
|
|
686
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
687
|
+
* @permissionScope Manage Stores
|
|
688
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
689
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
690
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
691
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
692
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
693
|
+
* @permissionId ECOM.ORDER_PAYMENT_REQUEST_READ
|
|
694
|
+
* @webhook
|
|
695
|
+
* @eventType wix.ecom.v1.order_payment_request_deleted
|
|
696
|
+
* @slug deleted
|
|
697
|
+
* @documentationMaturity preview
|
|
698
|
+
*/
|
|
699
|
+
declare function onOrderPaymentRequestDeleted(handler: (event: OrderPaymentRequestDeletedEnvelope) => void | Promise<void>): void;
|
|
700
|
+
interface OrderPaymentRequestExpiredEnvelope {
|
|
701
|
+
data: OrderPaymentRequestExpired;
|
|
702
|
+
metadata: EventMetadata;
|
|
703
|
+
}
|
|
704
|
+
/**
|
|
705
|
+
* Triggered when an order payment request's `status` changes to `EXPIRED`.
|
|
706
|
+
* @permissionScope Manage Stores - all permissions
|
|
707
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
708
|
+
* @permissionScope Manage Stores
|
|
709
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
710
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
711
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
712
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
713
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
714
|
+
* @permissionId ECOM.ORDER_PAYMENT_REQUEST_READ
|
|
715
|
+
* @webhook
|
|
716
|
+
* @eventType wix.ecom.v1.order_payment_request_expired
|
|
717
|
+
* @slug expired
|
|
718
|
+
* @documentationMaturity preview
|
|
719
|
+
*/
|
|
720
|
+
declare function onOrderPaymentRequestExpired(handler: (event: OrderPaymentRequestExpiredEnvelope) => void | Promise<void>): void;
|
|
721
|
+
interface OrderPaymentRequestPaidEnvelope {
|
|
722
|
+
data: OrderPaymentRequestPaid;
|
|
723
|
+
metadata: EventMetadata;
|
|
724
|
+
}
|
|
725
|
+
/**
|
|
726
|
+
* Triggered when an order payment request's `status` changes to `PAID`.
|
|
727
|
+
* @permissionScope Manage Stores - all permissions
|
|
728
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
729
|
+
* @permissionScope Manage Stores
|
|
730
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
731
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
732
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
733
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
734
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
735
|
+
* @permissionId ECOM.ORDER_PAYMENT_REQUEST_READ
|
|
736
|
+
* @webhook
|
|
737
|
+
* @eventType wix.ecom.v1.order_payment_request_paid
|
|
738
|
+
* @slug paid
|
|
739
|
+
* @documentationMaturity preview
|
|
740
|
+
*/
|
|
741
|
+
declare function onOrderPaymentRequestPaid(handler: (event: OrderPaymentRequestPaidEnvelope) => void | Promise<void>): void;
|
|
742
|
+
interface OrderPaymentRequestUpdatedEnvelope {
|
|
743
|
+
entity: OrderPaymentRequest;
|
|
744
|
+
metadata: EventMetadata;
|
|
745
|
+
}
|
|
746
|
+
/**
|
|
747
|
+
* Triggered when an order payment request is updated.
|
|
748
|
+
* @permissionScope Manage Stores - all permissions
|
|
749
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
750
|
+
* @permissionScope Manage Stores
|
|
751
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
752
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
753
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
754
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
755
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
756
|
+
* @permissionId ECOM.ORDER_PAYMENT_REQUEST_READ
|
|
757
|
+
* @webhook
|
|
758
|
+
* @eventType wix.ecom.v1.order_payment_request_updated
|
|
759
|
+
* @slug updated
|
|
760
|
+
* @documentationMaturity preview
|
|
761
|
+
*/
|
|
762
|
+
declare function onOrderPaymentRequestUpdated(handler: (event: OrderPaymentRequestUpdatedEnvelope) => void | Promise<void>): void;
|
|
763
|
+
interface OrderPaymentRequestVoidedEnvelope {
|
|
764
|
+
data: OrderPaymentRequestVoided;
|
|
765
|
+
metadata: EventMetadata;
|
|
766
|
+
}
|
|
767
|
+
/**
|
|
768
|
+
* Triggered when an order payment request's `status` changes to `VOIDED`.
|
|
769
|
+
* @permissionScope Manage Stores - all permissions
|
|
770
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
771
|
+
* @permissionScope Manage Stores
|
|
772
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
773
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
774
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
775
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
776
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
777
|
+
* @permissionId ECOM.ORDER_PAYMENT_REQUEST_READ
|
|
778
|
+
* @webhook
|
|
779
|
+
* @eventType wix.ecom.v1.order_payment_request_voided
|
|
780
|
+
* @slug voided
|
|
781
|
+
* @documentationMaturity preview
|
|
782
|
+
*/
|
|
783
|
+
declare function onOrderPaymentRequestVoided(handler: (event: OrderPaymentRequestVoidedEnvelope) => void | Promise<void>): void;
|
|
591
784
|
/**
|
|
592
|
-
* Creates
|
|
785
|
+
* Creates an order payment request.
|
|
786
|
+
*
|
|
787
|
+
* The response includes the payment page URL, which you can share with the customer. To retrieve the URL later, call [Get Order Payment Request URL](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/order-payment-requests/get-order-payment-request-url).
|
|
788
|
+
*
|
|
789
|
+
* Creation fails with `ORDER_PAYMENT_REQUEST_PAGE_NOT_FOUND` if the site doesn't have a Payment Request Page added and published.
|
|
593
790
|
* @public
|
|
594
791
|
* @documentationMaturity preview
|
|
595
792
|
* @requiredField options.orderPaymentRequest.amount
|
|
@@ -597,34 +794,34 @@ type VoidOrderPaymentRequestApplicationErrors = {
|
|
|
597
794
|
* @requiredField options.orderPaymentRequest.title
|
|
598
795
|
* @permissionId ECOM.ORDER_PAYMENT_REQUEST_CREATE
|
|
599
796
|
* @applicableIdentity APP
|
|
600
|
-
* @returns
|
|
797
|
+
* @returns Created order payment request.
|
|
601
798
|
* @fqn wix.ecom.order_payment_request.api.v1.OrderPaymentRequestsService.CreateOrderPaymentRequest
|
|
602
799
|
*/
|
|
603
800
|
declare function createOrderPaymentRequest(options?: NonNullablePaths<CreateOrderPaymentRequestOptions, `orderPaymentRequest.amount` | `orderPaymentRequest.orderId` | `orderPaymentRequest.title`, 3>): Promise<NonNullablePaths<OrderPaymentRequest, `source.externalId` | `status` | `orderId` | `amount.amount` | `amount.formattedAmount` | `currency` | `title` | `blockedPaymentMethods`, 3> & {
|
|
604
801
|
__applicationErrorsType?: CreateOrderPaymentRequestApplicationErrors;
|
|
605
802
|
}>;
|
|
606
803
|
interface CreateOrderPaymentRequestOptions {
|
|
607
|
-
/**
|
|
804
|
+
/** Order payment request to create. */
|
|
608
805
|
orderPaymentRequest?: OrderPaymentRequest;
|
|
609
806
|
}
|
|
610
807
|
/**
|
|
611
|
-
* Retrieves
|
|
612
|
-
* @param orderPaymentRequestId - ID of the
|
|
808
|
+
* Retrieves an order payment request.
|
|
809
|
+
* @param orderPaymentRequestId - ID of the order payment request to retrieve.
|
|
613
810
|
* @public
|
|
614
811
|
* @documentationMaturity preview
|
|
615
812
|
* @requiredField orderPaymentRequestId
|
|
616
813
|
* @permissionId ECOM.ORDER_PAYMENT_REQUEST_READ
|
|
617
814
|
* @applicableIdentity APP
|
|
618
|
-
* @returns
|
|
815
|
+
* @returns Retrieved order payment request.
|
|
619
816
|
* @fqn wix.ecom.order_payment_request.api.v1.OrderPaymentRequestsService.GetOrderPaymentRequest
|
|
620
817
|
*/
|
|
621
818
|
declare function getOrderPaymentRequest(orderPaymentRequestId: string): Promise<NonNullablePaths<OrderPaymentRequest, `source.externalId` | `status` | `orderId` | `amount.amount` | `amount.formattedAmount` | `currency` | `title` | `blockedPaymentMethods`, 3> & {
|
|
622
819
|
__applicationErrorsType?: GetOrderPaymentRequestApplicationErrors;
|
|
623
820
|
}>;
|
|
624
821
|
/**
|
|
625
|
-
* Updates
|
|
822
|
+
* Updates an order payment request.
|
|
626
823
|
*
|
|
627
|
-
*
|
|
824
|
+
* Only `UNPAID` order payment requests can be updated. The `amount` can't be changed after the order payment request is created.
|
|
628
825
|
* @param _id - Order payment request ID.
|
|
629
826
|
* @public
|
|
630
827
|
* @documentationMaturity preview
|
|
@@ -632,7 +829,7 @@ declare function getOrderPaymentRequest(orderPaymentRequestId: string): Promise<
|
|
|
632
829
|
* @requiredField orderPaymentRequest
|
|
633
830
|
* @permissionId ECOM.ORDER_PAYMENT_REQUEST_UPDATE
|
|
634
831
|
* @applicableIdentity APP
|
|
635
|
-
* @returns Updated
|
|
832
|
+
* @returns Updated order payment request.
|
|
636
833
|
* @fqn wix.ecom.order_payment_request.api.v1.OrderPaymentRequestsService.UpdateOrderPaymentRequest
|
|
637
834
|
*/
|
|
638
835
|
declare function updateOrderPaymentRequest(_id: string, orderPaymentRequest: UpdateOrderPaymentRequest): Promise<NonNullablePaths<OrderPaymentRequest, `source.externalId` | `status` | `orderId` | `amount.amount` | `amount.formattedAmount` | `currency` | `title` | `blockedPaymentMethods`, 3> & {
|
|
@@ -646,12 +843,12 @@ interface UpdateOrderPaymentRequest {
|
|
|
646
843
|
*/
|
|
647
844
|
_id?: string | null;
|
|
648
845
|
/**
|
|
649
|
-
*
|
|
846
|
+
* Details about the source that created the order payment request.
|
|
650
847
|
* @immutable
|
|
651
848
|
*/
|
|
652
849
|
source?: Source;
|
|
653
850
|
/**
|
|
654
|
-
* status.
|
|
851
|
+
* Payment request status. Set by the system. A new order payment request starts as `UNPAID`, unless `expirationDate` is already in the past at creation time, in which case it is created as `EXPIRED`. The system sets the status to `PAID` once payment is collected, `EXPIRED` when the expiration date passes, or `VOIDED` when the request is voided.
|
|
655
852
|
* @readonly
|
|
656
853
|
*/
|
|
657
854
|
status?: StatusWithLiterals;
|
|
@@ -668,49 +865,52 @@ interface UpdateOrderPaymentRequest {
|
|
|
668
865
|
*/
|
|
669
866
|
orderNumber?: string | null;
|
|
670
867
|
/**
|
|
671
|
-
* Amount to collect.
|
|
672
|
-
* > **Note:** The amount can only be set once.
|
|
868
|
+
* Amount to collect. Set when the order payment request is created and can't be changed afterward.
|
|
673
869
|
* @immutable
|
|
674
870
|
*/
|
|
675
871
|
amount?: Price;
|
|
676
872
|
/**
|
|
677
|
-
*
|
|
873
|
+
* Three-letter currency code in [ISO-4217 alphabetic format](http://en.wikipedia.org/wiki/ISO_4217). Always matches the order's currency.
|
|
678
874
|
* @format CURRENCY
|
|
679
875
|
* @readonly
|
|
680
876
|
*/
|
|
681
877
|
currency?: string;
|
|
682
878
|
/**
|
|
683
|
-
* Payment gateway order
|
|
879
|
+
* Payment gateway order ID associated with this payment request.
|
|
684
880
|
* @readonly
|
|
685
881
|
* @minLength 1
|
|
686
882
|
* @maxLength 100
|
|
687
883
|
*/
|
|
688
884
|
paymentGatewayOrderId?: string | null;
|
|
689
885
|
/**
|
|
690
|
-
* Title
|
|
886
|
+
* Title displayed to the customer on the payment page.
|
|
691
887
|
* @minLength 1
|
|
692
888
|
* @maxLength 200
|
|
693
889
|
*/
|
|
694
890
|
title?: string;
|
|
695
891
|
/**
|
|
696
|
-
* Description
|
|
892
|
+
* Description displayed to the customer on the payment page.
|
|
697
893
|
* @maxLength 300
|
|
698
894
|
*/
|
|
699
895
|
description?: string | null;
|
|
700
896
|
/**
|
|
701
|
-
*
|
|
897
|
+
* Date and time the order payment request expires. If not provided, the order payment request doesn't expire.
|
|
702
898
|
* @immutable
|
|
703
899
|
*/
|
|
704
900
|
expirationDate?: Date | null;
|
|
705
|
-
/**
|
|
901
|
+
/**
|
|
902
|
+
* Custom field data for this order payment request.
|
|
903
|
+
*
|
|
904
|
+
* [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.
|
|
905
|
+
*/
|
|
706
906
|
extendedFields?: ExtendedFields;
|
|
707
907
|
/**
|
|
708
|
-
* Date and time the
|
|
908
|
+
* Date and time the order payment request was created.
|
|
709
909
|
* @readonly
|
|
710
910
|
*/
|
|
711
911
|
_createdDate?: Date | null;
|
|
712
912
|
/**
|
|
713
|
-
* Date and time the
|
|
913
|
+
* Date and time the order payment request was last updated.
|
|
714
914
|
* @readonly
|
|
715
915
|
*/
|
|
716
916
|
_updatedDate?: Date | null;
|
|
@@ -723,10 +923,10 @@ interface UpdateOrderPaymentRequest {
|
|
|
723
923
|
blockedPaymentMethods?: PaymentMethodWithLiterals[];
|
|
724
924
|
}
|
|
725
925
|
/**
|
|
726
|
-
* Deletes
|
|
926
|
+
* Deletes an order payment request.
|
|
727
927
|
*
|
|
728
|
-
*
|
|
729
|
-
* @param orderPaymentRequestId -
|
|
928
|
+
* You can delete an order payment request in any status except `PAID`. Attempting to delete a `PAID` order payment request fails with `CANNOT_DELETE_PAID_ORDER_PAYMENT_REQUEST`.
|
|
929
|
+
* @param orderPaymentRequestId - ID of the order payment request to delete.
|
|
730
930
|
* @public
|
|
731
931
|
* @documentationMaturity preview
|
|
732
932
|
* @requiredField orderPaymentRequestId
|
|
@@ -738,11 +938,11 @@ declare function deleteOrderPaymentRequest(orderPaymentRequestId: string): Promi
|
|
|
738
938
|
__applicationErrorsType?: DeleteOrderPaymentRequestApplicationErrors;
|
|
739
939
|
}>;
|
|
740
940
|
/**
|
|
741
|
-
* Retrieves a list of
|
|
941
|
+
* Retrieves a list of up to 1,000 order payment requests, given the provided [paging, filtering, and sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language).
|
|
742
942
|
*
|
|
743
|
-
* Query Payment Requests runs with these defaults, which you can override:
|
|
744
|
-
* - `
|
|
745
|
-
* - `cursorPaging.limit` is 100
|
|
943
|
+
* Query Order Payment Requests runs with these defaults, which you can override:
|
|
944
|
+
* - `_createdDate` is sorted in `DESC` order
|
|
945
|
+
* - `cursorPaging.limit` is `100`
|
|
746
946
|
*
|
|
747
947
|
* To learn about working with _Query_ endpoints, see
|
|
748
948
|
* [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language), and
|
|
@@ -925,8 +1125,8 @@ declare const utils: {
|
|
|
925
1125
|
};
|
|
926
1126
|
};
|
|
927
1127
|
/**
|
|
928
|
-
* Retrieves the
|
|
929
|
-
* @param orderPaymentRequestId -
|
|
1128
|
+
* Retrieves the payment page URL for an order payment request.
|
|
1129
|
+
* @param orderPaymentRequestId - ID of the order payment request.
|
|
930
1130
|
* @public
|
|
931
1131
|
* @documentationMaturity preview
|
|
932
1132
|
* @requiredField orderPaymentRequestId
|
|
@@ -938,7 +1138,7 @@ declare function getOrderPaymentRequestUrl(orderPaymentRequestId: string): Promi
|
|
|
938
1138
|
__applicationErrorsType?: GetOrderPaymentRequestUrlApplicationErrors;
|
|
939
1139
|
}>;
|
|
940
1140
|
/**
|
|
941
|
-
* Updates extended fields of
|
|
1141
|
+
* Updates the extended fields of an order payment request.
|
|
942
1142
|
* @param _id - ID of the entity to update.
|
|
943
1143
|
* @param namespace - Identifier for the app whose extended fields are being updated.
|
|
944
1144
|
* @public
|
|
@@ -957,4 +1157,4 @@ interface UpdateExtendedFieldsOptions {
|
|
|
957
1157
|
namespaceData: Record<string, any> | null;
|
|
958
1158
|
}
|
|
959
1159
|
|
|
960
|
-
export { type AccountInfo, type ActionEvent, type ActionLink, type ActionLinks, type CommonQueryWithEntityContext, type CreateOrderPaymentRequestApplicationErrors, type CreateOrderPaymentRequestOptions, type CreateOrderPaymentRequestRequest, type CreateOrderPaymentRequestResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteOrderPaymentRequestApplicationErrors, type DeleteOrderPaymentRequestRequest, type DeleteOrderPaymentRequestResponse, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type GetOrderPaymentRequestApplicationErrors, type GetOrderPaymentRequestRequest, type GetOrderPaymentRequestResponse, type GetOrderPaymentRequestURLRequest, type GetOrderPaymentRequestURLResponse, type GetOrderPaymentRequestUrlApplicationErrors, type IdentificationData, type IdentificationDataIdOneOf, type MessageEnvelope, type OrderPaymentRequest, type OrderPaymentRequestExpired, type OrderPaymentRequestPaid, type OrderPaymentRequestQuery, type OrderPaymentRequestQuerySpec, type OrderPaymentRequestVoided, type OrderPaymentRequestsQueryBuilder, type OrderPaymentRequestsQueryResult, PaymentMethod, type PaymentMethodWithLiterals, type Price, type QueryOrderPaymentRequestsRequest, type QueryOrderPaymentRequestsResponse, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, type Source, Status, type StatusWithLiterals, type SubscriptionInfo, type UpdateExtendedFieldsOptions, type UpdateExtendedFieldsRequest, type UpdateExtendedFieldsResponse, type UpdateOrderPaymentRequest, type UpdateOrderPaymentRequestApplicationErrors, type UpdateOrderPaymentRequestRequest, type UpdateOrderPaymentRequestResponse, type VoidOrderPaymentRequestApplicationErrors, type VoidOrderPaymentRequestRequest, type VoidOrderPaymentRequestResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createOrderPaymentRequest, deleteOrderPaymentRequest, getOrderPaymentRequest, getOrderPaymentRequestUrl, queryOrderPaymentRequests, typedQueryOrderPaymentRequests, updateExtendedFields, updateOrderPaymentRequest, utils };
|
|
1160
|
+
export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type ActionLink, type ActionLinks, type BaseEventMetadata, type CommonQueryWithEntityContext, type CreateOrderPaymentRequestApplicationErrors, type CreateOrderPaymentRequestOptions, type CreateOrderPaymentRequestRequest, type CreateOrderPaymentRequestResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteOrderPaymentRequestApplicationErrors, type DeleteOrderPaymentRequestRequest, type DeleteOrderPaymentRequestResponse, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type GetOrderPaymentRequestApplicationErrors, type GetOrderPaymentRequestRequest, type GetOrderPaymentRequestResponse, type GetOrderPaymentRequestURLRequest, type GetOrderPaymentRequestURLResponse, type GetOrderPaymentRequestUrlApplicationErrors, type IdentificationData, type IdentificationDataIdOneOf, type MessageEnvelope, type OrderPaymentRequest, type OrderPaymentRequestCreatedEnvelope, type OrderPaymentRequestDeletedEnvelope, type OrderPaymentRequestExpired, type OrderPaymentRequestExpiredEnvelope, type OrderPaymentRequestPaid, type OrderPaymentRequestPaidEnvelope, type OrderPaymentRequestQuery, type OrderPaymentRequestQuerySpec, type OrderPaymentRequestUpdatedEnvelope, type OrderPaymentRequestVoided, type OrderPaymentRequestVoidedEnvelope, type OrderPaymentRequestsQueryBuilder, type OrderPaymentRequestsQueryResult, PaymentMethod, type PaymentMethodWithLiterals, type Price, type QueryOrderPaymentRequestsRequest, type QueryOrderPaymentRequestsResponse, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, type Source, Status, type StatusWithLiterals, type SubscriptionInfo, type UpdateExtendedFieldsOptions, type UpdateExtendedFieldsRequest, type UpdateExtendedFieldsResponse, type UpdateOrderPaymentRequest, type UpdateOrderPaymentRequestApplicationErrors, type UpdateOrderPaymentRequestRequest, type UpdateOrderPaymentRequestResponse, type VoidOrderPaymentRequestApplicationErrors, type VoidOrderPaymentRequestRequest, type VoidOrderPaymentRequestResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createOrderPaymentRequest, deleteOrderPaymentRequest, getOrderPaymentRequest, getOrderPaymentRequestUrl, onOrderPaymentRequestCreated, onOrderPaymentRequestDeleted, onOrderPaymentRequestExpired, onOrderPaymentRequestPaid, onOrderPaymentRequestUpdated, onOrderPaymentRequestVoided, queryOrderPaymentRequests, typedQueryOrderPaymentRequests, updateExtendedFields, updateOrderPaymentRequest, utils };
|