import { ReportExternalBillingEventRequest as ReportExternalBillingEventRequest$1, ReportExternalBillingEventResponse as ReportExternalBillingEventResponse$1 } from './index.typings.js'; import '@wix/sdk-types'; interface ExternalBillingEvent { /** * The app ID linked to this transaction. This field is only relevant if using an API key for authorization, * in which case you're required to pass the app ID. * @format GUID */ appId?: string | null; /** * The app instance ID linked to this transaction. This field is only relevant if using an API key for authorization, * in which case you can optionally pass the instance ID. * * This connects the transaction to a specific instance of your app installed on a Wix site. * Learn more [about app instances](https://dev.wix.com/docs/build-apps/develop-your-app/access/app-instances/about-app-instances). * @format GUID */ instanceId?: string | null; /** * The total amount of the transaction in USD, not including tax. * This value can be negative for refunds or adjustments. * * Example: "120.50" for a $120.50 charge, or "-120.50" for a $120.50 refund. * @format DECIMAL_VALUE * @decimalValue options { maxScale:10 } */ grossRevenue?: string; /** * The amount charged in USD minus agreed-upon expenses, such as shipping fees or * payment processing fees. Wix subtracts its share from this amount. * The value can be negative for refunds. * * Example calculation: * - Gross revenue: $120.50 * - Minus expenses: $20.00 (shipping) * - Net revenue: $100.50 * @format DECIMAL_VALUE * @decimalValue options { maxScale:10 } */ netRevenue?: string | null; /** * Wix's share of the transaction in USD, taken from the net revenue. * This value can be negative, such as for adjustments or refunds. * * Calculate based on your Partner Agreement terms. For example, if Wix's share is 20%: * - Net revenue: $100.50 * - Wix share (20%): $20.10 * * Important: Update this value if your revenue share percentage changes. * @format DECIMAL_VALUE * @decimalValue options { maxScale:10 } */ wixShare?: string; /** The date and time of the transaction. */ createdDate?: Date | null; /** The type of billing event, either charge or refund. */ billingType?: BillingTypeWithLiterals; } declare enum BillingType { UNKNOWN = "UNKNOWN", CHARGE = "CHARGE", REFUND = "REFUND" } /** @enumType */ type BillingTypeWithLiterals = BillingType | 'UNKNOWN' | 'CHARGE' | 'REFUND'; interface ReportExternalBillingEventRequest { /** * The billing event with details of the external transaction, including the gross revenue, * net revenue, and billing type (charge or refund). */ event?: ExternalBillingEvent; } interface ReportExternalBillingEventResponse { /** The billing event that was processed. */ event?: ExternalBillingEvent; } /** @docsIgnore */ type ReportExternalBillingEventApplicationErrors = { code?: 'FAILED_PRECONDITION'; description?: string; data?: Record; }; type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function reportExternalBillingEvent(): __PublicMethodMetaInfo<'POST', {}, ReportExternalBillingEventRequest$1, ReportExternalBillingEventRequest, ReportExternalBillingEventResponse$1, ReportExternalBillingEventResponse>; export { BillingType as BillingTypeOriginal, type BillingTypeWithLiterals as BillingTypeWithLiteralsOriginal, type ExternalBillingEvent as ExternalBillingEventOriginal, type ReportExternalBillingEventApplicationErrors as ReportExternalBillingEventApplicationErrorsOriginal, type ReportExternalBillingEventRequest as ReportExternalBillingEventRequestOriginal, type ReportExternalBillingEventResponse as ReportExternalBillingEventResponseOriginal, type __PublicMethodMetaInfo, reportExternalBillingEvent };