Skip to main content
After sending, look up the final result and details. The SDK exposes two lookup functions:

1) By Body Hash

Use the Base64 hash of the signed message body content (payload).
import { getTonPayTransferByBodyHash } from "@ton-pay/api";

const info = await getTonPayTransferByBodyHash(bodyBase64Hash, {
  chain: "mainnet",
});

2) By Reference

Use the reference returned by createTonPayTransfer.
import { getTonPayTransferByReference } from "@ton-pay/api";

const info = await getTonPayTransferByReference(reference, {
  chain: "testnet",
});

Return Shape

type CompletedTonPayTransferInfo = {
  amount: string;
  rawAmount: string;
  senderAddr: string;
  recipientAddr: string;
  asset: string;
  assetTicker?: string;
  status: string;
  reference: string;
  bodyBase64Hash: string;
  txHash: string;
  traceId: string;
  commentToSender?: string;
  commentToRecipient?: string;
  date: string;
  errorCode?: number;
  errorMessage?: string;
};
Use status to drive your UI and reference/bodyBase64Hash/txHash for reconciliation.
For TON coin payments, the recipient may receive slightly less than the requested amount because a portion is consumed by network fees (gas). If you need an exact settlement amount, consider overpaying slightly in TON or using a jetton where fees are paid separately in TON.

Response fields

amount
string
required
Human-readable amount with decimals.
rawAmount
string
required
Amount in base units (nano for TON / jetton base units).
senderAddr
string
required
Sender wallet address.
recipientAddr
string
required
Recipient wallet address.
asset
string
required
Asset address. “TON” for coin or jetton master address.
status
string
required
Final status: “success” or “failed”.
reference
string
required
Tracking reference returned at creation time.
bodyBase64Hash
string
required
Base64 hash of the signed message body content (payload). Used for lookups.
txHash
string
required
Transaction hash assigned by the network.
traceId
string
required
Trace identifier for explorer/deep dive.
commentToSender
string
Optional note shown to the payer while signing. Public on-chain; avoid confidential data and keep under ~120 characters to reduce gas.
commentToRecipient
string
Optional note shown to the payee after receipt. Public on-chain; avoid confidential data and keep under ~120 characters to reduce gas.