type RESTFunctionDescriptor any = (...args: any[]) => any> = (httpClient: HttpClient) => T; interface HttpClient { request(req: RequestOptionsFactory): Promise>; fetchWithAuth: typeof fetch; wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise; } type RequestOptionsFactory = (context: any) => RequestOptions; type HttpResponse = { data: T; status: number; statusText: string; headers: any; request?: any; }; type RequestOptions<_TResponse = any, Data = any> = { method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS'; url: string; data?: Data; params?: URLSearchParams; } & APIMetadata; type APIMetadata = { methodFqn?: string; entityFqdn?: string; packageName?: string; }; type BuildRESTFunction = T extends RESTFunctionDescriptor ? U : never; declare global { // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged. interface SymbolConstructor { readonly observable: symbol; } } /** Provider platform event */ interface ProviderPlatformEvent extends ProviderPlatformEventResourceOneOf { /** Refund event data. */ refund?: RefundEvent; /** Transaction event data. */ transaction?: TransactionEvent; /** * This field is ignored, do not send it. * @deprecated */ pluginId?: string; } /** @oneof */ interface ProviderPlatformEventResourceOneOf { /** Refund event data. */ refund?: RefundEvent; /** Transaction event data. */ transaction?: TransactionEvent; } 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; } interface CredentialsOnFile extends CredentialsOnFileInfoOneOf { /** Network token data. */ cardReference?: CardReference; /** Provider generated token data. */ paymentMethodReference?: PaymentMethodReference; } /** @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; } 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. */ bin?: string | null; /** Last 4 digits of the card's number. */ lastFour?: string | null; } /** Submit event request */ interface SubmitEventRequest { /** Event data. */ event: ProviderPlatformEvent; } /** Submit event response */ interface SubmitEventResponse { } declare function submitEvent$1(httpClient: HttpClient): SubmitEventSignature; interface SubmitEventSignature { /** * 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 data. * @returns Submit event response */ (event: ProviderPlatformEvent): Promise; } declare const submitEvent: BuildRESTFunction & typeof submitEvent$1; export { type CardDetails, type CardReference, type CredentialsOnFile, type CredentialsOnFileInfoOneOf, type PaymentMethodReference, type ProviderPlatformEvent, type ProviderPlatformEventResourceOneOf, type RefundEvent, type SubmitEventRequest, type SubmitEventResponse, type TransactionEvent, submitEvent };