Back to Content

PaymentRequestEvent: paymentRequestId property

files/en-us/web/api/paymentrequestevent/paymentrequestid/index.md

latest952 B
Original Source

{{SeeCompatTable}}{{APIRef("Web-Based Payment Handler API")}}{{AvailableInWorkers("service")}}

The paymentRequestId read-only property of the {{domxref("PaymentRequestEvent")}} interface returns the ID of the {{domxref("PaymentRequest")}} object.

Value

A string containing the ID.

Examples

js
self.addEventListener("paymentrequest", (e) => {
  console.log(e.paymentRequestId);
});

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also