export interface PurchasedItem { /** ID of your app's paid plan. */ productId?: string; /** Price of your app's paid plan. For example, `9.95`. */ price?: string; /** * 3-letter currency code in * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. */ currency?: string; /** Information about the billing cycle for your app's paid plan. */ billingCycle?: PaymentCycle; /** * Date and time the site onwers have purchased your app's paid plan in * `YYYY-MM-DDThh:mm:ss.sssZ` format. */ dateCreated?: Date | null; } export declare enum PaymentCycle { NO_CYCLE = "NO_CYCLE", MONTHLY = "MONTHLY", YEARLY = "YEARLY", ONE_TIME = "ONE_TIME", TWO_YEARS = "TWO_YEARS", THREE_YEARS = "THREE_YEARS", FOUR_YEARS = "FOUR_YEARS", FIVE_YEARS = "FIVE_YEARS" } export interface InvoiceStatusUpdate { /** Invoice payment status. */ status?: InvoiceStatus; /** Wix Premium invoice ID. */ invoiceId?: string; /** App instance ID - a unique ID assigned to each app in each site. */ instanceId?: string | null; /** Whether the invoice is for a single payment or for multiple, recurring payments. */ recurring?: boolean; } export declare enum InvoiceStatus { UNKNOWN_INVOICE_STATUS = "UNKNOWN_INVOICE_STATUS", PAYMENT_FAILED = "PAYMENT_FAILED", PAID = "PAID", REFUNDED = "REFUNDED", VOIDED = "VOIDED", CHARGEDBACK = "CHARGEDBACK" } export interface GetUrlRequest { /** * ID of your app's paid plan to retrieve the Wix checkout URL for. Check your app's dashboard * for a list of your app's supported product IDs. */ productId: string; /** * URL for the Wix checkout page. Redirect site owners to this URL after * they've successfully purchased a paid plan for your app. */ successUrl?: string | null; /** * Whether the checkout is for testing purposes only. Testing is mainly * relevant for in-app purchase flows. When `true`, Wix charges the site * owners an amount of `0.00`. */ testCheckout?: boolean; /** Information about the paid plan's billing cycle. */ billingCycle?: PaymentCycle; /** * 2-letter country code in * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) * format. * * Default: `"US"` */ countryCode?: string | null; /** * 2-letter language code in * [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. * * Default: `"EN"` */ languageCode?: string | null; /** Coupon code for the paid plan. Available only in case there is a discount. */ couponCode?: string | null; } export interface ChargeOverride { /** * Override price. In case you omit the override price, Wix charges site * owners the app's default price that's configured in the Pricing page of your app's dashboard. */ price?: number; /** * Override 3-letter currency code in * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. */ currency?: string; } export interface GetUrlResponse { /** URL for the Wix checkout page. */ checkoutUrl?: string; /** * Token for the Wix checkout page. The token holds all data about the order * you're creating a checkout for. It is [signed](), * so you can verify that it comes from Wix. */ token?: string | null; } export interface GetPurchaseHistoryRequest { } export interface GetPurchaseHistoryResponse { /** Retrieved purchases the site owners have completed for you app. */ purchases?: PurchasedItem[]; } export interface GetSitePaymentMethodsStatusRequest { } export interface GetSitePaymentMethodsStatusResponse { /** * Whether the site owners have enabled at least a single online payment method. * Online payment methods include Wix Payments, Stripe, PayPal, and credit * cards. */ onlineProviderEnabled?: boolean; /** Whether the site owners accept offline payments. */ offlineProviderEnabled?: boolean; /** * Whether the site owners have enabled the * [Wix Point of Sale](https://www.wix.com/pos). * This allows their customers to make electronic payments in person. */ wixPosProviderEnabled?: boolean; /** * Whether the site owners have enabled at least one 3rd-party point-of-sale * provider. This allows their customers to make electronic payments in person. */ thirdPartyPosProviderEnabled?: boolean; } export interface GetMeteredBillingChargesRequest { /** * 3-letter currency code in * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. */ currency?: string | null; /** * Start of the period you want to retrieve the custom charges for in * `YYYY-MM-DDThh:mm:ss.sssZ` format. */ startDate?: Date | null; /** * End of the period you want to retrieve the custom charges for in * `YYYY-MM-DDThh:mm:ss.sssZ` format. */ endDate?: Date | null; } export interface GetMeteredBillingChargesResponse { /** List of retrieved custom charges. */ charges?: Charge[]; } export interface Charge { /** ID of the custom charge. The ID consists of 64 characters. */ _id?: string | null; /** Description of the custom charge. */ description?: string; /** * Charge amount. * * Min: `0.50` */ amount?: 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" } export interface GetUrlResponseNonNullableFields { checkoutUrl: string; } interface PurchasedItemNonNullableFields { productId: string; price: string; currency: string; billingCycle: PaymentCycle; } export interface GetPurchaseHistoryResponseNonNullableFields { purchases: PurchasedItemNonNullableFields[]; } /** * Retrieves the URL for a Wix checkout page for the specified paid plan of your app. * * * This call succeeds only in case you have previously * [set up an external pricing page in your app's dashboard](https://dev.wix.com/docs/build-apps/build-your-app/pricing-plans/set-up-an-external-pricing-page). * * The returned checkout URL is valid for 48 hours. * * This API allows your app to manage your pricing page outside of Wix while * still using the standard Wix checkout flow. * @param productId - ID of your app's paid plan to retrieve the Wix checkout URL for. Check your app's dashboard * for a list of your app's supported product IDs. * @public * @requiredField productId * @permissionId WIX_DEVELOPERS.CREATE_CHECKOUT * @permissionScope Manage Your App * @permissionScopeId SCOPE.DC.MANAGE-YOUR-APP * @applicableIdentity APP * @fqn com.wixpress.market.aim.api.Checkout.GetUrl */ export declare function getUrl(productId: string, options?: GetUrlOptions): Promise; export interface GetUrlOptions { /** * URL for the Wix checkout page. Redirect site owners to this URL after * they've successfully purchased a paid plan for your app. */ successUrl?: string | null; /** * Whether the checkout is for testing purposes only. Testing is mainly * relevant for in-app purchase flows. When `true`, Wix charges the site * owners an amount of `0.00`. */ testCheckout?: boolean; /** Information about the paid plan's billing cycle. */ billingCycle?: PaymentCycle; /** * 2-letter country code in * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) * format. * * Default: `"US"` */ countryCode?: string | null; /** * 2-letter language code in * [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. * * Default: `"EN"` */ languageCode?: string | null; /** Coupon code for the paid plan. Available only in case there is a discount. */ couponCode?: string | null; } /** * Retrieves a list of the site owner's past purchases for your app. * * * You don't have to explicitly pass an identifier for the Wix site as part of * the request, since this information is taken automatically from the context. * * The response doesn't include any details about cancellations. * @public * @permissionId WIX_DEVELOPERS.APP_PURCHASE_HISTORY * @permissionScope Manage Your App * @permissionScopeId SCOPE.DC.MANAGE-YOUR-APP * @applicableIdentity APP * @fqn com.wixpress.market.aim.api.Checkout.GetPurchaseHistory */ export declare function getPurchaseHistory(): Promise; export {};