import { ListPayoutsRequest as ListPayoutsRequest$1, ListPayoutsResponse as ListPayoutsResponse$1, GetPayoutRequest as GetPayoutRequest$1, GetPayoutResponse as GetPayoutResponse$1 } from './index.typings.mjs'; import '@wix/sdk-types'; /** * A payout is an outgoing transfer of funds from a Wix Payments account to the * merchant's bank account. Each payout has an amount, a lifecycle status, an * estimated arrival date, and (when applicable) a failure reason. */ interface Payout { /** * Payout ID. * @format GUID */ id?: string; /** * ID of the Wix Payments account that owns the payout. Retrieve account IDs * from the Accounts API. * @format GUID */ accountId?: string; /** * ID of the Wix Payments account profile that owns the payout. * * A Wix Payments account has 1 or more profiles. Each profile has its own * balance and its own payouts. Most merchants have 1 profile. Retrieve * profile IDs from the Accounts API. * @format GUID */ accountProfileId?: string; /** * Date and time the payout was created. * * The payout is created before the underlying transfer is initiated at the * bank. Once initiated, the funds typically reach the merchant's bank account * within 3 to 5 business days, depending on the receiving bank. */ createdDate?: Date | null; /** Amount of the transfer to the merchant's bank account. */ amount?: Money; /** * Lifecycle status of the payout. * * `SENT` means the bank rail accepted the transfer for delivery. `FAILED` means * the receiving bank rejected the transfer. * * A `SENT` status doesn't guarantee that the funds were delivered to the * merchant. The bank rail doesn't provide a delivery acknowledgement, and a * payout in `SENT` can later transition to `FAILED` if the receiving bank * rejects the transfer. See the per-value documentation on `PayoutStatus` for * details. */ status?: PayoutStatusWithLiterals; /** * Estimated date for when the funds should arrive at the merchant's bank * account, in `YYYY-MM-DD` format. * * The estimated arrival date is a prediction, not a guarantee. Actual arrival * depends on the receiving bank's processing and may be later. * @format LOCAL_DATE */ estimatedArrivalDateV2?: string | null; /** * Reason the bank rail rejected the transfer. * * Returned only when `status` is `FAILED`. */ failureReason?: PayoutFailureReason; /** * Reference returned by the bank rail once the transfer is initiated. For * example, an ACH trace number or a SEPA reference. Use this value to * reconcile against the merchant's bank statement. * * Empty until the bank rail returns a reference. * @maxLength 500 */ bankTransferReference?: string | null; /** * Whether the payout `amount` includes funds from a Wix Capital cash advance * taken out by the merchant. If `false`, the amount comes only from the * merchant's sales proceeds. */ cashAdvanceIncluded?: boolean; } /** * Money. * Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003. */ interface Money { /** * Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, a single (-), to indicate that the amount is negative. * @format DECIMAL_VALUE */ value?: string; /** * Currency code. Must be valid ISO 4217 currency code (e.g., USD). * @format CURRENCY */ currency?: string; /** Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative. */ formattedValue?: string | null; } /** Lifecycle status of a payout. */ declare enum PayoutStatus { /** Unknown payout status. Not returned by the API. */ UNKNOWN = "UNKNOWN", /** * The bank rail accepted the transfer. Funds are en route to the merchant's * bank account. * * Acceptance isn't the same as delivery. A `SENT` payout can still * transition to `FAILED` if the receiving bank rejects the transfer. The * bank rail's return window is up to 60 days for ACH and up to 13 months * for SEPA. */ SENT = "SENT", /** * The bank rail rejected the transfer. See `failureReason` for the cause. * The funds remain in the merchant's Wix Payments balance. */ FAILED = "FAILED" } /** @enumType */ type PayoutStatusWithLiterals = PayoutStatus | 'UNKNOWN' | 'SENT' | 'FAILED'; /** Reason a payout failed. */ interface PayoutFailureReason { /** Why the bank rail rejected the transfer. */ code?: PayoutFailureCodeWithLiterals; } /** * Possible reasons for a payout failure. Each value describes a real-world * bank-rail condition. */ declare enum PayoutFailureCode { /** * Generic failure with no more specific reason available from the bank * rail. This value is also returned when no failure reason is known. * Clients can't distinguish "unknown" from "generic" using this code alone. */ GENERIC_PAYOUT_FAILURE = "GENERIC_PAYOUT_FAILURE", /** * The merchant's bank account is closed. The merchant must provide new * bank account details before further payouts can succeed. */ ACCOUNT_CLOSED = "ACCOUNT_CLOSED", /** * The merchant's bank account is frozen, for example due to a hold placed * by the bank. The merchant must resolve the hold with their bank before * further payouts can succeed. */ ACCOUNT_FROZEN = "ACCOUNT_FROZEN", /** * The merchant's bank account is restricted from receiving the transfer. * For example, the account type or status doesn't permit incoming credits. */ BANK_ACCOUNT_RESTRICTED = "BANK_ACCOUNT_RESTRICTED", /** * Ownership of the merchant's bank account changed and the rail no longer * recognises the previously-recorded owner. New bank details are required. */ BANK_OWNERSHIP_CHANGED = "BANK_OWNERSHIP_CHANGED", /** * The receiving bank couldn't process the transfer for an unspecified * reason. A subsequent payout attempt may succeed. */ COULD_NOT_PROCESS = "COULD_NOT_PROCESS", /** * The merchant's bank declined the debit authorisation associated with the * transfer. The merchant must contact their bank to authorise Wix Payments * payouts. */ DEBIT_NOT_AUTHORIZED = "DEBIT_NOT_AUTHORIZED", /** * The account holder name on file doesn't match the name the receiving * bank has on record. The merchant must correct the account holder name. */ INCORRECT_ACCOUNT_HOLDER_NAME = "INCORRECT_ACCOUNT_HOLDER_NAME", /** The city in the bank account details is invalid for the receiving bank. */ INVALID_ACCOUNT_DETAILS_CITY = "INVALID_ACCOUNT_DETAILS_CITY", /** * The bank account number is invalid. The format is wrong or the account * doesn't exist. */ INVALID_ACCOUNT_NUMBER = "INVALID_ACCOUNT_NUMBER", /** The payout currency isn't supported by the receiving bank account. */ INVALID_CURRENCY = "INVALID_CURRENCY", /** The routing number (US) is invalid or doesn't match the receiving bank. */ INVALID_ROUTING_NUMBER = "INVALID_ROUTING_NUMBER", /** The sort code (UK) is invalid or doesn't match the receiving bank. */ INVALID_SORT_CODE = "INVALID_SORT_CODE", /** * No bank account is on file for the merchant. The merchant must add bank * details before payouts can succeed. */ NO_ACCOUNT = "NO_ACCOUNT", /** * A technical error at the bank rail prevented the transfer. A subsequent * payout attempt may succeed. */ TECHNICAL_ERROR = "TECHNICAL_ERROR" } /** @enumType */ type PayoutFailureCodeWithLiterals = PayoutFailureCode | 'GENERIC_PAYOUT_FAILURE' | 'ACCOUNT_CLOSED' | 'ACCOUNT_FROZEN' | 'BANK_ACCOUNT_RESTRICTED' | 'BANK_OWNERSHIP_CHANGED' | 'COULD_NOT_PROCESS' | 'DEBIT_NOT_AUTHORIZED' | 'INCORRECT_ACCOUNT_HOLDER_NAME' | 'INVALID_ACCOUNT_DETAILS_CITY' | 'INVALID_ACCOUNT_NUMBER' | 'INVALID_CURRENCY' | 'INVALID_ROUTING_NUMBER' | 'INVALID_SORT_CODE' | 'NO_ACCOUNT' | 'TECHNICAL_ERROR'; interface ListPayoutsRequest { /** * ID of the Wix Payments account whose payouts to list. Retrieve account * IDs from the Accounts API. * @format GUID */ accountId: string; /** * ID of the Wix Payments account profile to filter by. * * When omitted, payouts across all profiles of the account are returned. * Retrieve profile IDs from the Accounts API. * @format GUID */ accountProfileId?: string | null; /** * Returns only payouts created before this date and time. The date and time * itself is excluded. */ createdBefore?: Date | null; /** * Returns only payouts created on or after this date and time. The date and * time itself is included. */ createdAfter?: Date | null; /** * Sort order for the result list. * * Supported `fieldName` values: `created_date` (snake_case, not auto-converted). At most 1 sort field is allowed. */ sort?: Sorting; /** * Offset-based paging. `limit` supports values from `1` to `20`. * * Default: `limit` is `20`, `offset` is `0`. */ paging?: Paging; } interface Sorting { /** * Name of the field to sort by. * @maxLength 512 */ fieldName?: string; /** Sort order. */ order?: SortOrderWithLiterals; /** * Origin point for geo-distance sorting on a GEO field * results are ordered by distance from this point (ASC = nearest first, DESC = farthest first). */ origin?: AddressLocation; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface AddressLocation { /** Address latitude. */ latitude?: number | null; /** Address longitude. */ longitude?: number | null; } interface Paging { /** Number of items to load. */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } interface ListPayoutsResponse { /** List of retrieved payouts. */ payouts?: Payout[]; /** Paging metadata. */ metadata?: PagingMetadata; } interface PagingMetadata { /** Number of items returned in the response. */ count?: number | null; /** Offset that was requested. */ offset?: number | null; /** Total number of items that match the query. */ total?: number | null; /** Flag that indicates the server failed to calculate the `total` field. */ tooManyToCount?: boolean | null; } interface CreatePayoutRequest { /** Payout to create. */ payout?: Payout; } interface CreatePayoutResponse { /** Created payout. */ payout?: Payout; } interface GetPayoutRequest { /** * ID of the Wix Payments account that owns the payout. The payout must * belong to this account. Retrieve account IDs from the Accounts API. * @format GUID */ accountId: string; /** * ID of the payout to retrieve. * @format GUID */ payoutId: string; } interface GetPayoutResponse { /** Retrieved payout. */ payout?: Payout; } interface ListPayoutGroupsRequest { /** * ID of the Wix Payments account whose payout groups to list. Retrieve * account IDs from the Accounts API. * @format GUID */ accountId?: string; /** * Optional filter by payout date. Use it to return payouts before specific date. * @format LOCAL_DATE */ payoutDateBefore?: string | null; /** * Optional filter by payout date. Use it to return payouts after specific date. * @format LOCAL_DATE */ payoutDateAfter?: string | null; /** Optional sorting. Supported fields: "payout_date". */ sort?: Sorting; /** Optional paging. */ paging?: Paging; } interface ListPayoutGroupsResponse { /** List of payout groups. */ groups?: PayoutGroup[]; /** Paging metadata. */ metadata?: PagingMetadata; } /** Payout group */ interface PayoutGroup { /** * Payout date. * @format LOCAL_DATE */ payoutDate?: string; /** * Payout number within the same date, is absent if there's only one group * @min 1 * @max 99 */ payoutNumber?: number | null; /** Payout group amount */ amount?: Money; /** * Payouts associated with the group * @maxSize 10 */ payouts?: Payout[]; } interface GetPayoutGroupRequest { /** * ID of the Wix Payments account that owns the payout group. Retrieve * account IDs from the Accounts API. * @format GUID */ accountId?: string; /** * Payout date. * @format LOCAL_DATE */ payoutDate?: string; /** * Optional payout number within the same date * @min 1 * @max 99 */ payoutNumber?: number | null; } interface GetPayoutGroupResponse { /** Payout group. */ group?: PayoutGroup; } interface GetPayoutGroupByPayoutIdRequest { /** * ID of the Wix Payments account that owns the payout. Retrieve account IDs * from the Accounts API. * @format GUID */ accountId?: string; /** * ID of the payout whose group to retrieve. * @format GUID */ payoutId?: string; } interface GetPayoutGroupByPayoutIdResponse { /** Payout group. */ group?: PayoutGroup; } interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * 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. * 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. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entityAsJson?: string; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo; } interface RestoreInfo { deletedDate?: Date | null; } interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntityAsJson?: string | null; } interface ActionEvent { bodyAsJson?: string; } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; /** Details related to the account */ accountInfo?: AccountInfo; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface AccountInfo { /** * ID of the Wix account associated with the event. * @format GUID */ accountId?: string | null; /** * ID of the parent Wix account. Only included when accountId belongs to a child account. * @format GUID */ parentAccountId?: string | null; /** * ID of the Wix site associated with the event. Only included when the event is tied to a specific site. * @format GUID */ siteId?: string | null; } type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function listPayouts(): __PublicMethodMetaInfo<'GET', {}, ListPayoutsRequest$1, ListPayoutsRequest, ListPayoutsResponse$1, ListPayoutsResponse>; declare function getPayout(): __PublicMethodMetaInfo<'GET', { payoutId: string; }, GetPayoutRequest$1, GetPayoutRequest, GetPayoutResponse$1, GetPayoutResponse>; export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, type AddressLocation as AddressLocationOriginal, type CreatePayoutRequest as CreatePayoutRequestOriginal, type CreatePayoutResponse as CreatePayoutResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type GetPayoutGroupByPayoutIdRequest as GetPayoutGroupByPayoutIdRequestOriginal, type GetPayoutGroupByPayoutIdResponse as GetPayoutGroupByPayoutIdResponseOriginal, type GetPayoutGroupRequest as GetPayoutGroupRequestOriginal, type GetPayoutGroupResponse as GetPayoutGroupResponseOriginal, type GetPayoutRequest as GetPayoutRequestOriginal, type GetPayoutResponse as GetPayoutResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type ListPayoutGroupsRequest as ListPayoutGroupsRequestOriginal, type ListPayoutGroupsResponse as ListPayoutGroupsResponseOriginal, type ListPayoutsRequest as ListPayoutsRequestOriginal, type ListPayoutsResponse as ListPayoutsResponseOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type Money as MoneyOriginal, type PagingMetadata as PagingMetadataOriginal, type Paging as PagingOriginal, PayoutFailureCode as PayoutFailureCodeOriginal, type PayoutFailureCodeWithLiterals as PayoutFailureCodeWithLiteralsOriginal, type PayoutFailureReason as PayoutFailureReasonOriginal, type PayoutGroup as PayoutGroupOriginal, type Payout as PayoutOriginal, PayoutStatus as PayoutStatusOriginal, type PayoutStatusWithLiterals as PayoutStatusWithLiteralsOriginal, type RestoreInfo as RestoreInfoOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, getPayout, listPayouts };