Skip to content

Summary

Display-ready result of the last completed Coinbase withdrawal.

When to use

On the success screen after startWithdrawal / confirmWithdrawal returns completed, or after coinbase:withdrawalCompleted.

Methods

MethodReturnsPurpose
getCompletedTransactionSummary()CoinbaseCompletedTransactionSummary | nullAmount, fee, destination, etc.

In-memory for the current module lifetime. After reload or restartSession() it may be null even if payment completed on the server.

Example

ts
const summary = client.coinbase.getCompletedTransactionSummary();

if (summary) {
  console.log(summary.provider);
  console.log(summary.amount.amount, summary.amount.currency);
  console.log(summary.network, summary.fee);
  console.log(summary.destinationAddress, summary.status);
  console.log(summary.id, summary.createdAt);
}

await client.restartSession(); // required before another payment

Or react to completion:

ts
client.coinbase.onWithdrawalCompleted(() => {
  const summary = client.coinbase.getCompletedTransactionSummary();
  // show success UI
});

Errors

This getter does not throw. If it returns null, there is no completed withdrawal in memory yet (or state was reset).

restartSession() failures are session-level, not Coinbase-specific — see Errors for SESSION_NOT_ACTIVE on the next payment attempt.