Payment Webhooks

Click the tabs below to see what webhooks you will receive from Coindirect when a customer completes their payment.

The scenario in this example is the following:

  1. The customer broadcasts their transaction on the Network

  2. Coindirect detects the transaction and sends "event": "transactionDetected" webhook to notify the merchant

  3. Coindirect then updates the payment status from PENDING to PROCESSING and sends "event": "statusChanged"

  4. The transaction gets a required number of confirmations on the Network

  5. Coindirect sends "event": "transactionConfirmed" webhook to notify the merchant

  6. Coindirect then updates the payment status from PROCESSING to COMPLETE and sends "event": "statusChanged"

Once you finalize the payment on your side, please ensure that no more transactions will appear on the customer's balance in case you receive further webhooks with the same payment UUID from us - this is to avoid potential issues with duplicate balance transactions.

No under circumstances should you completely rely only on webhooks when finalizing the payment on your side.

Once a webhook is received, we highly recommend making an additional API call to retrieve the payment details via GET /api/v1/pay/:uuid/summary (link) to check both the status and displayCurrency.actual field values.

{
  "source": "payment",
  "event": "transactionDetected",
  "data": {
    "uuid": "5c75bc40-c1b2-4f57-b96f-79882a6e7c4b",
    "merchantId": "9a57c17a-1eef-48ff-83d0-b5892c99f767",
    "dateCreated": 1633010030000,
    "expiryDate": 1633011226000,
    "reference": "c71102cf-4ac7-4503-8003-2e63931dd6e6",
    "type": "IN",
    "status": "PENDING",
    "displayCurrency": {
      "currency": "JPY",
      "amount": 10000,
      "actual": 0
    },
    "walletCurrency": {
      "currency": "EUR",
      "amount": 77.11,
      "actual": 0
    },
    "paidCurrency": {
      "currency": "ETH",
      "amount": 0.0305817,
      "actual": 0
    },
    "feeCurrency": {
      "currency": "EUR",
      "amount": 0.77,
      "actual": 0
    },
    "displayRate": {
      "base": "ETH",
      "counter": "JPY",
      "rate": 326992.94022242059793929
    },
    "exchangeRate": {
      "base": "EUR",
      "counter": "ETH",
      "rate": 2521.442345707899981442
    },
    "address": {
      "protocol": null,
      "address": "0x6115cfe64f3a8e4d974984a22a01936343bc8156",
      "tag": null
    },
    "redirectUrl": "https://business.sandbox.coindirect.com/payin?uuid=5c75bc40-c1b2-4f57-b96f-79882a6e7c4b&flow=direct",
    "returnUrl": "https://yourwebsitename.com",
    "transactions": [
      {
        "dateCreated": 1633010179620,
        "dateConfirmed": null,
        "hash": "0x087bcfd76ae12d6116d35a442e51dfff99e77fbf8330be39017dbdc60df7afea",
        "amount": 0,
        "risk": null,
        "networkFeeCurrency": null,
        "networkFeeAmount": null,
        "sources": null,
        "exchangeRate": null,
        "displayRate": null
      }
    ]
  }
}

Webhook Payload Data

See the Webhooks page to get basic information on webhooks and validation.

Last updated