Custom Payment Flow Webhooks (ticker)
Payment lifecycle notifications for custom payment flow: detection, incoming confirmation, and distribution sent.
Delivery & security
- Webhooks are sent to the
callback_urlconfigured for the invoice (or project), with all your original query parameters preserved. - HTTP method:
GETby default,POSTwhen the invoice was created withpost=1. - Content type:
application/x-www-form-urlencodedby default,application/jsonwhen the invoice was created withjson=1. - Webhooks are signed using
HMAC-SHA256with your project’sipn_secret. Always verify the signature before trusting the payload.
Signature headers
X-CryptAPI-Signature— hex-encoded HMAC of the canonical JSON payload and timestamp.X-CryptAPI-Signature-Alg— currently alwaysHMAC-SHA256.X-CryptAPI-Signature-Timestamp— Unix timestamp (seconds) used in the HMAC computation.
Sent for invoices with type = "ticker" that use the custom payment flow (ticker-style payment addresses). You receive payment_status notifications through KingPay’s Custom Payment Flow Webhooks.
Behaviour
payment_status=pending— UTXO, EVM or TRON payment detected, awaiting the required confirmations or execution checks. Reports observed progress; counts may jump.payment_status=confirmed— incoming threshold reached. The payment counts toward the invoice.payment_status=completed— distribution sent to the network. This does not credit the payment a second time or guarantee outgoing confirmation.confirmationsis the observed count;required_confirmationsis the merchant threshold. A threshold of one can skip pending. Progress updates stop after confirmed.- Solana sends confirmed and completed only. Both confirmation fields are 1, representing the accepted network stage, not slot depth; custom numeric depth is not enforced. Native SOL uses finalized discovery; SPL uses confirmed discovery.
- TRON credit follows the configured threshold, but distribution waits for the higher of that threshold and 23 confirmations for TRX or 20 for TRC20, plus a successful solidified receipt. Setting 5 therefore credits at 5 and distributes later. Early credit does not guarantee finality or automatic reversal.
- Deduplicate by UUID and handle out-of-order events without regressing state. Missing forwarding amounts and fees in progress events are not zero amounts.
- All custom query parameters you added to
callback_urlwhen creating the payment (e.g.?order_id=123&user_id=456) are echoed back in the webhook payload.
Payload example (completed distribution)
{
"uuid": "dbfcb40e-5a6b-4305-9fa2-b0fbda6e3ff2",
"address_in": "3PFoGK63cVVUWnd2vu7W1kM83NXUfvzMqM",
"address_out": "{ltc1qc8ks9meqmxtd7kkth5s8vv2edju3dy4qykvvek:1}",
"txid_in": "a2174ffd39289100709f2a07b129cdbba69df2e22e5be1830221dab1fd4e332c",
"txid_out": "{\"0x6624cf59312f1f385e0e972a78ca23cf2202a6def7dd7dcb8ef280828f3a2d4c\":0.98}",
"confirmations": 3,
"value_coin": 0.05,
"value_coin_convert": "{\"USD\": \"3.20\", \"EUR\": \"3.05\"}",
"value_forwarded_coin": 0.0495,
"value_forwarded_coin_convert": "{\"USD\": \"3.17\", \"EUR\": \"3.01\"}",
"fee_coin": 0.0005,
"coin": "btc",
"price": 64000,
"payment_status": "completed",
"required_confirmations": 1,
}Key fields
uuid— unique payment identifier. Use for idempotency.address_in— payment address the customer paid to.address_out— forwarding address(es) and percents.txid_in— customer’s blockchain transaction hash.txid_out— forwarding transaction hash, available on completed.coin— payment coin, e.g.btc,trc20_usdt.price— coin price in USD at the time of webhook.confirmations— observed incoming confirmation count; on Solana, 1 denotes the accepted network stage.payment_status— pending, confirmed, or completed; replaces numeric pending.value_coin— paid amount in coin (before fees).value_forwarded_coin— amount forwarded after fees.fee_coin— service fee in the payment currency (coin or token units), excluding blockchain network fees.network_feereports the separate network-cost deduction in the payment currency (not necessarily the final on-chain cost); unknown historical values are null.