# ดูข้อมูลผู้ซื้อสำหรับใบเสร็จ

Source: https://checkslip.com/docs/get-billing-info

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

ใช้ API key

แสดงชื่อ เลขประจำตัวผู้เสียภาษี สาขา ที่อยู่ และอีเมล ที่จะพิมพ์บนใบเสร็จรับเงินฉบับต่อไป ใช้ API key ที่มีสิทธิ์ billing:read

## Responses

### 200 `application/json`

| ฟิลด์ | ชนิด | จำเป็น |
| --- | --- | --- |
| `buyer_type` | `PERSON \| COMPANY` | ไม่ |
| `name` | `string` | ไม่ |
| `tax_id` | `string` | ไม่ |
| `branch` | `string` | ไม่ |
| `address` | `string` | ไม่ |
| `email` | `string (email)` | ไม่ |

### Error ที่อาจได้

401 403 500

error ในรูป Problem Details ดูรหัสทั้งหมดที่ [รหัสข้อผิดพลาด](https://checkslip.com/docs/errors)

**cURL**

```bash
curl https://api.checkslip.com/api/billing/billing-info \
  -H "Authorization: Bearer $CHECKSLIP_API_KEY"
```

**Node.js**

```javascript
const res = await fetch("https://api.checkslip.com/api/billing/billing-info", {
  headers: {
    Authorization: `Bearer ${process.env.CHECKSLIP_API_KEY}`,
  },
});
const data = await res.json();
```

**Python**

```python
import os

import requests

res = requests.get(
    "https://api.checkslip.com/api/billing/billing-info",
    headers={
        "Authorization": f"Bearer {os.environ['CHECKSLIP_API_KEY']}",
    },
)
data = res.json()
```

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