AkashicPay
繁體中文
繁體中文
  • 簡介
    • 概述
    • 費用結構
    • 交易時間
    • 術語
  • 儀表板
    • 儀表板
    • 帳號
    • 轉帳
    • 設置
    • 開發者
  • SDK
    • 入門
    • 付款流程
    • SDK 與工具套件
    • 函式 (Functions)
      • getDepositAddress
      • getDepositUrl
      • 識別碼 (Identifier) & ReferenceId
      • 要求的金額和貨幣 (Requested amount & currency)
      • 提款/提幣 (payout)
      • 提款/提幣回調 (Payout callback)
      • 存款回調 (Deposit callback)
      • getTransfers
      • getBalance
      • getTransactionDetails
      • 錯誤訊息 (Errors)
    • 支援貨幣
    • 回調安全性
  • 指南
    • 快速指南
    • 建議整合流程
Powered by GitBook
On this page
  • 範例
  • 等待存款 (L1Transaction)
  • 存款 (L1Transaction)
  • 存款 (L2Transaction)

Was this helpful?

  1. SDK
  2. 函式 (Functions)

存款回調 (Deposit callback)

存款到您所建立的錢包 (地址) 之後收到的資料

Previous提款/提幣回調 (Payout callback)NextgetTransfers

Last updated 11 days ago

Was this helpful?

要接收回調,請確保您在 AkashicPay.com 上註冊了您的 URL。有三個選項,一個是待定,一個是已確認存款,還有一個是存款失敗。

  • 等待存款: 一旦(第一層)交易在 和 上註冊,但尚未在 L1 網路上確認之前(即節點尚未驗證或尚未在上面建立/挖掘足夠的區塊之前),即接收回調。

  • 存款: 當交易在第一層上被確認(透過足夠的區塊/節點)時接收回調。未能確認的交易也會包含在此。至於 L2 交易,由於它們幾乎是即時的,因此也會包含在此。

  • 存款失敗: 如果交易未能在第一層完成,即使可能已經註冊/廣播,也會收到回調。在這種情況下,不應將資金存入。

我們建議始終設置存款 URL。如果您想要更多控制權並更早收到資訊,也可以設定待定存款的 URL - 但請注意,顯示為待定的存款並非最終存款,仍可能會失敗(雖然很少發生)。(它們可能是相同的 URL!)

注意:如果回調的回應狀態代碼 (status code) >= 400,則回呼最多會重試 15 次,且延遲時間會增加,自第一次嘗試起最多可延遲約 10 小時。

如果您正在管理您系統中的用戶餘額,請注意回調中的金額不包括向您收取的 。如果您想將實際可用的資金存入用戶的帳戶,您應該從金額中減去 internalFee.deposit。

注意: l2Txnhash (「L2-hash」)應該始終用作交易的唯一識別碼。這是 上任何交易的唯一交易哈希 (transaction-hash)。它存在於已確認的存款和待定/已確認的付款中。這對於交易尤其重要,因為第二層交易沒有第一層哈希值 (txHash)

注意:internalFee 是指在 AkashicChain 上交易的 。

注意:對於價值小於 1 USDT 的第 1 層存款,不會發送存款回調。

範例

等待存款 (L1Transaction)

請注意沒有 l2TxnHash

{
  "initiatedAt": "2024-08-19T10:02:54.000Z", // ISO8601 format
  "fromAddress": "TTVkK6hGoAFhALG9NTkUDHjcFFXKmWcScU",
  "toAddress": "TQH8ygbS8BAnzSQ9uxR9vXHJYMQVRvbgPg",
  "coinSymbol": "TRX-SHASTA", // NetworkSymbol
  "status": "Pending", // TransactionStatus. Always "Pending" here of course
  "type": "Deposit", // TransactionType. Always "Deposit" here
  "layer": "L1Transaction", // TransactionLayer. Always L1 for pending
  "amount": "10.000000", 
  "txHash": "28a9880ad2ef3b7be1c40763128ec9630ab74e4749a3c81037c3501e4209bfcc", // L1 txHash
  "receiverInfo": {
    "identity": "AS188689e48494c8a452683587138f209d673aada204cb23393140e7f40280e0c5", // Identity/L2-address/Akashic address of receiver
  },
  "receiverIdentity": "AS18...", // DEPRECATED. Same as above. Please use receiverInfo.identity 
  "tokenSymbol": "USDT", // Only here if a token-transaction,
  "identifier": "user123",
  // The below only if matching a requested amount
  "exchangeRate": "7.182",
  "requestedValue": {
    "amount": "1000",
    "currency": "USD"
  }
}

存款 (L1Transaction)

請參閱上文的 「待定」。指出的差異

請注意,由於費用的關係,您所控制的實際資金為 10.0 - 0.1 = 9.9

{
  "initiatedAt": "2024-08-19T10:03:58.649Z",
  "confirmedAt": "2024-08-19T10:05:02.529Z", // Time transaction was safely confirmed
  "fromAddress": "TTVkK6hGoAFhALG9NTkUDHjcFFXKmWcScU",
  "toAddress": "TQH8ygbS8BAnzSQ9uxR9vXHJYMQVRvbgPg",
  "coinSymbol": "TRX-SHASTA",
  "status": "Confirmed", // "Confirmed" or "Failed"
  "type": "Deposit",
  "layer": "L1Transaction", // Could be "L2Transaction" here
  "amount": "10.000000",
  "internalFee": {
    "deposit": "0.100000" // Akashic-fee, not present if Failed
  },
  "txHash": "28a9880ad2ef3b7be1c40763128ec9630ab74e4749a3c81037c3501e4209bfcc",
  "l2TxnHash": "ASe7eb1cb8193787040fcffa02a224a6ced7415ff2205343c0ab661e898e8d6eef", // AkashicChain txHash, only set after confirmation. Not present if Failed
 "receiverInfo": {
    "identity": "AS188689e48494c8a452683587138f209d673aada204cb23393140e7f40280e0c5", // Identity/L2-address/Akashic address of receiver
  },
  "receiverIdentity": "AS18...", // DEPRECATED. Same as above. Please use receiverInfo.identity 
  "tokenSymbol": "USDT" // Only here if a token-transaction,
  "identifier": "user123",
  // The below only if matching a requested amount
  "exchangeRate": "7.182",
  "requestedValue": {
    "amount": "1000",
    "currency": "USD"
  }
}

存款 (L2Transaction)

{
  "initiatedAt": "2024-08-19T10:03:58.649Z",
  "confirmedAt": "2024-08-19T10:03:58.649Z",
  "fromAddress": "AS3ce733d2af1ee530e0e85bd7de45c59626b28f95ac2d8e83a0685a70aac9b764", // Same as senderIdentity
  "toAddress": "AS188689e48494c8a452683587138f209d673aada204cb23393140e7f40280e0c5", // Same as receiverIdentity
  "coinSymbol": "TRX-SHASTA",
  "status": "Confirmed", // "Confirmed" or "Failed"
  "layer": "L2Transaction", // Could be "L2Transaction" here
  "amount": "10.000000",
  "internalFee": {
    "deposit": "0.100000" // Akashic-fee, not present if Failed
  },
  "l2TxnHash": "ASe7eb1cb8193787040fcffa02a224a6ced7415ff2205343c0ab661e898e8d6eef", // AkashicChain txHash
  "receiverInfo": {
    "identity": "AS188689e48494c8a452683587138f209d673aada204cb23393140e7f40280e0c5", // Identity/L2-address/Akashic address of receiver
  },
  "receiverIdentity": "AS18...", // DEPRECATED. Same as above. Please use receiverInfo.identity 
  "tokenSymbol": "USDT" // Only here if a token-transaction,
  "identifier": "user123",
 "senderInfo": {
    "identity": "AS3ce733d2af1ee530e0e85bd7de45c59626b28f95ac2d8e83a0685a70aac9b764", // Akashic Address of sender
  },
  "senderIdentity": "AS3c..." // DEPRECATED. Same as above. Please use senderInfo.identity instead
  // The below only if matching a requested amount
  "exchangeRate": "7.182",
  "requestedValue": {
    "amount": "1000",
    "currency": "USD"
  }
}

如果使用者從 傳送資產,將會在 執行,這是我們的第二層區塊鏈,以減少第一 層的礦工費和成本。

存款
L2 相關費用
L1
L2
網路
AkashicPay 費用
AkashicChain
第二層
AkashicLink
AkashicChain