-
Notifications
You must be signed in to change notification settings - Fork 22.4k
/
index.md
43 lines (31 loc) · 1.21 KB
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
title: "PaymentRequestEvent: paymentRequestOrigin property"
short-title: paymentRequestOrigin
slug: Web/API/PaymentRequestEvent/paymentRequestOrigin
page-type: web-api-instance-property
status:
- experimental
browser-compat: api.PaymentRequestEvent.paymentRequestOrigin
---
{{SeeCompatTable}}{{APIRef("Payment Handler API")}}{{AvailableInWorkers("service")}}
The **`paymentRequestOrigin`** read-only property of the
{{domxref("PaymentRequestEvent")}} interface returns the origin where the
{{domxref("PaymentRequest")}} object was initialized.
## Value
A string.
## Examples
```js
self.addEventListener("paymentrequest", (e) => {
console.log(e.paymentRequestOrigin);
});
```
## Specifications
{{Specifications}}
## Browser compatibility
{{Compat}}
## See also
- [Web-based payment apps overview](https://web.dev/articles/web-based-payment-apps-overview)
- [Setting up a payment method](https://web.dev/articles/setting-up-a-payment-method)
- [Life of a payment transaction](https://web.dev/articles/life-of-a-payment-transaction)
- [Using the Payment Request API](/en-US/docs/Web/API/Payment_Request_API/Using_the_Payment_Request_API)
- [Payment processing concepts](/en-US/docs/Web/API/Payment_Request_API/Concepts)