import { NonNullablePaths } from '@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; }; /** * Sends an external billing event to Wix. * Use this to report charges or refunds for your [Partner Billed App](https://dev.wix.com/docs/build-apps/launch-your-app/pricing-and-billing/partner-billed-apps-reporting). * The reported event enables Wix to track revenue, deductions, and Wix's share related to Partner Billed App charges. * @public * @requiredField options.event.billingType * @requiredField options.event.grossRevenue * @requiredField options.event.wixShare * @permissionId WIX_DEVELOPERS.MANAGE_APP_INSTANCE * @applicableIdentity APP * @fqn com.wixpress.market.aim.api.ExternalBillingBIService.ReportExternalBillingEvent */ declare function reportExternalBillingEvent(options?: NonNullablePaths): Promise & { __applicationErrorsType?: ReportExternalBillingEventApplicationErrors; }>; interface ReportExternalBillingEventOptions { /** * The billing event with details of the external transaction, including the gross revenue, * net revenue, and billing type (charge or refund). */ event?: ExternalBillingEvent; } export { BillingType, type BillingTypeWithLiterals, type ExternalBillingEvent, type ReportExternalBillingEventApplicationErrors, type ReportExternalBillingEventOptions, type ReportExternalBillingEventRequest, type ReportExternalBillingEventResponse, reportExternalBillingEvent };