interface OrderPaymentRequest { /** * Order payment request ID. * @readonly */ _id?: string | null; /** Additional parameters to identify the source of the order payment request. */ source?: Source; /** * status. * @readonly */ status?: Status; /** Order ID. */ orderId?: string; /** * Order number. * @readonly */ orderNumber?: string | null; /** * Amount to collect. * > **Note:** The amount can only be set once. */ amount?: Price; /** * Currency code. The value will always match the currency used in the order. * @readonly */ currency?: string; /** * Payment gateway order id which is associated with this payment request * @readonly */ paymentGatewayOrderId?: string | null; /** Title to be displayed to the customer on the payment page. Provide a clear and descriptive title to inform the customer about what they are paying for. */ title?: string; /** Description to be displayed to the customer on the payment page. Write a detailed description so the customer understands what they are paying for. */ description?: string | null; /** Image to be displayed to the customer on the payment page. */ image?: string; /** Time and date the order payment request expires. */ expirationDate?: Date | null; /** [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls. */ extendedFields?: ExtendedFields; /** * Date and time the OrderPaymentRequest was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the OrderPaymentRequest was last updated. * @readonly */ _updatedDate?: Date | null; } interface Source { /** App Def ID that created the order payment request. */ appId?: string | null; /** Reference to an ID from an external system, indicating the original source of the order payment request. */ externalId?: string; } declare enum Status { UNKNOWN_STATUS = "UNKNOWN_STATUS", UNPAID = "UNPAID", PAID = "PAID", EXPIRED = "EXPIRED" } interface Price { /** Amount. */ amount?: string; /** * Amount formatted with currency symbol. * @readonly */ formattedAmount?: string; } 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>; } /** Triggered when the the order payment request status changes to paid */ interface OrderPaymentRequestPaid { /** The order that was updated */ orderPaymentRequest?: OrderPaymentRequest; } /** Triggered when the the order payment request status changes to expired */ interface OrderPaymentRequestExpired { /** The order that was updated */ orderPaymentRequest?: OrderPaymentRequest; } interface CreateOrderPaymentRequestRequest { /** OrderPaymentRequest to be created. */ orderPaymentRequest?: OrderPaymentRequest; } interface CreateOrderPaymentRequestResponse { /** The created OrderPaymentRequest. */ orderPaymentRequest?: OrderPaymentRequest; /** Order payment request URL. */ orderPaymentRequestUrl?: string; } interface GetOrderPaymentRequestRequest { /** ID of the OrderPaymentRequest to retrieve. */ orderPaymentRequestId: string; } interface GetOrderPaymentRequestResponse { /** The requested OrderPaymentRequest. */ orderPaymentRequest?: OrderPaymentRequest; } interface UpdateOrderPaymentRequestRequest { /** OrderPaymentRequest to be updated, may be partial. */ orderPaymentRequest: OrderPaymentRequest; } interface UpdateOrderPaymentRequestResponse { /** Updated OrderPaymentRequest. */ orderPaymentRequest?: OrderPaymentRequest; } interface DeleteOrderPaymentRequestRequest { /** Id of the OrderPaymentRequest to delete. */ orderPaymentRequestId: string; } interface DeleteOrderPaymentRequestResponse { } interface QueryOrderPaymentRequestsRequest { /** WQL expression. */ query?: CursorQuery; } interface CursorQuery extends CursorQueryPagingMethodOneOf { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging; /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: Record | null; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` */ sort?: Sorting[]; } /** @oneof */ interface CursorQueryPagingMethodOneOf { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging; } interface Sorting { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrder; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } 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; } interface QueryOrderPaymentRequestsResponse { /** List of payment requests. */ orderPaymentRequests?: OrderPaymentRequest[]; /** Paging metadata */ pagingMetadata?: CursorPagingMetadata; } 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; } 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; } interface GetOrderPaymentRequestURLRequest { /** Order Payment Request ID. */ orderPaymentRequestId: string; } interface GetOrderPaymentRequestURLResponse { /** Order Payment Request URL. */ orderPaymentRequestUrl?: string; } interface UpdateExtendedFieldsRequest { /** ID of the entity to update. */ _id: string; /** Identifier for the app whose extended fields are being updated. */ namespace: string; /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */ namespaceData: Record | null; } interface UpdateExtendedFieldsResponse { /** Updated OrderPaymentRequest. */ orderPaymentRequest?: OrderPaymentRequest; } 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 */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entity?: string; } 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. */ currentEntity?: string; } interface EntityDeletedEvent { /** Entity that was deleted */ deletedEntity?: string | null; } interface ActionEvent { body?: string; } interface Empty { } interface MessageEnvelope { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; } 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 */ 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; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } interface SourceNonNullableFields { externalId: string; } interface PriceNonNullableFields { amount: string; formattedAmount: string; } interface OrderPaymentRequestNonNullableFields { source?: SourceNonNullableFields; status: Status; orderId: string; amount?: PriceNonNullableFields; currency: string; title: string; image: string; } interface CreateOrderPaymentRequestResponseNonNullableFields { orderPaymentRequest?: OrderPaymentRequestNonNullableFields; orderPaymentRequestUrl: string; } interface GetOrderPaymentRequestResponseNonNullableFields { orderPaymentRequest?: OrderPaymentRequestNonNullableFields; } interface UpdateOrderPaymentRequestResponseNonNullableFields { orderPaymentRequest?: OrderPaymentRequestNonNullableFields; } interface QueryOrderPaymentRequestsResponseNonNullableFields { orderPaymentRequests: OrderPaymentRequestNonNullableFields[]; } interface GetOrderPaymentRequestURLResponseNonNullableFields { orderPaymentRequestUrl: string; } interface UpdateExtendedFieldsResponseNonNullableFields { orderPaymentRequest?: OrderPaymentRequestNonNullableFields; } interface CreateOrderPaymentRequestOptions { /** OrderPaymentRequest to be created. */ orderPaymentRequest?: OrderPaymentRequest; } interface UpdateOrderPaymentRequest { /** * Order payment request ID. * @readonly */ _id?: string | null; /** Additional parameters to identify the source of the order payment request. */ source?: Source; /** * status. * @readonly */ status?: Status; /** Order ID. */ orderId?: string; /** * Order number. * @readonly */ orderNumber?: string | null; /** * Amount to collect. * > **Note:** The amount can only be set once. */ amount?: Price; /** * Currency code. The value will always match the currency used in the order. * @readonly */ currency?: string; /** * Payment gateway order id which is associated with this payment request * @readonly */ paymentGatewayOrderId?: string | null; /** Title to be displayed to the customer on the payment page. Provide a clear and descriptive title to inform the customer about what they are paying for. */ title?: string; /** Description to be displayed to the customer on the payment page. Write a detailed description so the customer understands what they are paying for. */ description?: string | null; /** Image to be displayed to the customer on the payment page. */ image?: string; /** Time and date the order payment request expires. */ expirationDate?: Date | null; /** [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls. */ extendedFields?: ExtendedFields; /** * Date and time the OrderPaymentRequest was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the OrderPaymentRequest was last updated. * @readonly */ _updatedDate?: Date | null; } interface QueryCursorResult { cursors: Cursors; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface OrderPaymentRequestsQueryResult extends QueryCursorResult { items: OrderPaymentRequest[]; query: OrderPaymentRequestsQueryBuilder; next: () => Promise; prev: () => Promise; } interface OrderPaymentRequestsQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ eq: (propertyName: '_id' | 'source.appId' | 'source.externalId' | 'status' | 'orderId' | 'orderNumber' | 'amount.amount' | 'paymentGatewayOrderId' | 'title' | 'description' | 'expirationDate' | '_createdDate' | '_updatedDate', value: any) => OrderPaymentRequestsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ne: (propertyName: '_id' | 'source.appId' | 'source.externalId' | 'status' | 'orderId' | 'orderNumber' | 'paymentGatewayOrderId' | 'title' | 'description' | 'expirationDate' | '_createdDate' | '_updatedDate', value: any) => OrderPaymentRequestsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ge: (propertyName: 'expirationDate' | '_createdDate' | '_updatedDate', value: any) => OrderPaymentRequestsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ gt: (propertyName: 'expirationDate' | '_createdDate' | '_updatedDate', value: any) => OrderPaymentRequestsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ le: (propertyName: 'expirationDate' | '_createdDate' | '_updatedDate', value: any) => OrderPaymentRequestsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ lt: (propertyName: 'expirationDate' | '_createdDate' | '_updatedDate', value: any) => OrderPaymentRequestsQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. * @documentationMaturity preview */ startsWith: (propertyName: '_id' | 'source.appId' | 'source.externalId' | 'orderId' | 'orderNumber' | 'paymentGatewayOrderId' | 'title' | 'description', value: string) => OrderPaymentRequestsQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. * @documentationMaturity preview */ hasSome: (propertyName: '_id' | 'source.appId' | 'source.externalId' | 'status' | 'orderId' | 'orderNumber' | 'paymentGatewayOrderId' | 'title' | 'description' | 'expirationDate' | '_createdDate' | '_updatedDate', value: any[]) => OrderPaymentRequestsQueryBuilder; /** @documentationMaturity preview */ in: (propertyName: '_id' | 'source.appId' | 'source.externalId' | 'status' | 'orderId' | 'orderNumber' | 'paymentGatewayOrderId' | 'title' | 'description' | 'expirationDate' | '_createdDate' | '_updatedDate', value: any) => OrderPaymentRequestsQueryBuilder; /** @documentationMaturity preview */ exists: (propertyName: '_id' | 'source.appId' | 'source.externalId' | 'status' | 'orderId' | 'orderNumber' | 'paymentGatewayOrderId' | 'title' | 'description' | 'expirationDate' | '_createdDate' | '_updatedDate', value: boolean) => OrderPaymentRequestsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ ascending: (...propertyNames: Array<'status' | 'orderNumber' | 'amount.amount' | 'title' | 'description' | 'expirationDate' | '_createdDate' | '_updatedDate'>) => OrderPaymentRequestsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ descending: (...propertyNames: Array<'status' | 'orderNumber' | 'amount.amount' | 'title' | 'description' | 'expirationDate' | '_createdDate' | '_updatedDate'>) => OrderPaymentRequestsQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. * @documentationMaturity preview */ limit: (limit: number) => OrderPaymentRequestsQueryBuilder; /** @param cursor - A pointer to specific record * @documentationMaturity preview */ skipTo: (cursor: string) => OrderPaymentRequestsQueryBuilder; /** @documentationMaturity preview */ find: () => Promise; } interface UpdateExtendedFieldsOptions { /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */ namespaceData: Record | null; } export { type DomainEvent as A, type DomainEventBodyOneOf as B, type CreateOrderPaymentRequestOptions as C, type DeleteOrderPaymentRequestRequest as D, type ExtendedFields as E, type EntityCreatedEvent as F, type GetOrderPaymentRequestURLResponse as G, type EntityUpdatedEvent as H, type EntityDeletedEvent as I, type ActionEvent as J, type Empty as K, type IdentificationData as L, type MessageEnvelope as M, type IdentificationDataIdOneOf as N, type OrderPaymentRequest as O, type Price as P, type QueryOrderPaymentRequestsRequest as Q, type RestoreInfo as R, Status as S, type CreateOrderPaymentRequestResponseNonNullableFields as T, type UpdateOrderPaymentRequest as U, type GetOrderPaymentRequestResponseNonNullableFields as V, WebhookIdentityType as W, type UpdateOrderPaymentRequestResponseNonNullableFields as X, type QueryOrderPaymentRequestsResponseNonNullableFields as Y, type OrderPaymentRequestsQueryResult as Z, type OrderPaymentRequestNonNullableFields as a, type OrderPaymentRequestsQueryBuilder as b, type GetOrderPaymentRequestURLResponseNonNullableFields as c, type UpdateExtendedFieldsOptions as d, type UpdateExtendedFieldsResponse as e, type UpdateExtendedFieldsResponseNonNullableFields as f, SortOrder as g, type Source as h, type OrderPaymentRequestPaid as i, type OrderPaymentRequestExpired as j, type CreateOrderPaymentRequestRequest as k, type CreateOrderPaymentRequestResponse as l, type GetOrderPaymentRequestRequest as m, type GetOrderPaymentRequestResponse as n, type UpdateOrderPaymentRequestRequest as o, type UpdateOrderPaymentRequestResponse as p, type DeleteOrderPaymentRequestResponse as q, type CursorQuery as r, type CursorQueryPagingMethodOneOf as s, type Sorting as t, type CursorPaging as u, type QueryOrderPaymentRequestsResponse as v, type CursorPagingMetadata as w, type Cursors as x, type GetOrderPaymentRequestURLRequest as y, type UpdateExtendedFieldsRequest as z };