> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paypal.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create billing entities

<div className="m-badge-page-wrapper">
  <Badge stroke color="orange" size="sm">Limited Release</Badge>
</div>

A billing entity represents a distinct billing configuration within your business that handles billing operations for specific regions, divisions, or legal entities.

Billing entities connect the following:

* <a href="/limited-release/usage-based-billing/set-up-billing-process/register-customers" target="_blank" rel="noopener noreferrer">Customers</a> through billing entity code assignment.
* <a href="/limited-release/usage-based-billing/set-up-billing-process/create-taxes" target="_blank" rel="noopener noreferrer">Tax codes</a> for compliance requirements in different jurisdictions.
* <a href="/limited-release/usage-based-billing/meter-bill/generate-invoices" target="_blank" rel="noopener noreferrer">Invoices</a> and <a href="/limited-release/usage-based-billing/meter-bill/handle-payment-issues#create-credit-notes" target="_blank" rel="noopener noreferrer">credit notes</a> that inherit billing entity context.

## 1. Understand billing entity configuration

Before you create a billing entity, decide on these configuration details based on your business structure and compliance requirements. Then, you can make a POST call to the <a href="/reference/api/rest/billing-entities/create-a-billing-entity" target="_blank" rel="noopener noreferrer">Create billing entity</a> endpoint to send the information to PayPal.

**Basic identification**

* **Name**: Set a descriptive name that identifies the billing entity.
* **Code**: Create a unique identifier to reference the billing entity in API calls.

**Billing configuration**

* **Default currency**: Set the primary currency for this billing entity's operations.
* **Invoice settings**: Configure whether to finalize invoices with zero amounts.
* **Address information**: Provide the billing entity's legal or operational address for compliance and tax purposes.

**Tax codes**: Associate relevant tax configurations with the billing entity. See <a href="/limited-release/usage-based-billing/manage-entities/manage-billing-entities#update-billing-entity-details" target="_blank" rel="noopener noreferrer">Update billing entity details</a>.

<Warning>
  Ensure you create the billing entity before you assign the tax codes. You cannot assign tax codes during the initial billing entity creation process.
</Warning>

## 2. Create billing entity

Use a <a href="/developer/how-to/api/get-started#2-get-an-access-token" target="_blank" rel="noopener noreferrer">valid access token</a> and make a POST call to the `/v1/commerce/billing/billing-entities` endpoint. Include the following parameters:

| <span style={{textAlign: 'left', display: 'block'}}>Parameter</span>                                                                               | <span style={{textAlign: 'left', display: 'block'}}>Action</span>                                                                                                                                                                                                         |
| -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`<br /><span style={{color: 'red', fontSize: 'smaller'}}>Required</span>, <span style={{color: '#95a5a6', fontSize: 'smaller'}}>string</span> | Provide a descriptive name that identifies the billing entity.                                                                                                                                                                                                            |
| `code`<br /><span style={{color: 'red', fontSize: 'smaller'}}>Required</span>, <span style={{color: '#95a5a6', fontSize: 'smaller'}}>string</span> | Set a unique code to identify this billing entity.                                                                                                                                                                                                                        |
| `default_currency`<br /><span style={{color: '#95a5a6', fontSize: 'smaller'}}>string</span>                                                        | Set the three-letter ISO currency code for the billing entity's primary currency (for example, `USD`). See <a href="https://developer.paypal.com/docs/reports/reference/paypal-supported-currencies/" target="_blank" rel="noopener noreferrer">supported currencies</a>. |
| `finalize_zero_amount_invoice`<br /><span style={{color: '#95a5a6', fontSize: 'smaller'}}>boolean</span>                                           | Set to `true` to finalize invoices with zero amounts or `false` to skip them.                                                                                                                                                                                             |
| `address`<br /><span style={{color: '#95a5a6', fontSize: 'smaller'}}>object</span>                                                                 | Provide the billing entity's address with fields: `line1`, `line2`, `city`, `state`, `postal_code`, `country`.                                                                                                                                                            |

For information on all parameters, see <a href="/reference/api/rest/billing-entities/create-a-billing-entity" target="_blank" rel="noopener noreferrer">API reference</a>.

<CodeGroup>
  ```shell lines title="Sample request" theme={null}
  curl -X POST -L 'https://api-m.sandbox.paypal.com/v1/commerce/billing/billing-entities' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <ACCESS-TOKEN>' \
  -d '{
      "code": "acme_west",
      "name": "Acme Western Division",
      "default_currency": "USD",
      "finalize_zero_amount_invoice": true,
      "address": {
          "line1": "789 Tech Boulevard",
          "line2": "Suite 1200",
          "city": "San Francisco",
          "state": "CA",
          "country": "US",
          "postal_code": "94107"
      },
      "legal_name": "Acme Corporation Western LLC",
      "legal_number": "US87654321",
      "email": "west-billing@acmeinc.com",
      "timezone": "America/Los_Angeles"
  }'
  ```

  ```json lines title="Sample response" theme={null}
  {
      "id": "e7f4c956-23fc-663d-a8c3-egcb1f5d4h0e",
      "code": "acme_west",
      "name": "Acme Western Division",
      "default_currency": "USD",
      "finalize_zero_amount_invoice": true,
      "is_default": false,
      "address": {
          "line1": "789 Tech Boulevard",
          "line2": "Suite 1200",
          "city": "San Francisco",
          "state": "CA",
          "country": "US",
          "postal_code": "94107"
      },
      "legal_name": "Acme Corporation Western LLC",
      "legal_number": "US87654321",
      "email": "west-billing@acmeinc.com",
      "timezone": "America/Los_Angeles",
      "created_at": "2023-01-15T00:00:00Z",
      "updated_at": "2023-01-15T00:00:00Z"
  }
  ```
</CodeGroup>

A successful call returns a `201 Created` response. The response includes the following parameter:

| <span style={{textAlign: 'left', display: 'block'}}>Parameter</span>            | <span style={{textAlign: 'left', display: 'block'}}>Description</span> | <span style={{textAlign: 'left', display: 'block'}}>Further action</span>                                                                                                                                                                                                                                                                              |
| ------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `code`<br /><span style={{color: '#95a5a6', fontSize: 'smaller'}}>string</span> | Unique code for the billing entity.                                    | Use this `code` when <a href="/limited-release/usage-based-billing/set-up-billing-process/register-customers" target="_blank" rel="noopener noreferrer">registering customers</a> or <a href="/limited-release/usage-based-billing/manage-entities/manage-billing-entities" target="_blank" rel="noopener noreferrer">managing the billing entity</a>. |

For information on all parameters, see <a href="/reference/api/rest/billing-entities/create-a-billing-entity" target="_blank" rel="noopener noreferrer">API reference</a>.

## 3. Manage billing entities

To review a billing entity's current configuration and available management options, make a GET call to the <a href="/reference/api/rest/billing-entities/get-a-billing-entity-by-code" target="_blank" rel="noopener noreferrer">/v1/commerce/billing/billing-entities/{code}</a> endpoint and review the billing entity properties.

| Billing entity component                | Updatable | Possible management options                                                                                                                                                                                                                                       | Impact on existing customers                 |
| --------------------------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- |
| **Name**                                | Yes       | <a href="/limited-release/usage-based-billing/manage-entities/manage-billing-entities#update-billing-entity-details" target="_blank" rel="noopener noreferrer">Update billing entity name</a>                                                                     | No impact - identification only              |
| **Billing configuration and tax codes** | Yes       | <a href="/limited-release/usage-based-billing/manage-entities/manage-billing-entities#update-billing-entity-details" target="_blank" rel="noopener noreferrer">Update billing entity details</a> - currency, invoice settings, address information, and tax codes | Updates apply to new invoices and operations |
| **Billing entity code**                 | No        | Billing entity cannot be modified - unique identifier remains permanent                                                                                                                                                                                           | N/A - cannot be modified                     |
