collana pay JS Docs / ApplePayOptions
Interface: ApplePayOptions
Defined in: types.ts:736
SDK-level options for Apple Pay providers using the W3C Payment Request API.
Remarks
Used by providers like Computop:ApplePay that implement the Apple Pay flow via the browser's native PaymentRequest API rather than the Apple Pay JS SDK.
Example
const computopApplePay: ProviderButtonConfig<'Computop:ApplePay'> = {
providerProtocolType: 'Computop',
paymentMethodType: 'ApplePay',
container: '#applepay-container',
style: { buttonstyle: 'black', type: 'buy' },
options: {
totalAmount: 19300,
currencyCode: 'USD',
countryCode: 'US',
merchantIdentifier: 'merchant.com.example',
merchantDisplayName: 'Example Shop',
validateMerchantUrl: 'https://api.example.com/applepay/authorizeMerchant',
emailRequired: true,
},
};Properties
billingAddressRequired?
optionalbillingAddressRequired?:boolean
Defined in: types.ts:769
Whether a billing address is required from the payer.
Default Value
false
countryCode
countryCode:
string
Defined in: types.ts:748
ISO 3166-1 alpha-2 country code for the merchant (e.g. 'US', 'DE').
currencyCode
currencyCode:
string
Defined in: types.ts:746
ISO 4217 currency code (e.g. 'USD', 'EUR').
merchantDisplayName
merchantDisplayName:
string
Defined in: types.ts:757
Merchant name shown as the payment line item label in the Apple Pay sheet.
merchantIdentifier
merchantIdentifier:
string
Defined in: types.ts:755
The merchant identifier registered with Apple Pay.
Remarks
Must match the identifier configured in your Apple Developer account.
requestPayerEmail?
optionalrequestPayerEmail?:boolean
Defined in: types.ts:775
Whether the payer's email address is requested.
Default Value
true
requestPayerName?
optionalrequestPayerName?:boolean
Defined in: types.ts:773
Whether the payer's name is requested.
Default Value
true
requestPayerPhone?
optionalrequestPayerPhone?:boolean
Defined in: types.ts:777
Whether the payer's phone number is requested.
Default Value
true
shippingAddressRequired?
optionalshippingAddressRequired?:boolean
Defined in: types.ts:771
Whether a shipping address is required from the payer.
Default Value
false
supportedNetworks?
optionalsupportedNetworks?:string[]
Defined in: types.ts:767
Card networks accepted by the merchant.
Default Value
['amex', 'discover', 'masterCard', 'visa']
totalAmount
totalAmount:
number
Defined in: types.ts:744
Transaction amount in minor units (e.g. 19300 = $193.00).
Remarks
Divided by 100 and formatted to two decimal places for the Payment Request total.amount.value field.
validateMerchantUrl
validateMerchantUrl:
string
Defined in: types.ts:765
URL of your backend endpoint for Apple Pay merchant session validation.
Remarks
The provider POSTs { validationUrl: string } to this endpoint and expects a merchant session object in return, which is passed to event.complete().
