This file describes payment and payment verification through TON and USDT TON.
TON and USDT TON are separate direct crypto payment methodsTON and USDT TON: +5%Cryptomus, Heleket and Plisio are separate methods and should not be mixed with the direct TON branchtxid/hash sent by the user must be checked via the resolve_ton_tx and check_ton_payment_status endpointssimilar or the sameit's the same transaction without calling the endpoint1 character, it is a different transaction and it needs to be checkedresolve_ton_tx againnot_found_on_chain, say exactly that: transaction not foundget_current_datetimeresolve_ton_txcheck_ton_payment_statusUse this algorithm if:
TON or USDT TONTON or USDT TON has not been creditedtxid/hash or explorer link and the context of the case already relates to TON / USDT TONDo not use this algorithm if:
Cryptomus, Heleket, Plisio, B2pay_New, B2pay_Old or another specific payment systemtxid/hash/address, but the branch TON / USDT TON has not yet been chosenTV Team as another payment systemIf a user asks how to pay via TON or USDT TON:
TON branch, not by sending them to CryptomusTON / USDT TON is +5%memo / comment / login, if they are specified in the payment formCryptomus or Plisio, but this is already a different branch with a +3% bonusrun_handle(get_current_datetime)TON / USDT TON, and not about Cryptomus, Plisio or another payment systemTV Team if the dispute is about a non-credited paymentIf the TON / USDT TON branch is not yet confirmed, you can't choose it based only on general words like crypto, network, wallet, address or just the form of the string.
If less than 30 minutes have passed since the payment, the bot should normally ask to wait in a regular case.
txid/hash or explorer link, start the checktxid/hash or explorer linktxidhashtonviewermemotxid/hash or explorer linkIf the wallet address is sent:
txid/hashIf the user writes that the memo is correct:
txid/hash or explorer link is still needed for verificationIf the user is asking where to get a txid:
txid/hash or explorer link from the user.tx_hash.resolve_ton_tx.TON or USDT TON, and not another asset?TV Team wallet?memo/comment?memo?memo match the current user?check_ton_payment_status and check the internal side:missed-ton?If the endpoints show that the payment has already been credited:
If the transaction is found in blockchain, but the crediting is not found yet:
check_ton_payment_status outcomeIf the transaction is not found in the chain:
If it is not TON and not USDT TON:
txid/hash does not relate to TON / USDT TON, and do not continue the TON scenario by defaultTON case to Cryptomus without a clear basisCryptomus, Heleket or Plisio to TON just because of the form txid/hash/addressTON just because the user sent a string similar to txid/hash, if they already named another payment system or the branch is not yet definedtxid, if you first need to wait for 30 minuteswallet address, memo, and txidTON or USDT TON are unavailable