Merchant API

Deposit Logs

Returns a full history of deposit transactions and IPN notifications for a specific deposit request. Use this endpoint to reconcile top-ups, inspect on-chain txids, and verify how callbacks were delivered to your server. The output is similar in purpose to KingPay’s /deposit/logs/ endpoint.

GET https://api-service.kingpay.online/deposit/logs/

All parameters are passed via query string. The token parameter must match the deposit_id returned by the /deposit/request/ endpoint.

Notices

  • This endpoint is intended for server-side use (monitoring, debugging, reconciliation), not for direct exposure to end-users.
  • The apikey must belong to the same project that created the deposit request.
  • Multiple transactions can be associated with the same token (e.g. user tops up multiple times for the same deposit request).
  • total_deposited is computed as a sum of paid_amount_fiat values for payments with payment_status equal to confirmed or completed. Pending payments remain in deposits but do not contribute to the total.

Query parameters (required)

apikey string • required

Project API key generated in your merchant dashboard. Only deposits created under this project will be accessible.

May also be sent via apikey HTTP header.

token string • required

Deposit identifier returned by the /deposit/request/ endpoint. Internally mapped to the invoice UID of the deposit.

Query parameters (optional)

This endpoint currently does not support additional filters. In future versions, pagination or date-range filters may be added for large deposit histories.

Request example (cURL)
curl -G \
  'https://api-service.kingpay.online/deposit/logs/' \
  --data-urlencode 'apikey=YOUR_PROJECT_API_KEY' \
  --data-urlencode 'token=de2d1c9f4a3b8e7d1f2a9c3b4e6f8a1'
Response (200 • application/json)
{
  "status": "success",
  "deposits": [
    {
      "txid": "f5e3d9a2c1b4e6f8a9c3d1e2f4b6a8c0d9e1f2a3b4c5d6e7f8a9b0c1d2e3f4",
      "paid_amount": "150.000000000000000000",
      "paid_amount_fiat": "150.00",
      "received_amount": "150.000000000000000000",
      "received_amount_fiat": "150.00",
      "coin": "trc20_usdt",
      "payment_status": "completed",
      "timestamp": "2025-11-23T10:15:30.000Z"
    },
    {
      "txid": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4f5e6d7c8b9a0f1e2",
      "paid_amount": "50.000000000000000000",
      "paid_amount_fiat": "50.00",
      "received_amount": "50.000000000000000000",
      "received_amount_fiat": "50.00",
      "coin": "trc20_usdt",
      "payment_status": "completed",
      "timestamp": "2025-11-24T08:02:10.000Z"
    }
  ],
  "total_deposited": "200.00",
  "currency": "USD",
  "notifications": [
    {
      "request_url": "https://example.com/ipn/deposit?user_id=123",
      "payload": {
        "payment_id": "de2d1c9f4a3b8e7d1f2a9c3b4e6f8a1",
        "type": "deposit",
        "is_paid": "1",
        "paid_amount": "150.00",
        "paid_amount_fiat": "150.00",
        "paid_coin": "trc20_usdt",
        "txid": "f5e3d9a2c1b4e6f8a9c3d1e2f4b6a8c0d9e1f2a3b4c5d6e7f8a9b0c1d2e3f4",
        "status": "done"
      },
      "response": "OK",
      "response_status": 200,
      "pending": false,
      "status": "done",
      "currency": "USD",
      "is_paid": 1,
      "paid_amount": null,
      "paid_coin": null,
      "exchange_rate": null,
      "txid": null,
      "address": null,
      "value": null,
      "success_token": null,
      "payment_url": null,
      "redirect_url": null,
      "timestamp": "2025-11-23T10:15:31.000Z"
    }
  ]
}

Response fields

  • status — request result ("success" on success).
  • deposits — list of deposit transactions associated with this token. Each item contains: txid, paid_amount, paid_amount_fiat, received_amount, received_amount_fiat, coin, payment_status, confirmations, required_confirmations, timestamp.
  • paid_amount — crypto amount marked as paid for this transaction (from DB).
  • paid_amount_fiat — fiat value for paid_amount stored in DB (may be null).
  • received_amount — crypto amount actually received on-chain (from DB).
  • received_amount_fiat — fiat value for received_amount stored in DB (may be null).
  • total_deposited — sum of paid_amount_fiat for confirmed and completed deposits. Returns 0.00 when only pending payments have fiat values, or null when no fiat values are available.
  • currency — fiat currency code for total_deposited, e.g. USD.
  • notifications — history of IPN webhook attempts for this deposit, including the original payload, target request_url, HTTP response_status, server response and a timestamp.