Transaction Events — iPhone
| Event | When | Recommended UI |
|---|---|---|
transactionStarted | NFC activating | Show "Present card" |
cardDetected | Card read | Show spinner |
transactionApproved | Approval received | Green checkmark + receipt |
transactionDeclined | Decline received | Decline message |
transactionCancelled | Timeout/cancel | Return to amount entry |
transactionError | Error | Error + retry |
transactionManager.onEvent = { [weak self] event in
DispatchQueue.main.async {
switch event {
case .transactionStarted: self?.statusLabel.text = "Hold card near top of phone"
case .cardDetected: self?.activityIndicator.startAnimating()
case .transactionApproved(let txn): self?.showApproval(txn)
case .transactionDeclined(let r): self?.showDecline(r)
default: break
}
}
}
See the Tap to Pay on iPhone overview for full context and the complete topic list.