LogoLogo
  • General
    • Welcome to 0xpay
    • Transaction Fees
    • Networks & Assets
  • Integration Cookbook
    • Getting Started
      • Merchant Setup
    • Receive assets
    • Send assets
    • Invoices
    • Exchanges
  • Public API
    • Authorization
      • Signature Examples
    • Endpoints
      • Merchant
      • Basic crypto operations
      • Crypto Invoices
      • Basic Fiat Operations
      • Fiat Invoices
      • Exchange
      • Exchange + Withdrawal
    • Notifications
      • Crypto Callbacks
      • Fiat Callbacks
      • Exchange Callbacks
    • JS/TS SDK
      • Getting started
      • Processing WebHook Notifications
      • Reference
  • Legal Info
    • Terms of Service
      • ANNEX 1: RISK DISCLOSURE
      • ANNEX 2: PROHIBITED BUSINESSES
      • ANNEX 3: HIGH-RISK STATES, TERRITORIES AND JURISDICTIONS
    • Privacy Policy
Powered by GitBook
On this page
  • Crypto Replenishment
  • Crypto Withdrawal
  • Crypto Invoice
  1. Public API
  2. Notifications

Crypto Callbacks

Check out the IPN examples for cryptocurrency operations

PreviousNotificationsNextFiat Callbacks

Last updated 1 year ago

Crypto Replenishment

Notifications for incoming crypto transactions will be simillar for both Permanent and Rotating addresses.

Notifications will be sent anytime when incoming transactions change their status:

Pending – incoming transaction is already in mempool/has at least 1 confirmation.

Done – incoming transaction is confirmed and added to your merchant's balance

Verified - transation passed AML verification

Failed - incoming transaction was not credited to your merchant's balance.

{
  "id": "8c12e071-cd00-439d-90c0-74a8c2f96da2",
  "ticker": "LTT",
  "blockchain": "BINANCE_SMART_CHAIN",
  "merchantId": "b2a46898-7e6d-4c13-8a31-47154c43ee8b",
  "hash": "0x2bdb432c0ccc0edc2b7427e9b5d65a712d2b95cf4d8abd68460fe5beb0181515",
  "from": [
    "0xba85c10f2292aae78754daca380da8557853ac09"
  ],
  "to": "0x2d4221783d2c575ca52ae6c3fb6420a891d1b4fe",
  "amount": "1",
  "fee": "0.01",
  "time": 1674221507732,
  "status": "Pending",
  "meta": "your-user-id-23",
  "kind": "Replenish",
  "internal": false
}
//With "Done" status IPN, request body will also include "block" field. 

{
  "id": "8c12e071-cd00-439d-90c0-74a8c2f96da2",
  "ticker": "LTT",
  "blockchain": "BINANCE_SMART_CHAIN",
  "merchantId": "b2a46898-7e6d-4c13-8a31-47154c43ee8b",
  "hash": "0x2bdb432c0ccc0edc2b7427e9b5d65a712d2b95cf4d8abd68460fe5beb0181515",
  "block": 1231231233,
  "from": [
    "0xba85c10f2292aae78754daca380da8557853ac09"
  ],
  "to": "0x2d4221783d2c575ca52ae6c3fb6420a891d1b4fe",
  "amount": "1",
  "fee": "0.01",
  "time": 1674221507732,
  "status": "Done",
  "meta": "your-user-id-23",
  "kind": "Replenish",
  "internal": false
}
//Failed tx's will also display the reason in the "failReason" field 
{
  "id": "8c12e071-cd00-439d-90c0-74a8c2f96da2",
  "ticker": "LTT",
  "blockchain": "BINANCE_SMART_CHAIN",
  "merchantId": "b2a46898-7e6d-4c13-8a31-47154c43ee8b",
  "hash": "0x2bdb432c0ccc0edc2b7427e9b5d65a712d2b95cf4d8abd68460fe5beb0181515",
  "from": [
    "0xba85c10f2292aae78754daca380da8557853ac09"
  ],
  "to": "0x2d4221783d2c575ca52ae6c3fb6420a891d1b4fe",
  "amount": "1",
  "fee": "0.01",
  "time": 1674221507732,
  "status": "Failed",
  "meta": "your-user-id-23",
  "kind": "Replenish",
  "internal": false,
  "failReason": "LESS_THEN_MIN_AMOUNT"
}
{
    "id": "27f736b1-94oc-4344-b3b1-7adb99006bb0",
    "ticker": "USDT",
    "blockchain": "TRON",
    "merchantId": "g21cce69-4234-4d9e-a4b0-92e257k41ac3",
    "hash": "0725be1026c98397ef25e3bkaa6b0claafe297c4df1497e1e2d6fc6ef98c2e34",
    "from": [
        "TXqGFMiQPTYzfRBSMpryn4pgeeqr9D4JAf"
    ],
    "to": "TXZRUVx7UZRKp5WtEgDkaAMb0WKBMRHhrZ",
    "amount": "100",
    "fee": "1",
    "time": 1692930129826,
    "status": "Verified",
    "meta": "{\"userId\":\"96933484-6c62-423c-b257-f74b40b5c7l5\"}",
    "kind": "Replenish",
    "internal": false,
    "compliance": {
        "url": "https://extrnlapiendpoint.site.com/response/file.pdf", //PDF Report
        "signals": {
            "atm": 0,
            "ico": 0,
            "scam": 0,
            "miner": 0,
            "mixer": 0,
            "other": 0,
            "bridge": 0,
            "ransom": 0,
            "wallet": 0,
            "malware": 0,
            "payment": 0,
            "exchange": 0,
            "gambling": 0,
            "sanctions": 0,
            "fraud_shop": 0,
            "dark_market": 0,
            "marketplace": 0,
            "dark_service": 0,
            "p2p_exchange": 0,
            "stolen_coins": 0,
            "seized_assets": 0,
            "risky_exchange": 1,
            "smart_contract": 0,
            "illegal_service": 0,
            "liquidity_pools": 0,
            "online_pharmacy": 0,
            "unnamed_service": 0,
            "lending_contract": 0,
            "protocol_privacy": 0,
            "special_measures": 0,
            "illicit_actor_org": 0,
            "merchant_services": 0,
            "child_exploitation": 0,
            "enforcement_action": 0,
            "exchange_fraudulent": 0,
            "exchange_mlrisk_low": 0,
            "terrorism_financing": 0,
            "exchange_mlrisk_high": 0,
            "token_smart_contract": 0,
            "high_risk_jurisdiction": 0,
            "nft_platform_collection": 0,
            "p2p_exchange_mlrisk_low": 0,
            "exchange_mlrisk_moderate": 0,
            "exchange_mlrisk_veryhigh": 0,
            "p2p_exchange_mlrisk_high": 0,
            "infrastructure_as_a_service": 0,
            "decentralized_exchange_contract": 0
        },
        "riskScore": 0.54,
        "timestamp": 1692930129826,
        "dangerSignals": {
            "scam": 0,
            "mixer": 0,
            "ransom": 0,
            "malware": 0,
            "gambling": 0,
            "sanctions": 0,
            "fraud_shop": 0,
            "dark_market": 0,
            "dark_service": 0,
            "stolen_coins": 0,
            "illegal_service": 0,
            "online_pharmacy": 0,
            "special_measures": 0,
            "illicit_actor_org": 0,
            "child_exploitation": 0,
            "enforcement_action": 0,
            "exchange_fraudulent": 0,
            "terrorism_financing": 0,
            "high_risk_jurisdiction": 0
        },
        "risky": false
    }
}

Crypto Withdrawal

Withdrawal notifications will be sent when transaction is in one of three statuses:

  • 😡 Failed - transaction has failed, amount was returned to the merchant's balance.

{
  "id": "e432c6a9-8f9e-4a8b-ad6e-2128cab29013",
  "ticker": "LTT",
  "blockchain": "BINANCE_SMART_CHAIN",
  "merchantId": "b2a46898-7e6d-4c13-8a31-47154c43ee8b",
  "hash": "0x2bdb432c0cccb015376fe6c1f58b8a7723cbf4d8abd68460fe5beb0181515",
  "from": [
    "0xba123123123123123"
  ],
  "to": "0x2d4222342352345632456324564fe",
  "amount": "10",
  "fee": "0.1",
  "time": 1674221507732,
  "status": "Pending",
  "meta": "your-user-id-23",
  "kind": "Withdraw",
  "internal": false
}
{
  "id": "e432c6a9-8f9e-4a8b-ad6e-2128cab29013",
  "ticker": "BNB",
  "blockchain": "BINANCE_SMART_CHAIN",
  "merchantId": "b2a46898-7e6d-4c13-8a31-47154c43ee8b",
  "hash": "0x2bdb41111111181515",
  "block" : 2131234123,
  "from": [
    "0xba123123123123123"
  ],
  "to": "0x0001021323123",
  "amount": "10",
  "fee": "0.1",
  "time": 1674221507732,
  "status": "Done",
  "meta": "your-user-id-23",
  "localId": "your-unique-local-identifier",
  "kind": "Withdraw",
  "internal": false
}
{
  "id": "e432c6a9-8f9e-4a8b-ad6e-2128cab29013",
  "ticker": "BNB",
  "blockchain": "BINANCE_SMART_CHAIN",
  "merchantId": "b2a46898-7e6d-4c13-8a31-47154c43ee8b",
  "hash": "0x2bdb41111111181515",
  "block" : 2131234123,
  "from": [
    "0xba123123123123123"
  ],
  "to": "0x0001021323123",
  "amount": "10",
  "fee": "0.1",
  "time": 1674221507732,
  "status": "Done",
  "meta": "your-user-id-23",
  "localId": "your-unique-local-identifier",
  "kind": "Withdraw",
  "internal": false,
  "failReason": "ERRROR_CODE_GENERIC"
}

Crypto Invoice

Webhooks will be sent on transitions to following statuses:

  • ⏱ Expired – invoice expired. Expiration time for invoice can be calculated by adding 72 hours to created date

{
    "id": "eb929d63-5f05-4d9f-9d3e-854384009ef1",
    "ticker": "ETH",
    "blockchain": "ETHEREUM",
    "amount": "0.5"
    "merchantId": "asdasd-asdasd-asdasd-asdad", 
    "paidAmount": "0.6",
    "description": "Order Payment #123123123",  
    "status": "PENDING", 
    "time": 1666091014270, 
    "meta": "i-want-to-know-about-that",
    "kind": "CryptoInvoice"
}
{
    "id": "eb929d63-5f05-4d9f-9d3e-854384009ef1",
    "ticker": "ETH",
    "blockchain": "ETHEREUM",
    "amount": "0.5"
    "merchantId": "asdasd-asdasd-asdasd-asdad", 
    "fee": "0.0025", 
    "paidAmount": "0.6",
    "description": "Order Payment #123123123",  
    "status": "DONE", 
    "time": 1666091014270, 
    "meta": "i-want-to-know-about-that",
    "kind": "CryptoInvoice"
}

Pending – transaction is in the mempool, transaction hash was assigned.

Done – withdrawal was included to the block, has at least 1 confirmation.

Pending – client entered his email and went to the final payment page.

Done – invoice was paid

⌛
✅
✅
❌
⏳
✅
⏳
✅