Citron
Home
  • ๐Ÿ‹General Description
  • Integration Guide
    • How to integrate with us?
    • Deposits
    • Withdrawals
    • Exchanges
    • Callbacks
    • What is Crypto payment form?
  • API Documentation
    • Authorization
    • Environments
    • Payment flows
    • Transaction types and statuses
    • API Endpoints
    • Callback Examples
  • How to use Citron
    • Balances
    • Transactions
    • Reports
    • Addresses and Bank Accounts
    • Fees
    • Profile
  • Confirmations and limits
  • FAQ
Powered by GitBook
On this page
  • Callback schedule
  • Deposit Callbacks
  • Withdrawal Callback
  • JSON parameters for the Payment Terminal

Was this helpful?

  1. API Documentation

Callback Examples

Callback schedule

The callback will be attempted on the following schedule:

1, 5, 10, 15, 20, 30, 60, 90, 120, 150, 180, 210, 240 minutes.

So, please keep in mind that the number of callback attempts is limited to 13 and the retries are executed in the predefined manner.

Deposit Callbacks

To provide authentication for the callback, Citron API signs the POST your api key and secret:

  1. X-Process-Key โ€“ Your public key

  2. X-Process-Signature โ€“ POST body, signed by your secret key HMAC-SHA512

Time

2023-04-25 12:29:13

Method

POST

Status

200

Format

application/json

Data sent:

{
    "id": 186961,
    "internal_id": 434088,
    "type": "deposit_exchange",
    "crypto_address": {
        "id": 68495,
        "currency": "BTC",
        "address": "bc1qvg...gc9l",
        "tag": null,
        "foreign_id": "test_user1"
    },
    "currency_sent": {
        "currency": "BTC",
        "amount": "0.00367652"
    },
    "currency_received": {
        "currency": "USDTT",
        "amount": "99.146193",
        "amount_minus_fee": "98.154731"
    },
    "transactions": [
        {
            "id": 186961,
            "currency": "BTC",
            "transaction_type": "blockchain",
            "type": "deposit",
            "address": "bc1qvg...9gc9l",
            "tag": null,
            "amount": "0.00367652",
            "txid": "49c4f42b863718d...d8e38af4a6350c91731d",
            "riskscore": null,
            "confirmation": 3,
            "senders": ["TJR8sM1....h9xfX1H17cwP6Ce"]
        }
    ],
    "fees": null,
    "error": "",
    "risk": {},
    "status": "confirmed",
    "exchange": {
        "ticker": "BTCUSDT",
        "rate": "26967.40200000",
        "exchanged_amount": "99.14619280"
    }
}

Response received:

{
    "code": 0
}

"riskscore" is used for coin compliance analysis and to reveal and track malicious behavior. Available for deposits and deposits with exchange in BTC, ETH.

Withdrawal Callback

Time

2023-04-25 12:27:23

Method

POST

Status

200

Format

application/json

Data sent:

{
    "id": 100000,
    "internal_id": 434088,
    "foreign_id": "100:customerid",
    "type": "withdrawal",
    "crypto_address": {
        "id": 100000,
        "currency": "USDTT",
        "address": "TNRZHR...i1as",
        "tag": null
    },
    "currency_sent": {
        "currency": "USDTT",
        "amount": "2996.058802",
        "amount_minus_fee": "3011.039096"
    },
    "currency_received": {
        "currency": "USDTT",
        "amount": "2996.058802"
    },
    "transactions": [
        {
            "id": 100000,
            "currency": "USDTT",
            "transaction_type": "blockchain",
            "type": "withdrawal",
            "address": "TNRZHRGNi6IbTuur7FcuXmXobohnZYiYas",
            "tag": null,
            "amount": "2996.058802",
            "txid": "15e698b4ffdf5463c7e7e31e54i3c95cddaaddc2de4414adca2d8e5b3d84d0f",
            "riskscore": null,
            "confirmations": 111
        }
    ],
    "fees": [
        {
            "type": "mining",
            "currency": "TRX",
            "amount": "27.600900"
        }
    ],
    "error": "",
    "status": "confirmed",
    "network_fee": "16.80594886",
    "network_fee_level": "avg",
    "risk": {
        "is_fraud": false,
        "alerts": [],
        "risk_level": null,
        "resource_name": "Binance.com",
        "resource_category": "exchange"
    }
}

Response received:

{
    "code": 0
}

JSON parameters for the Payment Terminal

A set of parameters is included in URL that will allow to redirect a user to the Payment Terminal.

Name
Description
Required
Type

client_id

This is a unique ID thatโ€™s generated on the side of Citron

Required

int

currency

ISO of a currency to receive funds in, example: BTC

Required

string

amount

Amount of funds to withdraw, example: "3500"

Optional

numeric

convert_to

In case you need on-the-fly exchange of all incoming funds (e.g. to EUR) specify this parameter as EUR or any other supported currency ISO, to see the list of available pairs check the method above

Optional

string

is_iframe

The parameter that allows you to get an iframe-link (false by default).

Optional

boolean

foreign_id

Unique foreign ID in your system, example: "164"

Required

string

url_back

A link that allows you to get a user back to your system

Optional

url

PreviousAPI EndpointsNextHow to use Citron

Last updated 3 months ago

Was this helpful?

Page cover image