Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

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,
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,
options?: boolean | EventListenerOptions,
): void;
show(detailsPromise?: PaymentDetailsUpdate | PromiseLike<PaymentDetailsUpdate>): Promise<PaymentResponse>;
}
var PaymentRequest: {
prototype: PaymentRequest;
new (methodData: PaymentMethodData[], details: PaymentDetailsInit): PaymentRequest;
}
;

§Extends

§Properties

§
readonly id: string
[src]
§
onpaymentmethodchange: ((this: PaymentRequest, ev: Event) => any) | null
[src]

§Methods

§
abort(): Promise<void>
[src]
§
addEventListener<K extends keyof PaymentRequestEventMap>(
type: K,
listener: (this: PaymentRequest, ev: PaymentRequestEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void
[src]
§
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void
[src]
§
canMakePayment(): Promise<boolean>
[src]
§
removeEventListener<K extends keyof PaymentRequestEventMap>(
type: K,
listener: (this: PaymentRequest, ev: PaymentRequestEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void
[src]
§
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void
[src]
§
show(detailsPromise?: PaymentDetailsUpdate | PromiseLike<PaymentDetailsUpdate>): Promise<PaymentResponse>
[src]