/** Provider platform event */ interface ProviderPlatformEvent extends ProviderPlatformEventResourceOneOf { /** Refund event data. */ refund?: RefundEvent; /** Transaction event data. */ transaction?: TransactionEvent; /** Capture event data. */ capture?: CaptureEvent; /** Void event data. */ void?: VoidEvent; /** * This field is deprecated. * @deprecated */ pluginId?: string; /** * Wix site ID. * @format GUID */ siteId?: string | null; } /** @oneof */ interface ProviderPlatformEventResourceOneOf { /** Refund event data. */ refund?: RefundEvent; /** Transaction event data. */ transaction?: TransactionEvent; /** Capture event data. */ capture?: CaptureEvent; /** Void event data. */ void?: VoidEvent; } interface RefundEvent { /** Wix transaction ID. */ wixTransactionId?: string; /** PSP refund ID. */ pluginRefundId?: string; /** 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. */ reasonCode?: number; /** Refunded amount. */ amount?: string; /** Wix refund ID. This field is only required when a merchant initiates a refund from the Wix dashboard. */ wixRefundId?: string | null; /** PSP-specific error code. */ errorCode?: string | null; /** PSP-specific error message. */ errorMessage?: string | null; } interface TransactionEvent { /** Wix transaction ID. */ wixTransactionId?: string; /** PSP transaction ID. */ pluginTransactionId?: string; /** Wix [reason code](https://dev.wix.com/api/rest/all-apis/provider-platform/reason-codes) indicating a failed or pending request. */ reasonCode?: number; /** PSP-specific error code. */ errorCode?: string | null; /** PSP-specific error message. */ errorMessage?: string | null; /** Token data for stored payment method. */ credentialsOnFile?: CredentialsOnFile; /** Details of actual customer's card, obtained from a Funding PAN as opposed to a Device PAN. */ cardDetails?: CardDetails; /** * Total amount authorized in a currency's minor units. Required for partial authorization events. * Learn more about [currencies](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/currencies). */ authorizedAmount?: string | null; } interface CredentialsOnFile extends CredentialsOnFileInfoOneOf { /** Network token data. */ cardReference?: CardReference; /** Provider generated token data. */ paymentMethodReference?: PaymentMethodReference; /** * Payment method (for example `creditCard`) to use for future payments, when it differs from the current one. * @minLength 1 * @maxLength 100 */ paymentMethod?: string | null; } /** @oneof */ interface CredentialsOnFileInfoOneOf { /** Network token data. */ cardReference?: CardReference; /** Provider generated token data. */ paymentMethodReference?: PaymentMethodReference; } interface CardReference { /** Network token. */ networkTransactionId?: string; /** Directory Server transaction ID */ dsTransactionId?: string | null; /** * Transaction Link Identifier assigned by Mastercard. * @minLength 1 * @maxLength 22 */ transactionLinkId?: string | null; } interface PaymentMethodReference { /** Payment method token created by the PSP. */ token?: string; } interface CardDetails { /** * Issuer (business) identification number. First 6 or 8 digits of the card's number. * @minLength 6 * @maxLength 8 */ bin?: string | null; /** * Last 4 digits of the card's number. * @minLength 4 * @maxLength 4 */ lastFour?: string | null; } interface CaptureEvent { /** * Wix transaction ID. * @format GUID */ wixTransactionId?: string; /** Wix [reason code](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/reason-codes) indicating request's status. */ reasonCode?: number; /** * Total amount captured in a currency’s minor units. * Learn more about [currencies](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/currencies). */ amount?: string; /** * PSP-specific error code. * @maxLength 50 */ errorCode?: string | null; /** * PSP-specific error message. * @maxLength 300 */ errorMessage?: string | null; } interface VoidEvent { /** * Wix transaction ID. * @format GUID */ wixTransactionId?: string; /** Wix [reason code](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/reason-codes) indicating request's status. */ reasonCode?: number; /** * Total amount voided in a currency’s minor units. * Learn more about [currencies](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/currencies). */ amount?: string; /** * PSP-specific error code. * @maxLength 50 */ errorCode?: string | null; /** * PSP-specific error message. * @maxLength 300 */ errorMessage?: string | null; } /** Submit event request */ interface SubmitEventRequest { /** Event data. */ event: ProviderPlatformEvent; } /** Submit event response */ interface SubmitEventResponse { } /** * This Wix API is used by a Payment Service Provider (PSP) to send webhooks about payment and refund states to Wix. * * Calls to this endpoint must include a `User-Agent` header with the name of the PSP and the integration version in this format: `{PSP}/{version}`. * PSP's create their own version numbers. * * > You cannot try out this endpoint because an `Authorization` header value has to be obtained * > with the OAuth 2.0 client credentials flow for a specific scope. * > So please ignore the **Authorization** section below as well as the **Try It Out** button. * @param event - Event data. * @public * @requiredField event * @permissionId CASHIER.GET_ACCESS * @returns Submit event response * @fqn wix.payments.v1.provider_platform_events.ProviderPlatformEventsService.SubmitEvent */ declare function submitEvent(event: ProviderPlatformEvent): Promise; export { type CaptureEvent, type CardDetails, type CardReference, type CredentialsOnFile, type CredentialsOnFileInfoOneOf, type PaymentMethodReference, type ProviderPlatformEvent, type ProviderPlatformEventResourceOneOf, type RefundEvent, type SubmitEventRequest, type SubmitEventResponse, type TransactionEvent, type VoidEvent, submitEvent };