Münzen API
  • Home
  • Getting Started
  • API Overview
    • API Reference
    • API Requests
    • API Authentication
    • Environments
    • Errors
    • Callbacks (Webhooks)
    • Currencies, Confirmations, and Limits
    • How to accept crypto payments
    • Proof of Funds
    • AML & Compliance Checks
  • Testing
    • How to check integration
  • Invoices
    • What is Invoices
    • Create an Invoice
    • Invoice Statuses
    • Invoice Callbacks
  • Channels
    • What is Channels
    • Create a Channel
    • Channel Payment Statuses
    • Channel Callbacks
  • Payment Widget
    • What is Payment Widget
    • Integration Guide for Payment Widget
      • Params for Channel Widget
  • Payouts
    • What is Payouts
    • Create a Payout
    • Payout Statuses
    • Payout Callbacks
  • Useful Information
    • Testnet Faucets
Powered by GitBook
On this page
  1. Channels

Channel Callbacks

First, read general information about callbacks: Callbacks (Webhooks).

We will send a callback on the following events:

Event
Description

deposit_completed

This event happens when we receive a deposit from the customer and successfully transfer this money to your account.

Since we receive a deposit in the channel from your customer, we will send a callback to your server. Here is an example of callbacks by their status:

{
    "type": "channel_payment",
    "event": "deposit_completed",
    "data": {
        "id": "055bb1bf-f4d2-7017-855c-6b31d10b55e6",
        "channel_id": "018bb1b3-9afc-24c0-a2a2-c7ffb944ddfa",
        "customer_external_id": "123",
        "external_id": null,
        "external_data": "{\"customer\":{\"id\":\"12345\"}}",
        "currency": "USDTTRC20",
        "amount": 6.5308,
        "amount_minus_fee": 6.481819,
        "received_currency": "USDTTRC20",
        "received_amount": 6.481819,
        "conversion_exchange_rate": null,
        "fees": {
            "processing_channel": {
                "currency": "USDTTRC20",
                "amount": 0.048981
            }
        },
        "fiat_amounts": {
            "USD": {
                "paid_amount": 6.53,
                "fee_amount": 0.05
            },
            "EUR": {
                "paid_amount": 6.18,
                "fee_amount": 0.05
            },
            "UAH": {
                "paid_amount": 237.61,
                "fee_amount": 1.78
            },
            "KZT": {
                "paid_amount": 3109.48,
                "fee_amount": 23.32
            }
        },
        "address": "0x7c0F6f14304862b3b590e0676a443eA51Ca55700",
        "address_tag": null,
        "address_uri": "ethereum:0x7c0F6f14304862b3b590e0676a443eA51Ca55700?amount=0.003",
        "transaction_hash": "0x057fc2e1c0dbfd047b6e8cd6045555f6119dc5690b1e5552d8a7a90ee70197aa",
        "transaction_risk_score": 7,
        "created_at": "2023-11-09T01:43:49.000000Z",
        "status": "paid",
        "status_reason": null
    },
    "timestamp": 1696925519
}

Below are explanations for some specific fields:

  • amount: the amount transferred by the client.

  • amount_minus_fee: The client's amount after deducting commissions.

  • received_amount: For integrations without auto-conversion to USDT, this value will match amount_minus_fee. For integrations with auto-conversion, it will be the amount_minus_fee converted to USDT at the conversion_exchange_rate, minus the commission for auto-conversion.

  • The amount in fiat_amounts is calculated at the moment of receiving the payment from the client.

  • Fields customer_external_id, external_id, external_data are set when creating a channel from the merchant's side (a unique string identifier/email of the client in the merchant's system, a unique string ID of the channel in the merchant's system, as well as additional information).

Callback Examples with Auto Conversion

If your project has enabled the auto conversion feature, received_currency and receivied_amount will contain USDT values. Here is an example:

{
    "type": "channel_payment",
    "event": "deposit_completed",
    "data": {
        "id": "055bb1bf-f4d2-7017-855c-6b31d10b55e6",
        "channel_id": "018bb1b3-9afc-24c0-a2a2-c7ffb944ddfa",
        "customer_external_id": "111",
        "external_id": null,
        "external_data": "{\"customer\":{\"id\":\"12345\"}}",
        "currency": "ETH",
        "amount": 0.003,
        "amount_minus_fee": 0.002976,
        "received_currency": "USDTTRC20",
        "received_amount": 5.629329,
        "conversion_exchange_rate": 1896.31663326,
        "fees": {
            "processing_channel": {
                "currency": "ETH",
                "amount": 0.000024
            },
            "conversion": {
                "currency": "USDTTRC20",
                "amount": 0.014109
            }
        },
        "fiat_amounts": {
            "USD": {
                "paid_amount": 5.71,
                "fee_amount": 0.05
            },
            "EUR": {
                "paid_amount": 5.33,
                "fee_amount": 0.04
            },
            "UAH": {
                "paid_amount": 205.77,
                "fee_amount": 1.65
            },
            "KZT": {
                "paid_amount": 2675.83,
                "fee_amount": 21.41
            }
        },
        "address": "0x7c0F6f14304862b3b590e0676a443eA51Ca55700",
        "address_tag": null,
        "address_uri": "ethereum:0x7c0F6f14304862b3b590e0676a443eA51Ca55700?amount=0.003",
        "transaction_hash": "0x057fc2e1c0dbfd047b6e8cd6045555f6119dc5690b1e5552d8a7a90ee70197aa",
        "transaction_risk_score": 7,
        "created_at": "2023-11-09T01:43:49.000000Z",
        "status": "paid",
        "status_reason": null
    },
    "timestamp": 1699494230
}
PreviousChannel Payment StatusesNextWhat is Payment Widget

Last updated 1 year ago