archivePlan( )

Archives a single plan.

The archivePlan() function returns a Promise that resolves to the newly-archived plan.

When a plan is archived, the plan

  • Is no longer available for display or selection by visitors. This is because the plan's public property is automatically set to false.
  • Cannot be purchased.
  • Cannot be "un-archived", meaning the plan cannot be made active again.

Plan archiving does not impact existing purchases made for the plan. All purchases for the plan are still active and keep their payment options and terms.

Site owners can see archived plans in the Dashboard under Pricing Plans -> Archived Plans.

Note: An attempt to archive an already-archived plan throws an error.

Admin Method

This function requires elevated permissions and runs only on the backend and on dashboard pages.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Pricing Plans
Learn more about permission scopes.
Method Declaration
Method Parameters

ID of the active plan to archive.

Return Type:Promise<ArchivePlanResponse>
Was this helpful?