Deposit callback

Data received after a deposit is made to one of your created wallets (addresses)

To receive callbacks make sure you registered your URLs on AkashicPay.com. There are three options, one for pending deposits, one for confirmed deposits, and one for failed deposits.

  • Pending Deposits: Receive callbacks as soon as the (Layer 1) transaction is registered on L1 and L2, but before it has been confirmed on the L1 network (i.e. before nodes have verified it or enough blocks have been created/mined on top)

  • Deposits: Receive callback when the transaction is confirmed (through sufficient blocks/nodes) on Layer 1 networks. Transactions that failed to confirm will also be included here. As for L2 transactions, since they are near-instant they will also be included here.

  • Failed Deposits: Receive callbacks if the transaction fails to complete on Layer 1, even though it might have been registered/broadcast. In this case, funds should not be credited.

We recommend always setting the Deposit URL. If you'd like more control and to receive information earlier, also set the URL for pending deposits - but be aware that deposits that show up as pending are not final and may still fail (albeit rarely). (They could be the same URL!)

Note: If the response to the callback has a status code >= 400, the callback is retried up to 15 times with increasing delays up to around 10hrs since the first attempt.

If you are managing the balance of users in your system, please note that the amount in the callback does not include the AkashicPay Fee charged on you. If you would like to credit your user with the actual available funds you should subtract internalFee.deposit from the amount.

Examples

Pending Deposit (L1Transaction)

{
  "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
  "receiverIdentity": "AS188689e48494c8a452683587138f209d673aada204cb23393140e7f40280e0c5", // Identity/l2-address of receiver
  "tokenSymbol": "USDT" // Only here if a token-transaction,
  "identifier": "user123"
}

Deposit (L1Transaction)

Refer to "Pending" above. Differences pointed out

Note that because of the fees, the actual funds under your control are: 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
  "receiverIdentity": "AS188689e48494c8a452683587138f209d673aada204cb23393140e7f40280e0c5",
  "tokenSymbol": "USDT" // Only here if a token-transaction,
  "identifier": "user123"
}

Deposit (L2Transaction)

If user is sending asset from AkashicLink, it will be executed in AkashicChain, which is our Layer 2 blockchain to reduce the gas fee and cost in Layer 1.

{
  "initiatedAt": "2024-08-19T10:03:58.649Z",
  "confirmedAt": "2024-08-19T10:03:58.649Z",
  "fromAddress": "TTVkK6hGoAFhALG9NTkUDHjcFFXKmWcScU",
  "toAddress": "TQH8ygbS8BAnzSQ9uxR9vXHJYMQVRvbgPg",
  "coinSymbol": "TRX-SHASTA",
  "status": "Confirmed", // "Confirmed" or "Failed"
  "type": "Deposit",
  "layer": "L2Transaction", // 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
  "receiverIdentity": "AS188689e48494c8a452683587138f209d673aada204cb23393140e7f40280e0c5",
  "tokenSymbol": "USDT" // Only here if a token-transaction,
  "identifier": "user123",
  "initiatedToNonL2": "TEu14jWk2srK7vrw3jaApzURzetvRDaNZW",
  "senderIdentity": "AS3ce733d2af1ee530e0e85bd7de45c59626b28f95ac2d8e83a0685a70aac9b764"
}

Last updated