export interface SavedPaymentMethod { /** * Unique identifier of a saved payment method. * @readonly */ id?: string | null; /** * Represents the current state of a saved payment method. Each time saved payment method is modified, its `revision` changes. For an update operation to succeed, you MUST pass the latest revision. * @readonly */ revision?: string | null; /** * SavedPaymentMethod creation time. * @readonly */ createdDate?: Date | null; /** * SavedPaymentMethod last update time. * @readonly */ updatedDate?: Date | null; /** Saved payment method owner's member ID. */ siteMemberId?: string | null; /** * Defines whether this payment method is primary for the member. Member can only have at most one primary saved payment method. * @readonly */ primary?: boolean; /** Payment method details. */ paymentMethod?: PaymentMethod; /** * Defines whether this payment method can be used by the merchant for making unscheduled payments. * Even if it's set to `false` payment method still can be used for scheduled payments e.g. subscription renewal without the buyer being present. */ merchantUseAllowed?: boolean | null; /** * Saved payment method sensitive information. * @readonly */ sensitiveInfo?: SensitiveInfo; /** Data Extensions */ extendedFields?: ExtendedFields; } export interface CardInfo { /** * Credit card's last 4 digits. * @readonly */ lastFourDigits?: string | null; /** * Credit card's BIN (Bank Identification Number). It's first 4-6 digits of card's number. * @readonly */ bin?: string | null; /** Credit card's expiration month. */ expirationMonth?: number | null; /** Credit card's expiration year. */ expirationYear?: number | null; /** Card holder's full name specified on the card. */ cardholderName?: string | null; } export declare enum CardBrand { UNKNOWN_CARD_BRAND = "UNKNOWN_CARD_BRAND", AMEX = "AMEX", DANKORT = "DANKORT", DINERS = "DINERS", DISCOVER = "DISCOVER", ISRACARD = "ISRACARD", JCB = "JCB", MAESTRO = "MAESTRO", MASTERCARD = "MASTERCARD", UNIONPAY = "UNIONPAY", VISA = "VISA", RUPAY = "RUPAY" } export interface PaymentMethod { /** Legacy payment method type ID. Supported values are `creditCard`, `payPal`. */ typeId?: string; /** * Payment method type ID. * @readonly */ paymentMethodTypeId?: string; /** * Payment method brand ID. * @readonly */ paymentMethodBrandId?: string | null; /** Details of credit card. */ cardInfo?: CardInfo; } export interface SensitiveInfo { /** Sensitive details of credit card like card token. */ cardSensitiveInfo?: CardSensitiveInfo; } export interface CardSensitiveInfo { /** Persistent token of credit card tokenized by Wix. */ persistentToken?: string | null; } export interface ExtendedFields { /** * Extended field data. Each key corresponds to the namespace of the app that created the extended fields. * The value of each key is structured according to the schema defined when the extended fields were configured. * * You can only access fields for which you have the appropriate permissions. * * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */ namespaces?: Record>; } export interface FindSavedCreditCardRequest { /** temporary card token */ temporaryCardToken?: string; /** site member id */ siteMemberId?: string; /** expiration month */ expirationMonth?: number; /** expiration year */ expirationYear?: number; } export interface FindSavedCreditCardResponse { /** saved payment method id */ savedPaymentMethodId?: string | null; } export interface UpsertSavedPaymentMethodRequest { /** Saved payment method. */ savedPaymentMethod: SavedPaymentMethod; /** Temporary token of credit card tokenized by Wix. This token is used to create a persistent token */ temporaryCardToken: string | null; } export interface UpsertSavedPaymentMethodResponse { /** Saved payment method. */ savedPaymentMethod?: SavedPaymentMethod; } export interface GetSavedPaymentMethodRequest { /** Unique identifier of a saved payment method. */ savedPaymentMethodId: string; /** * List of heeded fields that will be returned. * You should have additional permission in order to get them as described in HidedFields documentation. */ fields?: RequestedFields[]; } export declare enum RequestedFields { /** Default value. This value is unused. */ UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD", SENSITIVE_INFO = "SENSITIVE_INFO" } export interface GetSavedPaymentMethodResponse { /** Saved payment method. */ savedPaymentMethod?: SavedPaymentMethod; } export interface DeleteSavedPaymentMethodRequest { /** Unique identifier of a saved payment method. */ savedPaymentMethodId: string; } export interface DeleteSavedPaymentMethodResponse { } export interface ListSavedPaymentMethodsRequest { /** * Site member that owns saved payment methods. * Pass `me` to list saved payment method of the current site member. */ siteMemberId?: string | null; /** Payment method type id. Supported values are `creditCard`, `payPal`. */ paymentMethodTypeId?: string | null; /** * Defines whether this payment method can be used by the merchant for making unscheduled payments. * Even if it's set to `false` payment method still can be used for scheduled payments e.g. subscription renewal without the buyer being present. */ merchantUseAllowed?: boolean | null; /** * List of requested fields that will be returned. * Supported values: * SENSITIVE_INFO - Sensitive information of a SavedPaymentMethod like credit card tokens that's needed to process payments with it. * In order to receive it you should have `PAYMENTS.SAVED_PAYMENT_METHOD_READ_SENSITIVE_INFO` permission */ fields?: RequestedFields[]; /** * Paging for limit the response size. * If no paging provider default response limit 100 will be used. */ paging?: CursorPaging; } export interface CursorPaging { /** Maximum number of items to return in the results. */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string | null; } export interface ListSavedPaymentMethodsResponse { /** List of saved payment methods. */ savedPaymentMethods?: SavedPaymentMethod[]; /** Paging metadata. */ pagingMetadata?: CursorPagingMetadata; } export interface CursorPagingMetadata { /** Number of items returned in the response. */ count?: number | null; /** Cursor strings that point to the next page, previous page, or both. */ cursors?: Cursors; /** * Whether there are more pages to retrieve following the current page. * * + `true`: Another page of results can be retrieved. * + `false`: This is the last page. */ hasNext?: boolean | null; } export interface Cursors { /** Cursor string pointing to the next page in the list of results. */ next?: string | null; /** Cursor pointing to the previous page in the list of results. */ prev?: string | null; } export interface UpdateSavedPaymentMethodRequest { /** Saved payment method to update. */ savedPaymentMethod?: SavedPaymentMethod; } export interface UpdateSavedPaymentMethodResponse { /** Updated saved payment method. */ savedPaymentMethod?: SavedPaymentMethod; } export interface MarkSavedPaymentMethodPrimaryRequest { /** Unique identifier of a saved payment method. */ savedPaymentMethodId: string; } export interface MarkSavedPaymentMethodPrimaryResponse { } export interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * 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 defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ export interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } export interface EntityCreatedEvent { entityAsJson?: string; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo; } export interface RestoreInfo { deletedDate?: Date | null; } export 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; } export interface EntityDeletedEvent { /** Entity that was deleted */ deletedEntityAsJson?: string | null; } export interface ActionEvent { bodyAsJson?: string; } export interface MessageEnvelope { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; } export interface IdentificationData extends IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType; } /** @oneof */ export interface IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } export declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } interface CardInfoNonNullableFields { brand: CardBrand; } interface PaymentMethodNonNullableFields { typeId: string; paymentMethodTypeId: string; cardInfo?: CardInfoNonNullableFields; } interface SavedPaymentMethodNonNullableFields { primary: boolean; paymentMethod?: PaymentMethodNonNullableFields; } export interface UpsertSavedPaymentMethodResponseNonNullableFields { savedPaymentMethod?: SavedPaymentMethodNonNullableFields; } export interface GetSavedPaymentMethodResponseNonNullableFields { savedPaymentMethod?: SavedPaymentMethodNonNullableFields; } export interface ListSavedPaymentMethodsResponseNonNullableFields { savedPaymentMethods: SavedPaymentMethodNonNullableFields[]; } export interface UpdateSavedPaymentMethodResponseNonNullableFields { savedPaymentMethod?: SavedPaymentMethodNonNullableFields; } export {};