











Automatický identifikátor (VS) pro více plateb 
Variabilní symbol — reference pro sledování platby. Pro sledování platby přidáváme 4 číslice na konec částky; například u USDT v síti Tron je 6 míst za desetinnou tečkou. Používají se první dvě, např. 10.55 (10 dolarů 55 centů), a s variabilním symbolem to bude 10.550001. Ve skutečnosti je to 1000× méně než cent — kupující nepřeplácí. Platbu ale lze dohledat.
Když v režimu Merchant spotřebujete až 10 000 kódů, automaticky se přidá nová adresa USDT na dalších 10 000 kódů — a tak dále donekonečna. Tak lze obsloužit i velký e-shop s tisíci objednávek denně.
Jinak byste museli pro každou platbu použít samostatnou adresu. A pak platit síťový poplatek za sloučení všech prostředků na jednu adresu. Například pokud máte 100 plateb na 100 adresách, abyste shromáždili prostředky na jednu adresu (pro směnu apod.), museli byste zaplatit poplatek 100× (0.9$ za jednu). Tohoto omezení jsme se zbavili elegantními referenčními čísly popsanými výše.
app.post('/mi_webhook_subscription/', bodyParser.json(), (request, response) => {
try {
let eventObj = request.body;
const signature = request.headers['mitilena-signature'];
if (signature === endpointSecretMitilenaNewOur) {
if (!eventObj.statusObj) {
return response.status(400).send('Error, no object.');
}
let hookObj = eventObj.statusObj;
...Your private secret key:
You should only process requests to your webhook that contain this key.
statusObj = {
mitilenaInvoiceId: 'auto-683dc5-03f2c0-e3f06a-example-string', // never undefined
yourPaymentId: 'stringOrNull', // never undefined
yourProductName: 'stringOrNull', // never undefined
yourProductId: 'stringOrNull', // never undefined
secretKey: 'your-unique-secret-key', // never undefined,
stableCoinAmount: 0, // number, never undefined
stableCoinSymbol: 'USDT', // never undefined
stableCoinBlockchain: 'tether-trc20', // never undefined
stableCoinContractAddress: 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t', // string | null
localCurrencyAmount: 0, // number, never undefined
localCurrencyCode: 'EUR', /// ISO 4217 currency code, never undefined
wasPaid: true, // true | false, never undefined
}
/* payment time === webhook call time.
We try to send a request immediately after the payment is detected
!!!
If the secret key is incorrect or at least one field is
undefined - this is a fake request, do not set the order
as paid in your system! */