Skip to content

collana pay JS Docs v0.1.0


collana pay JS Docs / MollieApplePayOptions

Interface: MollieApplePayOptions

Defined in: types.ts:553

SDK-level options for the Mollie Apple Pay provider (Mollie:ApplePay).

Remarks

Uses the W3C Payment Request API with a pre-fetched Apple Pay session from Mollie. totalAmount and currencyCode are required.

Your onClick callback must return checkoutData containing:

  • data: base64-encoded Apple Pay session from the Mollie /wallets/applepay/sessions endpoint.
  • returnUrl: backend endpoint that receives the serialised PaymentResponse and completes the Mollie payment.
  • merchantIdentifier: the human-readable Apple Pay merchant identifier (e.g. 'merchant.com.example').

Example

ts
const mollieApplePay: ProviderButtonConfig<'Mollie:ApplePay'> = {
  providerProtocolType: 'Mollie',
  paymentMethodType: 'ApplePay',
  container: '#mollie-applepay-container',
  style: { buttonstyle: 'black', type: 'buy' },
  options: {
    totalAmount: 1000,
    currencyCode: 'EUR',
    countryCode: 'DE',
  },
};

Properties

countryCode?

optional countryCode?: string

Defined in: types.ts:561

ISO 3166-1 alpha-2 country code for the merchant (e.g. 'US', 'DE'). Defaults to 'DE'.


currencyCode

currencyCode: string

Defined in: types.ts:559

ISO 4217 currency code (e.g. 'EUR', 'USD').


requiredBillingContactFields?

optional requiredBillingContactFields?: string[]

Defined in: types.ts:572

Apple Pay contact fields required for billing (e.g. ['postalAddress', 'phone', 'email']).


requiredShippingContactFields?

optional requiredShippingContactFields?: string[]

Defined in: types.ts:570

Apple Pay contact fields required for shipping (e.g. ['postalAddress', 'phone', 'email']).

Remarks

Only relevant when the merchant needs shipping information.


supportedCountries?

optional supportedCountries?: string[]

Defined in: types.ts:580

ISO 3166-1 alpha-2 country codes that are valid for shipping.

Remarks

When provided, onshippingcontactselected will reject addresses from countries not in this list with an Apple Pay error.


supportedNetworks?

optional supportedNetworks?: string[]

Defined in: types.ts:563

Card networks accepted by the merchant.

Default Value

['amex', 'discover', 'masterCard', 'visa']


totalAmount

totalAmount: number

Defined in: types.ts:557

Transaction amount in minor units (e.g. 1000 = €10.00).

CollanaPay SDK Documentation