> For the complete documentation index, see [llms.txt](https://docs.barism.net/docs-slip-verity/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.barism.net/docs-slip-verity/basics/openapi.md).

# OpenAPI

## Inquiry

สำหรับการเรียกข้อมูลสามารถใช้ URL:\
`https://slip.ejs.app/`\
วิธี **Authentication** ใช้แบบเดิม โดยข้อมูลจะถูกส่งในรูปแบบ <mark style="background-color:orange;">Application/JSON</mark> ตัวอย่าง:

```jsx
{
    "payload": “0034000600000101039990213mamauishigure5102TH91046B93”
}
```

### Response

การตอบกลับมี 2 กรณี:

* **สำเร็จ**: จะได้ <mark style="color:green;">**HTTP Status Code 200**</mark>
* **ไม่สำเร็จ**: จะได้ <mark style="color:red;">**HTTP Status Code 4xx-5xx**</mark> พร้อมข้อความผิดพลาด

### <mark style="color:green;">**ตัวอย่าง Response สำเร็จ:**</mark>

```jsx
{
  "discriminator": "(รหัสธนาคาร 3 หลัก).(หมายเลขรายการ)",
  "valid": true,
  "data": {
    "language": "TH",
    "transRef": "(หมายเลขรายการ)",
    "sendingBank": "(รหัสธนาคาร 3 หลัก)",
    "receivingBank": "(รหัสธนาคาร 3 หลัก)",
    "transDate": "20230708",
    "transTime": "12:51:57",
    "sender": {
      "displayName": "(ชื่อผู้ส่งภาษาไทย)",
      "name": "(ชื่อผู้ส่งภาษาอังกฤษ)",
      "account": {
        "type": "BANKAC",
        "value": "XXX-X-XXXX-X"
      }
    },
    "receiver": {
      "displayName": "(ชื่อผู้รับภาษาไทย)",
      "name": "(ชื่อผู้รับภาษาอังกฤษ)",
      "account": {
        "type": "BANKAC",
        "value": "XXX-X-XXXX-X"
      }
    },
    "amount": "(จำนวนเงิน)",
    "paidLocalAmount": "(จำนวนเงิน)",
    "countryCode": "TH",
    "transFeeAmount": "(ค่าธรรมเนียม)",
    "ref1": "",
    "ref2": "",
    "ref3": "",
    "toMerchantId": ""
  },
  "quota": {
    "cost": 0,
    "usage": 0,
    "limit": 10
  },
  "subscription": {
    "id": 0,
    "postpaid": false
  },
  "isCached": true
}

```

## <mark style="color:red;">Error</mark>

เมื่อการเรียกข้อมูลไม่สำเร็จ จะมีการตอบกลับตามรหัสข้อผิดพลาดดังนี้:

* **40000 - Your IP address are not allowed to access this API**\
  ไอพีของคุณไม่ได้รับอนุญาต สามารถเพิ่มไอพีได้จากหน้าการตั้งค่าของ Application โดยนำไอพีที่ได้จาก<https://ifconfig.me/> มาใส่
* **0 - Invalid Data**\
  รูปแบบ Payload ไม่ถูกต้อง ต้องเรียกผ่าน JSON เท่านั้น
* **10001 - Invalid QR Payload**\
  Payload ที่ส่งมาไม่ถูกต้อง หรือมีข้อความอื่นแทรก ทำให้ตรวจสอบไม่ได้
* **10002 - This is not a Slip Verify API QR**\
  Payload ไม่ได้มาจากการทำรายการผ่าน Mobile Banking
* **21001 - Please renew your subscription before using API**\
  Subscription หมดอายุ (กรณีนี้ไม่มีทางเกิดเนื่องจาก ทำสัญญา Partner กัน)
* **20001, 20002 - Unable to connect to Bank API at this moment**\
  มีข้อผิดพลาดจากการเชื่อมต่อธนาคาร


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.barism.net/docs-slip-verity/basics/openapi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
