Verifying the source of a TON jetton transfer notification

A merchant sees the expected notification opcode and an amount in an incoming message. Another contract can construct the same body. The message envelope supplies a second piece of evidence.

Build the expected wallet mapping

For each accepted jetton master, call its get_wallet_address getter with the merchant owner address. Store the resulting wallet under that master and owner. In this local fixture the names stand for parsed TON addresses. The expected opcode passes, while checking the actual sending contract fails.

const notice = { opcode: 0x7362d09c, envelopeSource: "wallet-B", sender: "buyer" };
const walletsForMerchant = new Map([["wallet-A", "accepted-master"]]);
console.log(notice.opcode === 0x7362d09c);
console.log(walletsForMerchant.has(notice.envelopeSource));

Keep sender roles distinct

The address in the notification body identifies the previous token owner. Authenticate the incoming internal message using the envelope source, which should be the merchant’s jetton wallet for an accepted master. Compare normalized addresses and check the receiving owner before recording a deposit. A transfer with zero forward_ton_amount can omit the notification, so a notification-only integration also needs to document that condition to payers.

docs.ton.org Processing jetton deposits