Skip to main content

ApplePay

Methods#

canMakePayments#

Checks if the device supports Apple Pay and can make payments, based on the supplied options.

Usage#

const { canMakePayments } = await ApplePay.canMakePayments({ merchantIdentifier: merchantIdentifier, supportedNetworks: supportedNetworks,});if (canMakePayments) { // start building a payment request...}

Parameters#

NameType
optionsApplePayAvailabilityOptions

Returns: Promise<ApplePayCanMakePaymentsResponse>

makePaymentRequest#

Attempts to make request payment by presenting the payment sheet over the app.

Usage#

const request: ApplePayRequest = {...}const { success } = await ApplePay.makePaymentRequest(request);if (success) { alert("Payment successful!");}

Parameters#

NameType
optionsApplePayRequest

Returns: Promise<ApplePayPaymentRequestResponse>

setLogLevel#

Set the verbosity of event logging.

Parameters#

NameType
levelLogLevel

Returns: void