diff --git a/apps/docs/content/guides/platform/billing-faq.mdx b/apps/docs/content/guides/platform/billing-faq.mdx index 000372dbd3a..aa60e3b8d56 100644 --- a/apps/docs/content/guides/platform/billing-faq.mdx +++ b/apps/docs/content/guides/platform/billing-faq.mdx @@ -116,7 +116,7 @@ The Fair Use Policy is applied through service restrictions. This could mean: - Pausing projects - Switching databases to read-only mode - Disabling new project launches/transfers -- Responding with a 402 status code for all API requests +- Responding with a [402 status code](/docs/guides/platform/http-status-codes#402-service-restriction) for all API requests The Fair Use Policy is generally applied to all projects of the restricted organization. diff --git a/apps/docs/content/guides/platform/http-status-codes.mdx b/apps/docs/content/guides/platform/http-status-codes.mdx index fb560070b7c..7cacd273e64 100644 --- a/apps/docs/content/guides/platform/http-status-codes.mdx +++ b/apps/docs/content/guides/platform/http-status-codes.mdx @@ -18,6 +18,17 @@ The Supabase platform offers several HTTP APIs for each project. These APIs can 4XX status codes indicate an issue on the client's end with the request being made. These could include missing or invalid auth information, a malformed request, making too many requests in too short a time period ("rate limiting"), or a network issue on the client's end. +### 402 service restriction + +In case the Fair Use Policy is applied, the projects of your organization may be restricted from processing requests. If service restrictions are applied, projects will return a 402 status code together with a description of why the project is restricted. The description can contain one or more of the following codes: + +- `exceeded_*` indicates that the project has continued to exceeded the usage limits of its quota, e.g. `exceed_egress_quota`, `exceed_db_size_quota`. +- `overdue_payment` indicates that the organization has overdue bills. + +You will still have access to your data through the Supabase dashboard when the Fair Use Policy is applied. + +See the [Fair Use Policy](/docs/guides/platform/billing-faq#fair-use-policy) section to learn more about the restrictions and how to remove them. + ## 5XX server or project errors 5XX status codes indicate that the project was unable to process the request successfully, but not because of an issue with the client's request. diff --git a/apps/studio/components/interfaces/Organization/BillingSettings/Restriction.tsx b/apps/studio/components/interfaces/Organization/BillingSettings/Restriction.tsx index 2dcca460144..d99d5764dee 100644 --- a/apps/studio/components/interfaces/Organization/BillingSettings/Restriction.tsx +++ b/apps/studio/components/interfaces/Organization/BillingSettings/Restriction.tsx @@ -88,7 +88,8 @@ export const Restriction = () => { {dayjs(org.restriction_data['grace_period_end']).format('DD MMM, YYYY')} . After that, the Fair Use Policy will apply. If you plan to maintain this level of - usage, upgrade your plan to avoid any restrictions. + usage, upgrade your plan to avoid any restrictions. If restrictions are applied, + requests to your projects will return a 402 status code.