@wix/payments 1.0.24 → 1.0.26

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/payments",
3
- "version": "1.0.24",
3
+ "version": "1.0.26",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -21,10 +21,10 @@
21
21
  "type-bundles"
22
22
  ],
23
23
  "dependencies": {
24
- "@wix/payments_onboarding-availability": "1.0.11",
25
- "@wix/payments_psp-callbacks": "1.0.6",
26
- "@wix/payments_refunds": "1.0.20",
27
- "@wix/payments_saved-payment-methods": "1.0.1"
24
+ "@wix/payments_onboarding-availability": "1.0.12",
25
+ "@wix/payments_psp-callbacks": "1.0.7",
26
+ "@wix/payments_refunds": "1.0.21",
27
+ "@wix/payments_saved-payment-methods": "1.0.2"
28
28
  },
29
29
  "devDependencies": {
30
30
  "glob": "^10.4.1",
@@ -49,5 +49,5 @@
49
49
  "fqdn": ""
50
50
  }
51
51
  },
52
- "falconPackageHash": "2544b48e2bb07dbe4433247bc4fe266f898266d6dd50537704189be1"
52
+ "falconPackageHash": "acd522364b0879b2c0e2334876e7a06364a961230b0797adf06d9f8e"
53
53
  }
@@ -893,6 +893,10 @@ interface ProviderPlatformEvent extends ProviderPlatformEventResourceOneOf {
893
893
  refund?: RefundEvent;
894
894
  /** Transaction event data. */
895
895
  transaction?: TransactionEvent;
896
+ /** Capture event data */
897
+ capture?: CaptureEvent;
898
+ /** Void event data */
899
+ void?: VoidEvent;
896
900
  /**
897
901
  * This field is ignored, do not send it.
898
902
  * @deprecated
@@ -905,6 +909,10 @@ interface ProviderPlatformEventResourceOneOf {
905
909
  refund?: RefundEvent;
906
910
  /** Transaction event data. */
907
911
  transaction?: TransactionEvent;
912
+ /** Capture event data */
913
+ capture?: CaptureEvent;
914
+ /** Void event data */
915
+ void?: VoidEvent;
908
916
  }
909
917
  interface RefundEvent {
910
918
  /** Wix transaction ID. */
@@ -967,6 +975,30 @@ interface CardDetails {
967
975
  /** Last 4 digits of the card's number. */
968
976
  lastFour?: string | null;
969
977
  }
978
+ interface CaptureEvent {
979
+ /** Wix transaction ID. */
980
+ wixTransactionId?: string;
981
+ /** Wix [reason code](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/reason-codes#capture-declined) indicating request's status. */
982
+ reasonCode?: number;
983
+ /** Capture amount. */
984
+ amount?: string;
985
+ /** PSP-specific error code. */
986
+ errorCode?: string | null;
987
+ /** PSP-specific error message. */
988
+ errorMessage?: string | null;
989
+ }
990
+ interface VoidEvent {
991
+ /** Wix transaction ID. */
992
+ wixTransactionId?: string;
993
+ /** PSP void ID. */
994
+ reasonCode?: number;
995
+ /** Voided amount. */
996
+ amount?: string;
997
+ /** PSP-specific error code. */
998
+ errorCode?: string | null;
999
+ /** PSP-specific error message. */
1000
+ errorMessage?: string | null;
1001
+ }
970
1002
  /** Submit event request */
971
1003
  interface SubmitEventRequest {
972
1004
  /** Event data. */
@@ -995,6 +1027,7 @@ interface SubmitEventSignature {
995
1027
 
996
1028
  declare const submitEvent: MaybeContext<BuildRESTFunction<typeof submitEvent$1> & typeof submitEvent$1>;
997
1029
 
1030
+ type context$2_CaptureEvent = CaptureEvent;
998
1031
  type context$2_CardDetails = CardDetails;
999
1032
  type context$2_CardReference = CardReference;
1000
1033
  type context$2_CredentialsOnFile = CredentialsOnFile;
@@ -1006,9 +1039,10 @@ type context$2_RefundEvent = RefundEvent;
1006
1039
  type context$2_SubmitEventRequest = SubmitEventRequest;
1007
1040
  type context$2_SubmitEventResponse = SubmitEventResponse;
1008
1041
  type context$2_TransactionEvent = TransactionEvent;
1042
+ type context$2_VoidEvent = VoidEvent;
1009
1043
  declare const context$2_submitEvent: typeof submitEvent;
1010
1044
  declare namespace context$2 {
1011
- export { type context$2_CardDetails as CardDetails, type context$2_CardReference as CardReference, type context$2_CredentialsOnFile as CredentialsOnFile, type context$2_CredentialsOnFileInfoOneOf as CredentialsOnFileInfoOneOf, type context$2_PaymentMethodReference as PaymentMethodReference, type context$2_ProviderPlatformEvent as ProviderPlatformEvent, type context$2_ProviderPlatformEventResourceOneOf as ProviderPlatformEventResourceOneOf, type context$2_RefundEvent as RefundEvent, type context$2_SubmitEventRequest as SubmitEventRequest, type context$2_SubmitEventResponse as SubmitEventResponse, type context$2_TransactionEvent as TransactionEvent, context$2_submitEvent as submitEvent };
1045
+ export { type context$2_CaptureEvent as CaptureEvent, type context$2_CardDetails as CardDetails, type context$2_CardReference as CardReference, type context$2_CredentialsOnFile as CredentialsOnFile, type context$2_CredentialsOnFileInfoOneOf as CredentialsOnFileInfoOneOf, type context$2_PaymentMethodReference as PaymentMethodReference, type context$2_ProviderPlatformEvent as ProviderPlatformEvent, type context$2_ProviderPlatformEventResourceOneOf as ProviderPlatformEventResourceOneOf, type context$2_RefundEvent as RefundEvent, type context$2_SubmitEventRequest as SubmitEventRequest, type context$2_SubmitEventResponse as SubmitEventResponse, type context$2_TransactionEvent as TransactionEvent, type context$2_VoidEvent as VoidEvent, context$2_submitEvent as submitEvent };
1012
1046
  }
1013
1047
 
1014
1048
  /**
@@ -1145,44 +1179,6 @@ interface StatusInfo {
1145
1179
  /** Free-text description. */
1146
1180
  description?: string | null;
1147
1181
  }
1148
- interface SyncRefundRequest {
1149
- /** Refund ID. */
1150
- refundId?: string | null;
1151
- /** ID of the refund on the PSP side. */
1152
- providerRefundId?: string | null;
1153
- /** ID of charge for which the funds are returned by this refund. */
1154
- chargeId?: string | null;
1155
- /**
1156
- * Status of the refund.
1157
- * Read more about statuses in this [article](<https://dev.wix.com/docs/rest/business-management/payments/refunds/introduction#lifecycle-of-a-refund>).
1158
- */
1159
- status?: Status;
1160
- /**
1161
- * Status code.
1162
- * [Read more about reason codes.](https://dev.wix.com/docs/rest/api-reference/payment-provider-spi/reason-codes)
1163
- */
1164
- statusCode?: string | null;
1165
- /** Currency of refund, should be the same as currency of charge. */
1166
- currency?: string | null;
1167
- /**
1168
- * Amount of refund in base units, what's returned to the buyer.
1169
- * E.g. "12.95".
1170
- */
1171
- amount?: string | null;
1172
- /**
1173
- * Application fee returned to merchant from Wix.
1174
- * Having this as a separate field since Refund.returned_application_fee is readOnly.
1175
- */
1176
- returnedApplicationFee?: string | null;
1177
- /** Reason why this refund was issued. */
1178
- reason?: string | null;
1179
- /** Optional free-text note about this refund. */
1180
- note?: string | null;
1181
- }
1182
- interface SyncRefundResponse {
1183
- /** Created/updated refund. */
1184
- refund?: Refund;
1185
- }
1186
1182
  interface CreateRefundRequest {
1187
1183
  /** Refund to be created. */
1188
1184
  refund: Refund;
@@ -1495,6 +1491,44 @@ declare enum WebhookIdentityType$1 {
1495
1491
  WIX_USER = "WIX_USER",
1496
1492
  APP = "APP"
1497
1493
  }
1494
+ interface SyncRefundRequest {
1495
+ /** Refund ID. */
1496
+ refundId?: string | null;
1497
+ /** ID of the refund on the PSP side. */
1498
+ providerRefundId?: string | null;
1499
+ /** ID of charge for which the funds are returned by this refund. */
1500
+ chargeId?: string | null;
1501
+ /**
1502
+ * Status of the refund.
1503
+ * Read more about statuses in this [article](<https://dev.wix.com/docs/rest/business-management/payments/refunds/introduction#lifecycle-of-a-refund>).
1504
+ */
1505
+ status?: Status;
1506
+ /**
1507
+ * Status code.
1508
+ * [Read more about reason codes.](https://dev.wix.com/docs/rest/api-reference/payment-provider-spi/reason-codes)
1509
+ */
1510
+ statusCode?: string | null;
1511
+ /** Currency of refund, should be the same as currency of charge. */
1512
+ currency?: string | null;
1513
+ /**
1514
+ * Amount of refund in base units, what's returned to the buyer.
1515
+ * E.g. "12.95".
1516
+ */
1517
+ amount?: string | null;
1518
+ /**
1519
+ * Application fee returned to merchant from Wix.
1520
+ * Having this as a separate field since Refund.returned_application_fee is readOnly.
1521
+ */
1522
+ returnedApplicationFee?: string | null;
1523
+ /** Reason why this refund was issued. */
1524
+ reason?: string | null;
1525
+ /** Optional free-text note about this refund. */
1526
+ note?: string | null;
1527
+ }
1528
+ interface SyncRefundResponse {
1529
+ /** Created/updated refund. */
1530
+ refund?: Refund;
1531
+ }
1498
1532
  interface StatusInfoNonNullableFields {
1499
1533
  code: string;
1500
1534
  }
@@ -1881,20 +1915,6 @@ interface ExtendedFields {
1881
1915
  */
1882
1916
  namespaces?: Record<string, Record<string, any>>;
1883
1917
  }
1884
- interface FindSavedCreditCardRequest {
1885
- /** temporary card token */
1886
- temporaryCardToken?: string;
1887
- /** site member id */
1888
- siteMemberId?: string;
1889
- /** expiration month */
1890
- expirationMonth?: number;
1891
- /** expiration year */
1892
- expirationYear?: number;
1893
- }
1894
- interface FindSavedCreditCardResponse {
1895
- /** saved payment method id */
1896
- savedPaymentMethodId?: string | null;
1897
- }
1898
1918
  interface UpsertSavedPaymentMethodRequest {
1899
1919
  /** Saved payment method. */
1900
1920
  savedPaymentMethod: SavedPaymentMethod;
@@ -2115,6 +2135,20 @@ declare enum WebhookIdentityType {
2115
2135
  WIX_USER = "WIX_USER",
2116
2136
  APP = "APP"
2117
2137
  }
2138
+ interface FindSavedCreditCardRequest {
2139
+ /** temporary card token */
2140
+ temporaryCardToken?: string;
2141
+ /** site member id */
2142
+ siteMemberId?: string;
2143
+ /** expiration month */
2144
+ expirationMonth?: number;
2145
+ /** expiration year */
2146
+ expirationYear?: number;
2147
+ }
2148
+ interface FindSavedCreditCardResponse {
2149
+ /** saved payment method id */
2150
+ savedPaymentMethodId?: string | null;
2151
+ }
2118
2152
  interface CardInfoNonNullableFields {
2119
2153
  brand: CardBrand;
2120
2154
  }
@@ -2189,11 +2223,11 @@ interface SavedPaymentMethodCreatedEnvelope {
2189
2223
  entity: SavedPaymentMethod;
2190
2224
  metadata: EventMetadata;
2191
2225
  }
2192
- interface SavedPaymentMethodUpdatedEnvelope {
2193
- entity: SavedPaymentMethod;
2226
+ interface SavedPaymentMethodDeletedEnvelope {
2194
2227
  metadata: EventMetadata;
2195
2228
  }
2196
- interface SavedPaymentMethodDeletedEnvelope {
2229
+ interface SavedPaymentMethodUpdatedEnvelope {
2230
+ entity: SavedPaymentMethod;
2197
2231
  metadata: EventMetadata;
2198
2232
  }
2199
2233
  interface UpsertSavedPaymentMethodOptions {
@@ -2334,8 +2368,8 @@ interface MarkSavedPaymentMethodPrimarySignature {
2334
2368
  (savedPaymentMethodId: string): Promise<void>;
2335
2369
  }
2336
2370
  declare const onSavedPaymentMethodCreated$1: EventDefinition<SavedPaymentMethodCreatedEnvelope, "wix.payments.saved_payment_methods.v1.saved_payment_method_created">;
2337
- declare const onSavedPaymentMethodUpdated$1: EventDefinition<SavedPaymentMethodUpdatedEnvelope, "wix.payments.saved_payment_methods.v1.saved_payment_method_updated">;
2338
2371
  declare const onSavedPaymentMethodDeleted$1: EventDefinition<SavedPaymentMethodDeletedEnvelope, "wix.payments.saved_payment_methods.v1.saved_payment_method_deleted">;
2372
+ declare const onSavedPaymentMethodUpdated$1: EventDefinition<SavedPaymentMethodUpdatedEnvelope, "wix.payments.saved_payment_methods.v1.saved_payment_method_updated">;
2339
2373
 
2340
2374
  declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
2341
2375
 
@@ -2350,14 +2384,14 @@ type _publicOnSavedPaymentMethodCreatedType = typeof onSavedPaymentMethodCreated
2350
2384
  /** */
2351
2385
  declare const onSavedPaymentMethodCreated: ReturnType<typeof createEventModule<_publicOnSavedPaymentMethodCreatedType>>;
2352
2386
 
2353
- type _publicOnSavedPaymentMethodUpdatedType = typeof onSavedPaymentMethodUpdated$1;
2354
- /** */
2355
- declare const onSavedPaymentMethodUpdated: ReturnType<typeof createEventModule<_publicOnSavedPaymentMethodUpdatedType>>;
2356
-
2357
2387
  type _publicOnSavedPaymentMethodDeletedType = typeof onSavedPaymentMethodDeleted$1;
2358
2388
  /** */
2359
2389
  declare const onSavedPaymentMethodDeleted: ReturnType<typeof createEventModule<_publicOnSavedPaymentMethodDeletedType>>;
2360
2390
 
2391
+ type _publicOnSavedPaymentMethodUpdatedType = typeof onSavedPaymentMethodUpdated$1;
2392
+ /** */
2393
+ declare const onSavedPaymentMethodUpdated: ReturnType<typeof createEventModule<_publicOnSavedPaymentMethodUpdatedType>>;
2394
+
2361
2395
  type context_ActionEvent = ActionEvent;
2362
2396
  type context_BaseEventMetadata = BaseEventMetadata;
2363
2397
  type context_CardBrand = CardBrand;
@@ -893,6 +893,10 @@ interface ProviderPlatformEvent extends ProviderPlatformEventResourceOneOf {
893
893
  refund?: RefundEvent;
894
894
  /** Transaction event data. */
895
895
  transaction?: TransactionEvent;
896
+ /** Capture event data */
897
+ capture?: CaptureEvent;
898
+ /** Void event data */
899
+ void?: VoidEvent;
896
900
  /**
897
901
  * This field is ignored, do not send it.
898
902
  * @deprecated
@@ -905,6 +909,10 @@ interface ProviderPlatformEventResourceOneOf {
905
909
  refund?: RefundEvent;
906
910
  /** Transaction event data. */
907
911
  transaction?: TransactionEvent;
912
+ /** Capture event data */
913
+ capture?: CaptureEvent;
914
+ /** Void event data */
915
+ void?: VoidEvent;
908
916
  }
909
917
  interface RefundEvent {
910
918
  /** Wix transaction ID. */
@@ -967,6 +975,30 @@ interface CardDetails {
967
975
  /** Last 4 digits of the card's number. */
968
976
  lastFour?: string | null;
969
977
  }
978
+ interface CaptureEvent {
979
+ /** Wix transaction ID. */
980
+ wixTransactionId?: string;
981
+ /** Wix [reason code](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/reason-codes#capture-declined) indicating request's status. */
982
+ reasonCode?: number;
983
+ /** Capture amount. */
984
+ amount?: string;
985
+ /** PSP-specific error code. */
986
+ errorCode?: string | null;
987
+ /** PSP-specific error message. */
988
+ errorMessage?: string | null;
989
+ }
990
+ interface VoidEvent {
991
+ /** Wix transaction ID. */
992
+ wixTransactionId?: string;
993
+ /** PSP void ID. */
994
+ reasonCode?: number;
995
+ /** Voided amount. */
996
+ amount?: string;
997
+ /** PSP-specific error code. */
998
+ errorCode?: string | null;
999
+ /** PSP-specific error message. */
1000
+ errorMessage?: string | null;
1001
+ }
970
1002
  /** Submit event request */
971
1003
  interface SubmitEventRequest {
972
1004
  /** Event data. */
@@ -995,6 +1027,7 @@ interface SubmitEventSignature {
995
1027
 
996
1028
  declare const submitEvent: MaybeContext<BuildRESTFunction<typeof submitEvent$1> & typeof submitEvent$1>;
997
1029
 
1030
+ type index_d$2_CaptureEvent = CaptureEvent;
998
1031
  type index_d$2_CardDetails = CardDetails;
999
1032
  type index_d$2_CardReference = CardReference;
1000
1033
  type index_d$2_CredentialsOnFile = CredentialsOnFile;
@@ -1006,9 +1039,10 @@ type index_d$2_RefundEvent = RefundEvent;
1006
1039
  type index_d$2_SubmitEventRequest = SubmitEventRequest;
1007
1040
  type index_d$2_SubmitEventResponse = SubmitEventResponse;
1008
1041
  type index_d$2_TransactionEvent = TransactionEvent;
1042
+ type index_d$2_VoidEvent = VoidEvent;
1009
1043
  declare const index_d$2_submitEvent: typeof submitEvent;
1010
1044
  declare namespace index_d$2 {
1011
- export { type index_d$2_CardDetails as CardDetails, type index_d$2_CardReference as CardReference, type index_d$2_CredentialsOnFile as CredentialsOnFile, type index_d$2_CredentialsOnFileInfoOneOf as CredentialsOnFileInfoOneOf, type index_d$2_PaymentMethodReference as PaymentMethodReference, type index_d$2_ProviderPlatformEvent as ProviderPlatformEvent, type index_d$2_ProviderPlatformEventResourceOneOf as ProviderPlatformEventResourceOneOf, type index_d$2_RefundEvent as RefundEvent, type index_d$2_SubmitEventRequest as SubmitEventRequest, type index_d$2_SubmitEventResponse as SubmitEventResponse, type index_d$2_TransactionEvent as TransactionEvent, index_d$2_submitEvent as submitEvent };
1045
+ export { type index_d$2_CaptureEvent as CaptureEvent, type index_d$2_CardDetails as CardDetails, type index_d$2_CardReference as CardReference, type index_d$2_CredentialsOnFile as CredentialsOnFile, type index_d$2_CredentialsOnFileInfoOneOf as CredentialsOnFileInfoOneOf, type index_d$2_PaymentMethodReference as PaymentMethodReference, type index_d$2_ProviderPlatformEvent as ProviderPlatformEvent, type index_d$2_ProviderPlatformEventResourceOneOf as ProviderPlatformEventResourceOneOf, type index_d$2_RefundEvent as RefundEvent, type index_d$2_SubmitEventRequest as SubmitEventRequest, type index_d$2_SubmitEventResponse as SubmitEventResponse, type index_d$2_TransactionEvent as TransactionEvent, type index_d$2_VoidEvent as VoidEvent, index_d$2_submitEvent as submitEvent };
1012
1046
  }
1013
1047
 
1014
1048
  /**
@@ -1145,44 +1179,6 @@ interface StatusInfo {
1145
1179
  /** Free-text description. */
1146
1180
  description?: string | null;
1147
1181
  }
1148
- interface SyncRefundRequest {
1149
- /** Refund ID. */
1150
- refundId?: string | null;
1151
- /** ID of the refund on the PSP side. */
1152
- providerRefundId?: string | null;
1153
- /** ID of charge for which the funds are returned by this refund. */
1154
- chargeId?: string | null;
1155
- /**
1156
- * Status of the refund.
1157
- * Read more about statuses in this [article](<https://dev.wix.com/docs/rest/business-management/payments/refunds/introduction#lifecycle-of-a-refund>).
1158
- */
1159
- status?: Status;
1160
- /**
1161
- * Status code.
1162
- * [Read more about reason codes.](https://dev.wix.com/docs/rest/api-reference/payment-provider-spi/reason-codes)
1163
- */
1164
- statusCode?: string | null;
1165
- /** Currency of refund, should be the same as currency of charge. */
1166
- currency?: string | null;
1167
- /**
1168
- * Amount of refund in base units, what's returned to the buyer.
1169
- * E.g. "12.95".
1170
- */
1171
- amount?: string | null;
1172
- /**
1173
- * Application fee returned to merchant from Wix.
1174
- * Having this as a separate field since Refund.returned_application_fee is readOnly.
1175
- */
1176
- returnedApplicationFee?: string | null;
1177
- /** Reason why this refund was issued. */
1178
- reason?: string | null;
1179
- /** Optional free-text note about this refund. */
1180
- note?: string | null;
1181
- }
1182
- interface SyncRefundResponse {
1183
- /** Created/updated refund. */
1184
- refund?: Refund;
1185
- }
1186
1182
  interface CreateRefundRequest {
1187
1183
  /** Refund to be created. */
1188
1184
  refund: Refund;
@@ -1495,6 +1491,44 @@ declare enum WebhookIdentityType$1 {
1495
1491
  WIX_USER = "WIX_USER",
1496
1492
  APP = "APP"
1497
1493
  }
1494
+ interface SyncRefundRequest {
1495
+ /** Refund ID. */
1496
+ refundId?: string | null;
1497
+ /** ID of the refund on the PSP side. */
1498
+ providerRefundId?: string | null;
1499
+ /** ID of charge for which the funds are returned by this refund. */
1500
+ chargeId?: string | null;
1501
+ /**
1502
+ * Status of the refund.
1503
+ * Read more about statuses in this [article](<https://dev.wix.com/docs/rest/business-management/payments/refunds/introduction#lifecycle-of-a-refund>).
1504
+ */
1505
+ status?: Status;
1506
+ /**
1507
+ * Status code.
1508
+ * [Read more about reason codes.](https://dev.wix.com/docs/rest/api-reference/payment-provider-spi/reason-codes)
1509
+ */
1510
+ statusCode?: string | null;
1511
+ /** Currency of refund, should be the same as currency of charge. */
1512
+ currency?: string | null;
1513
+ /**
1514
+ * Amount of refund in base units, what's returned to the buyer.
1515
+ * E.g. "12.95".
1516
+ */
1517
+ amount?: string | null;
1518
+ /**
1519
+ * Application fee returned to merchant from Wix.
1520
+ * Having this as a separate field since Refund.returned_application_fee is readOnly.
1521
+ */
1522
+ returnedApplicationFee?: string | null;
1523
+ /** Reason why this refund was issued. */
1524
+ reason?: string | null;
1525
+ /** Optional free-text note about this refund. */
1526
+ note?: string | null;
1527
+ }
1528
+ interface SyncRefundResponse {
1529
+ /** Created/updated refund. */
1530
+ refund?: Refund;
1531
+ }
1498
1532
  interface StatusInfoNonNullableFields {
1499
1533
  code: string;
1500
1534
  }
@@ -1881,20 +1915,6 @@ interface ExtendedFields {
1881
1915
  */
1882
1916
  namespaces?: Record<string, Record<string, any>>;
1883
1917
  }
1884
- interface FindSavedCreditCardRequest {
1885
- /** temporary card token */
1886
- temporaryCardToken?: string;
1887
- /** site member id */
1888
- siteMemberId?: string;
1889
- /** expiration month */
1890
- expirationMonth?: number;
1891
- /** expiration year */
1892
- expirationYear?: number;
1893
- }
1894
- interface FindSavedCreditCardResponse {
1895
- /** saved payment method id */
1896
- savedPaymentMethodId?: string | null;
1897
- }
1898
1918
  interface UpsertSavedPaymentMethodRequest {
1899
1919
  /** Saved payment method. */
1900
1920
  savedPaymentMethod: SavedPaymentMethod;
@@ -2115,6 +2135,20 @@ declare enum WebhookIdentityType {
2115
2135
  WIX_USER = "WIX_USER",
2116
2136
  APP = "APP"
2117
2137
  }
2138
+ interface FindSavedCreditCardRequest {
2139
+ /** temporary card token */
2140
+ temporaryCardToken?: string;
2141
+ /** site member id */
2142
+ siteMemberId?: string;
2143
+ /** expiration month */
2144
+ expirationMonth?: number;
2145
+ /** expiration year */
2146
+ expirationYear?: number;
2147
+ }
2148
+ interface FindSavedCreditCardResponse {
2149
+ /** saved payment method id */
2150
+ savedPaymentMethodId?: string | null;
2151
+ }
2118
2152
  interface CardInfoNonNullableFields {
2119
2153
  brand: CardBrand;
2120
2154
  }
@@ -2189,11 +2223,11 @@ interface SavedPaymentMethodCreatedEnvelope {
2189
2223
  entity: SavedPaymentMethod;
2190
2224
  metadata: EventMetadata;
2191
2225
  }
2192
- interface SavedPaymentMethodUpdatedEnvelope {
2193
- entity: SavedPaymentMethod;
2226
+ interface SavedPaymentMethodDeletedEnvelope {
2194
2227
  metadata: EventMetadata;
2195
2228
  }
2196
- interface SavedPaymentMethodDeletedEnvelope {
2229
+ interface SavedPaymentMethodUpdatedEnvelope {
2230
+ entity: SavedPaymentMethod;
2197
2231
  metadata: EventMetadata;
2198
2232
  }
2199
2233
  interface UpsertSavedPaymentMethodOptions {
@@ -2334,8 +2368,8 @@ interface MarkSavedPaymentMethodPrimarySignature {
2334
2368
  (savedPaymentMethodId: string): Promise<void>;
2335
2369
  }
2336
2370
  declare const onSavedPaymentMethodCreated$1: EventDefinition<SavedPaymentMethodCreatedEnvelope, "wix.payments.saved_payment_methods.v1.saved_payment_method_created">;
2337
- declare const onSavedPaymentMethodUpdated$1: EventDefinition<SavedPaymentMethodUpdatedEnvelope, "wix.payments.saved_payment_methods.v1.saved_payment_method_updated">;
2338
2371
  declare const onSavedPaymentMethodDeleted$1: EventDefinition<SavedPaymentMethodDeletedEnvelope, "wix.payments.saved_payment_methods.v1.saved_payment_method_deleted">;
2372
+ declare const onSavedPaymentMethodUpdated$1: EventDefinition<SavedPaymentMethodUpdatedEnvelope, "wix.payments.saved_payment_methods.v1.saved_payment_method_updated">;
2339
2373
 
2340
2374
  declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
2341
2375
 
@@ -2350,14 +2384,14 @@ type _publicOnSavedPaymentMethodCreatedType = typeof onSavedPaymentMethodCreated
2350
2384
  /** */
2351
2385
  declare const onSavedPaymentMethodCreated: ReturnType<typeof createEventModule<_publicOnSavedPaymentMethodCreatedType>>;
2352
2386
 
2353
- type _publicOnSavedPaymentMethodUpdatedType = typeof onSavedPaymentMethodUpdated$1;
2354
- /** */
2355
- declare const onSavedPaymentMethodUpdated: ReturnType<typeof createEventModule<_publicOnSavedPaymentMethodUpdatedType>>;
2356
-
2357
2387
  type _publicOnSavedPaymentMethodDeletedType = typeof onSavedPaymentMethodDeleted$1;
2358
2388
  /** */
2359
2389
  declare const onSavedPaymentMethodDeleted: ReturnType<typeof createEventModule<_publicOnSavedPaymentMethodDeletedType>>;
2360
2390
 
2391
+ type _publicOnSavedPaymentMethodUpdatedType = typeof onSavedPaymentMethodUpdated$1;
2392
+ /** */
2393
+ declare const onSavedPaymentMethodUpdated: ReturnType<typeof createEventModule<_publicOnSavedPaymentMethodUpdatedType>>;
2394
+
2361
2395
  type index_d_ActionEvent = ActionEvent;
2362
2396
  type index_d_BaseEventMetadata = BaseEventMetadata;
2363
2397
  type index_d_CardBrand = CardBrand;
@@ -325,6 +325,10 @@ interface ProviderPlatformEvent$1 extends ProviderPlatformEventResourceOneOf$1 {
325
325
  refund?: RefundEvent$1;
326
326
  /** Transaction event data. */
327
327
  transaction?: TransactionEvent$1;
328
+ /** Capture event data */
329
+ capture?: CaptureEvent$1;
330
+ /** Void event data */
331
+ void?: VoidEvent$1;
328
332
  /**
329
333
  * This field is ignored, do not send it.
330
334
  * @deprecated
@@ -337,6 +341,10 @@ interface ProviderPlatformEventResourceOneOf$1 {
337
341
  refund?: RefundEvent$1;
338
342
  /** Transaction event data. */
339
343
  transaction?: TransactionEvent$1;
344
+ /** Capture event data */
345
+ capture?: CaptureEvent$1;
346
+ /** Void event data */
347
+ void?: VoidEvent$1;
340
348
  }
341
349
  interface RefundEvent$1 {
342
350
  /** Wix transaction ID. */
@@ -399,6 +407,30 @@ interface CardDetails$1 {
399
407
  /** Last 4 digits of the card's number. */
400
408
  lastFour?: string | null;
401
409
  }
410
+ interface CaptureEvent$1 {
411
+ /** Wix transaction ID. */
412
+ wixTransactionId?: string;
413
+ /** Wix [reason code](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/reason-codes#capture-declined) indicating request's status. */
414
+ reasonCode?: number;
415
+ /** Capture amount. */
416
+ amount?: string;
417
+ /** PSP-specific error code. */
418
+ errorCode?: string | null;
419
+ /** PSP-specific error message. */
420
+ errorMessage?: string | null;
421
+ }
422
+ interface VoidEvent$1 {
423
+ /** Wix transaction ID. */
424
+ wixTransactionId?: string;
425
+ /** PSP void ID. */
426
+ reasonCode?: number;
427
+ /** Voided amount. */
428
+ amount?: string;
429
+ /** PSP-specific error code. */
430
+ errorCode?: string | null;
431
+ /** PSP-specific error message. */
432
+ errorMessage?: string | null;
433
+ }
402
434
  /** Submit event request */
403
435
  interface SubmitEventRequest$1 {
404
436
  /** Event data. */
@@ -414,6 +446,10 @@ interface ProviderPlatformEvent extends ProviderPlatformEventResourceOneOf {
414
446
  refund?: RefundEvent;
415
447
  /** Transaction event data. */
416
448
  transaction?: TransactionEvent;
449
+ /** Capture event data */
450
+ capture?: CaptureEvent;
451
+ /** Void event data */
452
+ void?: VoidEvent;
417
453
  /**
418
454
  * This field is ignored, do not send it.
419
455
  * @deprecated
@@ -426,6 +462,10 @@ interface ProviderPlatformEventResourceOneOf {
426
462
  refund?: RefundEvent;
427
463
  /** Transaction event data. */
428
464
  transaction?: TransactionEvent;
465
+ /** Capture event data */
466
+ capture?: CaptureEvent;
467
+ /** Void event data */
468
+ void?: VoidEvent;
429
469
  }
430
470
  interface RefundEvent {
431
471
  /** Wix transaction ID. */
@@ -488,6 +528,30 @@ interface CardDetails {
488
528
  /** Last 4 digits of the card's number. */
489
529
  lastFour?: string | null;
490
530
  }
531
+ interface CaptureEvent {
532
+ /** Wix transaction ID. */
533
+ wixTransactionId?: string;
534
+ /** Wix [reason code](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/reason-codes#capture-declined) indicating request's status. */
535
+ reasonCode?: number;
536
+ /** Capture amount. */
537
+ amount?: string;
538
+ /** PSP-specific error code. */
539
+ errorCode?: string | null;
540
+ /** PSP-specific error message. */
541
+ errorMessage?: string | null;
542
+ }
543
+ interface VoidEvent {
544
+ /** Wix transaction ID. */
545
+ wixTransactionId?: string;
546
+ /** PSP void ID. */
547
+ reasonCode?: number;
548
+ /** Voided amount. */
549
+ amount?: string;
550
+ /** PSP-specific error code. */
551
+ errorCode?: string | null;
552
+ /** PSP-specific error message. */
553
+ errorMessage?: string | null;
554
+ }
491
555
  /** Submit event request */
492
556
  interface SubmitEventRequest {
493
557
  /** Event data. */