ALLINONE
  1. Description
ALLINONE
  • AIO Solution Brief
  • Overview
  • Getting Started
  • Supported Blockchain Networks and Tokens
  • Subaddresses and collection
  • Fund Pool and Withdrawal
  • Funds flow
  • Registration
  • Subaddress transactions
  • API
    • API Basics
    • API Encryption Transmission
    • Create Sub-Address
      POST
    • Create Multiple Subaddresses
      POST
    • Get Sub-Address List
      GET
    • Get Sub-Address Transaction
      GET
    • Create Withdraw Transaction
      POST
    • Direct Withdrawal Transaction
      POST
    • Get Withdraw Transaction details
      GET
    • Get Supported Blockchains and Tokens
      GET
  • Description
    • Collection Instructions
    • Withdrawal Instructions
    • 2-FA Authentication
    • TG Bot
    • Webhook
  • User Experience
    • Overview
    • Registration/Signup
    • Login/Signin
    • Enable TOTP
    • Reset Forgotten Password
    • Subaddress
    • Subaddress transactions
    • Collection Address
    • Fund Pool Addresses
    • Gas Management addresses
    • Settings
      • API Keys and Data encryption
      • IP Whitelisting in API Keys
      • IP Whitelisting - Dashboard
      • Webhooks
  • 用户体验
    • 注册
    • 登录
    • TOTP
    • 忘記密碼
    • 子地址
    • 子地址详情
    • 收款地址概览 (Collection Addresses)
    • 资金池概览 (FundPool Addresses)
    • 燃气管理地址 (Gas Management Addresses)
    • 设置
      • API密钥和数据加密
      • API 密钥中的 IP 白名单
      • AIO仪表板IP白名单
      • 用于通知的 Webhooks
  1. Description

Webhook

The Webhook function is mainly used to listen for a series of transaction changes and then callback them to the set Hook URL.

Configuration#

To configure your Webhook URL from the dashboard, make sure the Webhook URL is a POST request.
Support https and http requests.
When ALL IN ONE attempts to store the endpoint details, it ensures the endpoint is operational by sending a test webhook message, expecting a 200 response to confirm its active status.
The client (System B receiving the webhook) must set up the webhook with specific configurations:
1.
For the test message: The client should verify if the received message contains the word 'test.' If so, they should disregard it and simply respond with 'OK.' For any other scenarios, the message requires further processing.
The message key for testing is designated as "This is a test message"
The message key for actual production use is set as "ok."
2.
Ensure that the system does not process messages repeatedly, In some cases, if the message is not confirmed to have been delivered, multiple messages are sent to confirm.

Test message#

Click the Test button on the page and a test message will be sent, the value of 'msg' in the test message is This is a test message, msg in a normal callback is always ok and can be distinguished based on this.
image-20240407093850250

Security#

Every callback request contains a X-Auth-Key header, this field is used for callback authentication. The receiver can verify the validity of the callback according to this field.
"X-Auth-Key": "Y46_M4ZWFP8JQQgFhmMvmzLmOqZ49rjY1SUUkQ6wDjQ"
The value of X-Auth-Key can be obtained from the Auth Key field in the dashboard to verify the validity of the callback, as follows:
The IP address of the ALL IN ONE service is: 167.172.83.207, you can add it to the IP whitelist to ensure normal communication.
If you need to encrypt the transmitted data, go to API Encryption Transmission for details.

Webhook Name Explain#

Sub Address#

Notify when there is a transaction change in the sub-address
Sample request content
The data format is consistent with the TransactionData format in Get Sub-Address Transaction
  {
    "success": true,
    "msg": "ok",
    "data": {
      "chain": "BITCOIN",
      "token": "BTC",
      "hash": "09f48564be8272b922b316325a717ff64886cb007f2397e980e74525bdf4f555",
      "addr": "0xfdF03d452906B57C7e68226e728809C8A3a02F6B",
      "type": "receive",
      "from_addr": "0x342bEeF2685576570e94c89937E9F2C1c97D78BC",
      "to_addr": "0xfdF03d452906B57C7e68226e728809C8A3a02F6B",
      "amount": "1",
      "prices": [
        {
          "currency": "USDT",
          "price": "1.0001",
          "currency_amount": "67360.245000",
          "price_timestamp": "2024-07-11 11:46:00"
        },
        {
          "currency": "EUR",
          "price": "1.11",
          "currency_amount": "60684.684",
          "price_timestamp": "2024-09-17 15:21:39"
        }
      ],
      "timestamp": 1720531841000
    }
  }
---

Withdraw#

Withdraw will notify when the status changes. Currently, AIO will return the following statuses
CANCEL: Cancelled transaction
ACTIVE: Queue to wait for the transaction
AUTH: User secondary authentication is required
FUNDS_LACK: Insufficient funds (unable to activate or unable to trade)
FAILURE: Transaction process unknown exception or on-chain confirmation failure
SUCCEED: Transaction done
Sample request content
The data format is consistent with the data format in Get Withdraw Transaction details
    {
    "success": true,
    "msg": "This is a test message: ok",
    "data": {
      "id": "1",
      "chain": "ETHEREUM",
      "token": "USDT",
      "amount": "2",
      "prices": [
        {
          "currency": "USDT",
          "price": "1.0001",
          "currency_amount": "2.0002",
          "price_timestamp": "2024-09-17 10:38:00"
        },
        {
          "currency": "EUR",
          "price": "1.11",
          "currency_amount": "2.22",
          "price_timestamp": "2024-09-17 15:21:39"
        }
      ],
      "created_at": "2024-09-17T10:38:00+00:00",
      "modified_at": "2024-09-17T10:38:00+00:00",
      "status": "SUCCEED"
    }
  }

Handle duplicate events#

Callback endpoints might occasionally receive the same event more than once. We advise you to guard against duplicated event receipts. One way of doing this is logging the events you’ve processed, and then not processing the logged ones.

Retry logic#

All IN ONE server expects to get a 200 status code from you within 10 seconds. If the response code is different from 200 or a deadline is exceeded, we offer you a return visit of up to 14 hours and offer exponential backoff:
num ^ 4 + num seconds where num is 1 to 15 retry
1   |  0h  0m  2s
2   |  0h  0m 18s
3   |  0h  1m 24s
4   |  0h  4m 20s
5   |  0h 10m 30s
6   |  0h 21m 42s
7   |  0h 40m  8s
8   |  1h  8m 24s
9   |  1h 49m 30s
10  |  2h 46m 50s
11  |  4h  4m 12s
12  |  5h 45m 48s
13  |  7h 56m 14s
14  | 10h 40m 30s
15  | 14h  4m  0s
Previous
TG Bot
Next
Overview
Built with