Appearance
Summary
Display-ready result of the last completed Exchange Pay payment.
When to use
On the success screen after exchangePay:orderCompleted, or when session transaction data already reflects a completed Exchange Pay deposit.
Methods
| Method | Returns | Purpose |
|---|---|---|
getCompletedTransactionSummary() | ExchangePayCompletedTransactionSummary | null | Amount, fees, tx hash, destination, etc. |
Built from the in-memory completed transaction when available, otherwise from session transactionData for Exchange Pay providers. May be null after reload / restartSession() even if payment completed on the server.
Example
ts
const summary = client.exchangePay.getCompletedTransactionSummary();
if (summary) {
console.log(summary.provider);
console.log(summary.amount.amount, summary.amount.currency);
console.log(summary.amount.network ?? summary.receive?.network);
if (summary.isSwap) {
console.log(summary.send, summary.receive);
}
console.log(summary.fee, summary.merchantFee);
console.log(summary.destinationAddress, summary.transactionHash);
console.log(summary.status, summary.sessionId, summary.from, summary.to);
}
await client.restartSession(); // required before another paymentOr react to completion:
ts
client.exchangePay.onOrderCompleted(() => {
const summary = client.exchangePay.getCompletedTransactionSummary();
// show success UI
});Errors
This getter does not throw. If it returns null, there is no completed summary available yet.
The next createOrder can hit SESSION_NOT_ACTIVE if you did not call restartSession() — see Errors.