Signature Authentication and Encrypted Transmission#
To ensure the security and integrity of API requests, the client must generate a signature based on the request content for each API call and include it in the HTTP headers. The platform will validate the request based on the signature. Any request that fails verification will be considered unauthorized and rejected.Get API Key via aio-dashborad
| Header Name | Description | Example |
|---|
algorithm | The hashing algorithm used for signing. Supported: HMAC-SHA256 | HMAC-SHA256 |
date | The timestamp of the request (recommended in ISO-8601 UTC format) | 2025-05-12T00:00:00Z |
body-md5 | The MD5 hash of the request body (use an empty string if there is no body) | a4e00bea676896c4524f112fd0e2f6b6 |
aio-sign | The Base64-encoded signature generated using your Secret Key | QmFzZTY0RW5jb2RlZFNpZ25hdHVyZVN0cmluZw== |
aio-aes | (Optional) AES IV used to encrypt response data, for decrypting responses | pS1k2dfGjI9klq3j |
aio-api-key | Your API Key created in the AIO dashboard | viQblWoiMslwpVgHtNBfLstt |
Signature Construction#
AIO uses HMAC-based signature authentication. Clients must sign a structured string containing key request information. The format is:HMAC-SHA256 | 2025-05-27T08:00:00Z | GET /v2/tx?page=1&size=10
Signature Components#
| Field | Description |
|---|
algorithm | The algorithm used for signing HMAC-SHA256 |
date | The UTC timestamp of the request in ISO-8601 format |
method | HTTP method (uppercase), e.g., GET, POST |
uri | Full request path including query string, e.g., /v2/tx?page=1&size=10 |
body_md5 | The MD5 hash of the request body (only for POST/PUT/PATCH methods) |
Example: GET /tx#
Example: POST /tx/pay-in#
Encrypted Transmission#
To further enhance communication security, AIO supports AES-CBC encryption of API response data. If enabled, the client must send an aio-aes header containing the Base64-encoded IV (initialization vector). The server will return AES-encrypted content.Example: GET /tx#
Example: POST /tx/pay-in#
Response Decryption#
Additional Notes#
You should implement signature generation and AES encryption/decryption based on your development language and framework.
For debugging purposes, it's helpful to log the signature string and output for verification.