Important:
This method requests information about remaining quota in the plan. A Wix user can purchase a paid plan from your site or utilize a free plan if you offer one. You provide information about the current plan including how many searches remain out of the total in the plan, the dates of the plan, and whether the user currently has a paid plan.
Wix calls this method when a Wix user opens the SEO page of the Dashboard.
function getQuota(
payload: GetQuotaEnvelope,
): GetQuotaResponse | Promise<GetQuotaResponse>;
import { seoKeywordSuggestions } from "@wix/marketing/service-plugins";
seoKeywordSuggestions.provideHandlers({
getQuota: async (payload) => {
const { request, metadata } = payload;
// Use the `request` and `metadata` received from Wix and
// apply custom logic.
return {
// Return your response exactly as documented to integrate with Wix.
// Return value example:
quota: {
endDate: "2024-07-05T07:04:35Z",
limit: 10,
paidPlan: false,
remaining: 9,
startDate: "2024-07-04T07:04:35Z",
},
};
},
});