Package-level declarations

Types

Link copied to clipboard
interface AddressErrors
Link copied to clipboard
interface PayerErrors
Link copied to clipboard
open class PaymentAddress

The ContactAddress interface of the Contact Picker API represents a physical address.

Link copied to clipboard
sealed interface PaymentComplete
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
interface PaymentItem
Link copied to clipboard

The PaymentMethodChangeEvent interface of the Payment Request API describes the PaymentRequest/paymentmethodchange_event event which is fired by some payment handlers when the user switches payment instruments (e.g., a user selects a 'store' card to make a purchase while using Apple Pay). Available only in secure contexts.

Link copied to clipboard
Link copied to clipboard
interface PaymentOptions
Link copied to clipboard
open class PaymentRequest(methodData: ReadonlyArray<PaymentMethodData>, details: PaymentDetailsInit, options: PaymentOptions = definedExternally) : EventTarget

The Payment Request API's PaymentRequest interface is the primary access point into the API, and lets web content and apps accept payments from the end user on behalf of the operator of the site or the publisher of the app. Available only in secure contexts.

Link copied to clipboard

The PaymentRequestUpdateEvent interface is used for events sent to a PaymentRequest instance when changes are made to shipping-related information for a pending PaymentRequest. Available only in secure contexts.

Link copied to clipboard

The PaymentResponse interface of the Payment Request API is returned after a user selects a payment method and approves a payment request. Available only in secure contexts.

Link copied to clipboard
Link copied to clipboard
sealed interface PaymentShippingType
Link copied to clipboard

Properties

Link copied to clipboard

Functions

Link copied to clipboard
inline suspend fun PaymentRequest.abort()

The PaymentRequest.abort() method of the PaymentRequest interface causes the user agent to end the payment request and to remove any user interface that might be shown.

Link copied to clipboard
inline suspend fun PaymentRequest.canMakePayment(): Boolean

The PaymentRequest method canMakePayment() determines whether or not the request is configured in a way that is compatible with at least one payment method supported by the user agent.

Link copied to clipboard
inline suspend fun PaymentResponse.complete()
inline suspend fun PaymentResponse.complete(result: PaymentComplete)

The PaymentRequest method complete() of the Payment Request API notifies the user agent that the user interaction is over, and causes any remaining user interface to be closed.

Link copied to clipboard
inline suspend fun PaymentResponse.retry()
inline suspend fun PaymentResponse.retry(errorFields: PaymentValidationErrors)

The PaymentResponse interface's retry() method makes it possible to ask the user to retry a payment after an error occurs during processing.

Link copied to clipboard
inline suspend fun PaymentRequest.show(): PaymentResponse
inline suspend fun PaymentRequest.show(detailsPromise: PaymentDetailsUpdate): PaymentResponse

The PaymentRequest interface's show() method instructs the user agent to begin the process of showing and handling the user interface for the payment request to the user.