> For the complete documentation index, see [llms.txt](https://intella.gitbook.io/scan2pay/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://intella.gitbook.io/scan2pay/api-general-rules.md).

# API通用規則說明

## 單一API接入口

Scan2Pay API採用單一API接入口, Request和Response的內容是依據所POST的內容(Body)來決定.

## 傳輸資料加密

Request的Body為JSON格式的資料, 其欄位內容為AES加密過後的內容, 以及以RSA加密過後的AES Key, Server收到此Request後, 會依據所提供的AES Key將Request內容解密成原始資料. 加解密說明請參看

{% content-ref url="/pages/-LEhSZExgXFr8QdvICQI" %}
[API資料傳輸加解密](/scan2pay/api-general-rules/api-jia-jie-mi-ming.md)
{% endcontent-ref %}

## 原始傳輸JSON資料格式

API所接收和回應的原始JSON資料, 請參看

{% content-ref url="/pages/-LEhUWgxAKW9SH9UOVD8" %}
[API Request資料格式](/scan2pay/api-general-rules/api-request-format.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LEhgKsRVh7GoX35fYP3" %}
[API Response資料格式](/scan2pay/api-general-rules/api-response-format.md)
{% endcontent-ref %}
