Skip to content
coinkun Docs API v1
Coinkun home Dashboard

Callbacks

Receive payment and invoice notifications, acknowledge delivery and handle retries.

Examples use LTC unless stated otherwise. Use IDs and addresses for the selected currency.

On this page

#Payment Notifications

Available

Receive a notification when a payment is pending, confirmed or dropped. Callbacks use POST with a JSON body or GET with query parameters.

Parameters

ParameterTypeDescriptionRequired
valueintegerObserved amount in atomic units.Required
input_addressstringAddress that received the payment.Required
confirmationsintegerConfirmation count at observation time.Required
input_transaction_hashstringIncoming blockchain transaction hash.Required
currencystringPayment currency identifier.Required
dataobjectMerchant metadata supplied with the callback configuration.Optional
accountstringPublic account identifier for account-scoped events.Optional
networkstringConfigured network of the currency, such as mainnet.Required
eventstringNotified event: pending, confirmed or dropped.Required
statusstringReceipt state when this attempt was built; after a delay it can differ from event.Required
event_kindstringutxo_output for BTC/LTC; trx_transfer, trx_internal or trc20_log for TRON; monero_output for XMR.Required
positionintegerOutput index (vout) or TRON event position within the transaction.Required
{
  "account": "ACCOUNT_ID",
  "currency": "ltc",
  "value": 250000,
  "input_address": "LTC_ADDRESS",
  "confirmations": 1,
  "input_transaction_hash": "TRANSACTION_HASH",
  "network": "mainnet",
  "event": "confirmed",
  "status": "confirmed",
  "event_kind": "utxo_output",
  "position": 0,
  "data": {
    "order_id": "ORDER_ID"
  }
}

Replace placeholders in the JSON Request tab. Responses are illustrative.

#Acknowledgement and Retries

Available

Acknowledge payment and Simple Forwarding callbacks with HTTP 200, Content-Type text/plain and the exact body *ok*, including both asterisks.

Response partRequired value
Status200
Content-Typetext/plain
Body*ok*

#Invoice Notifications

Available

Invoice events are sent to the callback URL as POST requests with a frozen JSON body. Changed receipts create a new revision even when the status name stays the same. Changes after an expired event remain in history without another notification.

Parameters

ParameterTypeDescriptionRequired
accountstringPublic account identifier.Required
invoicestringInvoice identifier.Required
statusstringLifecycle state: created, partpaid, paid, overpaid, completed or expired.Required
{
  "account": "ACCOUNT_ID",
  "invoice": "INVOICE_ID",
  "status": "paid"
}

Replace placeholders in the JSON Request tab. Responses are illustrative.

#Event Identity and Verification

Available

Use event headers to deduplicate deliveries and keep updates in order. Verify payment status before fulfilling an order.

Coinkun API v1

Turning a preference off removes its saved values from this browser. It does not delete an account, change a payment or lock your current session. Read the storage details.

Type to search the documentation

↑↓ navigate↵ openesc close