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

# Set Billing Details

> Replaces the buyer details printed on a paid invoice (fields left out are cleared)

```
PUT /openapi/memorylake/admin/v1/billing/invoices/{invoice_id}/billing-details
```

Replaces the buyer details printed on a paid invoice (fields left out are cleared). The PDF download then carries them.

<Note>
  **Permission required:** `invoice:read`
</Note>

### Path Parameters

<ParamField path="invoice_id" type="string" required>
  Invoice id (`invoice_id`)
</ParamField>

### Request Body

<ParamField body="address" type="string" required>
  Billing address
</ParamField>

<ParamField body="invoice_type" type="string" required>
  individual requires name; business requires company\_name
</ParamField>

<ParamField body="company_name" type="string">
  Company name
</ParamField>

<ParamField body="contact_email" type="string">
  Contact email
</ParamField>

<ParamField body="name" type="string">
  Person's name
</ParamField>

<ParamField body="tax_id" type="string">
  Tax identification number
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PUT 'https://app.memorylake.ai/openapi/memorylake/admin/v1/billing/invoices/2501a637ff332794f7dc5edee0556e67/billing-details' \
    -H 'Authorization: Bearer sk_xxxxxx' \
    -H 'Content-Type: application/json' \
    -d '{
      "address": "example",
      "invoice_type": "individual",
      "company_name": "Example company",
      "contact_email": "alice@example.com",
      "name": "Example name",
      "tax_id": "4155f354c126224a5833bdd25597ea80"
    }'
  ```
</RequestExample>

### Response

<ResponseField name="data" type="object">
  <Expandable title="Billing Details object">
    <ResponseField name="address" type="string">Billing address</ResponseField>
    <ResponseField name="company_name" type="string">Company name</ResponseField>
    <ResponseField name="contact_email" type="string">Contact email</ResponseField>
    <ResponseField name="invoice_id" type="string">The invoice</ResponseField>
    <ResponseField name="invoice_type" type="string">individual = issued to a person (name); business = issued to a company (company\_name)</ResponseField>
    <ResponseField name="name" type="string">Person's name</ResponseField>
    <ResponseField name="saved" type="boolean">false = nothing is saved yet: the fields are a suggestion from the profile of the member the invoice was issued to (or empty), and the PDF is the provider's</ResponseField>
    <ResponseField name="tax_id" type="string">Tax identification number</ResponseField>
    <ResponseField name="updated_at" type="integer">When they were last saved, Unix seconds</ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json Success (200) theme={null}
  {
    "success": true,
    "message": "Operation completed successfully",
    "data": {
      "address": "example",
      "company_name": "Example company",
      "contact_email": "alice@example.com",
      "invoice_id": "19c056571f855cb3f9252ccbcaada863",
      "invoice_type": "individual",
      "name": "Example name",
      "saved": false,
      "tax_id": "42e837c2d259aa902d4196922464cfeb",
      "updated_at": 1760000000
    }
  }
  ```
</ResponseExample>

### Errors

Errors answer with `success: false`, a `message` and an `error_code`. See [Error Codes](/features/memorylake/api-reference/errors) for every code.

| Status | Meaning |
| - | - |
| `400` | A parameter or the body is invalid |
| `401` | The API key is missing, invalid, disabled or expired |
| `403` | The key is not allowed to do this |
| `404` | The resource does not exist |
| `409` | The request conflicts with the current state, e.g. a duplicate or a limit reached |
| `422` | The body or a parameter failed validation |
| `429` | Too many requests. Wait for the time in `Retry-After` |
| `500` | Server-side error |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.