> This page is for Developer.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.bigcommerce.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.bigcommerce.com/_mcp/server.

# Update Company-Level Payment Terms

PUT https://api-b2b.bigcommerce.com/api/v3/io/companies/{companyId}/payment-terms
Content-Type: application/json

Updates the Company-level payment terms for the Company specified by `companyId`. If the value of `isEnabled` is set to `false`, the `paymentTerms` field will be ignored and will default to the store-level value.

Reference: https://docs.bigcommerce.com/developer/api-reference/rest/b2b/management/payment/put-companies-company-id-payment-terms

## Authentication

- `X-Auth-Token` header (required) — | Header | Argument | Description | |:-------|:---------|:------------| | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts). | For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests). For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes). For a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).
- `X-Store-Hash` header (required) — | Header | Argument | Description | |:-------|:---------|:------------| | `X-Store-Hash` | `store_hash` | The unique store hash associated with a BigCommerce store that has B2B Edition enabled. |

## Request

### Path parameters

- `companyId` (integer, required) — The unique numeric ID of the Company assigned by B2B Edition.

### Body (application/json)

This endpoint expects an object.

- `isEnabled` (boolean, required) — Indicates whether payment on terms is available for the specified Company.
- `paymentTerms` (enum, required) — The term set for the specified Company. This field takes the store-level default value if `isEnabled` is `false`.
  - Allowed values: `0`, `5`, `15`, `30`, `45`, `60`

## Response

### 200

SUCCESS

- `code` (integer, optional, default: 200) — Operation status code.
- `data` (termsStatus, optional)
- `meta` (CompaniesCompanyIdPaymentTermsPutResponsesContentApplicationJsonSchemaMeta, optional)

## Errors

### 400 Bad Request Error

Invalid Request

- `code` (integer, optional, default: 400) — Operation status code.
- `data` (CompaniesCompanyIdPaymentTermsPutResponsesContentApplicationJsonSchemaData, optional)
- `meta` (CompaniesCompanyIdPaymentTermsPutResponsesContentApplicationJsonSchemaMeta, optional)

## Types

### termsStatus

- `isEnabled` (boolean, optional) — Indicates whether payment on terms is available for the specified Company.
- `paymentTerms` (enum, optional) — The term set for the specified Company. This field takes the store-level default value if `isEnabled` is `false`.
  - Allowed values: `0`, `5`, `15`, `30`, `45`, `60`

### CompaniesCompanyIdPaymentTermsPutResponsesContentApplicationJsonSchemaMeta

- `message` (string, optional, default: Bad Requests Error) — Human-readable status message.

### CompaniesCompanyIdPaymentTermsPutResponsesContentApplicationJsonSchemaData

- `errMsg` (string, optional, default: Payment terms value error, must be in [0, 5, 15, 30, 45, 60]; )

## Examples

**Request**

```json
{
  "isEnabled": true,
  "paymentTerms": 30
}
```

**Response**

```json
{
  "code": 200,
  "data": {
    "isEnabled": true,
    "paymentTerms": 30
  },
  "meta": {
    "message": "SUCCESS"
  }
}
```

**SDK Code**

```python Payment_put-companies-companyId-payment-terms_example
import requests

url = "https://api-b2b.bigcommerce.com/api/v3/io/companies/1/payment-terms"

payload = {
    "isEnabled": True,
    "paymentTerms": 30
}
headers = {
    "X-Auth-Token": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript Payment_put-companies-companyId-payment-terms_example
const url = 'https://api-b2b.bigcommerce.com/api/v3/io/companies/1/payment-terms';
const options = {
  method: 'PUT',
  headers: {'X-Auth-Token': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"isEnabled":true,"paymentTerms":30}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Payment_put-companies-companyId-payment-terms_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api-b2b.bigcommerce.com/api/v3/io/companies/1/payment-terms"

	payload := strings.NewReader("{\n  \"isEnabled\": true,\n  \"paymentTerms\": 30\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("X-Auth-Token", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Payment_put-companies-companyId-payment-terms_example
require 'uri'
require 'net/http'

url = URI("https://api-b2b.bigcommerce.com/api/v3/io/companies/1/payment-terms")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["X-Auth-Token"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"isEnabled\": true,\n  \"paymentTerms\": 30\n}"

response = http.request(request)
puts response.read_body
```

```java Payment_put-companies-companyId-payment-terms_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api-b2b.bigcommerce.com/api/v3/io/companies/1/payment-terms")
  .header("X-Auth-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"isEnabled\": true,\n  \"paymentTerms\": 30\n}")
  .asString();
```

```php Payment_put-companies-companyId-payment-terms_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api-b2b.bigcommerce.com/api/v3/io/companies/1/payment-terms', [
  'body' => '{
  "isEnabled": true,
  "paymentTerms": 30
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-Auth-Token' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Payment_put-companies-companyId-payment-terms_example
using RestSharp;

var client = new RestClient("https://api-b2b.bigcommerce.com/api/v3/io/companies/1/payment-terms");
var request = new RestRequest(Method.PUT);
request.AddHeader("X-Auth-Token", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"isEnabled\": true,\n  \"paymentTerms\": 30\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Payment_put-companies-companyId-payment-terms_example
import Foundation

let headers = [
  "X-Auth-Token": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "isEnabled": true,
  "paymentTerms": 30
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api-b2b.bigcommerce.com/api/v3/io/companies/1/payment-terms")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```