API reference
Connect your store to crypto payments with four API methods.
Receive BTC, LTC, TRX and USDT TRC20, then transfer the funds when you need them.
${URL}/api/v1Before you start
Ask your manager for these three details:
URL— your API address, starting withhttps://.ACCOUNT_ID— your account ID.Transfer Key— your secret key for transfers and callback settings.
Replace the placeholders below with your details. Use URL without a trailing slash. Keep the Transfer Key on your server.
How to specify amounts
The API uses whole numbers in the currency’s smallest unit:
- 1 BTC or LTC = 100,000,000 units
- 1 TRX or USDT = 1,000,000 units
For example, send 100000 for 0.001 BTC, or 1000000 for 1 USDT.
A typical payment: set your callback → create an address for the order → verify the incoming transaction. Transfer funds whenever you need to.
The examples are templates. Replace the placeholders with your details; the page itself never sends a payment.
New address
No Transfer Key/accounts/{account}/addressesCreate an address and show it to your customer at checkout. Save it with the order so you can match the incoming payment to the right purchase.
| Field | Description |
|---|---|
currencyrequired | btc, ltc, trx or usdt@trx. |
callbackoptional | Override the account callback for this address. Put your order reference in data. |
addr-typeoptional | BTC: p2sh-p2wpkh (default) or p2wpkh. LTC: p2wpkh. TRX/USDT: generic. |
Each successful request creates a new address, including identical requests. Do not automatically repeat a request after a lost response.
TRX and USDT share the account’s TRON address list. Always specify the intended currency.
curl --request POST "${URL}/api/v1/accounts/${ACCOUNT_ID}/addresses" \
--header 'Content-Type: application/json' \
--data-raw '{
"currency": "btc",
"callback": {
"url": "https://merchant.example/payments/callback",
"method": "POST",
"data": {
"order_id": "ORDER_1001"
}
}
}'200 response JSON
{
"account": "00000000000000000000000000000001",
"currency": "btc",
"address": "YOUR_RECEIVING_ADDRESS",
"created": "2026-09-05T12:00:00.000000",
"type": "p2sh-p2wpkh",
"callback": {
"url": "https://merchant.example/payments/callback",
"method": "POST",
"data": {
"order_id": "ORDER_1001"
}
}
}Transfer
Transfer Key required/accounts/{account}/transferSend funds to a destination address. The example sends 100% of the available balance in the selected currency, after network and service fees.
| Field | Description |
|---|---|
currencyrequired | The currency to send. |
transfer-keyrequired | Your private 32-character Transfer Key. |
destinationsrequired | Recipient address and amount. Use "100%" for a sweep, or an integer for a fixed amount. |
feeoptional | Use normal. |
addressesoptional | Array of your source addresses. Omit to select automatically; fixed-amount TRON transfers can use a single covering address. |
fee-limitprocessing-fee-limitoptional | Maximum network and service fees in atomic units of the selected currency. Omitted limits use the current quote. |
Save the returned payment id. success means publication; check TXID info for confirmation. TRX/USDT can return pending before any TXID exists.
Fees and uncertain responses
A single 100% destination deducts both fees automatically. For fixed amounts, fees are added unless subtract-fee-from-amount is true. USDT network and service fees are paid in USDT; the platform supplies execution TRX.
Do not retry the POST automatically: you could send funds again. After a timeout, lost response, 500 or 503, check the saved payment before sending again. A missing ID or a 404 alone does not prove rejection. If the outcome is still unknown, contact your manager before making another transfer.
TRON may finish with a partial-transfer error: some funds were sent. Inspect the saved payment; do not repeat the POST.
curl --request POST "${URL}/api/v1/accounts/${ACCOUNT_ID}/transfer" \
--header 'Content-Type: application/json' \
--data-raw '{
"currency": "btc",
"transfer-key": "YOUR_TRANSFER_KEY",
"destinations": [
{
"address": "YOUR_DESTINATION_ADDRESS",
"amount": "100%"
}
],
"fee": "normal"
}'200 response · selected fields JSON
{"account":"00000000000000000000000000000001","currency":"btc","type":"payment","id":"8312c94cb8d4a9025f7d1c783f2be9a446c0e837965219b46792ac8523d9f068","status":"success","txs":["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"]}TXID info
No Transfer Key/accounts/{account}/history/{id}Verify a payment associated with your account. For an incoming payment, use its blockchain TXID. For a transfer you submitted, use the returned payment ID, including while it has no TXID yet.
| Field | Description |
|---|---|
idpath | Incoming TXID or saved payment ID; 64 lowercase hexadecimal characters. |
currencyquery | Always include it in your integration, especially usdt@trx for USDT TRC20. |
For incoming funds, match items[].address and sum the corresponding items[].amount for your order. Check the account, currency, is_confirmed and observation freshness before fulfilling it. The top-level amount may include several receiving addresses.
A payment ID and a blockchain TXID are different identifiers. This method looks up your account’s recorded activity; it is not a general blockchain explorer.
503 means confirmation cannot currently be verified. Retry the read after Retry-After; do not treat it as an unpaid order. 404 means the item is not available for this account.
curl --get "${URL}/api/v1/accounts/${ACCOUNT_ID}/history/${TXID_OR_PAYMENT_ID}" \
--data-urlencode 'currency=btc'200 response · incoming payment JSON
{
"account": "00000000000000000000000000000001",
"currency": "btc",
"created": "2026-09-16T12:00:00.000000",
"type": "receipt",
"id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"items": [
{
"txid": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"created": "2026-09-16T12:00:00.000000",
"vout": 0,
"event_kind": "utxo_output",
"address": "YOUR_RECEIVING_ADDRESS",
"amount": 100000,
"block": {
"hash": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
"height": 101,
"deleted": false
},
"is_confirmed": true
}
],
"amount": 100000,
"is_confirmed": true,
"observation_status": "recorded",
"as_of": {
"height": 120,
"block_hash": "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
"checked_at": "2026-09-16T12:00:01.000000",
"source_height": 120,
"lag_blocks": 0
}
}Set callback
Transfer Key required/accounts/{account}Tell the service where to notify your store about incoming payments. This callback becomes the default for new addresses unless you set a separate one for an order.
| Field | Description |
|---|---|
currencyrequired | The currency to configure. TRX and USDT share callback defaults; BTC and LTC are separate. |
transfer-keyrequired | Your private Transfer Key. |
callback.urlrequired | Your public HTTPS endpoint. Redirects and private-network destinations are not followed. |
callback.methodoptional | POST (default, JSON body) or GET (query parameters). |
callback.dataoptional | Your metadata, returned with each notification. |
Setting callback to {} disables notifications. An address callback of null inherits the account default. Changes apply to newly created events; queued events retain their saved settings.
Receive, verify, acknowledge
- Save the event durably. Deduplicate retries by
X-Coinkun-Event-ID; credit each transaction position once. - Verify the incoming TXID with method 03 and compare the currency, receiving address and amount with your order. Callback headers are not cryptographic signatures.
- Reply
200,Content-Type: text/plain, with the exact body*ok*.
Acknowledging a pending event stops the later confirmed notification. If you acknowledge early, keep polling method 03. To wait for confirmation via callback, do not return *ok* for pending. Corrections such as dropped can still arrive.
Unacknowledged receipts retry after each processed BTC/LTC block, or every five TRON blocks, within their delivery window. Delivery can repeat and arrive out of order.
curl --request PATCH "${URL}/api/v1/accounts/${ACCOUNT_ID}" \
--header 'Content-Type: application/json' \
--data-raw '{
"currency": "btc",
"transfer-key": "YOUR_TRANSFER_KEY",
"callback": {
"url": "https://merchant.example/payments/callback",
"method": "POST",
"data": {}
}
}'200 response · selected fields JSON
{"account":"00000000000000000000000000000001","currency":"btc","callback":{"url":"https://merchant.example/payments/callback","method":"POST","data":{}}}Incoming notification JSON
{"account":"00000000000000000000000000000001","currency":"btc","value":100000,"input_address":"YOUR_RECEIVING_ADDRESS","confirmations":1,"input_transaction_hash":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","network":"mainnet","event":"confirmed","status":"confirmed","event_kind":"utxo_output","position":0,"data":{"order_id":"ORDER_1001"}}