New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@capacitor-community/apple-pay

Package Overview
Dependencies
Maintainers
54
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@capacitor-community/apple-pay

Capacitor Plugin used to enable Apple Pay in an Application

latest
Source
npmnpm
Version
5.0.1
Version published
Weekly downloads
0
Maintainers
54
Weekly downloads
 
Created
Source


Apple Pay

@capacitor-community/apple-pay

Capacitor Plugin used to enable Apple Pay in an Application

Maintainers

MaintainerGitHubSocial
Capacitor Communitycapacitor-community

Documentation

Installation

npm install @capacitor-community/apple-pay
npx cap sync

Demo

A working example can be found in the example-app directory.

API

setLogLevel(...)

setLogLevel(level: LogLevel) => void

Set the verbosity of event logging.

ParamType
levelLogLevel

canMakePayments(...)

canMakePayments(options: ApplePayAvailabilityOptions) => Promise<ApplePayCanMakePaymentsResponse>

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

ParamType
optionsApplePayAvailabilityOptions

Returns: Promise<ApplePayCanMakePaymentsResponse>

makePaymentRequest(...)

makePaymentRequest(request: ApplePayRequest) => Promise<ApplePayPaymentRequestResponse>

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

ParamType
requestApplePayRequest

Returns: Promise<ApplePayPaymentRequestResponse>

Interfaces

ApplePayCanMakePaymentsResponse

The response object from {@link ApplePay.canMakePayments}

PropTypeDescription
canMakePaymentsboolean- Type: boolean Whether or not the device can make payments.

ApplePayAvailabilityOptions

A config object for {@link ApplePay.canMakePayments}

PropTypeDescription
merchantIdentifierstring- Type: string The merchant identifier you registered with Apple for use with Apple Pay.
supportedNetworksApplePaySupportedNetwork[]- Type: {@link ApplePaySupportedNetwork} An array of supported networks that will be supported.

ApplePayPaymentRequestResponse

The response object from {@link ApplePay.makePaymentRequest}

PropTypeDescription
successboolean- Type: boolean Whether or not the payment request was successful.
dataany- Type: any The data response from the merchant validation server.

ApplePayRequest

PropTypeDescription
version1 | 2 | 5 | 4 | 3- Type: 1 | 2 | 3 | 4 | 5 The version of Apple Pay the app supports.
merchantValidationApplePayMerchantValidation- Type: {@link ApplePayMerchantValidation} An object containing merchant validation settings.
paymentAuthorizationApplePayPaymentAuthorization- Type: {@link ApplePayPaymentAuthorization} An object containing merchant payment authorization settings.
requestApplePayPaymentRequest- Type: {@link ApplePayPaymentRequest} The payment request object.

ApplePayMerchantValidation

An object containing settings for connecting with your merchant validation server.

PropTypeDescription
urlstring- Type: string The url to your merchant validation server. If your application will only be used natively then this value can be set to undefined.
paramsApplePayMerchantValidationParams- Type: {@link ApplePayMerchantValidationParams} Additional params that will be POSTed to the the merchant validation server.

ApplePayMerchantValidationParams

An object containing request parameters for server-side merchant validation.

PropTypeDescription
merchantIdentifierstring- Type: string The merchant identifier you registered with Apple for use with Apple Pay.
displayNamestring- Type: string The display name of your store, UTF-8, unlocalized, with a max length of 64 characters.
initiative'web' | 'native'- Type: web The type of the app making the request. This value should be set to web. It is ignored when run natively.
initiativeContextstring- Type: string This value should be your fully qualified domain name associated with your Apple Pay Merchant Identity Certificate.

ApplePayPaymentAuthorization

An object containing settings for connecting with your merchant payment authorization server.

PropTypeDescription
urlstring- Type: string The url to your merchant payment authorization server.

ApplePayPaymentRequest

An object describing the payment request, including information about payment processing capabilities, payment amounts and more.

PropTypeDescription
countryCodestring- Type: string The merchant’s two-letter ISO 3166 country code.
currencyCodestring- Type: string The three-letter ISO 4217 currency code for the payment.
merchantCapabilitiesApplePayMerchantCapability[]- Type: {@link ApplePayMerchantCapability} The payment capabilities supported by the merchant.
supportedNetworksApplePaySupportedNetwork[]- Type: {@link ApplePaySupportedNetwork} The payment networks the merchant supports.
lineItemsApplePaySummaryItem[]- Type: {@link ApplePaySummaryItem} A set of line items that explain recurring payments and additional charges and discounts.
totalApplePaySummaryItem- Type: {@link ApplePaySummaryItem} A line item representing the total for the payment.

ApplePaySummaryItem

An object that defines a line item in a payment request.

PropTypeDescriptionDefault
labelstring- Type: string The name of the line item (ex.: product name).
amountstring- Type: string The line item amount.
type'pending' | 'final'- Type: pending | final Whether or not the line item represents a known final cost or an estimated or unknown cost.undefined

Enums

LogLevel

MembersDescription
DEBUGLog events that may be useful during development.
ERROROnly log errors.

ApplePaySupportedNetwork

MembersValueDescription
AMEX'amex'American Express
CARTESBANCAIRES'cartesBancaires'Cartes Bancaires
CHINAUNIONPAY'chinaUnionPay'China Union Pay
DISCOVER'discover'Discover Card
EFTPOS'eftpos'Electronic funds transfer at point of sale
ELECTRON'electron'Visa Electron
ELO'elo'Elo
INTERAC'interac'Interac
JCB'jcb'Japan Credit Bureau
MADA'mada'Saudi Payments Network
MAESTRO'maestro'Maestro Debit Card
MASTERCARD'masterCard'Mastercard
PRIVATELABEL'privateLabel'Store credit and debit cards
VISA'visa'Visa
VPAY'vPay'Visa vPay

ApplePayMerchantCapability

MembersValueDescription
THREEDS'supports3DS'Support the 3D Secure protocol
DEBIT'supportsDebit'Support for debit cards
CREDIT'supportsCredit'Support for credit cards
EMV'supportsEMV'Support for the EMV protocol

Keywords

capacitor

FAQs

Package last updated on 20 Oct 2026

Related posts