PaymentRequest
This Payment Request API interface is the primary access point into the API, and lets web content and apps accept payments from the end user. Available only in secure contexts.
interface PaymentRequest extends EventTarget {
readonly id: string;
onpaymentmethodchange: ((this: PaymentRequest, ev: Event) => any) | null;
abort(): Promise<void>;
addEventListener<K extends keyof PaymentRequestEventMap>(
type: K,
listener: (this: PaymentRequest, ev: PaymentRequestEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void;addEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void;canMakePayment(): Promise<boolean>;
removeEventListener<K extends keyof PaymentRequestEventMap>(
type: K,
listener: (this: PaymentRequest, ev: PaymentRequestEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void;removeEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void;show(detailsPromise?: PaymentDetailsUpdate | PromiseLike<PaymentDetailsUpdate>): Promise<PaymentResponse>;
}var PaymentRequest: {
prototype: PaymentRequest;
new (methodData: PaymentMethodData[], details: PaymentDetailsInit): PaymentRequest;
};§Extends
§Properties
§
onpaymentmethodchange: ((this: PaymentRequest, ev: Event) => any) | null
[src]§Methods
§
addEventListener<K extends keyof PaymentRequestEventMap>(
[src]type: K,
listener: (this: PaymentRequest, ev: PaymentRequestEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void§
addEventListener(
[src]type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void§
removeEventListener<K extends keyof PaymentRequestEventMap>(
[src]type: K,
listener: (this: PaymentRequest, ev: PaymentRequestEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void§
removeEventListener(
[src]type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void§
show(detailsPromise?: PaymentDetailsUpdate | PromiseLike<PaymentDetailsUpdate>): Promise<PaymentResponse>
[src]