@wix/auto_sdk_ecom_order-payment-requests 1.0.60 → 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.
@@ -9,7 +9,7 @@ interface OrderPaymentRequest {
9
9
  */
10
10
  _id?: string | null;
11
11
  /**
12
- * Additional parameters to identify the source of the order payment request.
12
+ * Details about the source that created the order payment request.
13
13
  * @immutable
14
14
  */
15
15
  source?: Source;
@@ -36,43 +36,47 @@ interface OrderPaymentRequest {
36
36
  */
37
37
  amount?: Price;
38
38
  /**
39
- * Currency code. The value will always match the currency used in the order.
39
+ * Three-letter currency code in [ISO-4217 alphabetic format](http://en.wikipedia.org/wiki/ISO_4217). Always matches the order's currency.
40
40
  * @format CURRENCY
41
41
  * @readonly
42
42
  */
43
43
  currency?: string;
44
44
  /**
45
- * Payment gateway order id which is associated with this payment request
45
+ * Payment gateway order ID associated with this payment request.
46
46
  * @readonly
47
47
  * @minLength 1
48
48
  * @maxLength 100
49
49
  */
50
50
  paymentGatewayOrderId?: string | null;
51
51
  /**
52
- * Title to be displayed to the customer on the payment page. Provide a clear and descriptive title to inform the customer about what they are paying for.
52
+ * Title displayed to the customer on the payment page.
53
53
  * @minLength 1
54
54
  * @maxLength 200
55
55
  */
56
56
  title?: string;
57
57
  /**
58
- * Description to be displayed to the customer on the payment page. Write a detailed description so the customer understands what they are paying for.
58
+ * Description displayed to the customer on the payment page.
59
59
  * @maxLength 300
60
60
  */
61
61
  description?: string | null;
62
62
  /**
63
- * Time and date the order payment request expires.
63
+ * Date and time the order payment request expires. If not provided, the order payment request doesn't expire.
64
64
  * @immutable
65
65
  */
66
66
  expirationDate?: Date | null;
67
- /** [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls. */
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
+ */
68
72
  extendedFields?: ExtendedFields;
69
73
  /**
70
- * Date and time the OrderPaymentRequest was created.
74
+ * Date and time the order payment request was created.
71
75
  * @readonly
72
76
  */
73
77
  _createdDate?: Date | null;
74
78
  /**
75
- * Date and time the OrderPaymentRequest was last updated.
79
+ * Date and time the order payment request was last updated.
76
80
  * @readonly
77
81
  */
78
82
  _updatedDate?: Date | null;
@@ -86,7 +90,7 @@ interface OrderPaymentRequest {
86
90
  }
87
91
  interface Source {
88
92
  /**
89
- * App Def ID that created the order payment request.
93
+ * ID of the app that created the order payment request.
90
94
  * @format GUID
91
95
  * @minLength 1
92
96
  * @maxLength 100
@@ -94,7 +98,7 @@ interface Source {
94
98
  */
95
99
  appId?: string | null;
96
100
  /**
97
- * Reference to an ID from an external system, indicating the original source of the order payment request.
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.
98
102
  * @minLength 1
99
103
  * @maxLength 100
100
104
  * @immutable
@@ -102,8 +106,11 @@ interface Source {
102
106
  externalId?: string;
103
107
  }
104
108
  declare enum Status {
109
+ /** Payment is owed but hasn't been collected yet. */
105
110
  UNPAID = "UNPAID",
111
+ /** Payment has been collected. */
106
112
  PAID = "PAID",
113
+ /** The order payment request has passed its `expirationDate` without being paid. */
107
114
  EXPIRED = "EXPIRED"
108
115
  }
109
116
  /** @enumType */
@@ -139,11 +146,13 @@ declare enum PaymentMethod {
139
146
  type PaymentMethodWithLiterals = PaymentMethod | 'MANUAL';
140
147
  interface ActionLinks {
141
148
  /**
142
- * A general navigation action link rendered as an anchor in the UI.
149
+ * Navigation action links rendered as anchors on the payment page.
150
+ *
151
+ * Currently supports a single action link.
143
152
  * @maxSize 1
144
153
  */
145
154
  general?: ActionLink[];
146
- /** An action link rendered as a button in error messages in the UI. */
155
+ /** Action link rendered as a button in error messages on the payment page. */
147
156
  error?: ActionLink;
148
157
  }
149
158
  interface ActionLink {
@@ -167,7 +176,7 @@ interface SubscriptionInfo {
167
176
  */
168
177
  title?: string;
169
178
  /**
170
- * Description of the charges that will be applied for subscription.
179
+ * Description of the charges applied for the subscription.
171
180
  * @maxLength 1000
172
181
  */
173
182
  chargeDescription?: string | null;
@@ -179,30 +188,30 @@ interface SubscriptionInfo {
179
188
  /** Whether the subscription renews automatically. */
180
189
  autoRenewal?: boolean;
181
190
  }
182
- /** Triggered when the order payment request status changes to paid */
191
+ /** Triggered when an order payment request's `status` changes to `PAID`. */
183
192
  interface OrderPaymentRequestPaid {
184
- /** Order payment request */
193
+ /** Order payment request that was paid. */
185
194
  orderPaymentRequest?: OrderPaymentRequest;
186
195
  }
187
- /** Triggered when the order payment request status changes to expired */
196
+ /** Triggered when an order payment request's `status` changes to `EXPIRED`. */
188
197
  interface OrderPaymentRequestExpired {
189
- /** Order payment request */
198
+ /** Order payment request that expired. */
190
199
  orderPaymentRequest?: OrderPaymentRequest;
191
200
  }
192
- /** Triggered when the order payment request status changes to voided */
201
+ /** Triggered when an order payment request's `status` changes to `VOIDED`. */
193
202
  interface OrderPaymentRequestVoided {
194
- /** Order payment request */
203
+ /** Order payment request that was voided. */
195
204
  orderPaymentRequest?: OrderPaymentRequest;
196
205
  }
197
206
  interface CreateOrderPaymentRequestRequest {
198
- /** OrderPaymentRequest to be created. */
207
+ /** Order payment request to create. */
199
208
  orderPaymentRequest?: OrderPaymentRequest;
200
209
  }
201
210
  interface CreateOrderPaymentRequestResponse {
202
- /** The created OrderPaymentRequest. */
211
+ /** Created order payment request. */
203
212
  orderPaymentRequest?: OrderPaymentRequest;
204
213
  /**
205
- * Order payment request URL.
214
+ * Payment page URL for the order payment request. Share this URL with the customer so they can complete the payment.
206
215
  * @minLength 1
207
216
  * @maxLength 100
208
217
  */
@@ -210,26 +219,26 @@ interface CreateOrderPaymentRequestResponse {
210
219
  }
211
220
  interface GetOrderPaymentRequestRequest {
212
221
  /**
213
- * ID of the OrderPaymentRequest to retrieve.
222
+ * ID of the order payment request to retrieve.
214
223
  * @format GUID
215
224
  */
216
225
  orderPaymentRequestId: string;
217
226
  }
218
227
  interface GetOrderPaymentRequestResponse {
219
- /** The requested OrderPaymentRequest. */
228
+ /** Retrieved order payment request. */
220
229
  orderPaymentRequest?: OrderPaymentRequest;
221
230
  }
222
231
  interface UpdateOrderPaymentRequestRequest {
223
- /** OrderPaymentRequest to be updated, may be partial. */
232
+ /** Order payment request to update. */
224
233
  orderPaymentRequest: OrderPaymentRequest;
225
234
  }
226
235
  interface UpdateOrderPaymentRequestResponse {
227
- /** Updated OrderPaymentRequest. */
236
+ /** Updated order payment request. */
228
237
  orderPaymentRequest?: OrderPaymentRequest;
229
238
  }
230
239
  interface DeleteOrderPaymentRequestRequest {
231
240
  /**
232
- * Id of the OrderPaymentRequest to delete.
241
+ * ID of the order payment request to delete.
233
242
  * @format GUID
234
243
  */
235
244
  orderPaymentRequestId: string;
@@ -296,11 +305,11 @@ interface CursorPaging {
296
305
  }
297
306
  interface QueryOrderPaymentRequestsResponse {
298
307
  /**
299
- * List of payment requests.
308
+ * List of order payment requests.
300
309
  * @maxSize 1000
301
310
  */
302
311
  orderPaymentRequests?: OrderPaymentRequest[];
303
- /** Paging metadata */
312
+ /** Paging metadata. */
304
313
  pagingMetadata?: CursorPagingMetadata;
305
314
  }
306
315
  interface CursorPagingMetadata {
@@ -330,14 +339,14 @@ interface Cursors {
330
339
  }
331
340
  interface GetOrderPaymentRequestURLRequest {
332
341
  /**
333
- * Order Payment Request ID.
342
+ * ID of the order payment request.
334
343
  * @format GUID
335
344
  */
336
345
  orderPaymentRequestId: string;
337
346
  }
338
347
  interface GetOrderPaymentRequestURLResponse {
339
348
  /**
340
- * Order Payment Request URL.
349
+ * Payment page URL for the order payment request.
341
350
  * @minLength 1
342
351
  * @maxLength 100
343
352
  */
@@ -352,7 +361,7 @@ interface UpdateExtendedFieldsRequest {
352
361
  namespaceData: Record<string, any> | null;
353
362
  }
354
363
  interface UpdateExtendedFieldsResponse {
355
- /** Updated OrderPaymentRequest. */
364
+ /** Updated order payment request. */
356
365
  orderPaymentRequest?: OrderPaymentRequest;
357
366
  }
358
367
  interface VoidOrderPaymentRequestRequest {
@@ -532,6 +541,10 @@ type CreateOrderPaymentRequestApplicationErrors = {
532
541
  code?: 'INVALID_ORDER_STATUS_FOR_SUBSCRIPTION';
533
542
  description?: string;
534
543
  data?: Record<string, any>;
544
+ } | {
545
+ code?: 'ORDER_PAYMENT_REQUEST_PAGE_NOT_FOUND';
546
+ description?: string;
547
+ data?: Record<string, any>;
535
548
  };
536
549
  /** @docsIgnore */
537
550
  type GetOrderPaymentRequestApplicationErrors = {
@@ -689,7 +702,7 @@ interface OrderPaymentRequestExpiredEnvelope {
689
702
  metadata: EventMetadata;
690
703
  }
691
704
  /**
692
- * Triggered when an order payment request status is updated to `"EXPIRED"`.
705
+ * Triggered when an order payment request's `status` changes to `EXPIRED`.
693
706
  * @permissionScope Manage Stores - all permissions
694
707
  * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
695
708
  * @permissionScope Manage Stores
@@ -710,7 +723,7 @@ interface OrderPaymentRequestPaidEnvelope {
710
723
  metadata: EventMetadata;
711
724
  }
712
725
  /**
713
- * Triggered when an order payment request status is updated to `"PAID"`.
726
+ * Triggered when an order payment request's `status` changes to `PAID`.
714
727
  * @permissionScope Manage Stores - all permissions
715
728
  * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
716
729
  * @permissionScope Manage Stores
@@ -752,7 +765,7 @@ interface OrderPaymentRequestVoidedEnvelope {
752
765
  metadata: EventMetadata;
753
766
  }
754
767
  /**
755
- * Triggered when an order payment request status is updated to `"VOIDED"`.
768
+ * Triggered when an order payment request's `status` changes to `VOIDED`.
756
769
  * @permissionScope Manage Stores - all permissions
757
770
  * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
758
771
  * @permissionScope Manage Stores
@@ -769,7 +782,11 @@ interface OrderPaymentRequestVoidedEnvelope {
769
782
  */
770
783
  declare function onOrderPaymentRequestVoided(handler: (event: OrderPaymentRequestVoidedEnvelope) => void | Promise<void>): void;
771
784
  /**
772
- * Creates a order payment request.
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.
773
790
  * @public
774
791
  * @documentationMaturity preview
775
792
  * @requiredField options.orderPaymentRequest.amount
@@ -777,25 +794,25 @@ declare function onOrderPaymentRequestVoided(handler: (event: OrderPaymentReques
777
794
  * @requiredField options.orderPaymentRequest.title
778
795
  * @permissionId ECOM.ORDER_PAYMENT_REQUEST_CREATE
779
796
  * @applicableIdentity APP
780
- * @returns The created OrderPaymentRequest.
797
+ * @returns Created order payment request.
781
798
  * @fqn wix.ecom.order_payment_request.api.v1.OrderPaymentRequestsService.CreateOrderPaymentRequest
782
799
  */
783
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> & {
784
801
  __applicationErrorsType?: CreateOrderPaymentRequestApplicationErrors;
785
802
  }>;
786
803
  interface CreateOrderPaymentRequestOptions {
787
- /** OrderPaymentRequest to be created. */
804
+ /** Order payment request to create. */
788
805
  orderPaymentRequest?: OrderPaymentRequest;
789
806
  }
790
807
  /**
791
- * Retrieves a order payment request.
792
- * @param orderPaymentRequestId - ID of the OrderPaymentRequest to retrieve.
808
+ * Retrieves an order payment request.
809
+ * @param orderPaymentRequestId - ID of the order payment request to retrieve.
793
810
  * @public
794
811
  * @documentationMaturity preview
795
812
  * @requiredField orderPaymentRequestId
796
813
  * @permissionId ECOM.ORDER_PAYMENT_REQUEST_READ
797
814
  * @applicableIdentity APP
798
- * @returns The requested OrderPaymentRequest.
815
+ * @returns Retrieved order payment request.
799
816
  * @fqn wix.ecom.order_payment_request.api.v1.OrderPaymentRequestsService.GetOrderPaymentRequest
800
817
  */
801
818
  declare function getOrderPaymentRequest(orderPaymentRequestId: string): Promise<NonNullablePaths<OrderPaymentRequest, `source.externalId` | `status` | `orderId` | `amount.amount` | `amount.formattedAmount` | `currency` | `title` | `blockedPaymentMethods`, 3> & {
@@ -812,7 +829,7 @@ declare function getOrderPaymentRequest(orderPaymentRequestId: string): Promise<
812
829
  * @requiredField orderPaymentRequest
813
830
  * @permissionId ECOM.ORDER_PAYMENT_REQUEST_UPDATE
814
831
  * @applicableIdentity APP
815
- * @returns Updated OrderPaymentRequest.
832
+ * @returns Updated order payment request.
816
833
  * @fqn wix.ecom.order_payment_request.api.v1.OrderPaymentRequestsService.UpdateOrderPaymentRequest
817
834
  */
818
835
  declare function updateOrderPaymentRequest(_id: string, orderPaymentRequest: UpdateOrderPaymentRequest): Promise<NonNullablePaths<OrderPaymentRequest, `source.externalId` | `status` | `orderId` | `amount.amount` | `amount.formattedAmount` | `currency` | `title` | `blockedPaymentMethods`, 3> & {
@@ -826,7 +843,7 @@ interface UpdateOrderPaymentRequest {
826
843
  */
827
844
  _id?: string | null;
828
845
  /**
829
- * Additional parameters to identify the source of the order payment request.
846
+ * Details about the source that created the order payment request.
830
847
  * @immutable
831
848
  */
832
849
  source?: Source;
@@ -853,43 +870,47 @@ interface UpdateOrderPaymentRequest {
853
870
  */
854
871
  amount?: Price;
855
872
  /**
856
- * Currency code. The value will always match the currency used in the order.
873
+ * Three-letter currency code in [ISO-4217 alphabetic format](http://en.wikipedia.org/wiki/ISO_4217). Always matches the order's currency.
857
874
  * @format CURRENCY
858
875
  * @readonly
859
876
  */
860
877
  currency?: string;
861
878
  /**
862
- * Payment gateway order id which is associated with this payment request
879
+ * Payment gateway order ID associated with this payment request.
863
880
  * @readonly
864
881
  * @minLength 1
865
882
  * @maxLength 100
866
883
  */
867
884
  paymentGatewayOrderId?: string | null;
868
885
  /**
869
- * Title to be displayed to the customer on the payment page. Provide a clear and descriptive title to inform the customer about what they are paying for.
886
+ * Title displayed to the customer on the payment page.
870
887
  * @minLength 1
871
888
  * @maxLength 200
872
889
  */
873
890
  title?: string;
874
891
  /**
875
- * Description to be displayed to the customer on the payment page. Write a detailed description so the customer understands what they are paying for.
892
+ * Description displayed to the customer on the payment page.
876
893
  * @maxLength 300
877
894
  */
878
895
  description?: string | null;
879
896
  /**
880
- * Time and date the order payment request expires.
897
+ * Date and time the order payment request expires. If not provided, the order payment request doesn't expire.
881
898
  * @immutable
882
899
  */
883
900
  expirationDate?: Date | null;
884
- /** [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls. */
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
+ */
885
906
  extendedFields?: ExtendedFields;
886
907
  /**
887
- * Date and time the OrderPaymentRequest was created.
908
+ * Date and time the order payment request was created.
888
909
  * @readonly
889
910
  */
890
911
  _createdDate?: Date | null;
891
912
  /**
892
- * Date and time the OrderPaymentRequest was last updated.
913
+ * Date and time the order payment request was last updated.
893
914
  * @readonly
894
915
  */
895
916
  _updatedDate?: Date | null;
@@ -905,7 +926,7 @@ interface UpdateOrderPaymentRequest {
905
926
  * Deletes an order payment request.
906
927
  *
907
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`.
908
- * @param orderPaymentRequestId - Id of the OrderPaymentRequest to delete.
929
+ * @param orderPaymentRequestId - ID of the order payment request to delete.
909
930
  * @public
910
931
  * @documentationMaturity preview
911
932
  * @requiredField orderPaymentRequestId
@@ -917,11 +938,11 @@ declare function deleteOrderPaymentRequest(orderPaymentRequestId: string): Promi
917
938
  __applicationErrorsType?: DeleteOrderPaymentRequestApplicationErrors;
918
939
  }>;
919
940
  /**
920
- * Retrieves a list of Payment Requests, given the provided [paging, filtering, and sorting][1].
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).
921
942
  *
922
- * Query Payment Requests runs with these defaults, which you can override:
923
- * - `createdDate` is sorted in DESC order
924
- * - `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`
925
946
  *
926
947
  * To learn about working with _Query_ endpoints, see
927
948
  * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language), and
@@ -1104,8 +1125,8 @@ declare const utils: {
1104
1125
  };
1105
1126
  };
1106
1127
  /**
1107
- * Retrieves the order payment request page URL of a specified order payment request.
1108
- * @param orderPaymentRequestId - Order Payment Request ID.
1128
+ * Retrieves the payment page URL for an order payment request.
1129
+ * @param orderPaymentRequestId - ID of the order payment request.
1109
1130
  * @public
1110
1131
  * @documentationMaturity preview
1111
1132
  * @requiredField orderPaymentRequestId
@@ -1117,7 +1138,7 @@ declare function getOrderPaymentRequestUrl(orderPaymentRequestId: string): Promi
1117
1138
  __applicationErrorsType?: GetOrderPaymentRequestUrlApplicationErrors;
1118
1139
  }>;
1119
1140
  /**
1120
- * Updates extended fields of a order payment request
1141
+ * Updates the extended fields of an order payment request.
1121
1142
  * @param _id - ID of the entity to update.
1122
1143
  * @param namespace - Identifier for the app whose extended fields are being updated.
1123
1144
  * @public