Last updated 26 November 2026. By Paul Badarau.
Maren, a fictional developer, sells records from her shop. A card decline changes the button to Try again and throws nothing. A network failure is caught, and the page stays on the same step.
- In the catch, call
Sentry.captureExceptionwith the error. That stores an issue. Owners and Administrators are emailed the first time that fingerprint appears. - For a decline the shop treats as ordinary, call
Sentry.logger.warn('checkout declined', { reason: 'issuer' }).Sentry.logger.warnsends a log line when the SDK is running. Put the words you will search for in the message. Search matches the message, not the attributes. Leave out the card number, the email address, and the name. Monitoring drops attributes whose names start withuser.orclient., and it redacts some secrets in the text. That redaction is not a guarantee. A log line does not open an issue and does not send email. When the decline should be an issue, callSentry.captureException(new Error('checkout declined')). - On the confirmation page only, after the server has recorded the order, call
postdeploy.track('order-paid', { revenue: 48 }). The goal must already exist. The number runs from 0 to 1,000,000 and is stored rounded to two decimals. There is no currency code.
A card field in another host's frame often surfaces as Script error., and the installed @sentry/browser drops that text. Errors and log lines are kept 7 days. A decline you only logged is gone after that, and it never emailed you.
The product page for this is Monitoring.