---
title: Update account billing settings
slug: reference/update-account-billing-settings
docTags: 
createdAt: 2025-03-18T18:28:02.913Z
---

{
  "id": "qg0D4m510FNkQklD2NiVX",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://app.amberflo.io/payments/settings",
    "servers": [
      {
        "url": "https://app.amberflo.io/payments/settings"
      }
    ],
    "name": "Update account billing settings",
    "description": "<p>Updates your account's billing configuration and plan defaults.\nUse this endpoint to modify billing behavior, set plan start units, and configure account-level preferences.</p>\n<p>Use this endpoint to:</p>\n<ul>\n<li>Change default plan start units (DAY or MONTH)</li>\n<li>Update billing configuration preferences</li>\n<li>Modify account-level billing behaviors</li>\n</ul>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "Account billing settings to update, including plan defaults and configuration preferences",
          "customType": "payment.pricing.AccountPricingSettings.in",
          "schema": [
            {
              "name": "planDefaultStartUnit",
              "kind": "optional",
              "type": "string",
              "description": "Default time unit for determining when new customer plans should start (DAY or MONTH).",
              "modelRef": "#/components/schemas/payment.pricing.PlanDefaultStartUnit.in",
              "customType": "payment.pricing.PlanDefaultStartUnit.in",
              "schema": []
            }
          ],
          "modelRef": "#/components/schemas/payment.pricing.AccountPricingSettings.in",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKey",
          "name": "X-API-KEY",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successfully updated account billing settings and returns the new configuration",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Account-level pricing configuration settings that control default behavior for pricing plans and billing operations.",
            "customType": "payment.pricing.AccountPricingSettings.out",
            "schema": [
              {
                "name": "planDefaultStartUnit",
                "kind": "optional",
                "type": "string",
                "description": "Default time unit configuration for when new pricing plans become active for customers.",
                "modelRef": "#/components/schemas/payment.pricing.PlanDefaultStartUnit.in",
                "customType": "payment.pricing.PlanDefaultStartUnit.in",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/payment.pricing.AccountPricingSettings.out",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Invalid settings format or unsupported configuration values",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "401",
        "description": "Authentication required or invalid API key provided",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "403",
        "description": "Insufficient permissions to modify account billing settings",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "404",
        "description": "Account not found or billing configuration not accessible",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "500",
        "description": "Internal server error occurred while updating billing settings",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "umj0zIo6xsP-VXf0Y2lCc",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://app.amberflo.io/payments/settings \\\n     --header 'accept: application/json'"
        },
        {
          "id": "PLqjlklCrV8ANqlVPSjGk",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://app.amberflo.io/payments/settings\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "RVM8U70Y_rNBnHj_CR2lZ",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/payments/settings\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "efIjzJ_-4SED_czbS6YFa",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/payments/settings\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "umj0zIo6xsP-VXf0Y2lCc"
    },
    "results": {
      "languages": [
        {
          "id": "ZV8y9NlZIeVoD2mYrFsbt",
          "language": "200",
          "code": "// Successfully updated account billing settings and returns the new configuration\n{\n  \"planDefaultStartUnit\": \"\"\n}"
        },
        {
          "id": "GBPp08OyvgZvHtZX7WcgF",
          "language": "400",
          "code": "// Invalid settings format or unsupported configuration values\n"
        },
        {
          "id": "EESp22t301MAHunBAc3VI",
          "language": "401",
          "code": "// Authentication required or invalid API key provided\n"
        },
        {
          "id": "kYskZGZhxW64KzHY1jwdL",
          "language": "403",
          "code": "// Insufficient permissions to modify account billing settings\n"
        },
        {
          "id": "s76KfJeDcFo-1Ucfdees9",
          "language": "404",
          "code": "// Account not found or billing configuration not accessible\n"
        },
        {
          "id": "uGnz8XFwFpLDbnChlqLV0",
          "language": "500",
          "code": "// Internal server error occurred while updating billing settings\n"
        }
      ],
      "selectedLanguageId": "ZV8y9NlZIeVoD2mYrFsbt"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}