document.hasRedemptionRecord(issuer) returns a Promise that fulfills with a boolean: whether the browser has a redemption record originating from that issuer (MDN).
Pass the required arguments shown below. Check return values and browser support before you rely on the result.
Syntax
Call document.hasRedemptionRecord. Start with this line.
JavaScript
document.hasRedemptionRecord(issuer)
Call
What it does
document.hasRedemptionRecord(issuer)
Primary signature.
document.hasRedemptionRecord(...)
Call with the arguments your case needs.
Built into the browser. Call hasRedemptionRecord(...) on document — no import required.
Library declarations
JavaScript
document.hasRedemptionRecord(issuer)
Parameters
Parameter
Description
issuer
Required. URL of the issuer server (MDN)
Secure context
Required. Required; else NotAllowedError
Return Value
Return Value
Description
*
Promise that resolves to boolean
JavaScript Examples
Example 1 — Feature-Detect First
Experimental APIs must be detected before you call them.
Detect first. Unsupported engines never throw from this call.
Pass a bad string. Not a valid URL → rejection (MDN TypeError).
Catch the error. Read err.name for a clear student-friendly log.
Other failures. Also watch for NotAllowedError / InvalidStateError (MDN).
Compatibility
Limited / Experimental Browser Support
Document.hasRedemptionRecord() is Experimental on MDN. Support is primarily Chromium-based (Chrome / Edge from 117+, Opera from 103+). Firefox and Safari currently lack support. Logos use the shared browser-image-sprite.png sprite from this project.
✓ Experimental · Limited
Document.hasRedemptionRecord()
Promise-based check for a stored redemption record from an issuer URL. Feature-detect before use.
MDN: Document.hasRedemptionRecord() returns a promise that fulfills with a boolean indicating whether the browser has a redemption record originating from a particular issuer.
MDN marks Document.hasRedemptionRecord() as Experimental. It is not Deprecated or Non-standard, but support is limited — check compatibility before production use.
hasPrivateToken() asks whether a private state token from an issuer is stored. hasRedemptionRecord() asks whether a redemption record from that issuer already exists (after redeeming tokens).
MDN: issuer — a string representing the URL of an issuer server.
MDN: InvalidStateError if the Document is not yet active; NotAllowedError if not in a secure context; TypeError if issuer is not a valid URL.
Feature-detect with typeof document.hasRedemptionRecord === "function", use HTTPS (secure context), pass a valid issuer URL, and await the Promise (or use .then).