(GET) https\://www.warmkey.finance/paymentV1/interface
The generation of deposit link is different to other APIs
Query Params For Deposit Link
Redirect user from merchant site to WARMKEY for out-app integration, or you can put this link in IFRAME for in-app integration.
Parameter | Type / Format | Required | Description |
---|---|---|---|
account | string | ✅ | md5(api key) |
path | string | ✅ | - Relative path of bip44. - Format is tableId/recordId. eg. 1/123. - User defined table ID: 1 can represent order, user or anything, - User defined record ID: 123 can be order id, user id or anything to match with primary key of table in your local db. |
config | string / base64 | - below is base64-decoded string uses to override saved/default config. { "features": { "footer": true }, "themeVariables": { "--w3m-font-family": "'Noto_Sans_a57643', 'Noto_Sans_Fallback_a57643'", "--w3m-border-radius-master": "4px", "--w3m-accent": "#10B981", "--w3m-color-mix": "#363636", "--w3m-color-mix-strength": 10 }, "themeMode": "dark" } | |
signature | string | ✅ | 64-bytes signature. |
Signature Generation
A signature is generated using RSA private key
.
$payload = [
"account"=>md5($your_api_key),
"path"=>"1/123",
];
$signature_data = json_encode($payload);
$to_sign = hash('sha256', $signature_data, true);
$your_private_key_pem = <<EOD
-----BEGIN PRIVATE KEY-----
MIIBVwIBADANBgkqhkiG9w0BAQEFAASCAUEwggE9AgEAAkEA1eerGN7aInrV0myN
5RYAVL58JsUQCdkIUYDLoupVLnhO8uw0DD5ooNwd8gT8KJU0UzKSpRN+sjSwutD3
ZMrvAQIDAQABAkEA1VLwmKIPa5mTSwLF1DTH6bv6tvOK1jdjC11mOLh4cRjoEw83
FzwSfuWlGyFGdir5PE5SK/1D8nZ41h8bnw9pAQIhAP/AQKUYlha+t7gGstFc+J6Z
9ZgoxT44ngyF5dE/4+FRAiEA1hz8Rpwwrm8pwp+kdho8guTwozmpvMrQYdRufjag
RrECIQCTtZrgf3m3+0CqlZvTlam2GF+jGPEKhbKqsu7P0uGvcQIhAIr1MtEMqxd6
M6sI+q5fZqg4tufoE33gTo8/VBp7j1dxAiEAsvhkqXu0AWvkJxVrCfQWiv5RMxAL
LXPLNzdej9IFEns=
-----END PRIVATE KEY-----
EOD;
$private_key = openssl_pkey_get_private($your_private_key_pem);
openssl_sign($to_sign, $your_signature, $private_key, OPENSSL_ALGO_SHA256);
Deposit Link Generation
$deposit_link = "https://www.warmkey.finance/paymentV1/interface/?";
$payload = [
"account"=>md5($your_api_key),
"path"=>"1/123",
"signature"=> $your_signature,
];
$deposit_link .= http_build_query($payload);
Query Params For Return URL
- Redirect user from WARMKEY to merchant site when end user cancel or pay finish at WARMKEY.
- Only available if you implement out-app (link to WARMKEY) solution.
- Merchant's developer can design his own return UI/UX based on these returned params.
- Do not rely on these return params for critical operation. Instead call
Query Log
endpoint for confirmed transactions.
Parameter | Type / Format | Required | Description |
---|---|---|---|
txs | string / base64 | ✅ | base64_encode(json_encode([]TX array)). Empty array if deposit not detected. |
TX Array
Array Index | Type / Format | Required | Description |
---|---|---|---|
0 | string / address | ✅ | Sender address. |
1 | string / address | ✅ | Deposit address. |
2 | string / hex string | ✅ | Transaction hash. |
3 | string / double | ✅ | Deposit amount. |
4 | string | ✅ | Coin symbol. |
5 | string | ✅ | Network. |