# ดูใบเสร็จรับเงินหนึ่งใบ

Source: https://checkslip.com/docs/get-receipt

GET `https://api.checkslip.com/api/billing/receipts/{receipt_id}`

ใช้ API key

แสดงใบเสร็จรับเงินหนึ่งใบ ใบเสร็จออกครั้งเดียวเมื่อชำระสำเร็จและแก้ไขไม่ได้ ข้อมูลผู้ซื้อบนใบเสร็จเป็นข้อมูล ณ เวลาที่ชำระ ถ้า seller_ready เป็น false แปลว่าใบเสร็จนี้ใช้เป็นหลักฐานทางภาษีไม่ได้ ใช้ API key ที่มีสิทธิ์ billing:read

## Parameters

| ฟิลด์ | ส่งทาง | ชนิด | จำเป็น |
| --- | --- | --- | --- |
| `receipt_id` | path | `string (uuid)` | ใช่ |

## Responses

### 200 `application/json`

| ฟิลด์ | ชนิด | จำเป็น |
| --- | --- | --- |
| `seller_ready` | `boolean` | ใช่ |
| `id` | `string (uuid)` | ใช่ |
| `receipt_no` | `string` | ใช่ |
| `order_id` | `string (uuid)` | ใช่ |
| `issued_at` | `string (date-time)` | ใช่ |
| `seller` | `object` | ใช่ |
| `seller.name` | `string` | ใช่ |
| `seller.tax_id` | `string` | ไม่ |
| `seller.address` | `string` | ไม่ |
| `seller.branch` | `string` | ไม่ |
| `buyer` | `BillingInfo` | ใช่ |
| `buyer.buyer_type` | `PERSON \| COMPANY` | ไม่ |
| `buyer.name` | `string` | ไม่ |
| `buyer.tax_id` | `string` | ไม่ |
| `buyer.branch` | `string` | ไม่ |
| `buyer.address` | `string` | ไม่ |
| `buyer.email` | `string (email)` | ไม่ |
| `lines` | `object[]` | ใช่ |
| `lines[].description` | `string` | ใช่ |
| `lines[].quantity` | `integer` | ใช่ |
| `lines[].amount` | `Money` | ใช่ |
| `lines[].amount.satang` | `integer` | ใช่ |
| `lines[].amount.currency` | `string = THB` | ใช่ |
| `vat` | `object` | ไม่ |
| `vat.rate_bp` | `integer` | ใช่ |
| `vat.base` | `Money` | ใช่ |
| `vat.base.satang` | `integer` | ใช่ |
| `vat.base.currency` | `string = THB` | ใช่ |
| `vat.amount` | `Money` | ใช่ |
| `vat.amount.satang` | `integer` | ใช่ |
| `vat.amount.currency` | `string = THB` | ใช่ |
| `total` | `Money` | ใช่ |
| `total.satang` | `integer` | ใช่ |
| `total.currency` | `string = THB` | ใช่ |
| `payment_method` | `CARD \| PROMPTPAY` | ใช่ |

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

401 403 404 500

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

**cURL**

```bash
curl https://api.checkslip.com/api/billing/receipts/0b6c2f5e-8a41-4d1e-9c3a-5f7e2d18a6b4 \
  -H "Authorization: Bearer $CHECKSLIP_API_KEY"
```

**Node.js**

```javascript
const res = await fetch("https://api.checkslip.com/api/billing/receipts/0b6c2f5e-8a41-4d1e-9c3a-5f7e2d18a6b4", {
  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/receipts/0b6c2f5e-8a41-4d1e-9c3a-5f7e2d18a6b4",
    headers={
        "Authorization": f"Bearer {os.environ['CHECKSLIP_API_KEY']}",
    },
)
data = res.json()
```

```json
{
  "seller_ready": true,
  "id": "0b6c2f5e-8a41-4d1e-9c3a-5f7e2d18a6b4",
  "receipt_no": "RC-202611-0001",
  "order_id": "0b6c2f5e-8a41-4d1e-9c3a-5f7e2d18a6b4",
  "issued_at": "2026-11-05T09:30:00+07:00",
  "seller": {
    "name": "บริษัท โฮโลแกรม จำกัด",
    "tax_id": "string",
    "address": "string",
    "branch": "สำนักงานใหญ่"
  },
  "buyer": {
    "buyer_type": "PERSON",
    "name": "string",
    "tax_id": "string",
    "branch": "string",
    "address": "string",
    "email": "shop@example.com"
  },
  "lines": [
    {
      "description": "string",
      "quantity": 1,
      "amount": {
        "satang": 5000,
        "currency": "THB"
      }
    }
  ],
  "vat": {
    "rate_bp": 700,
    "base": {
      "satang": 5000,
      "currency": "THB"
    },
    "amount": {
      "satang": 5000,
      "currency": "THB"
    }
  },
  "total": {
    "satang": 5000,
    "currency": "THB"
  },
  "payment_method": "CARD"
}
```
