# 付款流程

注意: `l2Txnhash` (「L2-hash」) 應該始終用作交易的唯一識別碼。這是 [AkashicChain](/traditional-chinese/jian-jie/shu-yu.md#akashicchain) 上任何交易的唯一交易 identifier。它存在於已確認的存款和待定/已確認的付款中。這對於[第二層](/traditional-chinese/jian-jie/shu-yu.md#di-er-ceng-layer2)交易尤其重要，因為第二層交易沒有第一層哈希值 (`txHash`)。

## <mark style="color:blue;">存款流程</mark>

{% @mermaid/diagram content="sequenceDiagram
autonumber
伺服器->>Akashic: getDepositAddress<br/> 使用唯一的用戶端識別碼 (identifier) 擷取用戶端的永久 L1 地址<br/>。
Akashic-->>伺服器: 永久 L1 地址
伺服器->>用戶: 永久 L1 地址
loop
用戶->>L1/L2 網路: 存款至地址
Akashic->>伺服器: 待存款回調<br/>包含識別碼 (identifier) 和 哈希值 (txHash)
Akashic->>伺服器: 確認存款回調<br/>包含識別碼 (identifier) 和 L2 哈希值 (TxnHash/txHash)
note over 伺服器: \*建議<br/>增加客戶結餘
end" fullWidth="false" %}

## <mark style="color:blue;">出款 (提幣) 流程</mark>

{% @mermaid/diagram content="sequenceDiagram
autonumber
伺服器->>Akashic: 以獨特的客戶識別碼 (identifier) 出款
Akashic-->>伺服器: 成功
note over 伺服器: \*建議<br/>扣除客戶結餘
Akashic->>L1/L2 網路: 出款
Akashic->>伺服器: 待出款回調<br/>包含識別碼 (identifier) 和 哈希值 (txHash)
Akashic->>伺服器: 確認出款回調<br/>包含識別碼 (identifier) 和 L2 哈有值 (TxnHash/txHash)" %}


---

# Agent Instructions: 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.akashicpay.com/traditional-chinese/zhi-nan/fu-kuan-liu-cheng.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.
