Skip to content

Change the platform billing thresholds

The platform_billing.settings.update operation: PATCH /api/v1/platform/billing_settings in the REST API and the platform_billing_settings_update tool in the MCP server.

PATCH/api/v1/platform/billing_settings

Changes how many days after a failed Ownrecord payment an organization is restricted (restrictAfterDays, default 14) and suspended (suspendAfterDays, default 30), from 1 to 60 days, restriction first. Organizations move at the next escalation pass. The platform brand's own billing settings follow: payment retries and entitlements last until the suspension. Platform admins only; audited.

At a glance

  • REST: PATCH /api/v1/platform/billing_settings
  • MCP tool: platform_billing_settings_update
  • Operation ID: platform_billing.settings.update
  • Scope: Platform
  • Permission: platform:admin
  • Risk tier: write
  • Dry run: Not supported
  • Idempotency: Idempotency-Key optional
  • Modes: Test and live
  • Authentication: API key with the platform:admin scope
  • Fresh sign-in: In the console, a sign-in within the last 15 minutes
  • Since: M12

Request

Body

A JSON object (Content-Type: application/json):

FieldTypeRequiredDescription
restrictAfterDaysinteger (1 to 60)No
suspendAfterDaysinteger (1 to 60)No

Response

200 OK with a JSON object:

FieldTypeDescription
object"platform_billing_settings"
restrictAfterDaysinteger
suspendAfterDaysinteger
livemodeboolean
defaultPlanPriceIdstring or null

Examples

Suspend after 45 days

HTTP
PATCH /api/v1/platform/billing_settings
Authorization: Bearer or_test_…
Content-Type: application/json

{
  "suspendAfterDays": 45
}

Response (200):

JSON
{
  "object": "platform_billing_settings",
  "restrictAfterDays": 14,
  "suspendAfterDays": 45,
  "livemode": true,
  "defaultPlanPriceId": "price_01jbz3m4k5n6p7q8r9s0t1v2w8"
}

Errors

CodeHTTP statusWhenWhat to do
validation_failed400A threshold is missing or not a whole number.Fix the fields listed in details.issues and send the request again.
platform_billing_thresholds_invalid400The thresholds are outside 1–60 days or not in order.Use whole days from 1 to 60, with suspendAfterDays later than restrictAfterDays (the defaults are 14 and 30).
platform_billing_unavailable409The platform bootstrap hasn't run yet.A platform admin runs pnpm platform:bootstrap, which creates the plans, prices and features of data/platform/plans.yaml. Try again afterwards.
permission_denied403Only platform staff read, and only a platform_admin changes, these settings.Ask an organization owner or admin for a role or scope that allows this action.
fresh_auth_required403Your last sign-in is older than 15 minutes: sign in again first.Sign in again, then repeat the action within 15 minutes.

It can also return these common errors: api_version_unsupported, invalid_json, unsupported_media_type, authentication_required, api_key_invalid, resource_not_found, idempotency_key_reused, idempotency_in_progress, dry_run_not_supported, rate_limited, internal_error.