KashierDevelopersKashier Developers
Accept payments

Apple Pay

Offer Apple Pay on your website with the Kashier SDK

Add an Apple Pay button to your website with the Kashier SDK. Customers on Apple devices pay directly from your checkout page.

Note

An Apple Pay payment settles over the card rail (MPGS), so refunds, void and authorize/capture behave the same as a card payment. enable3DS is forced to false — the device cryptogram already carries the authentication, so no separate 3D Secure step runs. Google Pay is not supported.

Prerequisites

Before implementing the Kashier Apple Pay integration, ensure you have:

  1. A website with HTTPS enabled
  2. Provided your website domain to Kashier's team so it can be verified with Apple
  3. The Kashier SDK script

Step 1: Domain registration

Provide your website domain to the Kashier support team for certification with Apple.

Step 2: Certificate installation

After receiving the Apple Pay certificate from Kashier:

  1. Save the certificate file as apple-developer-merchantid-domain-association.txt
  2. Create a .well-known directory in your web server's root directory
  3. Upload the certificate file to this directory
  4. Ensure the file is accessible at: https://your-domain.com/.well-known/apple-developer-merchantid-domain-association.txt

Implementation

After receiving the Apple Pay certificate from Kashier:

Basic integration

Add the following code to your checkout page:

<!-- Apple Pay Button Container -->
<div id="kashier-sdk-id"></div>

<!-- Optional Success Response Container -->
<div id="kashier-success-id"></div>

<!-- Optional Failure Response Container -->
<div id="kashier-failure-id"></div>

<!-- Kashier SDK Script -->
<script src="https://payments.kashier.io/kashier-sdk.js"></script>

<!-- Initialization Script -->
<script>
  kashierSDK.load({
      data: {
          mode: 'test', // Use 'live' for production
          sessionId: "YOUR_SESSION_ID"
      },
      onSuccess: (response) => console.log(response),
      onFailure: (error) => console.log(error),
      locale: 'en',
  });
</script>

HTML elements

Element IDRequiredDescription
kashier-sdk-idYesContainer where the Apple Pay button will be rendered
kashier-success-idNoOptional container for displaying successful payment information
kashier-failure-idNoOptional container for displaying payment failure information

Configuration options

The kashierSDK.load() method accepts a configuration object with the following properties:

Required parameters

ParameterTypeDescription
data.modeStringEnvironment mode: 'test' or 'live'
data.sessionIdStringUnique payment session identifier provided by Kashier's payment session creation API. See payment sessions.

Optional parameters

ParameterTypeDescription
localeStringLanguage for the Apple Pay button: 'en' (English) or 'ar' (Arabic)
onSuccessFunctionCallback function that executes after successful payment completion
onFailureFunctionCallback function that executes after payment failure

Support

For technical support, contact Kashier support at:

On this page