Instructions for upgrading, downgrading, pausing, or canceling your AI Docs subscription.
AI Docs provides flexible billing and subscription options to match your documentation needs. This guide explains how to understand your plan, monitor usage, upgrade your subscription, and manage your billing details directly within the AI Docs platform.
Your subscription can have several statuses, which indicate your current access level and any pending changes:
Upgrading to a Pro plan is a straightforward process initiated from your AI Docs dashboard. This allows you to unlock advanced features and higher limits for your documentation projects.
When you choose to upgrade, you'll select your preferred billing cycle (monthly or annual). This action triggers a secure checkout process handled by Dodo, our payment provider.
The system makes an API call to create a checkout session:
// Example: Initiating a checkout session for an annual plan
async function handleUpgrade() {
// ...
const res = await fetch("/api/billing/checkout", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ planType: "annual" }), // or "monthly"
});
if (!res.ok) {
// Handle error, e.g., redirect to login if not authenticated
window.location.href = "/login?redirect=/dashboard/billing";
return;
}
const { checkout_url } = await res.json();
window.location.href = checkout_url; // Redirect user to Dodo's secure payment page
// ...
}
Upon successful creation of the checkout session, you will be redirected to Dodo's secure payment page to complete your purchase. After payment, you are redirected back to your AI Docs billing page, where your Pro plan will be activated.
The process of upgrading involves your browser, the AI Docs backend, and the Dodo payment system:
If you decide to cancel your Pro subscription, your access to Pro features will continue until the end of your current billing period. After this date, your account will automatically revert to the Starter (Free) plan.
When your plan reverts to Starter:
The cancellation process is handled by an API endpoint:
// Example: Handling subscription cancellation
async function handleCancel() {
// ...
try {
await fetch("/api/billing/cancel", { method: "POST" });
// Refresh UI to reflect pending cancellation status
// ...
} catch (error) {
console.error("Failed to cancel subscription:", error);
// Handle error
}
// ...
}
When you cancel, your subscription status will change to "Cancelling," indicating that Pro access will end at your next billing date.
If you have previously cancelled your subscription but wish to continue with the Pro plan before your current billing period ends, you can resume it. This will prevent your plan from reverting to Starter at the end of the period.
The resume process is handled by an API endpoint:
// Example: Handling subscription resumption
async function handleResume() {
// ...
try {
await fetch("/api/billing/resume", { method: "POST" });
// Refresh UI to reflect active subscription status
// ...
} catch (error) {
console.error("Failed to resume subscription:", error);
// Handle error
}
// ...
}
Resuming your subscription will revert its status to "Active," and you will continue to enjoy all Pro features without interruption.
AI Docs handles subscription management directly within the application. Dodo, our payment provider, does not offer a separate hosted customer portal for these actions.
The AI Docs dashboard provides a clear overview of your current plan and how your usage compares to your plan's limits. This helps you manage your resources effectively and decide when an upgrade might be beneficial. For more details, refer to Monitoring Your Usage.
Your AI Docs billing page also displays a history of your recent payments. This includes details such as the transaction ID, amount, currency, status, payment method, and the date of the transaction. You can also access invoices for your payments directly from this section. For more details, refer to Payment History.