# Update buyer details for receipts

Source: https://checkslip.com/en/docs/put-billing-info

PUT `https://api.checkslip.com/api/billing/billing-info`

API key

Saves the buyer details printed on your next receipts; receipts already issued keep theirs. The tax ID must be 13 digits with a valid check digit. Needs an API key with billing:write.

## Request body

`application/json`

| Field | Type | Required |
| --- | --- | --- |
| `buyer_type` | `PERSON \| COMPANY` | no |
| `name` | `string` | no |
| `tax_id` | `string` | no |
| `branch` | `string` | no |
| `address` | `string` | no |
| `email` | `string (email)` | no |

## Responses

### 200 `application/json`

| Field | Type | Required |
| --- | --- | --- |
| `buyer_type` | `PERSON \| COMPANY` | no |
| `name` | `string` | no |
| `tax_id` | `string` | no |
| `branch` | `string` | no |
| `address` | `string` | no |
| `email` | `string (email)` | no |

### Possible errors

400 401 403 500

An error as Problem Details. All codes are listed at [Error codes](https://checkslip.com/en/docs/errors)

**cURL**

```bash
curl -X PUT https://api.checkslip.com/api/billing/billing-info \
  -H "Authorization: Bearer $CHECKSLIP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"buyer_type":"PERSON","name":"string","tax_id":"string","branch":"string","address":"string","email":"shop@example.com"}'
```

**Node.js**

```javascript
const res = await fetch("https://api.checkslip.com/api/billing/billing-info", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.CHECKSLIP_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    buyer_type: "PERSON",
    name: "string",
    tax_id: "string",
    branch: "string",
    address: "string",
    email: "shop@example.com",
  }),
});
const data = await res.json();
```

**Python**

```python
import os

import requests

res = requests.put(
    "https://api.checkslip.com/api/billing/billing-info",
    headers={
        "Authorization": f"Bearer {os.environ['CHECKSLIP_API_KEY']}",
    },
    json={
        "buyer_type": "PERSON",
        "name": "string",
        "tax_id": "string",
        "branch": "string",
        "address": "string",
        "email": "shop@example.com",
    },
)
data = res.json()
```

```json
{
  "buyer_type": "PERSON",
  "name": "string",
  "tax_id": "string",
  "branch": "string",
  "address": "string",
  "email": "shop@example.com"
}
```
