Hinkal API

Partner Transfer Address

Create a transfer address with a partner secret key, refunding to refundTo

POST/partner/transfer-address
https://api.hinkal.io/partner/transfer-address

Creates a transfer address with only a Hinkal Partner secret key in x-api-key: no session and no wallet signature. Each payment is paid out to recipientAddress, like a transfer address from POST /receive-address, and the payout is credited to the key with volume and commission. Without destinationChainId, each payment is paid out on the chain it was sent on.

Send only on acceptedChainIds. On EVM the address is the same on every EVM chain, so a payer can also send on a chain Hinkal doesn't support. Funds sent there can't be paid out, refunded or recovered.

Refunds. A payment that can't be paid out, for example because its payout or bridge fails, is refunded to refundTo automatically, on the chain it was sent on, minus network fees. Some funds can't be refunded automatically: payments sent after the address expired, payments from a sender that failed Hinkal's compliance screening, tokens Hinkal doesn't support, and balances too small to cover the fee of an automatic refund. Check GET /partner/transfer-address/stuck-balances regularly; if a balance is still listed an hour later, recover it with POST /partner/transfer-address/recover.

Every call creates a new address, valid for 14 days. Overlapping calls can return 409; retry. These addresses don't appear in GET /receive-vault-account or GET /stuck-balances.

Header parameters

NameTypeDescription
x-api-keyrequiredstringHinkal Partner secret key (hk_sk_live_ + 64 hex characters). It is the only authentication on this route: no session and no x-hinkal-request-signature. Publishable keys are rejected. Send it from your backend only.

Request body application/jsonrequired

NameTypeDescription
networkTyperequiredstringNetwork the address is for. The chains it accepts payments on come back in acceptedChainIds.
One of: "evm", "tron", "solana"
recipientAddressrequiredstringPublic address each payment is paid out to, in the native format of destinationChainId when set, otherwise of the network. The zero address and the native-token placeholder are rejected.
refundTorequiredstringAddress on the same network that receives refunds. Fixed for the address. It signs POST /partner/transfer-address/recover, so it must be an address you control on every chain of the network. On Tron, use the base58 form here and in every later call.
destinationChainIdintegerBridge each payment to this chain. Omit to withdraw on the chain the payment arrived on.
destinationTokenAddressstringToken the recipient receives on destinationChainId. Required with destinationChainId.
slippagePercentageone ofMax bridge slippage in percent (e.g. "1" = 1%). Only with destinationChainId; defaults per route.
refstringOptional fee discount code agreed with Hinkal, or a whitelisted referral. Attribution comes from the key.

Responses

200The new transfer address
NameTypeDescription
successrequiredboolean
One of: true
recordrequiredobjectThe terms a receive address was derived from, plus the address itself. A receive address belongs to a network, not one chain — the same record covers every EVM chain.
record.indexrequiredinteger
record.networkrequiredstringNetwork the address is for.
One of: "evm", "tron", "solana"
record.expiryrequiredstringUnix timestamp (seconds) when the address expires, 14 days after creation. Deposits sent after it are not shielded automatically.
record.versionrequiredstring
record.vaultAddressrequiredstringThe public deposit address, in the chain's native format.
acceptedChainIdsrequiredinteger[]Chains the payer can send on. With destinationChainId, only chains that can bridge to it. Funds sent on any other chain can't be paid out, refunded or recovered.
400Unsupported `networkType`; invalid `refundTo` (including the zero address or the native-token placeholder); invalid recipient; unsupported bridge route or token; invalid `slippagePercentage`; `destinationTokenAddress` or `slippagePercentage` without `destinationChainId`; or `ref` is not a whitelisted referral or fee discount code
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring
401`A partner secret API key is required` (no `x-api-key`, a value that doesn't start with `hk_`, or a publishable key), or `Invalid API key` (unknown, turned off or revoked)
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring
403A publishable key was sent and the request's `Origin` is not on its list; use the secret key
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring
409Another transfer address for the same key, network and `refundTo` is being created; retry
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring
500Server error
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring
502A service the API calls over HTTP (for example henclave or the relayer) returned an error; retry
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring
503The partner key service is temporarily unavailable; retry with backoff
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring

List what is stuck for a refundTo across the key's transfer addresses

GET/partner/transfer-address/stuck-balances
https://api.hinkal.io/partner/transfer-address/stuck-balances

Lists funds that weren't paid out or refunded, summed over every transfer address the key created with refundTo through POST /partner/transfer-address, per chain and token, split by kind: utxo (a payment that reached Hinkal but wasn't paid out), bridge (a bridge payout that was refunded) and vault (funds still at the address). The refundTo format picks the network. Chains with nothing stuck are left out. A chain that can't be read is returned with error while the other chains are still listed.

Most stuck funds are refunded automatically. If a balance is still listed an hour later, recover it with POST /partner/transfer-address/recover; leave newer balances alone.

Takes only the partner secret key in x-api-key; no session.

Query parameters

NameTypeDescription
refundTorequiredstringThe refundTo the addresses were created with (EVM, Tron or Solana address)

Header parameters

NameTypeDescription
x-api-keyrequiredstringHinkal Partner secret key (hk_sk_live_ + 64 hex characters). It is the only authentication on this route: no session and no x-hinkal-request-signature. Publishable keys are rejected. Send it from your backend only.

Responses

200Stuck balances per chain and token
NameTypeDescription
successrequiredboolean
One of: true
chainsrequiredobject[]
chains[].chainIdrequiredinteger
chains[].balancesrequiredobject[]
chains[].balances[].tokenAddressrequiredstring
chains[].balances[].balancerequiredstringTotal of all kinds, in the token's smallest unit
chains[].balances[].sourcesrequiredobject[]
chains[].errorstringSet when this chain could not be read; balances may then be incomplete
400`refundTo` is not a valid EVM, Tron or Solana address
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring
401`A partner secret API key is required` (no `x-api-key`, a value that doesn't start with `hk_`, or a publishable key), or `Invalid API key` (unknown, turned off or revoked)
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring
403A publishable key was sent and the request's `Origin` is not on its list; use the secret key
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring
500Server error
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring
503The partner key service is temporarily unavailable; retry with backoff
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring

Recover one stuck token to refundTo, signed by the refundTo wallet

POST/partner/transfer-address/recover
https://api.hinkal.io/partner/transfer-address/recover

Recovers one token and kind on one chain to refundTo, from every transfer address the key created with that refundTo. Use it for a balance from GET /partner/transfer-address/stuck-balances that is still listed an hour later, which means it wasn't refunded automatically.

Takes the partner secret key in x-api-key and, in the body, a signature from the refundTo wallet. There is no session. nonce is a single-use UUID and timestamp is in milliseconds, within 5 minutes of the server's clock.

  • EVM / Tron: EIP-712 typed data, domain { name: "Hinkal Enclave", chainId }, primary type RefundToRecover with fields refundTo (string), chainId (uint256), tokenAddress (string), kind (string), nonce (string), timestamp (uint256). Strings are signed exactly as sent. EVM smart contract wallets that support ERC-1271 can sign.
  • Solana: hex-encoded ed25519 signature by the refundTo keypair over "Hinkal Enclave\n\nPrimary Type: RefundToRecover\nChain ID: {chainId}\nRefund To: {refundTo}\nToken Address: {tokenAddress}\nKind: {kind}\nNonce: {nonce}\nTimestamp: {timestamp}".

results has one entry per recovery. utxo (txHashes) and bridge (recoveredCount, recoveredAmount, failedCount, errors) are relayed by the API. vault returns one txData per address holding the token, in the format of POST /receive-vault-recover. You send it and pay the gas: from any wallet on EVM, from refundTo on Tron and Solana; the funds always go to refundTo. Send it right away: its recovery signature is valid for 15 minutes, and a Tron or Solana transaction can expire sooner, in which case call again with a new nonce. A failed recovery is { error } and the call still returns 200. An empty results means nothing of that kind and token is stuck on this chain.

Header parameters

NameTypeDescription
x-api-keyrequiredstringHinkal Partner secret key (hk_sk_live_ + 64 hex characters). It is the only authentication on this route: no session and no x-hinkal-request-signature. Publishable keys are rejected. Send it from your backend only.

Request body application/jsonrequired

NameTypeDescription
refundTorequiredstringThe refund address. It signs the request and receives the funds.
chainIdrequiredintegerChain the funds are on. It must belong to refundTo's network.
tokenAddressrequiredstringToken to recover, as listed by GET /partner/transfer-address/stuck-balances
kindrequiredstring
One of: "utxo", "bridge", "vault"
noncerequiredstring (uuid)Single-use UUID. Echoed back in the response.
timestamprequiredintegerCurrent time in milliseconds, within 5 minutes of the server's clock
signaturerequiredstringRefundToRecover signature by the refundTo wallet: EIP-712 on EVM/Tron, hex ed25519 on Solana

Responses

200One entry per recovery; empty when nothing matched
NameTypeDescription
successrequiredboolean
One of: true
resultsrequiredobject[]
results[].txHashesstring[]utxo only
results[].recoveredCountintegerbridge only
results[].recoveredAmountstringbridge only
results[].failedCountintegerbridge only
results[].errorsstring[]bridge only
results[].txDataanyvault only: the recovery transaction, as POST /receive-vault-recover returns it. Send it from any wallet on EVM, from refundTo on Tron and Solana
results[].errorstringSet when this recovery failed
noncerequiredstringEchoed per-request nonce from the request.
400Missing or invalid fields, `chainId` is not on `refundTo`'s network, or a `nonce` that isn't a UUID (that one returns only `{ error }`)
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring
401No partner secret key in `x-api-key`, an invalid key, an expired `timestamp`, or an invalid `refundTo` signature
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring
403A publishable key was sent and the request's `Origin` is not on its list; use the secret key
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring
409Nonce already used. The body is only `{ error }`.
NameTypeDescription
errorrequiredstring
500Server error
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring
503The partner key service is temporarily unavailable; retry with backoff
NameTypeDescription
successrequiredboolean
One of: false
errorrequiredstring